/* ── RESET & ROOT ── */
*, 
*::before, 
*::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

:root {
  --bg: #F7F5F0;
  --surface: #FFFFFF;
  --surface2: #F0EDE6;
  --text-primary: #1A1814;
  --text-secondary: #6B6760;
  --text-muted: #9E9B95;
  --accent: #D4521A;
  --accent-hover: #B84312;
  --accent-light: #FAF0EA;
  --border: rgba(26,24,20,0.12);
  --border-strong: rgba(26,24,20,0.22);
  --card-shadow: 0 2px 12px rgba(0,0,0,0.07);
  --card-shadow-hover: 0 8px 32px rgba(0,0,0,0.13);
  --radius: 14px;
  --radius-sm: 8px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── NAVBAR ── */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 5%;
}
.nav-inner {
  max-width: 1280px;
  margin: auto;
  display: flex;
  align-items: center;
  height: 64px;
  gap: 24px;
}
.logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.logo span { color: var(--accent); }

.search-bar {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.search-bar input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}
.search-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,82,26,0.1);
}
.search-bar svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  position: relative;
}
.cart-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.cart-btn:active { transform: scale(0.97); }
.cart-count {
  background: white;
  color: var(--accent);
  font-weight: 700;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ── HERO BANNER ── */
.hero {
  max-width: 1280px;
  margin: 32px auto 0;
  padding: 0 5%;
}
.hero-inner {
  background: var(--text-primary);
  border-radius: 20px;
  padding: 52px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}
.hero-inner::before {
  content: '';
  position: absolute;
  right: -60px;
  top: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(212,82,26,0.15);
}
.hero-inner::after {
  content: '';
  position: absolute;
  right: 100px;
  bottom: -100px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(212,82,26,0.08);
}
.hero-text { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 18px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  color: white;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 14px;
}
.hero-title em { color: #F4A46A; font-style: normal; }
.hero-sub {
  color: rgba(255,255,255,0.6);
  font-size: 15px;
  margin-bottom: 28px;
  max-width: 380px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.hero-cta:hover { background: var(--accent-hover); transform: translateY(-2px); }
.hero-stats {
  display: flex;
  gap: 32px;
  position: relative;
  z-index: 1;
}
.hero-stat { text-align: center; }
.hero-stat .num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: white;
  display: block;
}
.hero-stat .label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ── MAIN LAYOUT ── */
.main-layout {
  max-width: 1280px;
  margin: 40px auto 60px;
  padding: 0 5%;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

/* ── SIDEBAR ── */
.sidebar {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  position: sticky;
  top: 84px;
}
.sidebar-section { margin-bottom: 28px; }
.sidebar-section:last-child { margin-bottom: 0; }
.sidebar-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.category-list { list-style: none; }
.category-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
  user-select: none;
}
.category-list li:hover { background: var(--bg); color: var(--text-primary); }
.category-list li.active { background: var(--accent-light); color: var(--accent); font-weight: 500; }
.category-list li .cat-icon { font-size: 16px; flex-shrink: 0; }
.cat-count {
  margin-left: auto;
  font-size: 11px;
  background: var(--surface2);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 50px;
}
.category-list li.active .cat-count { background: rgba(212,82,26,0.15); color: var(--accent); }

/* Price slider */
.price-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.price-range-labels strong { color: var(--text-primary); }
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Rating filter */
.rating-opts { display: flex; flex-direction: column; gap: 8px; }
.rating-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  user-select: none;
}
.rating-opt:hover { background: var(--bg); }
.rating-opt.active { background: var(--accent-light); color: var(--accent); font-weight: 500; }
.stars { color: #F5A623; letter-spacing: 1px; font-size: 13px; }

.clear-btn {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 4px;
}
.clear-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* ── PRODUCTS AREA ── */
.products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.products-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}
.products-subtitle { font-size: 14px; color: var(--text-muted); margin-top: 2px; }

.sort-bar { display: flex; align-items: center; gap: 10px; }
.sort-label { font-size: 13px; color: var(--text-muted); }
.sort-select {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  transition: border 0.2s;
}
.sort-select:focus { border-color: var(--accent); }

/* Category tabs */
.cat-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.cat-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.cat-tab:hover { border-color: var(--accent); color: var(--accent); }
.cat-tab.active { background: var(--accent); border-color: var(--accent); color: white; }

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* Product Card */
.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s;
  position: relative;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.35s ease both;
}
.product-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--border-strong);
}

.badge-sale {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 50px;
  z-index: 2;
}
.badge-new {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #1A7A5E;
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 50px;
  z-index: 2;
}
.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
}
.wishlist-btn:hover { background: #FDEAE3; border-color: var(--accent); }
.wishlist-btn.liked { background: #FDEAE3; border-color: var(--accent); }

.card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: var(--surface2);
  transition: transform 0.3s;
}
.product-card:hover .card-image { transform: scale(1.04); }
.card-image-wrap { overflow: hidden; }

.card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.card-category-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.card-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.card-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
}
.card-rating .stars { font-size: 12px; }
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 8px;
}
.card-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.card-price-original {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 4px;
}
.add-cart-btn {
  padding: 9px 14px;
  background: var(--text-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
}
.add-cart-btn:hover { background: var(--accent); transform: translateY(-1px); }
.add-cart-btn:active { transform: scale(0.96); }

/* No results */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 15px;
}
.no-results .icon { font-size: 48px; margin-bottom: 12px; display: block; }

/* Toast */
#toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--text-primary);
  color: white;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 999;
  pointer-events: none;
  max-width: 300px;
}
#toast.show { opacity: 1; transform: translateY(0); }

/* Mobile overlay sidebar toggle */
.sidebar-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 28px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sidebar close btn (mobile) */
.sidebar-close {
  display: none;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  margin-top: 16px;
}

/* Overlay */
#overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 199;
}
#overlay.show { display: block; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 0;
    z-index: 200;
    overflow-y: auto;
  }
  .sidebar.open { display: block; }
  .sidebar-toggle { display: flex; }
  .sidebar-close { display: block; }
  .hero-stats { display: none; }
  .hero-inner { padding: 36px 28px; }
  .sort-bar .sort-label { display: none; }
}
@media (max-width: 600px) {
  .search-bar { display: none; }
  .hero-inner { flex-direction: column; gap: 20px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-name { font-size: 13px; }
  .card-price { font-size: 15px; }
  .add-cart-btn { padding: 8px 10px; font-size: 12px; }
}
