:root {
  --brown-dark: #3d2b1f;
  --brown: #6b4226;
  --brown-light: #8a5a3c;
  --gold: #c8963e;
  --gold-light: #e6c58a;
  --cream: #faf5ee;
  --cream-2: #f3e9db;
  --text: #2b2119;
  --muted: #7a6b5d;
  --white: #ffffff;
  --danger: #c0392b;
  --success: #2e7d32;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(61, 43, 31, 0.10);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: var(--cream);
  padding-bottom: 60px;
}
h1, h2, h3, h4, .brand-name, .footer-brand {
  font-family: 'Playfair Display', serif;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Topbar */
.topbar {
  background: var(--brown-dark);
  color: var(--gold-light);
  text-align: center;
  font-size: 13px;
  padding: 8px 10px;
  font-weight: 500;
}

/* Header */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--brown-dark);
}
.brand { display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap; }
.brand-name { font-size: 22px; font-weight: 700; color: var(--brown-dark); letter-spacing: 1px; }
.brand-tag { font-size: 10px; color: var(--gold); letter-spacing: 2px; text-transform: uppercase; }
.search-form { flex: 1; display: flex; max-width: 460px; }
.search-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--cream-2);
  border-radius: 20px 0 0 20px;
  outline: none;
  background: var(--cream);
  font-family: inherit;
}
.search-form button {
  border: none;
  background: var(--brown);
  color: #fff;
  padding: 0 16px;
  border-radius: 0 20px 20px 0;
  cursor: pointer;
}
.header-icons { display: flex; gap: 18px; align-items: center; font-size: 20px; }
.header-icons a { position: relative; }
.badge {
  position: absolute; top: -8px; right: -10px;
  background: var(--gold); color: #fff; font-size: 11px;
  border-radius: 50%; padding: 1px 6px; font-weight: 600;
}
.main-nav {
  display: flex;
  gap: 26px;
  padding: 10px 20px;
  background: var(--cream-2);
  font-size: 14px;
  font-weight: 500;
  overflow-x: auto;
}
.main-nav a:hover { color: var(--brown); }

/* Alerts */
.alert { padding: 12px 18px; margin: 14px auto; border-radius: 8px; font-size: 14px; }
.alert-success { background: #e3f3e3; color: var(--success); }
.alert-error { background: #fbe4e1; color: var(--danger); }

/* Hero */
.hero {
  background: linear-gradient(120deg, var(--brown-dark), var(--brown));
  color: #fff;
  border-radius: var(--radius);
  margin: 20px auto;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.hero-text { padding: 40px; }
.hero-text h1 { font-size: 34px; margin: 0 0 12px; line-height: 1.2; }
.hero-text p { color: var(--gold-light); margin-bottom: 22px; }
.hero-img { height: 100%; }
.hero-img img { height: 100%; object-fit: cover; width: 100%; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  text-align: center;
}
.btn-primary { background: var(--brown); color: #fff; }
.btn-primary:hover { background: var(--brown-dark); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--brown); color: var(--brown); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* Feature strip */
.features-strip {
  display: flex; justify-content: space-around; flex-wrap: wrap;
  gap: 20px; margin: 30px auto; text-align: center; font-size: 13px; color: var(--muted);
}
.features-strip div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.features-strip span.ico { font-size: 22px; }

/* Section heading */
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 34px auto 16px;
}
.section-head h2 { margin: 0; font-size: 24px; color: var(--brown-dark); }
.section-head a { color: var(--gold); font-size: 14px; font-weight: 600; }

/* Category grid */
.category-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0 auto 10px;
}
.category-card {
  position: relative; border-radius: var(--radius); overflow: hidden; height: 200px;
  box-shadow: var(--shadow);
}
.category-card img { width: 100%; height: 100%; object-fit: cover; }
.category-card .overlay {
  position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.65), transparent 60%);
  display: flex; align-items: flex-end; padding: 16px; color: #fff;
}
.category-card h3 { margin: 0 0 4px; font-size: 17px; }
.category-card small { color: var(--gold-light); }

/* Product grid */
.product-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 0 auto 30px;
}
.product-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; position: relative; transition: transform .15s;
}
.product-card:hover { transform: translateY(-4px); }
.product-card .fav-btn {
  position: absolute; top: 10px; right: 10px; background: #fff; border-radius: 50%;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); border: none; cursor: pointer; font-size: 16px; z-index: 2;
}
.product-card .fav-btn.active { color: var(--danger); }
.product-thumb { height: 200px; overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info { padding: 14px; }
.product-info h4 { margin: 0 0 6px; font-size: 15px; }
.rating { color: var(--gold); font-size: 13px; margin-bottom: 6px; }
.price-row { display: flex; align-items: center; gap: 8px; }
.price { font-weight: 700; color: var(--brown-dark); }
.price-old { text-decoration: line-through; color: var(--muted); font-size: 13px; }
.badge-sale { background: var(--danger); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.product-info .btn { margin-top: 10px; width: 100%; }

/* Product detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 30px auto; }
.gallery-main { border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; box-shadow: var(--shadow); }
.gallery-main img { width: 100%; height: 460px; object-fit: cover; }
.thumb-row { display: flex; gap: 10px; }
.thumb { width: 70px; height: 70px; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; }
.thumb.active { border-color: var(--gold); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-title { font-size: 26px; margin: 0 0 8px; }
.pd-price { font-size: 24px; font-weight: 700; color: var(--brown-dark); margin: 12px 0; }
.pd-badges { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.pd-badge { background: var(--cream-2); padding: 8px 14px; border-radius: 8px; font-size: 12px; text-align: center; }
.size-options { display: flex; gap: 10px; margin: 10px 0 20px; flex-wrap: wrap; }
.size-option { border: 1.5px solid var(--brown-light); padding: 8px 16px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.size-option.active { background: var(--brown); color: #fff; border-color: var(--brown); }
.pd-actions { display: flex; gap: 12px; margin-top: 10px; }
.pd-actions form { flex: 1; }
.qty-box { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--cream-2); border-radius: 8px; overflow: hidden; }
.qty-stepper button { border: none; background: var(--cream-2); width: 34px; height: 34px; cursor: pointer; font-size: 16px; }
.qty-stepper input { width: 44px; border: none; text-align: center; font-size: 14px; }
.discount-hint { background: #fff6e6; border: 1px dashed var(--gold); padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-top: 14px; }

/* Category filter tabs */
.filter-tabs { display: flex; gap: 20px; overflow-x: auto; margin: 20px auto; border-bottom: 1px solid var(--cream-2); padding-bottom: 4px; }
.filter-tabs a { padding: 8px 4px; white-space: nowrap; color: var(--muted); font-weight: 500; }
.filter-tabs a.active { color: var(--brown-dark); border-bottom: 2px solid var(--gold); }

/* Cart */
.cart-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; margin: 30px auto; align-items: start; }
.cart-item { display: flex; gap: 14px; background: #fff; border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); margin-bottom: 14px; align-items: center; }
.cart-item img { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; }
.cart-item .info { flex: 1; }
.cart-item .remove { color: var(--danger); font-size: 13px; background: none; border: none; cursor: pointer; }
.summary-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.summary-row.total { font-weight: 700; font-size: 17px; border-top: 1px solid var(--cream-2); padding-top: 12px; margin-top: 12px; }
.summary-row.discount { color: var(--success); }
.coupon-box { display: flex; gap: 8px; margin: 14px 0; }
.coupon-box input { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid var(--cream-2); }

/* Forms */
.form-card { max-width: 460px; margin: 40px auto; background: #fff; padding: 34px; border-radius: var(--radius); box-shadow: var(--shadow); }
.form-card h2 { margin-top: 0; text-align: center; color: var(--brown-dark); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--brown-dark); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--cream-2); border-radius: 8px; font-family: inherit; font-size: 14px;
}
.form-note { text-align: center; font-size: 13px; margin-top: 16px; color: var(--muted); }

/* Wide forms (checkout) */
.checkout-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; margin: 30px auto; align-items: start; }
.checkout-box { background: #fff; padding: 26px; border-radius: var(--radius); box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Orders / profile lists */
.list-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.order-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.status-pill { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-processing { background: #fff3cd; color: #856404; }
.status-shipped { background: #d1ecf1; color: #0c5460; }
.status-delivered { background: #d4edda; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }

.profile-menu a { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--cream-2); }

/* About / Contact */
.page-hero { background: var(--cream-2); padding: 50px 0; text-align: center; margin-bottom: 20px; }
.page-hero h1 { color: var(--brown-dark); margin: 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin: 30px auto; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin: 30px auto; }
.contact-info-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.contact-info-card p { margin: 10px 0; }

/* Footer */
.site-footer { background: var(--brown-dark); color: #eee0cc; margin-top: 50px; padding-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 30px; padding-bottom: 30px; }
.footer-brand { color: #fff; font-size: 24px; margin-bottom: 10px; }
.site-footer h4 { color: var(--gold-light); margin-bottom: 12px; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
.site-footer a { display: block; margin-bottom: 8px; font-size: 14px; color: #d8c8ae; }
.site-footer a:hover { color: #fff; }
.social-links { display: flex; gap: 12px; margin-top: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 0; text-align: center; font-size: 13px; color: #b8a58a; }

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed; bottom: 76px; right: 20px; background: #25d366; width: 56px; height: 56px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.3); z-index: 999;
}

/* Exit intent popup */
.exit-popup-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none;
  align-items: center; justify-content: center; z-index: 1000; padding: 20px;
}
.exit-popup-overlay.open { display: flex; }
.exit-popup { background: #fff; border-radius: var(--radius); max-width: 380px; width: 100%; padding: 30px; text-align: center; position: relative; }
.exit-popup-close { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 22px; cursor: pointer; }
.exit-popup h3 { color: var(--brown-dark); margin-top: 0; }
.exit-popup-code {
  background: var(--cream-2); border: 2px dashed var(--gold); font-size: 22px; font-weight: 700;
  letter-spacing: 2px; padding: 12px; border-radius: 8px; margin: 18px 0; color: var(--brown-dark);
}

/* Bottom mobile nav */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
  border-top: 1px solid var(--cream-2); z-index: 500; padding: 6px 0;
}
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--muted); gap: 2px; }
.bottom-nav a.active { color: var(--brown); font-weight: 600; }
.bottom-nav span { font-size: 18px; }

/* Home mini banners */
.mini-banners { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 20px auto; }
.mini-banner { position: relative; border-radius: var(--radius); overflow: hidden; height: 220px; box-shadow: var(--shadow); }
.mini-banner img { width: 100%; height: 100%; object-fit: cover; }
.mini-banner .overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.55), transparent 55%); display: flex; align-items: flex-end; padding: 20px; color: #fff; }

/* Responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-img { height: 220px; }
  .category-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail, .cart-layout, .checkout-layout, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  body { padding-bottom: 70px; }
  .bottom-nav { display: flex; }
  .search-form { display: none; }
  .main-nav { display: none; flex-direction: column; gap: 0; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 0; border-bottom: 1px solid #e8dcc8; }
  .menu-toggle { display: block; }
  .whatsapp-float { bottom: 86px; }
}
@media (max-width: 600px) {
  .category-grid, .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .mini-banners { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
