@import url('https://fonts.googleapis.com/css2?family=Epilogue:wght@400;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

/* ── DESIGN TOKENS ───────────────────────────────────────── */
:root {
  --forest-green: #1e8c3e;
  --dark-green:   #166830;
  --green-tint:   #e8f5ec;
  --green-tint2:  #d1ecda;
  --gold:         #fed65b;
  --gold-dark:    #e0b93e;
  --sale-red:     #C0392B;
  --wa:           #25D366;
  --wa-dark:      #1daa52;
  --on-surface:         #1a1c1c;
  --on-surface-variant: #42493e;
  --muted:        #6b7169;
  --muted-light:  #9a988f;
  --warm-white:   #faf9f8;
  --surface-low:  #f4f3f2;
  --surface-lowest: #ffffff;
  --surface-high: #e9e8e7;
  --rule:         #ececea;
  --rule-dark:    #dcdad8;
  --shadow-sm:    0 1px 2px rgba(26,28,28,0.04), 0 1px 3px rgba(26,28,28,0.06);
  --shadow-md:    0 4px 14px rgba(26,28,28,0.08);
  --shadow-xl:    0 20px 40px rgba(26,28,28,0.14), 0 8px 18px rgba(26,28,28,0.08);
  --shadow-header: 0px 12px 32px rgba(26,28,28,0.06);
  --radius:       10px;
  --radius-card:  16px;
  --radius-pill:  999px;
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--warm-white);
  color: var(--on-surface);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* ── PRINT-ONLY COVER ────────────────────────────────────── */
.print-cover { display: none; }
.print-only  { display: none; }

/* ── HEADER ──────────────────────────────────────────────── */
.header {
  background: linear-gradient(135deg, var(--forest-green) 0%, var(--dark-green) 100%);
  border-bottom: 3px solid var(--gold);
  box-shadow: var(--shadow-header);
  position: sticky;
  top: 0;
  z-index: 300;
}
.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-shrink: 0;
  min-width: 0;
}
.header-logo-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.16);
  flex-shrink: 0;
}
.header-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.header-name {
  display: block;
  font-family: 'Epilogue', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.01em;
  line-height: 1.15;
  white-space: nowrap;
}
.header-addr {
  display: block;
  font-size: 10px;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.04em;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Header cart button */
.header-cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.32);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
  white-space: nowrap;
  min-height: 44px;
}
.header-cart-btn:hover { background: rgba(0,0,0,0.3); border-color: rgba(255,255,255,0.5); }
.header-cart-btn:active { transform: scale(0.95); }

.header-cart-badge {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: var(--on-surface);
  font-size: 10px;
  font-weight: 800;
  border-radius: 99px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  line-height: 1;
}

.btn-ghost {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.32);
  border-radius: var(--radius-pill);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  letter-spacing: 0.02em;
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.btn-ghost:hover { background: rgba(0,0,0,0.3); color: #fff; border-color: rgba(255,255,255,0.5); }

.btn-wa {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--wa);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background .2s ease;
  white-space: nowrap;
  min-height: 44px;
}
.btn-wa:hover { background: var(--wa-dark); }
.btn-wa:active { transform: scale(0.95); }

.btn-print {
  background: var(--gold);
  color: var(--on-surface);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background .2s ease;
  white-space: nowrap;
  min-height: 44px;
}
.btn-print:hover { background: var(--gold-dark); }

/* ── CATEGORY TABS ───────────────────────────────────────── */
.cat-nav {
  background: var(--surface-lowest);
  border-bottom: 1px solid var(--surface-high);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 77px;
  z-index: 200;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 32px;
  min-width: 100%;
  white-space: nowrap;
}
.cat-tab {
  background: none;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0 16px;
  height: 36px;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.cat-tab:hover { color: var(--forest-green); background: var(--green-tint); }
.cat-tab.active {
  color: #fff;
  background: var(--dark-green);
  box-shadow: 0 2px 8px rgba(22,104,48,0.3);
}
.tab-ic {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-low);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  border-radius: 99px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  line-height: 1;
}
.cat-tab.active .tab-count {
  background: var(--green-tint2);
  color: var(--dark-green);
}

/* ── SEARCH BAR ──────────────────────────────────────────── */
.search-bar {
  background: var(--warm-white);
  border-bottom: 1px solid var(--rule);
}
.search-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  max-width: 500px;
  background: var(--surface-lowest);
  border: 1px solid var(--rule-dark);
  border-bottom: 2px solid var(--rule-dark);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 0 12px;
  transition: border-color .2s ease;
}
.search-field:focus-within { border-bottom-color: var(--forest-green); }
.search-icon { color: var(--muted-light); flex-shrink: 0; }
#search {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  padding: 9px 0;
  background: transparent;
  color: var(--on-surface);
  min-height: 44px;
}
#search::placeholder { color: var(--muted-light); }
.search-clear {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  display: none;
  align-items: center;
  border-radius: 3px;
  transition: color .2s ease;
}
.search-clear:hover { color: var(--on-surface); }
#result-count {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

/* ── CATALOG SHELL ───────────────────────────────────────── */
#catalog {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 32px 160px;
}

/* ── CATEGORY SECTION ────────────────────────────────────── */
/* Each category is its own warm surface "block" so white product
   cards lift off the page instead of blending into flat white.
   Alternating tint gives the page vertical rhythm and depth. */
.cat-section {
  margin-bottom: 26px;
  padding: 28px 30px 34px;
  border-radius: 22px;
  background: var(--surface-low);
  border: 1px solid var(--rule);
  scroll-margin-top: 140px;
}
.cat-section:nth-of-type(even) {
  background: var(--green-tint);
  border-color: var(--green-tint2);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--green-tint2);
  position: relative;
}
.cat-section:nth-of-type(even) .section-head {
  border-bottom-color: rgba(22,104,48,0.18);
}
.section-head::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 3px;
  border-radius: 3px;
  background: var(--forest-green);
}
.section-head-main {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}
.section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--forest-green) 0%, var(--dark-green) 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(22,104,48,0.28);
  flex-shrink: 0;
}
.section-ic { width: 27px; height: 27px; }
.section-eyebrow {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--dark-green);
  background: #fff;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px;
}
.section-title {
  font-family: 'Epilogue', system-ui, sans-serif;
  font-size: 27px;
  font-weight: 800;
  color: var(--on-surface);
  line-height: 1.05;
}
.section-count {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dark-green);
  background: #fff;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes imgFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
@keyframes badgePop {
  0%   { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}
@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}

/* ── PRODUCT GRID ────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ── PRODUCT CARD ────────────────────────────────────────── */
.product-card {
  background: var(--surface-lowest);
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
  animation: cardIn .3s ease backwards;
}
.product-card:nth-child(1)  { animation-delay: 0ms; }
.product-card:nth-child(2)  { animation-delay: 30ms; }
.product-card:nth-child(3)  { animation-delay: 60ms; }
.product-card:nth-child(4)  { animation-delay: 90ms; }
.product-card:nth-child(5)  { animation-delay: 50ms; }
.product-card:nth-child(6)  { animation-delay: 80ms; }
.product-card:nth-child(7)  { animation-delay: 110ms; }
.product-card:nth-child(8)  { animation-delay: 140ms; }

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  border-color: var(--surface-high);
}

/* ── CARD IMAGE ──────────────────────────────────────────── */
.card-img {
  position: relative;
  height: 240px;
  overflow: hidden;
  flex-shrink: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--rule);
}

/* Shimmer loading state */
.card-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.55) 40%,
    rgba(255,255,255,0.8) 50%,
    rgba(255,255,255,0.55) 60%,
    transparent 100%
  );
  background-size: 800px 100%;
  animation: shimmer 1.8s infinite linear;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  transition: opacity .3s ease .15s;
}
.card-img.img-loaded::before { opacity: 0; }

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  display: block;
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: transform .3s ease, opacity .0s;
}
.card-img.img-loaded img {
  opacity: 1;
  animation: imgFadeIn .3s ease forwards;
}
.product-card:hover .card-img img {
  transform: scale(1.05);
}

/* Bottom fade to blend image into card body */
.card-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: linear-gradient(to bottom, transparent, rgba(244,243,242,0.6));
  z-index: 3;
  pointer-events: none;
}

/* Placeholder */
.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  background: #ffffff;
}
.card-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(30,140,62,0.05) 0%, transparent 70%);
}
.placeholder-mono {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--forest-green) 0%, var(--dark-green) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Epilogue', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(30,140,62,0.25);
  position: relative;
  z-index: 1;
  transition: transform .25s ease;
}
.product-card:hover .placeholder-mono {
  transform: scale(1.06);
}
.placeholder-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted-light);
  position: relative;
  z-index: 1;
}

/* Badge */
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--gold);
  color: var(--on-surface);
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  z-index: 10;
  box-shadow: var(--shadow-sm);
  animation: badgePop .25s ease .15s backwards;
}

/* Stock tag */
.stock-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  z-index: 10;
  backdrop-filter: blur(4px);
}
.stock-tag.in  {
  background: rgba(232,245,236,0.92);
  color: var(--dark-green);
  border: 1px solid rgba(22,104,48,0.2);
}
.stock-tag.out {
  background: rgba(253,238,236,0.92);
  color: var(--sale-red);
  border: 1px solid rgba(192,57,43,0.2);
}

/* ── CARD BODY ───────────────────────────────────────────── */
.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-category {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--forest-green);
  padding: 13px 14px 0;
}
.card-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--on-surface);
  line-height: 1.4;
  padding: 4px 14px 12px;
  position: relative;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

/* ── SIZE ROWS ───────────────────────────────────────────── */
.size-rows { flex: 1; }

.size-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  min-height: 56px;
  border-bottom: 1px solid var(--rule);
  transition: background .2s ease;
}
.size-row:last-child { border-bottom: none; }

/* Two-line info block */
.sr-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Line 1 — box type + contents */
.sr-top {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.sr-type {
  font-size: 12px;
  font-weight: 700;
  color: var(--on-surface);
  white-space: nowrap;
}
.sr-sep {
  font-size: 10px;
  color: var(--muted-light);
}
.sr-detail {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--on-surface-variant);
  white-space: nowrap;
}

/* Line 2 — price info */
.sr-bottom {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.sr-unit {
  font-size: 12px;
  font-weight: 800;
  color: var(--forest-green);
  white-space: nowrap;
}
.sr-box-sep { font-size: 10px; color: var(--muted-light); }
.sr-box {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--dark-green);
  white-space: nowrap;
}
.sr-call {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  font-style: italic;
}
.sr-loose {
  font-size: 10px;
  color: var(--muted-light);
  white-space: nowrap;
}
.sr-note {
  font-size: 10px;
  color: var(--muted-light);
  white-space: nowrap;
}

/* Active state */
.size-row.size-active             { background: var(--green-tint); }
.size-row.size-active .sr-type   { color: var(--dark-green); }
.size-row.size-active .sr-detail { color: var(--dark-green); }
.size-row.size-active .sr-unit   { color: var(--dark-green); }
.size-row.size-active .sr-box    { color: var(--dark-green); font-weight: 700; }
.size-row.size-active .qty-num   { color: var(--dark-green); font-weight: 800; background: var(--green-tint2); }

/* Print — compact rows */
@media print {
  .size-row { min-height: 0; padding: 3pt 8pt; }
  .sr-info { gap: 1pt; }
  .sr-type { font-size: 7.5pt; }
  .sr-detail, .sr-unit, .sr-box { font-size: 7pt; }
  .sr-loose, .sr-note { display: none; }
}

/* ── QTY CONTROLS ────────────────────────────────────────── */
.qty-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.qty-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--surface-lowest);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease, opacity .15s ease, transform .1s ease;
  flex-shrink: 0;
  background: var(--forest-green);
  line-height: 1;
}
.qty-btn:hover { background: var(--dark-green); }
.qty-btn:active { transform: scale(0.95); }

/* Minus when qty is 0 — faded, not clickable visually */
.qty-btn.qty-minus.faded {
  opacity: 0.25;
  pointer-events: none;
}

.qty-num {
  min-width: 28px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 4px;
  line-height: 1;
  user-select: none;
}
.qty-num.active {
  color: var(--dark-green);
  font-weight: 800;
}

/* ── CARD PRINT ORDER LINE ───────────────────────────────── */
.card-print-order {
  border-left: 3px solid var(--forest-green);
  padding: 8px 13px;
  font-size: 9pt;
  color: var(--muted);
  font-style: italic;
  border-top: 1px solid var(--rule);
}

/* ── CART BAR ────────────────────────────────────────────── */
.cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--dark-green);
  z-index: 400;
  box-shadow: 0 -8px 24px rgba(26,28,28,0.12);
  transform: translateY(100%);
  transition: transform .3s ease;
  cursor: pointer;
}
.cart-bar.visible { transform: translateY(0); }

.cart-bar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.cart-bar-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  font-weight: 600;
  min-width: 0;
  flex: 1;
}
.cart-bar-dot { color: rgba(255,255,255,0.3); flex-shrink: 0; }
#cart-bar-count { color: #fff; white-space: nowrap; }
#cart-bar-total { color: rgba(255,255,255,0.65); font-size: 13px; font-weight: 500; white-space: nowrap; }

.cart-bar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--on-surface);
  border: none;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background .2s ease;
  flex-shrink: 0;
  white-space: nowrap;
  min-height: 44px;
}
.cart-bar-btn:hover { background: var(--gold-dark); }
.cart-bar-btn:active { transform: scale(0.95); }

/* ── CART OVERLAY ────────────────────────────────────────── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,28,28,0.45);
  z-index: 490;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

/* ── CART DRAWER ─────────────────────────────────────────── */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 100vw;
  background: var(--surface-lowest);
  z-index: 500;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 32px rgba(26,28,28,0.16);
  border-radius: 16px 0 0 16px;
  transform: translateX(100%);
  transition: transform .3s ease;
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 18px;
  background: var(--dark-green);
  border-radius: 16px 0 0 0;
  flex-shrink: 0;
}
.cart-drawer-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 4px;
}
.cart-drawer-title {
  font-family: 'Epilogue', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}
.cart-close {
  background: rgba(255,255,255,0.1);
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
  flex-shrink: 0;
  margin-top: 2px;
}
.cart-close:hover { background: rgba(255,255,255,0.2); color: #fff; }
.cart-close:active { transform: scale(0.95); }

/* ── CART ITEMS LIST ─────────────────────────────────────── */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.cart-empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--muted-light);
}
.cart-empty p { font-size: 14px; font-weight: 500; margin: 12px 0 6px; color: var(--on-surface-variant); }
.cart-empty small { font-size: 12px; line-height: 1.6; }

/* Category group in drawer */
.cart-category-group {
  border-bottom: 2px solid var(--surface-low);
}
.cart-cat-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  background: var(--dark-green);
  padding: 6px 20px;
}

.cart-group {
  padding: 10px 20px 4px;
  border-bottom: 1px solid var(--rule);
}
.cart-group:last-child { border-bottom: none; }
.cart-group-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--on-surface);
  margin-bottom: 6px;
  line-height: 1.35;
}
.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--rule);
}
.cart-line:last-child { border-bottom: none; padding-bottom: 8px; }
.cart-line-left {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}
.cart-line-size {
  font-size: 12px;
  font-weight: 600;
  color: var(--on-surface-variant);
}
.cart-line-x {
  font-size: 12px;
  color: var(--dark-green);
  font-weight: 700;
}
.cart-line-unit {
  font-size: 11px;
  color: var(--muted-light);
  white-space: nowrap;
}
.cart-line-total {
  font-size: 13px;
  font-weight: 800;
  color: var(--dark-green);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* ── CART FOOTER ─────────────────────────────────────────── */
.cart-drawer-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--rule-dark);
  padding: 18px 24px 24px;
  background: var(--surface-low);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.total-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.total-amount {
  font-family: 'Epilogue', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--dark-green);
}
.total-amount small {
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}
.cart-wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--wa);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 13px 20px;
  border-radius: var(--radius-pill);
  transition: background .2s ease;
  min-height: 48px;
}
.cart-wa-btn:hover { background: var(--wa-dark); }
.cart-wa-btn:active { transform: scale(0.95); }

.cart-clear-btn {
  background: none;
  border: 1px solid var(--rule-dark);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all .2s ease;
  min-height: 40px;
}
.cart-clear-btn:hover { border-color: var(--sale-red); color: var(--sale-red); }
.cart-clear-btn:active { transform: scale(0.95); }

/* ── CUSTOMER INFO MODAL ─────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,28,28,0.55);
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.order-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.97);
  z-index: 700;
  width: 92%;
  max-width: 460px;
  background: var(--surface-lowest);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  overflow: hidden;
}
.order-modal.open {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.order-modal-head {
  background: var(--dark-green);
  padding: 22px 24px 20px;
}
.order-modal-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 5px;
}
.order-modal-title {
  font-family: 'Epilogue', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.order-modal-sub {
  font-size: 12.5px;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
}

/* Form inside modal */
#order-form { padding: 20px 24px 24px; }

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--on-surface-variant);
  margin-bottom: 6px;
}
.req { color: var(--sale-red); margin-left: 2px; }

.form-group input {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--rule-dark);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--on-surface);
  background: var(--surface-low);
  transition: border-color .2s ease, box-shadow .2s ease;
  min-height: 48px;
}
.form-group input:focus {
  outline: none;
  border-color: var(--forest-green);
  box-shadow: 0 0 0 3px rgba(30,140,62,0.1);
}
.form-group input.error { border-color: var(--sale-red); }
.form-group input::placeholder { color: var(--muted-light); }

.field-err {
  display: block;
  font-size: 11.5px;
  color: var(--sale-red);
  margin-top: 4px;
  min-height: 16px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.form-cancel-btn {
  flex: 1;
  background: none;
  border: 1.5px solid var(--rule-dark);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all .2s ease;
  min-height: 48px;
}
.form-cancel-btn:hover { border-color: var(--on-surface-variant); color: var(--on-surface); }
.form-cancel-btn:active { transform: scale(0.95); }

.form-submit-btn {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--wa);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background .2s ease;
  min-height: 48px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-submit-btn:hover { background: var(--wa-dark); }
.form-submit-btn:active { transform: scale(0.95); }
.form-submit-btn:disabled {
  background: var(--muted-light);
  cursor: not-allowed;
}

.form-privacy {
  font-size: 10.5px;
  color: var(--muted-light);
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}

/* Mobile modal */
@media (max-width: 600px) {
  .order-modal {
    width: 100%;
    max-width: 100%;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(20px);
    border-radius: 16px 16px 0 0;
  }
  .order-modal.open { transform: translateY(0); }
}

/* ── TOAST ───────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: var(--dark-green);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xl);
  z-index: 9999;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  max-width: calc(100vw - 48px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── BACK TO TOP ─────────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 96px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-lowest);
  color: var(--dark-green);
  border: 1px solid var(--surface-high);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 390;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
#back-to-top:hover { background: var(--green-tint); }
#back-to-top:active { transform: scale(0.95); }

/* ── FLOATING WHATSAPP ───────────────────────────────────── */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--wa);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.42);
  z-index: 399;
  transition: transform .2s ease, box-shadow .2s ease;
}
.wa-float:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 24px rgba(37,211,102,0.55);
}
.wa-float:active { transform: scale(0.95); }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--muted);
}
.empty-icon { margin-bottom: 16px; display: flex; justify-content: center; }
.empty-state h3 {
  font-family: 'Epilogue', system-ui, sans-serif;
  font-size: 20px;
  color: var(--on-surface);
  margin-bottom: 8px;
  font-weight: 700;
}
.empty-state p { font-size: 13px; }

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
  background: var(--dark-green);
  padding: 44px 32px;
}
.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 56px;
  align-items: start;
}
.footer-left { display: flex; align-items: center; gap: 14px; }
.footer-logo { width: 46px; height: 46px; object-fit: contain; flex-shrink: 0; }
.footer-name {
  font-family: 'Epilogue', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: block;
}
.footer-tag {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 3px;
  display: block;
}
.footer-mid { font-size: 12.5px; color: rgba(255,255,255,0.5); line-height: 2; }
.footer-row strong { color: rgba(255,255,255,0.75); font-weight: 600; margin-right: 6px; }
.footer-right { font-size: 11px; color: rgba(255,255,255,0.28); line-height: 2; text-align: right; }
.footer-copy { color: rgba(255,255,255,0.5); font-weight: 600; font-size: 12px; }

/* ── PRINT ───────────────────────────────────────────────── */
@media print {
  @page { size: A4 portrait; margin: 14mm 12mm 16mm; }

  .no-print,
  .cart-bar,
  .cart-overlay,
  .cart-drawer,
  #toast,
  #back-to-top,
  .wa-float,
  .search-bar,
  .cat-nav { display: none !important; }

  .print-only { display: block !important; }

  body { background: white; font-size: 10pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .print-cover {
    display: flex;
    align-items: center;
    gap: 16pt;
    padding-bottom: 12pt;
    margin-bottom: 18pt;
    border-bottom: 2pt solid var(--dark-green);
  }
  .print-logo { width: 44pt; height: 44pt; object-fit: contain; }
  .print-cover-title {
    font-family: 'Epilogue', system-ui, sans-serif;
    font-size: 16pt;
    font-weight: 700;
    color: var(--dark-green);
    display: block;
  }
  .print-cover-addr { font-size: 8pt; color: var(--muted); margin-top: 3pt; display: block; }

  .header { position: relative; display: none; }

  #catalog { padding: 0; max-width: 100%; }

  .cat-section {
    margin-bottom: 28pt;
    break-before: auto;
    background: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }

  .section-head { padding-bottom: 8pt; margin-bottom: 14pt; border-bottom: 1pt solid var(--rule-dark); }
  .section-icon { display: none !important; }
  .section-head-main { gap: 0; }
  .section-eyebrow { font-size: 7pt; background: none !important; box-shadow: none !important; padding: 0 !important; color: var(--forest-green); }
  .section-title { font-size: 18pt; }
  .section-count { background: none !important; box-shadow: none !important; padding: 0 0 4pt !important; color: var(--muted-light); }

  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 6pt; break-inside: avoid-page; }

  .product-card { break-inside: avoid; border-radius: 0; border: 0.5pt solid #c8c8c8; }
  .product-card:hover { box-shadow: none; transform: none; }

  .card-img { height: 110pt; }
  .card-img::before, .card-img::after { display: none !important; }
  .card-img img { opacity: 1 !important; animation: none !important; padding: 4pt; }
  .product-card { animation: none !important; }
  .placeholder-mono { width: 40pt; height: 40pt; font-size: 15pt; box-shadow: none; }
  .card-badge { animation: none !important; }

  .card-category { padding: 6pt 8pt 0; font-size: 6pt; }
  .card-name { font-size: 8pt; padding: 2pt 8pt 6pt; }

  .size-row { min-height: 0; padding: 4pt 8pt; }
  .size-name { font-size: 8pt; }
  .size-price { font-size: 9pt; }
  .qty-wrap { display: none; }

  .card-print-order { display: block; border-left: 2pt solid var(--forest-green); padding: 4pt 8pt; font-size: 7pt; }

  .footer { padding: 12pt 0 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .footer-inner { grid-template-columns: auto 1fr auto; gap: 24pt; }

  .card-badge, .stock-tag, .section-head::after, .print-cover {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ── RESPONSIVE — 3 col ──────────────────────────────────── */
@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

/* ── RESPONSIVE — 2 col / tablet ────────────────────────── */
@media (max-width: 800px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .header-addr  { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-right { text-align: left; }
  .search-inner,
  #catalog { padding-left: 16px; padding-right: 16px; }
  .cat-nav-inner { padding: 10px 12px; }
  .header-inner { padding: 0 16px; }
  /* Hide phone / WA / PDF buttons on tablet */
  .btn-ghost, .btn-wa, .btn-print { display: none; }
}

/* ── RESPONSIVE — 1 col / mobile ────────────────────────── */
@media (max-width: 600px) {
  .product-grid { grid-template-columns: 1fr; }

  /* Header: only logo + name + cart badge button */
  .header-actions .btn-ghost,
  .header-actions .btn-wa,
  .header-actions .btn-print { display: none; }
  .header-cart-btn { display: flex; }

  .header-name { font-size: 16px; }

  /* Category tabs: smaller text, tighter padding, scroll horizontally */
  .cat-tab { font-size: 10px; padding: 0 12px; letter-spacing: 0.04em; height: 34px; }
  .tab-count { font-size: 8px; min-width: 14px; height: 14px; }
  .cat-nav-inner { padding: 8px 10px; }

  /* Catalog padding */
  #catalog { padding: 18px 12px 120px; }
  .search-field { max-width: 100%; }
  .search-inner { padding: 8px 12px; }

  /* Category blocks — tighter on mobile */
  .cat-section { padding: 20px 16px 24px; border-radius: 18px; margin-bottom: 18px; }
  .section-head { gap: 10px; margin-bottom: 18px; padding-bottom: 14px; }
  .section-head-main { gap: 12px; }
  .section-icon { width: 42px; height: 42px; border-radius: 13px; }
  .section-ic { width: 23px; height: 23px; }
  .section-title { font-size: 21px; }
  .section-count { font-size: 9.5px; padding: 5px 9px; }

  /* Cart bar */
  .cart-bar-inner { padding: 12px 16px; gap: 12px; }
  .cart-bar-info { font-size: 13px; gap: 6px; }
  #cart-bar-total { font-size: 11.5px; }
  .cart-bar-btn { padding: 9px 14px; font-size: 12px; }

  /* Cart drawer — full width */
  .cart-drawer { width: 100vw; border-radius: 0; }
  .cart-drawer-header { border-radius: 0; }

  /* Toast — left side */
  #toast { bottom: 80px; }

  /* Back to top */
  #back-to-top { bottom: 88px; right: 16px; }
  .wa-float { bottom: 20px; right: 16px; width: 46px; height: 46px; }
}

/* ── MIN TAP TARGET SAFETY ───────────────────────────────── */
@media (max-width: 600px) {
  .qty-btn { width: 32px; height: 32px; }
  .qty-num { min-width: 32px; font-size: 13px; }
  .size-row { min-height: 52px; }
  .cat-tab  { height: 48px; }
}
