/* ============================================================
   VARIETY STORE JA — MAIN STYLESHEET
   Design: Tropical Modern | Fonts: Playfair Display + DM Sans
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ── Variables ── */
:root {
  --green-900: #2d0a4e;
  --green-800: #5b1a8a;
  --green-700: #7b2fb5;
  --green-600: #9b3ed6;
  --green-500: #b76ee0;
  --green-400: #ce9fec;
  --green-100: #f3e5ff;
  --green-50:  #faf0ff;

  --yellow-500: #f472b6;
  --yellow-400: #f9a8d4;
  --yellow-300: #fce7f3;
  --yellow-100: #fdf2f8;

  --white: #ffffff;
  --off-white: #f9f9f5;
  --gray-100: #f2f2ef;
  --gray-200: #e5e5e0;
  --gray-400: #9e9e9a;
  --gray-600: #5c5c58;
  --gray-800: #2a2a28;
  --black: #111110;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --nav-height: 64px;
  --nav-height-mobile: 48px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);

  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--gray-800);
  line-height: 1.6;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 5vw, 3.2rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { color: var(--gray-600); }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3.5rem 0; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { color: var(--green-800); margin-bottom: 0.5rem; }
.section-header .underline {
  width: 60px; height: 3px;
  background: var(--yellow-500);
  margin: 0.5rem auto 0;
  border-radius: var(--radius-pill);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--green-600) 0%, var(--green-800) 100%);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(91,26,138,0.35);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--green-700) 0%, var(--green-900) 100%); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(91,26,138,0.45); }
.btn-yellow {
  background: linear-gradient(135deg, var(--yellow-400) 0%, var(--yellow-500) 100%);
  color: var(--green-900);
  box-shadow: 0 2px 8px rgba(244,114,182,0.3);
}
.btn-yellow:hover { background: linear-gradient(135deg, var(--yellow-300) 0%, var(--yellow-400) 100%); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--green-700);
  color: var(--green-700);
}
.btn-outline:hover { background: var(--green-700); color: var(--white); }
.btn-whatsapp {
  background: #25d366;
  color: var(--white);
  box-shadow: 0 2px 8px rgba(37,211,102,0.35);
}
.btn-whatsapp:hover { background: #1ebe5d; transform: translateY(-1px); }
.btn-block { width: 100%; display: flex; }
.btn-add-cart {
  background: linear-gradient(135deg, var(--green-600) 0%, var(--green-800) 100%);
  color: var(--white);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  width: 100%;
  transition: all var(--transition);
  box-shadow: 0 2px 6px rgba(91,26,138,0.25);
  border: 2px solid var(--yellow-500);
}
.btn-add-cart:hover { background: linear-gradient(135deg, var(--green-700) 0%, var(--green-900) 100%); box-shadow: 0 4px 12px rgba(91,26,138,0.35); }
.btn-danger { background: #e53935; color: var(--white); }
.btn-danger:hover { background: #c62828; }

/* ── Navigation ── */
#main-nav {
  position: sticky; top: 0; z-index: 1000;
  background: var(--white);
  box-shadow: 0 4px 20px rgba(91,26,138,0.1), 0 1px 0 rgba(91,26,138,0.08);
  height: var(--nav-height);
  border-bottom: 3px solid var(--yellow-500);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.nav-logo { display: flex; align-items: center; flex: 0 0 auto; }
.nav-logo img { height: 40px; max-width: 140px; width: auto; object-fit: contain; }
.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green-800);
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
}
.nav-link {
  color: var(--green-700);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  transition: all var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--green-800);
  background: var(--green-100);
}
.nav-link.active { color: var(--green-800); }
.nav-cart {
  position: relative;
  color: var(--green-700);
  display: flex; align-items: center;
  padding: 0.4rem;
  border-radius: 50%;
  transition: background var(--transition);
}
.nav-cart:hover { background: var(--green-100); }
.cart-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--yellow-500);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--white);
}
.nav-hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  padding: 0.4rem;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--green-700);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-right {
  display: flex; align-items: center; gap: 0.25rem; flex-shrink: 0;
}
.nav-close {
  display: none;
  color: var(--green-700);
  font-size: 1.1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--green-100);
  align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}
.nav-close:hover { background: var(--green-100); color: var(--green-900); }

/* ── Scrolling Banner ── */
#scroll-banner {
  background: var(--yellow-500);
  color: var(--green-900);
  overflow: hidden;
  padding: 0.55rem 0;
  font-size: 0.85rem;
  font-weight: 600;
}
.banner-track {
  display: flex; align-items: center; gap: 1.5rem;
  animation: marquee 30s linear infinite;
  white-space: nowrap;
  width: max-content;
}
.banner-item { flex-shrink: 0; }
.banner-sep { color: var(--green-700); font-size: 0.7rem; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Hero Carousel ── */
#hero-carousel {
  position: relative;
  overflow: hidden;
  height: 70vh;
  min-height: 400px;
  max-height: 700px;
  background: var(--green-900);
  border-bottom: 4px solid var(--yellow-500);
}
.carousel-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex;
}
.carousel-slide.active { opacity: 1; z-index: 1; }
.slide-media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(45,10,78,0.3) 0%, rgba(45,10,78,0.7) 100%);
  z-index: 2;
}
.slide-content {
  position: relative; z-index: 3;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  width: 100%; padding: 2rem 1.5rem;
  color: var(--white);
}
.slide-headline {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  color: var(--white);
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
  margin-bottom: 1rem;
  line-height: 1.15;
}
.slide-subtext {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: rgba(255,255,255,0.9);
  max-width: 600px;
  margin-bottom: 1.5rem;
}
.carousel-btn {
  position: absolute; top: 50%; z-index: 10;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 2rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: background var(--transition);
  border: 1px solid rgba(255,255,255,0.2);
}
.carousel-btn:hover { background: rgba(255,255,255,0.3); }
.carousel-btn.prev { left: 1rem; }
.carousel-btn.next { right: 1rem; }
.carousel-dots {
  position: absolute; bottom: 1.25rem; left: 50%;
  transform: translateX(-50%); z-index: 10;
  display: flex; gap: 0.5rem;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.45);
  transition: all var(--transition);
}
.dot.active { background: var(--yellow-500); width: 24px; border-radius: 4px; }

/* ── Page Hero ── */
#page-hero {
  height: 45vh; min-height: 280px; max-height: 500px;
  background-size: cover; background-position: center;
  background-color: var(--green-800);
  position: relative; display: flex;
  border-bottom: 4px solid var(--yellow-500);
}

/* ── Product Grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.product-card {
  background: linear-gradient(160deg, #ffffff 0%, #f7f5f0 100%);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid var(--green-500);
}
.product-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0,0,0,0.13), 0 4px 8px rgba(0,0,0,0.07);
  border-color: var(--green-600);
}
.product-img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--gray-100);
  border-radius: calc(var(--radius-lg) - 2px) calc(var(--radius-lg) - 2px) 0 0;
}
.product-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.06); }
.product-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400);
  background: linear-gradient(135deg, var(--green-50) 0%, var(--green-100) 100%);
}
.product-img-placeholder.large { min-height: 240px; }
.badge-featured {
  position: absolute; top: 0.5rem; left: 0.5rem;
  background: var(--yellow-500);
  color: var(--green-900);
  font-size: 0.65rem; font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.product-info { padding: 0.9rem; border-top: 2px solid var(--yellow-500); }
.product-name {
  font-family: var(--font-body);
  font-size: 0.92rem; font-weight: 700;
  color: var(--gray-800); margin-bottom: 0.3rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.product-price {
  font-size: 1rem; font-weight: 700;
  color: var(--green-700); margin-bottom: 0.6rem;
}

/* ── Product Card Quick-Add Overlay ── */
.product-quick-add {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(45,10,78,0.92) 0%, rgba(45,10,78,0.5) 70%, transparent 100%);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0.75rem 0.6rem 0.65rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}
.product-card:hover .product-quick-add {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.btn-quick-add {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  background: var(--yellow-500);
  color: var(--green-900);
  font-family: var(--font-body);
  font-size: 0.78rem; font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  border: none; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
  width: 100%;
}
.btn-quick-add:hover { background: var(--yellow-400); transform: scale(1.03); }
/* On touch devices, always show the quick-add */
@media (hover: none) {
  .product-quick-add {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    background: linear-gradient(to top, rgba(45,10,78,0.85) 0%, transparent 80%);
  }
}

/* ── Filter Bar ── */
#filter-bar {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 1.25rem 0 0.5rem;
}
.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--green-200, #c8e6c9);
  color: var(--green-700);
  font-size: 0.82rem; font-weight: 600;
  background: var(--white);
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--green-600); }
.filter-btn.active {
  background: var(--green-700);
  color: var(--white);
  border-color: var(--green-700);
}

/* ── Empty State ── */
.empty-state {
  text-align: center; padding: 4rem 1rem;
  grid-column: 1 / -1;
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state p { color: var(--gray-400); font-size: 1rem; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(4px);
  overflow-y: auto;
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 680px;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  animation: slideUp 0.25s ease;
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 10;
  width: 32px; height: 32px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; color: var(--gray-600);
  transition: all var(--transition);
}
.modal-close:hover { background: var(--gray-200); }
.modal-body {
  display: grid; grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
}
.modal-gallery {}
.modal-main-img img, .modal-main-img video {
  width: 100%; border-radius: var(--radius-md);
  aspect-ratio: 1; object-fit: cover;
}
.modal-thumbs {
  display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap;
}
.modal-thumb {
  width: 60px; height: 60px; border-radius: var(--radius-sm);
  object-fit: cover; cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}
.modal-thumb.active { border-color: var(--green-600); }
.video-thumb {
  background: var(--green-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--green-700); font-size: 1.2rem;
  border-radius: var(--radius-sm);
}
.modal-details { display: flex; flex-direction: column; gap: 0.75rem; }
.modal-title { font-size: 1.4rem; color: var(--green-900); }
.modal-price { font-size: 1.5rem; font-weight: 700; color: var(--green-600); }
.modal-desc { color: var(--gray-600); font-size: 0.95rem; line-height: 1.7; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Cart Toast ── */
.cart-toast {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--green-800);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  white-space: nowrap;
}
.cart-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ── Cart Page ── */
.cart-page { padding: 2rem 0 4rem; min-height: 60vh; }
.cart-header { margin-bottom: 2rem; }
.cart-header h1 { color: var(--green-800); }
.cart-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.cart-items { display: flex; flex-direction: column; gap: 1rem; }
.cart-item {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex; gap: 1rem; align-items: flex-start;
  box-shadow: var(--shadow-sm);
  min-width: 0; overflow: hidden;
}
.cart-item-img {
  width: 72px; height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0;
  background: var(--gray-100);
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.2rem; overflow-wrap: break-word; word-break: break-word; }
.cart-item-price { font-size: 0.9rem; color: var(--green-600); font-weight: 600; }
.qty-control { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.qty-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gray-100);
  font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.qty-btn:hover { background: var(--green-100); }
.qty-num { font-weight: 700; font-size: 0.95rem; min-width: 24px; text-align: center; }
.cart-remove { color: #e53935; font-size: 0.8rem; font-weight: 600; margin-top: 0.3rem; display: inline-block; }
.cart-remove:hover { text-decoration: underline; }
.cart-summary {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  box-shadow: var(--shadow-sm);
  height: fit-content;
  min-width: 0; width: 100%;
}
.cart-summary h2 { font-size: 1.2rem; color: var(--green-800); margin-bottom: 1.25rem; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 0.75rem; font-size: 0.95rem; }
.summary-row.total { font-weight: 700; font-size: 1.15rem; color: var(--green-800); padding-top: 0.75rem; border-top: 2px solid var(--gray-100); }
.empty-cart { text-align: center; padding: 5rem 1rem; }
.empty-cart .empty-icon { font-size: 4rem; margin-bottom: 1rem; }
.empty-cart h2 { color: var(--green-800); margin-bottom: 0.5rem; }
.empty-cart p { margin-bottom: 1.5rem; }

/* ── Checkout Modal ── */
.checkout-modal-box {
  max-width: 520px;
  padding: 2rem;
}
.checkout-modal-box h2 {
  font-size: 1.5rem; color: var(--green-800);
  margin-bottom: 1.5rem; text-align: center;
}
.checkout-steps { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
.checkout-step { display: flex; gap: 0.75rem; align-items: flex-start; }
.step-num {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--green-700);
  color: var(--white);
  font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.checkout-step p { font-size: 0.9rem; color: var(--gray-600); padding-top: 0.3rem; }

/* ── Footer ── */
#main-footer {
  background: var(--green-900);
  color: rgba(255,255,255,0.85);
  padding-top: 3rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  display: grid; grid-template-columns: 1fr;
  gap: 2rem;
}
.footer-logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700;
  color: var(--yellow-500);
  margin-bottom: 0.5rem;
}
.footer-tagline { color: rgba(255,255,255,0.6); font-size: 0.9rem; margin-bottom: 1rem; }
.footer-socials { display: flex; gap: 0.75rem; }
.footer-socials a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8);
  transition: all var(--transition);
}
.footer-socials a:hover { background: var(--yellow-500); color: var(--green-900); }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 1rem; color: var(--yellow-500);
  margin-bottom: 0.75rem;
}
.footer-col p { font-size: 0.88rem; color: rgba(255,255,255,0.7); margin-bottom: 0.25rem; }
.footer-col a { color: rgba(255,255,255,0.7); transition: color var(--transition); }
.footer-col a:hover { color: var(--yellow-500); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  max-width: 1200px; margin: 0 auto;
}

/* ── Featured Section ── */
.featured-section { padding: 3rem 0; }
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 1rem;
}

/* ── Responsive — Tablet ── */
@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; }
  .featured-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .modal-body { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .cart-item-img { width: 90px; height: 90px; }
  .cart-summary { padding: 1.5rem; }
}

/* ── Mobile — Cart specific ── */
@media (max-width: 479px) {
  .cart-page { padding: 1.25rem 0 3rem; }
  .cart-item { padding: 0.75rem; gap: 0.75rem; }
  .cart-item-img { width: 60px; height: 60px; flex-shrink: 0; }
  .cart-item-name { font-size: 0.88rem; }
  .cart-item-price { font-size: 0.85rem; }
  .cart-summary { padding: 1rem 0.875rem; }
  .coupon-input { font-size: 0.875rem; }
  .coupon-apply-btn { width: 100%; }
  .coupon-input-row { flex-direction: column; }
  .summary-row { font-size: 0.875rem; }
  .summary-row.total { font-size: 1rem; }
}

/* ── Responsive — Desktop ── */
@media (min-width: 1024px) {
  .nav-hamburger, .nav-close { display: none; }
  .nav-links { display: flex !important; position: static !important; background: none !important; flex-direction: row !important; padding: 0 !important; width: auto !important; height: auto !important; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }
  .featured-grid { grid-template-columns: repeat(4, 1fr); }
  .cart-grid { grid-template-columns: 1fr 340px; }
  .footer-inner { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}

/* ── Mobile Nav ── */
@media (max-width: 1023px) {
  #main-nav { height: var(--nav-height-mobile); }
  .nav-logo img { height: 28px; }
  .nav-hamburger { display: flex; }
  .nav-logo-text {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55vw;
  }

  .nav-links {
    position: fixed; inset: 0 0 0 25%;
    background: var(--green-900);
    flex-direction: column;
    gap: 0;
    padding: 0;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    z-index: 1100;
    overflow-y: auto;
    box-shadow: -8px 0 32px rgba(0,0,0,0.35);
  }
  .nav-links.open { transform: translateX(0); }

  /* Drawer header */
  .nav-links::before {
    content: '';
    display: block;
    height: 4px;
    background: var(--yellow-500);
    flex-shrink: 0;
  }

  .nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
  }
  .nav-drawer-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--yellow-500);
    letter-spacing: -0.01em;
  }
  .nav-close { display: flex; }

  /* Nav links */
  .nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    gap: 0.85rem;
    padding: 0.9rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255,255,255,0.82);
    border-radius: 0;
    border-left: 3px solid transparent;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: all var(--transition);
  }
  .nav-link .nav-icon {
    font-size: 1rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.75;
    transition: opacity var(--transition);
  }
  .nav-link:hover {
    color: var(--white);
    background: rgba(255,255,255,0.06);
    border-left-color: var(--yellow-500);
  }
  .nav-link:hover .nav-icon { opacity: 1; }
  .nav-link.active {
    color: var(--yellow-500);
    background: rgba(244,114,182,0.12);
    border-left-color: var(--yellow-500);
  }
  .nav-link.active .nav-icon { opacity: 1; }

  /* Drawer footer actions */
  .nav-drawer-footer {
    margin-top: auto;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    gap: 0.6rem;
  }
  .nav-drawer-footer .btn {
    flex: 1;
    font-size: 0.85rem;
    padding: 0.6rem 0.75rem;
    justify-content: center;
  }
}

/* ── Utility ── */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ============================================================
   SKELETON SCREENS & CARD ENTRANCE ANIMATIONS
   ============================================================ */

/* ── Shimmer keyframe ── */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

/* ── Skeleton base block ── */
.skeleton-block {
  border-radius: var(--radius-sm);
  background: linear-gradient(
    90deg,
    var(--gray-100) 25%,
    var(--gray-200) 50%,
    var(--gray-100) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

/* ── Skeleton card shape — mirrors real .product-card exactly ── */
.product-card--skeleton {
  pointer-events: none;
  /* Suppress the hover lift on skeleton cards */
  cursor: default;
}
.product-card--skeleton:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  border-color: var(--green-500);
}

/* Fill the image area (aspect-ratio: 1 inherited from .product-img-wrap) */
.skeleton-img {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--radius-lg) - 2px) calc(var(--radius-lg) - 2px) 0 0;
}

/* Name line — ~70% width */
.skeleton-name {
  height: 0.82rem;
  width: 70%;
  margin-bottom: 0.55rem;
}

/* Price line — ~45% width */
.skeleton-price {
  height: 1rem;
  width: 45%;
  margin-bottom: 0.75rem;
}

/* Button — full width, matches .btn-add-cart height */
.skeleton-btn {
  height: 2rem;
  width: 100%;
  border-radius: var(--radius-pill);
}

/* ── Staggered card entrance ── */

/*
  Cards start invisible and translated down.
  The IntersectionObserver adds .product-card--visible when
  the card enters the viewport, triggering the transition.
  --card-index is set inline by renderProductGrid() so the
  stagger cap (12 * 80ms = 960ms max) keeps late cards snappy.
*/
.product-card--animate {
  opacity: 0;
  transform: translateY(20px);
  /* No transition yet — wait until visible so off-screen cards
     don't animate before the observer fires. */
}

.product-card--animate.product-card--visible {
  animation: cardEntrance 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  /* Stagger: clamp to 12 cards max so deep-scroll cards don't wait forever */
  animation-delay: calc(min(var(--card-index, 0), 12) * 80ms);
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* After animation completes, ensure the card is fully visible
   (handles cases where animation-fill-mode: both isn't enough
   in some WebKit versions) */
.product-card--animate.product-card--visible {
  /* keep final state after animation */
  animation-fill-mode: both;
}

/* ============================================================
   PRODUCT CARD — DUAL IMAGE HOVER / TOUCH REVEAL
   ============================================================ */

/* Both images sit stacked in the same grid cell */
.product-img-wrap {
  display: grid;
}
.product-img-primary,
.product-img-alt {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

/* Alt image hidden by default */
.product-img-alt {
  opacity: 0;
}

/* ── Desktop: CSS-only hover swap ── */
.product-card--has-alt:hover .product-img-primary {
  opacity: 0;
}
.product-card--has-alt:hover .product-img-alt {
  opacity: 1;
}

/* ── Mobile: JS-driven class swap ── */
.product-card--show-alt .product-img-primary {
  opacity: 0;
}
.product-card--show-alt .product-img-alt {
  opacity: 1;
}

/* ── Dot indicators ── */
.product-img-dots {
  position: absolute;
  bottom: 0.45rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.3rem;
  z-index: 2;
  pointer-events: none;
}
.product-img-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.3s ease, transform 0.3s ease;
}
.product-img-dot--active {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.2);
}

/* Swap active dot on hover (desktop) */
.product-card--has-alt:hover .product-img-dot--active,
.product-card--show-alt   .product-img-dot--active {
  background: rgba(255, 255, 255, 0.45);
  transform: scale(1);
}
.product-card--has-alt:hover .product-img-dot:last-child,
.product-card--show-alt   .product-img-dot:last-child {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.2);
}

/* ── Sale Badge & Price ── */
.badge-sale {
  position: absolute; top: 0.5rem; right: 0.5rem;
  background: #e53935;
  color: var(--white);
  font-size: 0.65rem; font-weight: 800;
  padding: 0.22rem 0.5rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase; letter-spacing: 0.04em;
  z-index: 2;
}
.product-price-wrap { display: flex; align-items: baseline; gap: 0.4rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.product-price { margin-bottom: 0; }
.product-price--sale { color: #e53935; }
.product-price-original { font-size: 0.82rem; color: var(--gray-400); text-decoration: line-through; font-weight: 500; }
.cart-item-price { display: flex; align-items: baseline; gap: 0.4rem; flex-wrap: wrap; }
.cart-item-original { font-size: 0.8rem; color: var(--gray-400); text-decoration: line-through; }

/* ── Coupon Section (Cart) ── */
.coupon-section { margin: 0.75rem 0; padding-top: 0.75rem; border-top: 1px solid var(--gray-100); }
.coupon-input-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.coupon-input {
  flex: 1; padding: 0.6rem 0.9rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-pill);
  font-family: var(--font-body); font-size: 0.9rem;
  color: var(--gray-800); background: var(--white);
  outline: none; transition: border-color var(--transition);
  text-transform: uppercase;
}
.coupon-input:focus { border-color: var(--green-500); }
.coupon-apply-btn { flex-shrink: 0; padding: 0.6rem 1.1rem; font-size: 0.85rem; }
.coupon-feedback { font-size: 0.8rem; margin-top: 0.4rem; min-height: 1.1rem; }
.coupon-feedback--error { color: #e53935; }
.coupon-feedback--success { color: #16a34a; font-weight: 600; }
.coupon-applied {
  display: flex; align-items: center; justify-content: space-between;
  background: #f0fdf4; border: 1.5px solid #86efac;
  border-radius: var(--radius-pill); padding: 0.45rem 0.75rem;
  margin-top: 0.4rem;
}
.coupon-applied-text { font-size: 0.82rem; font-weight: 600; color: #15803d; }
.coupon-remove-btn {
  background: none; border: none; color: #9ca3af;
  font-size: 0.85rem; cursor: pointer; padding: 0 0.2rem;
  transition: color var(--transition);
}
.coupon-remove-btn:hover { color: #e53935; }
.discount-row { color: #16a34a; }
