:root {
  --brand-dark: #2d1810;
  --brand-gold: #c5a55a;
  --brand-cream: #faf5ef;
  --brand-pink: #e8a0b4;
  --btn-gradient: linear-gradient(180deg, #6655ff, #9944cc);
}

body {
  background: var(--brand-cream);
  color: #333;
  margin: 0;
}

.section-title {
  font-family: 'Great Vibes', cursive;
  color: var(--brand-gold);
  text-align: center;
  font-size: 2.5rem;
  margin: 1.5rem 0;
}

/* Nav */
.nav {
  background: var(--brand-dark);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav a {
  color: var(--brand-gold);
  text-decoration: none;
  margin-right: 1rem;
}
.nav-logo {
  font-family: 'Great Vibes', cursive;
  font-size: 1.5rem;
}
.nav-links { display: flex; align-items: center; gap: 1rem; }
.cart-badge {
  background: var(--brand-pink);
  color: #fff;
  border-radius: 50%;
  padding: 0.1rem 0.5rem;
  font-size: 0.8rem;
  margin-left: 0.25rem;
}

/* Hero */
.hero {
  background: var(--brand-dark);
  color: var(--brand-gold);
  text-align: center;
  padding: 3rem 1rem;
}
.hero h1 {
  font-family: 'Great Vibes', cursive;
  font-size: 3rem;
  margin: 0;
}
.hero p { color: #ddd; margin-top: 0.5rem; }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.product-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}
.product-card:hover { transform: translateY(-2px); }
.product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.product-card-body { padding: 0.75rem; }
.product-card-body h3 { margin: 0 0 0.25rem; font-size: 1rem; }

/* Price */
.price-badge {
  display: inline-block;
  border: 2px solid #333;
  padding: 0.15rem 0.6rem;
  font-weight: bold;
  border-radius: 4px;
}

/* Buttons */
.btn-pay {
  background: var(--btn-gradient);
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  width: 100%;
}
.btn-pay:hover { opacity: 0.9; }
.btn-secondary {
  background: var(--brand-dark);
  color: var(--brand-gold);
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
}

/* Category filter */
.category-bar {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.category-bar button {
  padding: 0.4rem 1rem;
  border: 1px solid var(--brand-gold);
  background: transparent;
  color: var(--brand-dark);
  border-radius: 20px;
  cursor: pointer;
}
.category-bar button.active {
  background: var(--brand-gold);
  color: #fff;
}

/* Out of stock */
.out-of-stock {
  opacity: 0.6;
  position: relative;
}
.out-of-stock::after {
  content: 'Out of Stock';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 0.3rem 1rem;
  border-radius: 4px;
}

/* Product detail */
.product-detail {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.product-detail img {
  width: 100%;
  border-radius: 8px;
}
.product-detail .info h1 { font-size: 1.5rem; }
.qty-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}
.qty-control button {
  width: 2rem;
  height: 2rem;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  border-radius: 4px;
}
.qty-control input {
  width: 3rem;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.25rem;
}

/* Cart table */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.cart-table th, .cart-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.cart-table img { width: 60px; border-radius: 4px; }
.cart-summary {
  text-align: right;
  font-size: 1.25rem;
  font-weight: bold;
  margin: 1rem 0;
}

/* Checkout form */
.checkout-wrap {
  max-width: 600px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.checkout-wrap label { display: block; margin: 0.75rem 0 0.25rem; }
.checkout-wrap input, .checkout-wrap textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

/* Login */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-wrap {
  width: 100%;
  max-width: 360px;
  padding: 1rem;
}
.login-wrap .card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.login-wrap label { display: block; margin: 0.75rem 0 0.25rem; }
.login-wrap input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

/* Error message */
.error-msg {
  background: #fee;
  color: #c00;
  padding: 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

/* Footer */
.footer {
  background: var(--brand-dark);
  color: #ccc;
  text-align: center;
  padding: 1.5rem;
  margin-top: 3rem;
}
.footer a { color: var(--brand-gold); }

/* About section */
.about-section, .contact-section {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  text-align: center;
}

/* Gallery */
.gallery {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.gallery img {
  height: 150px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Page content (static pages) */
.page-content {
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  line-height: 1.7;
}
.page-content h3 { margin-top: 1.5rem; }
.page-content ul { padding-left: 1.5rem; }
.page-content li { margin-bottom: 0.4rem; }

/* Contact cards */
.contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
.contact-card {
  background: #fff;
  padding: 1.25rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-align: center;
}
.contact-card h3 { margin: 0 0 0.5rem; color: var(--brand-gold); }

/* Floating cart button */
.cart-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 150;
}
.cart-float-btn {
  background: var(--brand-dark);
  color: var(--brand-gold);
  border: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  font-size: 1.4rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-float-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--brand-pink);
  color: #fff;
  border-radius: 50%;
  min-width: 22px;
  height: 22px;
  font-size: 0.75rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.cart-float-count:empty { display: none; }
.cart-dropdown {
  display: none;
  position: absolute;
  bottom: 100%;
  right: 0;
  background: #fff;
  color: #333;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  min-width: 280px;
  max-width: 340px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.cart-float:hover .cart-dropdown { display: block; }
.cart-dd-empty {
  padding: 1.25rem;
  text-align: center;
  color: #999;
}
.cart-dd-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}
.cart-dd-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.cart-dd-item-info {
  flex: 1;
  font-size: 0.85rem;
  line-height: 1.3;
}
.cart-dd-item-info .name { font-weight: 600; }
.cart-dd-item-info .meta { color: #888; }
.cart-dd-footer {
  padding: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--brand-cream);
  font-weight: bold;
}
.cart-dd-footer a {
  background: var(--btn-gradient);
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
}

/* Cart toast */
.cart-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  background: var(--brand-dark);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(120%);
  transition: transform 0.3s ease;
  z-index: 200;
  max-width: 340px;
}
.cart-toast.show { transform: translateY(0); }
.cart-toast-img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.cart-toast-text { font-size: 0.9rem; line-height: 1.3; }
.cart-toast-text strong { color: var(--brand-gold); }
.cart-toast-link {
  color: var(--brand-gold);
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 600px) {
  .product-detail { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; padding: 1rem; }
}
