/* ── RESET & ROOT ── */
:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface2: #f0ede6;
  --ink: #1a1a18;
  --muted: #8a8880;
  --accent: #c8522a;
  --accent2: #e8b84b;
  --border: #ddd9d0;
  --radius: 12px;
  --shadow: 0 2px 20px rgba(0,0,0,0.07);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --nav-h: 68px;
}

/* ── DARK THEME ── */
body.dark {
  --bg: #0f0f0e;
  --surface: #1a1a18;
  --surface2: #242420;
  --ink: #f0ede6;
  --muted: #6b6966;
  --border: #2e2e2a;
  --shadow: 0 2px 20px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
}

/* Smooth theme transition — skip images/svgs so they don't flash */
body.dark-transitioning *,
body.dark-transitioning *::before,
body.dark-transitioning *::after {
  transition: background-color .28s ease, border-color .28s ease,
              color .22s ease, box-shadow .28s ease !important;
}
body.dark-transitioning img,
body.dark-transitioning svg { transition: none !important; }

/* ── PROFILE DROPDOWN ── */
.profile-wrap {
  position: relative;
}
.profile-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px;
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  z-index: 500;
  opacity: 0; pointer-events: none;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top right;
  transition: opacity .2s ease, transform .2s ease !important;
}
.profile-dropdown.open {
  opacity: 1; pointer-events: all;
  transform: translateY(0) scale(1);
}
.profile-dropdown-header {
  padding: 10px 12px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.profile-dropdown-header p {
  font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 2px;
}
.profile-dropdown-header span {
  font-size: 12px; color: var(--muted);
}
.profile-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  color: var(--ink); background: none; border: none;
  width: 100%; text-align: left; font-family: 'DM Sans', sans-serif;
  transition: background .15s !important;
}
.profile-menu-item:hover { background: var(--surface2); }
.profile-menu-item svg { flex-shrink: 0; }

/* Theme toggle button inside dropdown */
.theme-toggle-btn {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  color: var(--ink); background: var(--surface2);
  border: 1px solid var(--border);
  width: 100%; font-family: 'DM Sans', sans-serif;
  margin-top: 4px;
  transition: background .15s, border-color .15s !important;
}
.theme-toggle-btn:hover { border-color: var(--accent); }
.theme-toggle-left {
  display: flex; align-items: center; gap: 8px;
}
.theme-toggle-pill {
  width: 36px; height: 20px; border-radius: 10px;
  background: var(--border); position: relative;
  transition: background .25s !important; flex-shrink: 0;
}
body.dark .theme-toggle-pill { background: var(--accent); }
.theme-toggle-pill::after {
  content: ''; position: absolute;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px;
  transition: transform .25s !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
body.dark .theme-toggle-pill::after { transform: translateX(16px); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* ════════════════════════════════════
   NAVBAR
════════════════════════════════════ */
nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(247,245,240,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 24px;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 900;
  color: var(--accent); letter-spacing: -0.5px;
  white-space: nowrap; flex-shrink: 0;
}

.search-wrap {
  flex: 1; max-width: 460px; position: relative;
}
.search-wrap input {
  width: 100%; padding: 9px 18px 9px 42px;
  border: 1.5px solid var(--border);
  border-radius: 30px; background: var(--surface);
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  color: var(--ink); outline: none;
  transition: border-color .2s;
}
.search-wrap input:focus { border-color: var(--accent); }
.search-wrap svg {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); opacity: .4;
  pointer-events: none;
}

.nav-links {
  display: flex; align-items: center; gap: 4px; margin-left: auto;
}
.nav-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 30px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  border: none; background: transparent; color: var(--ink);
  transition: background .2s, color .2s; white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
}
.nav-btn:hover, .nav-btn.active { background: var(--surface2); }
.nav-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.cart-badge {
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Hamburger — hidden on desktop */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  align-items: center; gap: 5px;
  width: 40px; height: 40px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--surface);
  cursor: pointer; flex-shrink: 0;
}
.hamburger span {
  display: block; width: 18px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: all .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-overlay {
  display: none; position: fixed; inset: 0; z-index: 150;
  background: rgba(0,0,0,.4); backdrop-filter: blur(2px);
}
.mobile-overlay.show { display: block; }

.mobile-menu {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 160;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px;
  transform: translateY(-110%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-lg);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu .nav-btn {
  justify-content: flex-start; padding: 12px 16px;
  border-radius: var(--radius); font-size: 15px;
  width: 100%;
}

/* ── PAGES ── */
.page { display: none; }
.page.active { display: block; }

/* ════════════════════════════════════
   HERO
════════════════════════════════════ */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink);
  min-height: 480px;
  display: flex; align-items: center;
  padding: 60px 80px;
}
.hero-content { position: relative; z-index: 1; max-width: 560px; }
.hero-tag {
  display: inline-block;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; padding: 5px 14px; border-radius: 30px;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 5vw, 62px); font-weight: 900;
  color: #fff; line-height: 1.1; margin-bottom: 18px;
}
.hero h1 span { color: var(--accent2); }
.hero p { color: rgba(255,255,255,.65); font-size: 17px; margin-bottom: 32px; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  padding: 13px 28px; border-radius: 30px;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 600;
  border: 1px solid var(--accent); cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200,82,42,.35);
  background: var(--ink); color: var(--accent);
}
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--ink);
  padding: 11px 24px; border-radius: 30px;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--border); cursor: pointer;
  transition: background .2s;
}
.btn-outline:hover { background: var(--surface2); }

/* ── WHY US ── */
.why-section { padding: 70px 80px; text-align: center; }
.section-label {
  font-size: 12px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3vw, 42px); font-weight: 700;
  color: var(--ink); margin-bottom: 50px;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}
.why-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 20px; text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.why-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.why-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.why-icon svg { color: #fff; }
.why-card h3 { font-weight: 600; font-size: 16px; margin-bottom: 8px; }
.why-card p { font-size: 14px; color: var(--muted); }

/* ── FEATURED ── */
.featured-section { background: var(--surface2); padding: 70px 80px; }
.featured-banner {
  border-radius: 20px; overflow: hidden;
  background: var(--ink);
  padding: 48px 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: relative;
}
.featured-badge {
  position: absolute; top: 24px; right: 24px;
  background: var(--accent2); color: var(--ink);
  font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 30px;
}
.featured-sale-text {
  font-size: 80px; opacity: .12;
  font-family: 'Playfair Display', serif;
  color: #fff; line-height: 1; user-select: none;
}
.featured-banner h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3vw, 36px); font-weight: 900;
  color: #fff; margin-bottom: 10px;
}
.featured-banner p { color: rgba(255,255,255,.6); margin-bottom: 28px; }

/* ── CATEGORIES ── */
.categories-section { padding: 70px 80px; }
.section-header {
  display: flex; justify-content: space-between;
  align-items: flex-end; margin-bottom: 36px; flex-wrap: wrap; gap: 12px;
}
.cat-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.cat-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 10px 18px; cursor: pointer;
  transition: all .2s; font-weight: 500; font-size: 14px;
}
.cat-chip:hover, .cat-chip.active {
  background: var(--ink); color: #fff; border-color: var(--ink);
}
.cat-chip span { font-size: 20px; }

/* ── NEW PRODUCTS (home) ── */
.new-section { padding: 70px 80px; }
.products-row { display: flex; gap: 20px; flex-wrap: wrap; }

/* ════════════════════════════════════
   PRODUCT CARD
════════════════════════════════════ */
.product-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  width: 230px;
  transition: transform .2s, box-shadow .2s; cursor: pointer;
  position: relative; flex-shrink: 0;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.product-card img {
  width: 100%; height: 200px; object-fit: cover; display: block;
  transition: transform .3s;
}
.product-card:hover img { transform: scale(1.03); }
.product-card .card-body { padding: 14px; }
.product-card .card-name {
  font-weight: 600; font-size: 14px; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.product-card .card-price { color: var(--accent); font-weight: 700; font-size: 16px; }
.product-card .card-rating { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.product-card .card-actions { display: flex; gap: 8px; margin-top: 10px; }

.card-btn {
  flex: 1; padding: 8px; border-radius: 8px; font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--border); background: transparent; cursor: pointer;
  transition: all .2s; font-family: 'DM Sans', sans-serif;
}
.card-btn.fill { background: var(--ink); color: #fff; border-color: var(--ink); }
.card-btn:hover:not(.fill) { background: var(--surface2); }
.card-btn.fill:hover { background: var(--accent); border-color: var(--accent); }

/* Wishlist heart button */
.wishlist-btn {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,.92);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s;
  font-size: 16px; line-height: 1;
  z-index: 2;
}
.wishlist-btn:hover { transform: scale(1.15); }
.wishlist-btn.liked {
  background: #fee2e2;
  border-color: #f87171;
  color: #e53;
}

/* ════════════════════════════════════
   FOOTER
════════════════════════════════════ */
footer {
  background: var(--ink); color: rgba(255,255,255,.65);
  padding: 60px 80px 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 48px;
}
.footer-brand .logo { display: block; margin-bottom: 16px; font-size: 28px; }
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 260px; }
.footer-col h4 {
  color: #fff; font-size: 13px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 14px; transition: color .2s; }
.footer-col ul li a:hover { color: var(--accent2); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px; text-align: center; font-size: 13px;
}

/* ════════════════════════════════════
   PRODUCTS PAGE
════════════════════════════════════ */
.products-page { padding: 24px 40px 40px; }

/* Mobile filter toggle button */
.filter-toggle-btn {
  display: none;
  align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 30px;
  border: 1.5px solid var(--border); background: var(--surface);
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; margin-bottom: 16px;
}

.products-layout { display: flex; gap: 32px; }

.sidebar { width: 240px; flex-shrink: 0; }
.sidebar-close { display: none; }
.sidebar-overlay { display: none; }

.sidebar-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; margin-bottom: 16px;
}
.sidebar-card h3 {
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 16px;
}
.sidebar-search {
  width: 100%; padding: 9px 14px; border: 1.5px solid var(--border);
  border-radius: 8px; font-family: 'DM Sans', sans-serif;
  font-size: 14px; outline: none; margin-bottom: 16px;
  transition: border-color .2s;
}
.sidebar-search:focus { border-color: var(--accent); }
.filter-item {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; cursor: pointer;
}
.filter-item input[type=checkbox] {
  accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer;
}
.filter-item label { font-size: 14px; cursor: pointer; user-select: none; }
.price-range { width: 100%; accent-color: var(--accent); cursor: pointer; }

.products-main { flex: 1; min-width: 0; }
.products-toolbar {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.sort-select {
  padding: 9px 14px; border: 1.5px solid var(--border); border-radius: 8px;
  font-family: 'DM Sans', sans-serif; font-size: 14px; outline: none;
  cursor: pointer; background: var(--surface);
}
.products-grid { display: flex; flex-wrap: wrap; gap: 20px; }

/* ════════════════════════════════════
   PRODUCT DETAIL PAGE
════════════════════════════════════ */
.product-detail-page { padding: 32px 60px; }
.product-detail-layout {
  display: flex; gap: 60px; align-items: flex-start; margin-bottom: 60px;
}
.product-gallery { flex: 0 0 400px; }
.product-gallery img {
  width: 100%; border-radius: 16px; object-fit: cover; display: block;
}
.product-info { flex: 1; }
.product-brand {
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.product-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(22px, 3vw, 32px); font-weight: 700;
  line-height: 1.2; margin-bottom: 14px;
}
.product-price {
  font-size: 28px; font-weight: 700; color: var(--accent); margin-bottom: 14px;
}
.product-rating {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; font-size: 14px; color: var(--muted);
}
.stars { color: var(--accent2); }
.product-summary {
  font-size: 14px; color: var(--muted); line-height: 1.8; margin-bottom: 24px;
}
.detail-controls {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px; margin-bottom: 28px;
}
.size-label {
  font-size: 12px; font-weight: 700; margin-bottom: 10px;
  letter-spacing: 1px; text-transform: uppercase;
}
.size-row { display: flex; gap: 8px; flex-wrap: wrap; }
.size-btn {
  padding: 8px 16px; border-radius: 8px; border: 1.5px solid var(--border);
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s; background: var(--surface);
}
.size-btn.active, .size-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.qty-row {
  display: flex; align-items: center; gap: 10px;
}
.qty-btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--surface);
  cursor: pointer; font-size: 18px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s; font-family: 'DM Sans', sans-serif;
}
.qty-btn:hover { background: var(--surface2); }
.qty-val {
  font-size: 16px; font-weight: 700; min-width: 28px; text-align: center;
}
.action-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* Reviews */
.reviews-section { margin-top: 48px; }
.reviews-layout { display: flex; gap: 40px; align-items: flex-start; flex-wrap: wrap; }
.reviews-left { flex-shrink: 0; width: 260px; }
.rating-graph {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.rating-graph h3 {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--muted); margin-bottom: 18px;
}
.rating-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; font-size: 13px;
}
.rating-bar .bar-track {
  flex: 1; height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden;
}
.rating-bar .bar-fill { height: 100%; background: var(--accent2); border-radius: 4px; }
.delivery-info {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.reviews-list { display: flex; flex-direction: column; gap: 16px; }
.review-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.review-author { font-weight: 600; margin-bottom: 6px; }
.review-text { font-size: 14px; color: var(--muted); }

/* More products carousel */
.more-products-row { display: flex; gap: 16px; align-items: center; }
.more-products-track {
  display: flex; gap: 20px; overflow: hidden; flex: 1;
  scroll-behavior: smooth;
}
/* Cards inside more-products use the same .product-card styles */
.scroll-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--surface);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s; flex-shrink: 0; font-size: 16px;
}
.scroll-btn:hover { background: var(--ink); color: #fff; }

/* ════════════════════════════════════
   ABOUT PAGE
════════════════════════════════════ */
.about-page { padding: 40px 80px; }
.about-hero { border-radius: 20px; overflow: hidden; margin-bottom: 60px; }
.about-hero-inner {
  background: linear-gradient(135deg, #1a1a18, #2e2b22);
  padding: 80px 60px; text-align: center; color: #fff;
}
.about-hero-inner h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 5vw, 52px); font-weight: 900; margin-bottom: 20px;
}
.about-hero-inner p {
  font-size: 17px; color: rgba(255,255,255,.65);
  max-width: 560px; margin: 0 auto;
}
.faq-section { margin-bottom: 60px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 22px 0; }
.faq-q {
  font-weight: 600; font-size: 16px;
  display: flex; justify-content: space-between; cursor: pointer; gap: 12px;
}
.faq-a {
  font-size: 14px; color: var(--muted); margin-top: 12px;
  line-height: 1.8; max-height: 0; overflow: hidden; transition: max-height .3s;
}
.faq-a.open { max-height: 200px; }
.contact-form {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 48px; max-width: 600px; margin: 0 auto 60px;
}
.contact-form h2 {
  font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; margin-bottom: 8px;
}
.contact-form > p { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.form-control {
  width: 100%; padding: 11px 16px; border: 1.5px solid var(--border);
  border-radius: 10px; font-family: 'DM Sans', sans-serif; font-size: 14px;
  outline: none; transition: border-color .2s; background: var(--bg);
}
.form-control:focus { border-color: var(--accent); }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ════════════════════════════════════
   CART PAGE
════════════════════════════════════ */
.cart-page { padding: 40px 80px; }
.cart-page h1 {
  font-family: 'Playfair Display', serif; font-size: 36px;
  font-weight: 700; margin-bottom: 40px;
}
.cart-empty { text-align: center; padding: 80px 20px; }
.cart-empty svg { margin-bottom: 24px; opacity: .3; display: block; margin-left: auto; margin-right: auto; }
.cart-empty h2 {
  font-family: 'Playfair Display', serif; font-size: 28px; margin-bottom: 12px;
}
.cart-empty p { color: var(--muted); margin-bottom: 28px; }
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; }
.cart-steps { display: flex; margin-bottom: 40px; }
.step {
  flex: 1; text-align: center; padding: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  border-bottom: 2px solid var(--border); color: var(--muted);
}
.step.active { border-color: var(--accent); color: var(--accent); }

.cart-items { display: flex; flex-direction: column; gap: 16px; }
.cart-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  display: flex; gap: 16px; align-items: flex-start;
}
.cart-item img {
  width: 80px; height: 80px; object-fit: cover; border-radius: 10px;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.cart-item-meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.cart-item-price { font-weight: 700; color: var(--accent); font-size: 15px; }

/* Cart quantity controls */
.cart-qty-row {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
}
.cart-qty-btn {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1.5px solid var(--border); background: var(--surface);
  cursor: pointer; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s; font-family: 'DM Sans', sans-serif;
  line-height: 1;
}
.cart-qty-btn:hover { background: var(--surface2); }
.cart-qty-num {
  font-size: 14px; font-weight: 700; min-width: 24px;
  text-align: center;
}

.cart-item-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0;
}
.remove-btn {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 12px; transition: color .2s;
  white-space: nowrap;
}
.remove-btn:hover { color: #e53; }

.price-summary {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  position: sticky; top: calc(var(--nav-h) + 16px);
  align-self: flex-start;
}
.price-summary h3 {
  font-family: 'Playfair Display', serif; font-size: 20px;
  font-weight: 700; margin-bottom: 24px;
}
.price-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; font-size: 14px;
}
.price-row.total {
  font-size: 18px; font-weight: 700;
  border-top: 1px solid var(--border); padding-top: 14px; margin-top: 4px;
}
.price-row .label { color: var(--muted); }
.discount-badge { color: #2a9e5a; font-weight: 600; font-size: 13px; }
.checkout-btn {
  width: 100%; margin-top: 24px;
  background: var(--accent); color: #fff;
  padding: 15px; border-radius: 12px;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 700;
  border: none; cursor: pointer; transition: transform .2s, box-shadow .2s;
}
.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200,82,42,.35);
}

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 30px; right: 30px; z-index: 9999;
  background: var(--ink); color: #fff;
  padding: 14px 24px; border-radius: 12px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(80px); opacity: 0;
  transition: all .3s;
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 40px);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast .t-icon { color: var(--accent2); flex-shrink: 0; }

/* ════════════════════════════════════
   SKELETON LOADER
════════════════════════════════════ */
@keyframes pulse { from { opacity:1 } to { opacity:0.45 } }

/* ════════════════════════════════════
   MEDIA QUERIES
════════════════════════════════════ */

/* ── Tablet: ≤ 1024px ── */
@media (max-width: 1024px) {
  nav { padding: 0 24px; gap: 16px; }
  .nav-btn span:not(.cart-badge) { display: none; } /* icon-only on tablet */
  .hero { padding: 50px 40px; }
  .why-section, .featured-section, .categories-section, .new-section { padding: 50px 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-page { padding: 32px 40px; }
  .cart-page { padding: 32px 40px; }
  .product-detail-page { padding: 24px 40px; }
  .products-page { padding: 20px 30px 40px; }
  .cart-layout { grid-template-columns: 1fr 280px; }
}

/* ── Mobile: ≤ 768px ── */
@media (max-width: 768px) {
  :root { --nav-h: 60px; }

  /* Navbar: logo + search + hamburger only */
  nav { padding: 0 16px; gap: 12px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .search-wrap { max-width: none; }

  /* Hero */
  .hero { padding: 40px 24px; min-height: 360px; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 15px; }

  /* Sections */
  .why-section,
  .categories-section,
  .new-section { padding: 40px 20px; }
  .featured-section { padding: 40px 20px; }
  .featured-banner { padding: 32px 24px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .featured-sale-text { display: none; }
  .featured-badge { position: static; display: inline-block; margin-bottom: 12px; }

  .why-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .why-card { padding: 20px 16px; }

  /* Product cards: 2-col grid on mobile */
  .products-row,
  .products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .product-card { width: auto; }
  .product-card img { height: 150px; }

  /* Filter sidebar — slide in from left */
  .filter-toggle-btn { display: flex; }
  .products-page { padding: 16px; }
  .products-layout { position: relative; }

  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 300;
    width: 280px; max-width: 85vw;
    background: var(--bg); overflow-y: auto;
    padding: 20px 0; padding-top: calc(var(--nav-h) + 8px);
    transform: translateX(-110%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-card { margin: 0 16px 16px; }
  .sidebar-close {
    display: block; margin: 0 16px 12px;
    background: none; border: none; cursor: pointer;
    font-size: 14px; font-weight: 600; color: var(--muted);
    text-align: left; padding: 4px 0;
  }
  .sidebar-overlay {
    display: block; position: fixed; inset: 0; z-index: 290;
    background: rgba(0,0,0,.4); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none;
    transition: opacity .3s;
  }
  .sidebar-overlay.show { opacity: 1; pointer-events: all; }

  /* Product detail */
  .product-detail-page { padding: 16px; }
  .product-detail-layout { flex-direction: column; gap: 24px; }
  .product-gallery { flex: none; width: 100%; }
  .product-gallery img { max-height: 320px; width: 100%; object-fit: cover; }
  .product-price { font-size: 22px; }
  .detail-controls { flex-direction: column; gap: 16px; }
  .action-row .btn-primary, .action-row .btn-outline { flex: 1; justify-content: center; }

  /* Reviews */
  .reviews-layout { flex-direction: column; }
  .reviews-left { width: 100%; }

  /* More products — smaller cards */
  .more-products-track { gap: 12px; }

  /* About */
  .about-page { padding: 20px 16px; }
  .about-hero-inner { padding: 40px 24px; }
  .about-hero-inner h1 { font-size: 28px; }

  /* Cart */
  .cart-page { padding: 20px 16px; }
  .cart-page h1 { font-size: 26px; margin-bottom: 24px; }
  .cart-layout { grid-template-columns: 1fr; }
  .price-summary { position: static; }
  .cart-item { flex-wrap: wrap; }
  .cart-steps .step { font-size: 10px; padding: 10px 4px; }

  /* Footer */
  footer { padding: 40px 20px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ── Small mobile: ≤ 420px ── */
@media (max-width: 420px) {
  .products-row,
  .products-grid {
    grid-template-columns: 1fr;
  }
  .product-card { width: 100%; }
  .why-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 28px 20px; }
}

/* ════════════════════════════════════
   VIEW DETAILS BUTTON (cart)
════════════════════════════════════ */
.view-details-btn {
  background: none; border: 1.5px solid var(--border);
  border-radius: 8px; padding: 6px 12px;
  font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 600;
  cursor: pointer; color: var(--accent);
  transition: background .15s, border-color .15s !important;
  white-space: nowrap;
}
.view-details-btn:hover {
  background: var(--surface2); border-color: var(--accent);
}

/* ════════════════════════════════════
   DARK MODE OVERRIDES
   (elements that need explicit fixes
   beyond CSS-variable coverage)
════════════════════════════════════ */

/* Hero always stays dark — no change needed */

/* Nav background in dark */
body.dark nav {
  background: rgba(15,15,14,0.97);
}

/* Mobile menu dark */
body.dark .mobile-menu {
  background: var(--surface);
  border-bottom-color: var(--border);
}

/* Featured banner stays dark bg regardless */
body.dark .featured-banner {
  background: #1a1a18;
}

/* About hero stays dark */
body.dark .about-hero-inner {
  background: linear-gradient(135deg, #0f0f0e, #1a1a18);
}

/* Cart qty buttons */
body.dark .cart-qty-btn {
  background: var(--surface2);
  border-color: var(--border);
  color: var(--ink);
}
body.dark .cart-qty-btn:hover { background: var(--border); }

/* Inputs and selects */
body.dark input,
body.dark select,
body.dark textarea {
  background: var(--surface2);
  color: var(--ink);
  border-color: var(--border);
}
body.dark .sidebar-search,
body.dark .sort-select,
body.dark .form-control {
  background: var(--surface2);
  color: var(--ink);
}

/* Scroll buttons */
body.dark .scroll-btn {
  background: var(--surface2);
  color: var(--ink);
}
body.dark .scroll-btn:hover {
  background: var(--surface);
  color: var(--accent);
}

/* Wishlist button */
body.dark .wishlist-btn {
  background: rgba(26,26,24,0.92);
  border-color: var(--border);
  color: var(--ink);
}

/* Hamburger spans */
body.dark .hamburger span { background: var(--ink); }

/* Profile dropdown arrow */
body.dark .profile-dropdown {
  background: var(--surface);
  border-color: var(--border);
}

/* Footer link hover */
body.dark .footer-col ul li a:hover { color: var(--accent2); }

/* ════════════════════════════════════
   DARK MODE — PINNED COLOURS
   (sections that must NOT change theme)
════════════════════════════════════ */

/* ── Footer: always dark, colours unchanged ── */
body.dark footer {
  background: #1a1a18;            /* same as light mode footer */
  color: rgba(255,255,255,.65);   /* same muted white text */
}
body.dark .footer-col h4       { color: #ffffff; }
body.dark .footer-col ul li a  { color: rgba(255,255,255,.65); }
body.dark .footer-col ul li a:hover { color: #e8b84b; }  /* accent2 */
body.dark .footer-bottom {
  border-top-color: rgba(255,255,255,.1);
  color: rgba(255,255,255,.45);
}
body.dark .footer-brand p { color: rgba(255,255,255,.65); }

/* ── Hero: always dark, colours unchanged ── */
body.dark .hero {
  background: #1a1a18;
}
body.dark .hero h1   { color: #ffffff; }
body.dark .hero p    { color: rgba(255,255,255,.65); }
body.dark .hero-tag  { background: #c8522a; color: #ffffff; }

/* ════════════════════════════════════
   DARK MODE — PRODUCT CARD BUTTONS
════════════════════════════════════ */

/* "Add" button — keep the orange accent fill */
body.dark .card-btn:not(.fill) {
  background: #c8522a;
  color: #ffffff;
  border-color: #c8522a;
}
body.dark .card-btn:not(.fill):hover {
  background: #a8421f;
  border-color: #a8421f;
}

/* "View" button (fill class) — dark text on light surface so it's readable */
body.dark .card-btn.fill {
  background: #f0ede6;
  color: #1a1a18;
  border-color: #f0ede6;
}
body.dark .card-btn.fill:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #1a1a18;
}

/* ════════════════════════════════════
   DARK MODE — SIZE BUTTONS
════════════════════════════════════ */

/* Unselected size buttons — light surface with dark text so they're readable */
body.dark .size-btn {
  background: var(--surface2);
  color: var(--ink);
  border-color: var(--border);
}

/* Selected / hovered size button — pin to a true dark bg with dark text */
body.dark .size-btn.active,
body.dark .size-btn:hover {
  background: #f0ede6;   /* warm light fill — visually "selected" */
  color: #1a1a18;        /* always dark text so it's readable */
  border-color: #f0ede6;
}