@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Jost:wght@300;400;500;600&display=swap');

:root {
  --gold: #0c6934;
  --gold-light: #E8C97A;
  --gold-dark: #14a717;
  --cream: #f3f3f3;
  --cream-dark: #EEEBE5;
  --charcoal: #1A1A1A;
  --charcoal-mid: #2D2D2D;
  --muted: #888580;
  --border: #dddad591;
  --white: #FFFFFF;
  --success: #4CAF50;
  --danger: #C0392B;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06), 0 2px 12px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 8px 32px rgba(0,0,0,0.05);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
  --radius: 14px;
  --radius-sm: 8px;
  --transition: all 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Jost', -apple-system, sans-serif;
}

[data-theme="dark"] {
  --cream: #141210;
  --cream-dark: #1E1C18;
  --charcoal: #F0EBE1;
  --charcoal-mid: #D4CFC7;
  --muted: #9A9690;
  --border: #302E2A;
  --white: #201E1B;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.25), 0 2px 12px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35), 0 8px 32px rgba(0,0,0,0.25);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--cream-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ---- PROMO BANNER ---- */
.promo-banner {
  background: var(--charcoal);
  color: rgba(255,255,255,0.85);
  text-align: center;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* ---- NAVBAR ---- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 64px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-logo { height: 40px; width: auto; object-fit: contain; }

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-icon-btn {
  width: 38px; height: 38px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
  position: relative;
  text-decoration: none;
}

.nav-icon-btn:hover { background: var(--cream-dark); color: var(--charcoal); }

.badge {
  position: absolute;
  top: 3px; right: 3px;
  background: var(--charcoal);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ---- SOCIAL OVERLAY ---- */
.socials-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,26,26,0.95);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transform: translateX(-100%);
  transition: transform 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.socials-overlay.visible { transform: translateX(0); }

.socials-overlay .close-btn {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 22px;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  background: none;
  border: none;
  transition: var(--transition);
}
.socials-overlay .close-btn:hover { color: white; }

.social-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 40px;
  border-radius: 10px;
  font-size: 15px;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  color: white;
  width: 240px;
  justify-content: center;
  transition: var(--transition);
  letter-spacing: 0.3px;
}
.social-link:hover { transform: translateY(-2px); opacity: 0.9; }
.social-link.wa { background: #25D366; }
.social-link.ig { background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5); }
.social-link.tt { background: #111; border: 1px solid #333; }

/* ---- HERO CAROUSEL ---- */
.hero {
  position: relative;
  overflow: hidden;
  height: 68vh;
  min-height: 380px;
  max-height: 640px;
}

.slides { display: flex; height: 100%; transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94); }

.slide { min-width: 100%; position: relative; overflow: hidden; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(26,26,26,0.72) 0%, rgba(26,26,26,0.15) 55%, transparent 100%);
}

.slide-caption {
  position: absolute;
  bottom: 44px; left: 40px; right: 40px;
  color: white;
}
.slide-caption h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 8px;
}
.slide-caption p {
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 300;
  opacity: 0.85;
  max-width: 420px;
}
.btn-hero {
  display: inline-block;
  margin-top: 18px;
  padding: 11px 28px;
  background: white;
  color: var(--charcoal);
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  transition: var(--transition);
}
.btn-hero:hover { background: var(--gold); color: white; }

.carousel-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 6px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  color: white; font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  z-index: 10;
  backdrop-filter: blur(4px);
}
.carousel-nav:hover { background: rgba(255,255,255,0.32); transform: translateY(-50%) scale(1.05); }
.carousel-nav.prev { left: 16px; }
.carousel-nav.next { right: 16px; }

.carousel-dots { position: absolute; bottom: 16px; right: 20px; display: flex; gap: 6px; }
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  cursor: pointer; transition: var(--transition); border: none;
}
.dot.active { background: white; width: 20px; border-radius: 4px; }

/* ---- SEARCH ---- */
.search-section {
  padding: 20px 20px 0;
  max-width: 640px;
  margin: 0 auto;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 16px;
  gap: 10px;
  transition: var(--transition);
}
.search-bar:focus-within { border-color: var(--charcoal); }
.search-bar i { color: var(--muted); font-size: 14px; }
.search-bar input {
  flex: 1; border: none; background: transparent;
  padding: 13px 0;
  font-family: var(--font-body); font-size: 14px;
  color: var(--charcoal); outline: none;
}
.search-bar input::placeholder { color: var(--muted); }
.search-bar button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 4px; transition: var(--transition); }
.search-bar button:hover { color: var(--charcoal); }

/* ---- SECTION TITLE ---- */
.section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}

/* ---- CATEGORIES STRIP ---- */
.categories-section { padding: 24px 20px 12px; }

.categories-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.categories-scroll::-webkit-scrollbar { display: none; }

.cat-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}
.cat-chip:hover { transform: translateY(-2px); }

.cat-icon {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--charcoal);
  transition: var(--transition);
}
.cat-chip:hover .cat-icon { border-color: var(--charcoal); background: var(--cream-dark); }

.cat-chip span {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.3px;
}

/* ---- PRODUCT GRID ---- */
.products-section { padding: 8px 16px 120px; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 580px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .products-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .products-grid { grid-template-columns: repeat(5, 1fr); } }

/* ---- PRODUCT CARD ---- */
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #C8C5BF; }

.card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--cream-dark);
}
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.55s ease; }
.product-card:hover .card-img-wrap img { transform: scale(1.05); }

.card-overlay {
  position: absolute; inset: 0;
  background: rgba(26,26,26,0.25);
  opacity: 0; transition: var(--transition);
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 16px;
}
.product-card:hover .card-overlay { opacity: 1; }

.btn-quick-view {
  background: white;
  color: var(--charcoal);
  border: none;
  border-radius: 6px;
  padding: 8px 20px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-quick-view:hover { background: var(--charcoal); color: white; }

.wishlist-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 32px; height: 32px;
  border-radius: 6px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.06);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  color: var(--muted);
  transition: var(--transition);
  z-index: 2;
}
.wishlist-btn:hover, .wishlist-btn.active { color: var(--danger); background: white; }

.product-badges {
  position: absolute;
  top: 8px; left: 8px;
  display: flex; flex-direction: column; gap: 4px;
  z-index: 2;
}
.badge-label {
  font-size: 9px; font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-label.new { background: var(--charcoal); color: white; }
.badge-label.low { background: #E67E22; color: white; }
.badge-label.out { background: var(--danger); color: white; }
.badge-label.soon { background: #7B68EE; color: white; }

.card-info { padding: 10px 12px 12px; }
.card-name {
  font-size: 12px; font-weight: 500; color: var(--charcoal);
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 8px;
}
.card-bottom { display: flex; align-items: center; justify-content: space-between; }
.card-price { font-size: 14px; font-weight: 700; color: var(--charcoal); font-family: var(--font-display); }

.btn-add-card {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--charcoal);
  color: white; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 11px;
  transition: var(--transition);
}
.btn-add-card:hover { background: var(--gold); transform: scale(1.05); }

/* ---- BOTTOM NAV ---- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  z-index: 900;
}

.nav-tab {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; cursor: pointer;
  text-decoration: none;
  color: var(--muted);
  font-size: 10px; font-weight: 500;
  transition: var(--transition);
  padding: 4px 12px;
  border-radius: 8px;
  background: none; border: none;
}
.nav-tab i { font-size: 18px; }
.nav-tab.active, .nav-tab:hover { color: var(--charcoal); }

/* ---- LOADER ---- */
.loader-wrapper {
  display: flex; justify-content: center; align-items: center;
  padding: 80px; grid-column: 1/-1;
}
.spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--charcoal);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: 84px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--charcoal);
  color: white;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 13px; font-weight: 500;
  z-index: 9999; opacity: 0;
  transition: all 0.25s ease;
  white-space: nowrap; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- EMPTY STATE ---- */
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.empty-state i { font-size: 40px; margin-bottom: 16px; display: block; color: var(--border); }
.empty-state h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 6px; color: var(--charcoal); font-weight: 600; }
.empty-state p { font-size: 13px; }

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.product-card { animation: fadeUp 0.35s ease both; }

/* ---- DESKTOP ---- */
@media (min-width: 900px) {
  .navbar { padding: 0 40px; }
  .slide-caption { left: 72px; bottom: 72px; }
  .search-section { padding: 28px 40px 0; max-width: 100%; }
  .search-bar { max-width: 560px; }
  .categories-section { padding: 28px 40px 12px; }
  .products-section { padding: 8px 40px 80px; }
  .bottom-nav { display: none; }
  .navbar .desktop-nav { display: flex !important; }
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 2px;
}
.desktop-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: var(--transition);
}
.desktop-nav a:hover { color: var(--charcoal); background: var(--cream-dark); }

#resultsCount { font-size: 12px; color: var(--muted); padding: 8px 4px; }
