:root {
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --text: #1F2A24;
  --text-muted: #6B7570;
  --accent: #28D3D8;
  --accent-dark: #0E7490;
  --accent-soft: #E5FBFC;
  --border: #E7E9E6;
  --danger: #DC2626;
  --danger-soft: #FDECEC;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 3px rgba(20, 30, 25, 0.06), 0 6px 20px rgba(20, 30, 25, 0.05);
  --shadow-pop: 0 10px 40px rgba(20, 30, 25, 0.18);
  --header-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}
h1, h2, h3, h4 {
  font-family: 'Poppins', 'Inter', sans-serif;
  margin: 0 0 0.5em;
  line-height: 1.25;
}
p { margin: 0 0 1em; color: var(--text-muted); }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; border-color: var(--accent); color: var(--accent-dark); }
.btn-outline:hover { background: var(--accent-soft); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
}
.logo span { color: var(--accent); }
.logo-image { display: flex; align-items: center; }
.logo-image img { height: 34px; width: auto; display: block; }
.main-nav {
  display: flex;
  gap: 28px;
  font-weight: 500;
  font-size: 0.95rem;
}
.main-nav a:hover { color: var(--accent-dark); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative;
  background: transparent;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent-dark); }
.cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
.nav-toggle { display: none; }
.search-bar {
  border-top: 1px solid var(--border);
  padding: 12px 0;
  background: var(--surface);
}
.search-bar input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 0.95rem;
  font-family: inherit;
}
.search-bar input:focus { outline: none; border-color: var(--accent); }

/* Hero */
.hero { padding: 56px 0 40px; overflow: hidden; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}
.eyebrow {
  display: inline-block;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 16px;
}
.hero h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.hero-text > p { font-size: 1.05rem; max-width: 480px; }
.hero-actions { display: flex; gap: 14px; margin: 24px 0; flex-wrap: wrap; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 18px; font-size: 0.88rem; font-weight: 500; }
.trust-badges li { display: flex; align-items: center; gap: 8px; }
.trust-badges .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.hero-visual { max-width: 320px; margin: 0 auto; }

/* Category nav */
.category-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  background: var(--bg);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.chips-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.chips-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent-dark); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Product sections */
#productSections { padding: 40px 20px 20px; }
.loading-state { text-align: center; padding: 60px 0; color: var(--text-muted); }
.category-section { margin-bottom: 52px; scroll-margin-top: calc(var(--header-h) + 70px); }
.category-heading { margin-bottom: 4px; font-size: 1.5rem; }
.category-tagline { margin-bottom: 22px; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.no-results { padding: 40px; text-align: center; color: var(--text-muted); }

.product-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: transparent; }
.product-icon-wrap {
  width: 100%;
  aspect-ratio: 1.3 / 1;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--accent-dark);
  position: relative;
}
.pack-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}
.product-icon-wrap svg,
.pm-icon svg,
.cart-item-icon svg {
  width: 56%;
  height: 56%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.product-icon-wrap .product-photo,
.pm-icon .product-photo,
.cart-item-icon .product-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.stock-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.product-name { font-size: 1rem; font-weight: 600; margin-bottom: 2px; }
.product-subtitle { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 10px; }
.product-price-row { margin-top: auto; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-current { font-weight: 700; color: var(--accent-dark); font-size: 1.05rem; }
.price-original { text-decoration: line-through; color: var(--text-muted); font-size: 0.82rem; }
.price-from { font-size: 0.72rem; color: var(--text-muted); display: block; margin-bottom: 2px; }

/* About */
.about-section { padding: 30px 0 60px; }
.about-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--border);
}
.about-card h2 { text-align: center; margin-bottom: 32px; font-size: 1.6rem; }
.about-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.about-item { text-align: center; }
.about-icon { font-size: 1.8rem; margin-bottom: 10px; }
.about-item h3 { font-size: 1rem; }
.about-item p { font-size: 0.88rem; margin: 0; }

/* Footer */
.site-footer { background: #16221C; color: #D7E0DB; margin-top: 20px; }
.footer-inner {
  padding: 48px 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.site-footer .logo { color: #fff; }
.footer-brand p { color: #9AAAA2; font-size: 0.9rem; max-width: 280px; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.footer-col p { color: #9AAAA2; font-size: 0.9rem; }
.footer-col ul li { color: #9AAAA2; font-size: 0.9rem; padding: 4px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 18px 0; text-align: center; font-size: 0.82rem; color: #7C8B83; }

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 18, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  padding: 28px;
  box-shadow: var(--shadow-pop);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}
.modal-close:hover { background: var(--accent-soft); color: var(--accent-dark); }

/* Product modal content */
.pm-icon { width: 100px; height: 100px; margin: 0 auto 16px; background: var(--accent-soft); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--accent-dark); }
.pm-gallery { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.pm-gallery-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 2px solid var(--border);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
}
.pm-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-gallery-thumb.active { border-color: var(--accent); }
.pm-title { text-align: center; font-size: 1.2rem; margin-bottom: 2px; }
.pm-subtitle { text-align: center; font-size: 0.88rem; margin-bottom: 14px; }
.pm-desc { font-size: 0.9rem; text-align: center; margin-bottom: 20px; }
.pm-section-label { font-weight: 600; font-size: 0.85rem; margin-bottom: 10px; display: block; }
.variant-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.variant-chip {
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s ease;
}
.variant-chip:hover { border-color: var(--accent); }
.variant-chip.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.variant-chip.disabled { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }
.pm-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.pm-price-row .price-current { font-size: 1.4rem; }
.pm-stock-note { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 18px; }
.pm-stock-note.low { color: var(--danger); }
.qty-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.qty-stepper { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty-stepper button { width: 38px; height: 38px; border: none; background: var(--bg); font-size: 1.1rem; cursor: pointer; }
.qty-stepper button:hover { background: var(--accent-soft); }
.qty-stepper span { width: 42px; text-align: center; font-weight: 600; }

/* Cart drawer */
.drawer-overlay { position: fixed; inset: 0; background: rgba(15,20,18,0.5); z-index: 90; }
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--surface);
  z-index: 95;
  display: flex;
  flex-direction: column;
  transition: right 0.25s ease;
  box-shadow: var(--shadow-pop);
}
.cart-drawer.open { right: 0; }
.cart-header { padding: 20px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.cart-header h3 { margin: 0; }
.cart-items { flex: 1; overflow-y: auto; padding: 12px 22px; }
.cart-empty { text-align: center; color: var(--text-muted); padding: 60px 0; }
.cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-item-icon { width: 56px; height: 56px; background: var(--accent-soft); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--accent-dark); flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 0.9rem; }
.cart-item-variant { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px; }
.cart-item-row { display: flex; align-items: center; justify-content: space-between; }
.cart-item-price { font-weight: 600; font-size: 0.85rem; color: var(--accent-dark); }
.cart-item-remove { background: none; border: none; color: var(--text-muted); font-size: 0.78rem; cursor: pointer; text-decoration: underline; padding: 0; }
.mini-stepper { display: flex; align-items: center; gap: 6px; }
.mini-stepper button { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; }
.cart-addons { padding: 10px 22px; border-top: 1px dashed var(--border); }
.addon-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; font-size: 0.85rem; }
.addon-row label { display: flex; align-items: center; gap: 8px; }
.cart-footer { padding: 18px 22px 22px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; margin-bottom: 6px; }

/* Account area (header) */
.account-area { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.account-btn {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
}
.account-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.account-greeting { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.account-greeting strong { font-weight: 700; }
.account-logout { background: none; border: none; color: var(--text-muted); font-size: 0.78rem; text-decoration: underline; cursor: pointer; padding: 0; }
@media (max-width: 560px) {
  .account-greeting span.account-name-text { display: none; }
}

/* Auth (login / register / guest) */
.auth-tabs { display: flex; gap: 4px; background: var(--bg); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.auth-tab {
  flex: 1;
  padding: 9px 12px;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}
.auth-tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; font-weight: 600; }
.auth-form input {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 400;
}
.auth-form input:focus { outline: none; border-color: var(--accent); }
.auth-error { color: var(--danger); font-size: 0.82rem; margin: -4px 0 0; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--text-muted); font-size: 0.8rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.checkout-account-banner {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.checkout-account-banner button { background: none; border: none; color: var(--accent-dark); text-decoration: underline; font-size: 0.78rem; font-weight: 600; cursor: pointer; }

/* Checkout form */
.checkout-modal { max-width: 440px; }
#checkoutForm { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
#checkoutForm label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; font-weight: 600; }
#checkoutForm input, #checkoutForm textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 400;
  resize: vertical;
}
#checkoutForm input:focus, #checkoutForm textarea:focus { outline: none; border-color: var(--accent); }
.checkout-note { font-size: 0.78rem; text-align: center; margin: 4px 0 0; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1F2A24;
  color: #fff;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 200;
  box-shadow: var(--shadow-pop);
}
.toast.error { background: var(--danger); }

/* Responsive */
@media (max-width: 960px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 780px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-text > p { margin-inline: auto; }
  .trust-badges { justify-content: center; }
  .hero-visual { order: -1; max-width: 220px; }
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    display: none;
  }
  .main-nav.open-mobile { display: flex; }
  .main-nav a { padding: 14px 20px; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: flex; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-brand p { margin-inline: auto; }
}
@media (max-width: 620px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .cart-drawer { max-width: 100%; }
}
@media (max-width: 420px) {
  .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .product-card { padding: 14px; }
}
