/* ==========================================================================
   Shop, product cards, pouch artwork, product page
   ========================================================================== */

/* Pouch artwork (shown until real photos are uploaded) ----------------- */
.pouch { position: relative; width: 62%; aspect-ratio: 0.72; display: flex; flex-direction: column; filter: drop-shadow(0 24px 28px rgba(8, 42, 31, 0.28)); transition: transform var(--dur-slow) var(--ease-out); }
.pouch__crimp { height: 7%; margin: 0 4%; border-radius: 6px 6px 0 0; background: repeating-linear-gradient(90deg, #0b3326 0 3px, #134a39 3px 6px); }
.pouch__body {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; overflow: hidden;
  padding: 10% 8% 8%;
  border-radius: 4px 4px 18px 18px;
  background: linear-gradient(160deg, #15503d 0%, var(--forest-900) 45%, var(--forest-950) 100%);
  color: var(--gold-300);
  container-type: inline-size;
}
.pouch__shine { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.12) 45%, transparent 60%); transform: translateX(-60%); transition: transform 1.2s var(--ease-out); }
.pouch__logo { width: 42%; height: auto; margin-bottom: 4%; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35)); }
.pouch__brand { font-family: var(--font-display); font-size: 9cqi; letter-spacing: 0.18em; background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pouch__name { margin-top: 4%; text-align: center; font-family: var(--font-display); font-style: italic; font-size: 10cqi; line-height: 1.15; color: var(--cream-50); }
:lang(ta) .pouch__name { font-family: var(--font-body-ta); font-style: normal; font-size: 8.5cqi; }
.pouch__window { margin-top: auto; width: 34%; aspect-ratio: 1; border-radius: 50%; padding: 4%; background: var(--gold-gradient); }
.pouch__window span { display: block; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--tea) 60%, #fff), var(--tea) 65%); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4); }
.pouch__size { margin-top: 5%; font-size: 7cqi; letter-spacing: 0.2em; color: var(--gold-300); text-transform: uppercase; }
.pouch--lg { width: min(70%, 380px); }

/* Product grid & card --------------------------------------------------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--sp-6) var(--sp-5); }
.pcard { position: relative; display: flex; flex-direction: column; }
.pcard__media {
  position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden;
  background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--tea) 22%, var(--cream-50)) 0%, var(--cream-100) 70%);
  border: 1px solid var(--line);
}
.pcard__img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.pcard:hover .pouch { transform: translateY(-8px) rotate(-3deg); }
.pcard:hover .pouch__shine { transform: translateX(60%); }
.pcard:hover .pcard__img { transform: scale(1.05); }
.pcard__badge { position: absolute; left: var(--sp-4); top: var(--sp-4); padding: 4px 12px; border-radius: var(--radius-pill); background: var(--gold-gradient); color: var(--forest-950); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.04em; }
.pcard__body { padding: var(--sp-4) var(--sp-1) 0; display: flex; flex-direction: column; flex: 1; }
.pcard__cat { font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
:lang(ta) .pcard__cat { letter-spacing: 0.02em; }
.pcard__title { font-size: var(--fs-md); margin: var(--sp-1) 0 var(--sp-2); }
.pcard__title a { text-decoration: none; }
.pcard__title a::after { content: ""; position: absolute; inset: 0; } /* whole card is clickable */
.pcard__short { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--sp-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__foot { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.pcard__price { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; color: var(--forest-900); }
.pcard__price small { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 500; color: var(--text-muted); }
.pcard__sizes { font-size: var(--fs-xs); color: var(--text-muted); text-align: right; }

/* Shop page ------------------------------------------------------------- */
.shop-hero { padding-block: var(--sp-8) var(--sp-6); }
.shop-hero h1 { font-size: var(--fs-2xl); }
.shop { padding-bottom: var(--sp-9); }
.cat-tabs { display: flex; gap: var(--sp-2); overflow-x: auto; padding-bottom: var(--sp-3); margin-bottom: var(--sp-5); scrollbar-width: thin; }
.cat-tabs a { display: inline-flex; align-items: center; gap: var(--sp-2); padding: 10px 18px; border-radius: var(--radius-pill); border: 1px solid var(--line); text-decoration: none; white-space: nowrap; font-size: var(--fs-sm); font-weight: 500; color: var(--forest-900); background: var(--white); transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast); }
.cat-tabs a i { width: 10px; height: 10px; border-radius: 50%; background: var(--dot); }
.cat-tabs a small { font-size: var(--fs-xs); color: var(--text-muted); }
.cat-tabs a:hover { border-color: var(--forest-700); }
.cat-tabs a[aria-current="page"] { background: var(--forest-900); border-color: var(--forest-900); color: var(--cream-50); }
.cat-tabs a[aria-current="page"] small { color: var(--gold-300); }

.shop-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4); padding: var(--sp-4); border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); margin-bottom: var(--sp-4); }
.shop-tools__search { position: relative; flex: 1 1 260px; }
.shop-tools__search .input { padding-left: 44px; border-radius: var(--radius-pill); }
.shop-tools__icon { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--text-muted); }
.shop-tools__sort { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); }
.shop-tools__sort .select { min-height: 44px; width: auto; border-radius: var(--radius-pill); }
.toggle { display: inline-flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); font-weight: 500; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle__track { position: relative; width: 44px; height: 26px; border-radius: var(--radius-pill); background: var(--cream-300); transition: background var(--dur); }
.toggle__track span { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease-out); }
.toggle input:checked + .toggle__track { background: var(--forest-700); }
.toggle input:checked + .toggle__track span { transform: translateX(18px); }
.toggle input:focus-visible + .toggle__track { outline: 2px solid var(--focus); outline-offset: 2px; }
.shop-meta { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--sp-5); }
.shop-empty { text-align: center; padding: var(--sp-9) var(--sp-5); color: var(--text-muted); }
.shop-empty__icon { width: 64px; height: 64px; margin: 0 auto var(--sp-4); color: var(--forest-500); }

.bulk-nudge { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-5); margin-top: var(--sp-8); padding: var(--sp-5) var(--sp-6); border-radius: var(--radius-lg); background: var(--forest-900); color: var(--cream-100); }
.bulk-nudge > div:nth-child(2) { flex: 1; display: grid; }
.bulk-nudge strong { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--cream-50); }
.bulk-nudge__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: rgba(217, 180, 106, 0.14); color: var(--gold-300); }

/* Product page ---------------------------------------------------------- */
.product { padding-block: var(--sp-6) var(--sp-8); }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--sp-6); }
.crumbs a { color: var(--forest-700); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.product__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--sp-8); align-items: start; }
.product__gallery { position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
.product__stage { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--tea) 26%, var(--cream-50)) 0%, var(--cream-100) 70%); border: 1px solid var(--line); }
.product__stage > img { width: 100%; height: 100%; object-fit: cover; }
.product__thumbs { display: flex; gap: var(--sp-3); margin-top: var(--sp-3); }
.product__thumbs button { width: 76px; height: 76px; padding: 0; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid transparent; background: none; }
.product__thumbs button[aria-current="true"] { border-color: var(--gold-500); }
.product__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product__title { font-size: var(--fs-2xl); margin-bottom: var(--sp-1); }
:lang(ta) .product__title { font-size: var(--fs-xl); }
.product__alt { font-size: var(--fs-md); color: var(--text-muted); margin-bottom: var(--sp-4); }
.product__short { font-size: var(--fs-md); }
.product__price { display: flex; align-items: baseline; gap: var(--sp-3); margin: var(--sp-5) 0; }
.product__price strong { font-family: var(--font-display); font-size: var(--fs-xl); color: var(--forest-900); display: inline-block; }
.product__price s { color: var(--text-muted); }
.product__save { padding: 2px 10px; border-radius: var(--radius-pill); background: var(--gold-100); color: var(--gold-700); font-size: var(--fs-xs); font-weight: 700; }

.sizes { border: 0; padding: 0; margin: 0 0 var(--sp-5); }
.sizes legend { font-size: var(--fs-sm); font-weight: 600; color: var(--forest-900); margin-bottom: var(--sp-3); }
.sizes__list { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.size input { position: absolute; opacity: 0; }
.size span { display: grid; min-width: 104px; padding: 12px 16px; border-radius: var(--radius); border: 1.5px solid var(--cream-300); background: var(--white); cursor: pointer; text-align: center; transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast); }
.size b { font-size: var(--fs-base); color: var(--forest-900); }
.size small { font-size: var(--fs-xs); color: var(--text-muted); }
.size:hover span { border-color: var(--forest-500); }
.size input:checked + span { border-color: var(--gold-500); box-shadow: 0 0 0 3px var(--gold-100); transform: translateY(-2px); }
.size input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.size.is-out span { opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }

.buy-row { display: flex; gap: var(--sp-3); align-items: stretch; }
.buy-row__btn { flex: 1; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--cream-300); border-radius: var(--radius-pill); background: var(--white); }
.qty button { width: 46px; height: 54px; border: 0; background: none; font-size: 1.3rem; color: var(--forest-900); }
.qty input { width: 44px; border: 0; text-align: center; font-weight: 600; -moz-appearance: textfield; appearance: textfield; background: transparent; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.product__stock { margin: var(--sp-3) 0 0; font-size: var(--fs-sm); font-weight: 600; }
.product__stock.is-in { color: var(--success); }
.product__stock.is-low { color: var(--warning); }
.product__stock.is-out { color: var(--danger); }
.product__note { font-size: var(--fs-xs); color: var(--text-muted); }

.facts { list-style: none; padding: var(--sp-4) 0; margin: var(--sp-5) 0; display: flex; flex-wrap: wrap; gap: var(--sp-5); border-block: 1px solid var(--line); font-size: var(--fs-sm); }
.facts li { display: flex; align-items: center; gap: var(--sp-2); }
.facts .icon { width: 22px; height: 22px; color: var(--forest-700); }
.facts__swatch { width: 18px; height: 18px; border-radius: 50%; background: var(--tea); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3); }

.bulk-card { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); border-radius: var(--radius); background: var(--forest-900); color: var(--cream-100); text-decoration: none; transition: transform var(--dur) var(--ease-out), box-shadow var(--dur); }
.bulk-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.bulk-card > span:nth-child(2) { flex: 1; display: grid; }
.bulk-card strong { color: var(--cream-50); }
.bulk-card small { color: rgba(241, 234, 219, 0.75); }
.bulk-card__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(217, 180, 106, 0.15); color: var(--gold-300); flex: none; }
.bulk-card__icon .icon { width: 24px; height: 24px; }
.bulk-card__go { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); font-weight: 600; color: var(--gold-300); white-space: nowrap; }

.product-details { background: var(--cream-100); }
.product-details__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--sp-8); align-items: start; }
.product-details h2 { font-size: var(--fs-xl); }
.product-details h3 { font-size: var(--fs-md); margin-top: var(--sp-6); }
.brew-box { padding: var(--sp-6); border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--line); }
.brew-box__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: var(--sp-4); margin: var(--sp-4) 0; }
.brew-box dt { font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.brew-box dd { margin: 0; font-family: var(--font-display); font-size: var(--fs-lg); color: var(--forest-900); }
.brew-box dd small { display: block; font-family: var(--font-body); font-size: var(--fs-xs); color: var(--text-muted); }
.calc__tip { padding: var(--sp-4); border-left: 3px solid var(--gold-500); background: var(--cream-100); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

@media (max-width: 900px) {
  .product__grid, .product-details__grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .product__gallery { position: static; }
  .bulk-card { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .pgrid { grid-template-columns: 1fr 1fr; gap: var(--sp-5) var(--sp-3); }
  .pcard__short { display: none; }
  .pcard__foot { flex-direction: column; align-items: flex-start; gap: 2px; }
  .pcard__sizes { text-align: left; }
  .shop-tools__sort { width: 100%; }
  .shop-tools__sort .select { flex: 1; min-width: 0; }
}

/* ==========================================================================
   Phase 3 — cart button, slide-out cart, cart page, checkout, order pages
   ========================================================================== */
.page-title { font-size: var(--fs-2xl); margin-bottom: var(--sp-6); }
.container--mid { width: min(100% - 2 * var(--gutter), 980px); margin-inline: auto; }
.card-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); margin-bottom: var(--sp-5); }
.card-box h2 { font-size: var(--fs-lg); }
.card-box--accent { border-color: var(--gold-400); box-shadow: 0 0 0 4px var(--gold-100); }

/* Header cart button */
.cart-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--forest-900); text-decoration: none; transition: background var(--dur-fast); }
.cart-btn:hover { background: var(--cream-200); }
.cart-btn .icon { width: 24px; height: 24px; }
.cart-btn__count { position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--gold-gradient); color: var(--forest-950); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.cart-btn__count.is-bump { animation: bump 0.45s var(--ease-out); }
@keyframes bump { 40% { transform: scale(1.35); } }
@media (max-width: 960px) { .cart-btn { order: 2; } }

/* Drawer */
.drawer-backdrop { position: fixed; inset: 0; z-index: var(--z-drawer); background: rgba(8, 42, 31, 0.45); opacity: 0; transition: opacity var(--dur) var(--ease-out); }
.drawer-backdrop.is-open { opacity: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: calc(var(--z-drawer) + 1); width: min(440px, 100vw); display: flex; flex-direction: column; background: var(--cream-50); box-shadow: var(--shadow-lg); transform: translateX(100%); visibility: hidden; transition: transform 0.45s var(--ease-out), visibility 0s linear 0.45s; outline: none; }
.drawer.is-open { transform: none; visibility: visible; transition: transform 0.45s var(--ease-out); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-5) var(--sp-5) var(--sp-4); border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: var(--fs-lg); margin: 0; }
.drawer__close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: none; font-size: 1.5rem; line-height: 1; color: var(--forest-900); }
.drawer__body { flex: 1; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.drawer__lines { padding: var(--sp-3) var(--sp-5); flex: 1; }
.drawer__foot { padding: var(--sp-4) var(--sp-5) var(--sp-5); border-top: 1px solid var(--line); background: var(--white); }
.drawer__empty { margin: auto; padding: var(--sp-7); text-align: center; color: var(--text-muted); }
.drawer__empty .icon { width: 56px; height: 56px; margin: 0 auto var(--sp-3); color: var(--forest-500); }
.drawer__note { font-size: var(--fs-xs); color: var(--text-muted); margin: 0 0 var(--sp-4); }
.drawer__link { display: block; text-align: center; margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--forest-700); }
.drawer__loading { margin: auto; color: var(--text-muted); }
.drawer .alert { margin: var(--sp-4) var(--sp-5) 0; }
body.drawer-open { overflow: hidden; }

/* Cart line */
.cart-line { display: grid; grid-template-columns: 68px 1fr auto; gap: var(--sp-4); align-items: start; padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line__thumb { display: grid; place-items: center; width: 68px; height: 68px; border-radius: var(--radius); overflow: hidden; background: radial-gradient(circle, color-mix(in srgb, var(--tea) 25%, var(--cream-50)), var(--cream-100)); }
.cart-line__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line__thumb span { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--tea) 60%, #fff), var(--tea) 65%); box-shadow: 0 0 0 4px var(--gold-300); }
.cart-line__info { display: grid; gap: 2px; min-width: 0; }
.cart-line__name { font-family: var(--font-display); font-weight: 600; color: var(--forest-900); text-decoration: none; }
:lang(ta) .cart-line__name { font-family: var(--font-body-ta); }
.cart-line__meta { font-size: var(--fs-xs); color: var(--text-muted); }
.cart-line__offer { justify-self: start; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--gold-100); color: var(--gold-700); font-size: 11px; font-weight: 700; }
.cart-line__qty { display: flex; align-items: center; gap: var(--sp-4); margin-top: var(--sp-2); }
.cart-line__remove { background: none; border: 0; padding: 0; font-size: var(--fs-xs); color: var(--text-muted); text-decoration: underline; }
.cart-line__remove:hover { color: var(--danger); }
.cart-line__total { text-align: right; display: grid; }
.cart-line__total s { font-size: var(--fs-xs); color: var(--text-muted); }
.cart-line__total strong { font-family: var(--font-display); color: var(--forest-900); }
.qty--sm button { width: 32px; height: 34px; font-size: 1.1rem; }
.qty--sm span { min-width: 26px; text-align: center; font-weight: 600; font-size: var(--fs-sm); }
.qty--sm button[disabled] { opacity: 0.3; }
.qty-form { display: flex; gap: var(--sp-2); }
.input--qty { width: 76px; min-height: 40px; padding: 6px 10px; text-align: center; }

/* Nudges */
.nudges { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.nudge { display: flex; gap: var(--sp-3); align-items: flex-start; margin: 0; padding: var(--sp-3); border-radius: var(--radius-sm); font-size: var(--fs-sm); text-decoration: none; }
.nudge .icon { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.nudge > span { flex: 1; }
.nudge--offer { background: var(--gold-100); color: var(--gold-700); font-weight: 600; }
.nudge--delivery { background: var(--forest-100); color: var(--forest-900); }
.nudge--wholesale { background: var(--forest-900); color: var(--cream-100); }
.nudge--wholesale strong { color: var(--cream-50); }
.nudge--wholesale u { color: var(--gold-300); }
.progress { display: block; height: 4px; border-radius: 4px; background: rgba(14, 59, 44, 0.15); margin-top: 6px; overflow: hidden; }
.progress b { display: block; height: 100%; background: var(--forest-700); border-radius: 4px; transition: width 0.6s var(--ease-out); }

/* Totals */
.totals { margin: 0 0 var(--sp-3); display: grid; gap: var(--sp-2); }
.totals div { display: flex; justify-content: space-between; gap: var(--sp-4); font-size: var(--fs-sm); }
.totals dt small { display: block; font-size: var(--fs-xs); color: var(--text-muted); }
.totals dd { margin: 0; white-space: nowrap; }
.totals__discount { color: var(--gold-700); font-weight: 600; }
.totals__grand { padding-top: var(--sp-3); border-top: 1px solid var(--line); font-size: var(--fs-md) !important; }
.totals__grand dt, .totals__grand dd { font-family: var(--font-display); font-weight: 700; color: var(--forest-900); }

/* Cart page */
.cart-page, .checkout, .order-page, .track-page { padding-block: var(--sp-8) var(--sp-9); }
.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: var(--sp-6); align-items: start; }
.cart-summary, .checkout-summary { position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
.cart-summary h2, .checkout-summary h2 { font-size: var(--fs-lg); }
@media (max-width: 960px) { .cart-layout, .checkout-layout { grid-template-columns: 1fr; } .cart-summary, .checkout-summary { position: static; } }

/* Checkout */
.checkout-form fieldset { border: 1px solid var(--line); margin: 0 0 var(--sp-5); }
.checkout-form legend { display: flex; align-items: center; gap: var(--sp-3); padding: 0 var(--sp-2); font-family: var(--font-display); font-size: var(--fs-lg); color: var(--forest-900); }
.checkout-form legend span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--forest-900); color: var(--gold-300); font-family: var(--font-body); font-size: var(--fs-sm); }
.pay-options { display: grid; gap: var(--sp-3); }
.pay-option { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4); border: 1.5px solid var(--cream-300); border-radius: var(--radius); cursor: pointer; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.pay-option input { margin-top: 4px; accent-color: var(--forest-700); }
.pay-option span { display: grid; gap: 2px; }
.pay-option small { color: var(--text-muted); }
.pay-option em { font-style: normal; font-size: var(--fs-xs); font-weight: 600; color: var(--gold-700); }
.pay-option:has(input:checked) { border-color: var(--gold-500); box-shadow: 0 0 0 3px var(--gold-100); }
.pay-option.is-disabled { opacity: 0.55; cursor: not-allowed; }
.mini-lines { list-style: none; padding: 0; margin: 0 0 var(--sp-4); display: grid; gap: var(--sp-3); }
.mini-lines li { display: grid; grid-template-columns: 34px 1fr auto; gap: var(--sp-3); align-items: center; font-size: var(--fs-sm); }
.mini-lines__dot { position: relative; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--tea, #b9824d) 60%, #fff), var(--tea, #b9824d) 65%); }
.mini-lines__dot b { position: absolute; top: -6px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--forest-900); color: var(--cream-50); font-size: 11px; display: grid; place-items: center; }
.mini-lines__name small { display: block; color: var(--text-muted); font-size: var(--fs-xs); }
.checkout-summary__hint, .checkout-summary__approx { font-size: var(--fs-xs); color: var(--text-muted); }
.form-note .icon--btn { display: inline-block; vertical-align: -3px; width: 16px; height: 16px; }

/* Product page offer box */
.offer-box { margin-top: var(--sp-4); padding: var(--sp-4); border-radius: var(--radius); background: var(--gold-100); color: var(--gold-700); font-size: var(--fs-sm); }
.offer-box strong { display: flex; align-items: center; gap: var(--sp-2); }
.offer-box .icon { width: 20px; height: 20px; }
.offer-box ul { margin: var(--sp-2) 0 0; padding-left: 28px; }

/* Order page */
.order-hero { text-align: center; padding: var(--sp-6) 0 var(--sp-7); }
.order-hero h1 { font-size: var(--fs-2xl); }
.order-hero .lead { margin-inline: auto; }
.order-hero__tick { width: 84px; height: 84px; margin: 0 auto var(--sp-5); border-radius: 50%; display: grid; place-items: center; background: var(--gold-gradient); color: var(--forest-950); box-shadow: 0 16px 40px -16px var(--gold-700); animation: pop 0.7s var(--ease-out) both; }
.order-hero__tick .icon { width: 48px; height: 48px; stroke-width: 2.4; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } }
.order-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-4); }
.order-meta dt { font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.order-meta dd { margin: 0; font-weight: 600; color: var(--forest-900); }
.order-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--sp-5); }
.order-grid address { font-style: normal; line-height: 1.7; }
@media (max-width: 760px) { .order-grid { grid-template-columns: 1fr; } }
.progress-steps { list-style: none; padding: 0; margin: var(--sp-4) 0 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: s; }
.progress-steps li { position: relative; display: grid; justify-items: center; gap: var(--sp-2); text-align: center; font-size: var(--fs-xs); color: var(--text-muted); }
.progress-steps li span { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; background: var(--cream-200); border: 2px solid var(--cream-300); }
.progress-steps li::before { content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: var(--cream-300); }
.progress-steps li:first-child::before { display: none; }
.progress-steps li.is-done { color: var(--forest-900); font-weight: 600; }
.progress-steps li.is-done span { background: var(--forest-700); border-color: var(--forest-700); }
.progress-steps li.is-done::before { background: var(--forest-700); }
.progress-steps li.is-current span { box-shadow: 0 0 0 5px var(--gold-100); background: var(--gold-500); border-color: var(--gold-500); }
.order-tracking { margin: var(--sp-5) 0 0; font-size: var(--fs-sm); }
.bank-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-3); margin: var(--sp-4) 0 0; padding: var(--sp-4); border-radius: var(--radius); background: var(--cream-100); }
.bank-details dt { font-size: var(--fs-xs); color: var(--text-muted); }
.bank-details dd { margin: 0; font-weight: 700; color: var(--forest-900); word-break: break-word; }

/* ── Phase 4 · Payments ───────────────────────────────── */
.btn--sm { padding: 0.5rem 1rem; font-size: var(--fs-sm); min-height: 38px; }
.pay-option { align-items: center; }
.pay-option__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--cream-100); color: var(--forest-700); }
.pay-option__icon .icon { width: 26px; height: 26px; }
.pay-option:has(input:checked) .pay-option__icon { background: var(--gold-100); color: var(--gold-700); }
.pay-option input { margin-top: 0; }

.pay-method-tag { display: inline-flex; align-items: center; gap: 6px; margin-left: var(--sp-2); padding: 3px 10px; border-radius: var(--radius-pill); background: var(--cream-100); font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600; color: var(--forest-700); vertical-align: middle; }
.pay-method-tag .icon { width: 16px; height: 16px; }

.qr-pay { margin: var(--sp-4) 0; display: inline-grid; gap: var(--sp-2); justify-items: center; padding: var(--sp-4); background: var(--white); border: 1px solid var(--cream-300); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.qr-pay img { width: min(220px, 60vw); height: auto; display: block; }
.qr-pay figcaption { font-size: var(--fs-sm); font-weight: 600; color: var(--forest-900); }

.slip-list { list-style: none; padding: 0; margin: var(--sp-5) 0 0; display: grid; gap: var(--sp-2); }
.slip-list__item { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) var(--sp-4); border-radius: var(--radius); background: var(--cream-100); font-size: var(--fs-sm); }
.slip-list__item .icon { flex: none; width: 22px; height: 22px; color: var(--forest-700); margin-top: 2px; }
.slip-list__item span { display: grid; gap: 2px; }
.slip-list__item small { color: var(--text-muted); }
.slip-list__item--approved { background: #e7f4ec; }
.slip-list__item--rejected { background: #fbecea; }
.slip-list__item--rejected .icon { color: var(--danger); }
.slip-list__reason { color: var(--danger) !important; }

.slip-form { margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px dashed var(--cream-300); display: grid; gap: var(--sp-4); }
.slip-form h3 { margin: 0; font-size: var(--fs-md); font-family: var(--font-body); font-weight: 700; color: var(--forest-900); }
.slip-form .btn { justify-self: start; }
.slip-drop { position: relative; display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-5); border: 2px dashed var(--cream-300); border-radius: var(--radius); background: var(--cream-50); cursor: pointer; transition: border-color var(--dur-fast), background var(--dur-fast); }
.slip-drop:hover, .slip-drop:focus-within { border-color: var(--gold-500); background: var(--gold-100); }
.slip-form.has-file .slip-drop { border-style: solid; border-color: var(--forest-500); }
.slip-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.slip-drop .icon { flex: none; width: 34px; height: 34px; color: var(--gold-600); }
.slip-drop span { display: grid; gap: 2px; min-width: 0; }
.slip-drop small { color: var(--text-muted); font-size: var(--fs-xs); overflow-wrap: anywhere; }

.pay-switch { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--text-muted); }
.pay-switch span { margin-right: var(--sp-2); }

.pay-handoff { text-align: center; margin-top: var(--sp-7); display: grid; gap: var(--sp-3); justify-items: center; }
.pay-handoff h1 { font-size: var(--fs-xl); margin: 0; }
.pay-handoff__icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-100); color: var(--gold-700); }
.pay-handoff__icon .icon { width: 32px; height: 32px; }
.pay-handoff__test { padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-pill); background: #fff4dc; color: var(--warning); font-size: var(--fs-xs); font-weight: 600; }
.bank-details + p, .qr-pay + .bank-details { margin-top: var(--sp-4); }
.progress-steps li { min-width: 0; overflow-wrap: anywhere; }
/* Phones (and long Tamil words): steps go top-to-bottom */
@media (max-width: 560px) {
  .progress-steps { grid-template-columns: 1fr; gap: var(--sp-4); }
  .progress-steps li { grid-template-columns: 22px 1fr; justify-items: start; align-items: center; text-align: left; gap: var(--sp-3); font-size: var(--fs-sm); }
  .progress-steps li::before { top: auto; bottom: calc(100% - 4px); left: 10px; width: 2px; height: calc(var(--sp-4) + 8px); }
}

/* Phase 5 · link from a product page to its wholesale price */
.ws-product-link { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); padding: var(--sp-3) var(--sp-4); border-radius: var(--radius); background: var(--cream-100); font-size: var(--fs-sm); text-decoration: none; color: var(--forest-900); }
.ws-product-link .icon { flex: none; width: 24px; height: 24px; color: var(--gold-600); }
.ws-product-link:hover { background: var(--gold-100); }

/* ── Phase 7 · WhatsApp ─────────────────────────────────────────────── */
:root { --wa-green: #25D366; }
.btn--wa { background: var(--forest-900); color: var(--cream-50); }
.btn--wa:hover { background: var(--forest-700); }
.btn--wa .icon { color: var(--wa-green); }
.btn--wa:hover .icon--btn { transform: none; }

/* Checkout: second way to place the order */
.checkout-wa { display: grid; gap: var(--sp-2); margin-top: var(--sp-3); text-align: center; }
.checkout-wa__or { display: flex; align-items: center; gap: var(--sp-3); color: var(--text-muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.12em; }
.checkout-wa__or::before, .checkout-wa__or::after { content: ""; flex: 1; height: 1px; background: var(--line, rgba(14, 59, 44, 0.12)); }
.checkout-wa .form-note { margin: 0; }

/* Order page: "send your order on WhatsApp" step */
.wa-send { display: flex; gap: var(--sp-5); align-items: flex-start; margin-bottom: var(--sp-5); border: 1px solid rgba(37, 211, 102, 0.35); background: linear-gradient(135deg, rgba(37, 211, 102, 0.08), transparent 60%), var(--cream-50); }
.wa-send__icon { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--forest-900); color: var(--wa-green); }
.wa-send__icon .icon { width: 30px; height: 30px; }
.wa-send__body { display: grid; gap: var(--sp-3); justify-items: start; }
.wa-send h2 { margin: 0; font-size: var(--fs-lg); }
.wa-send p { margin: 0; color: var(--text-muted); }
.wa-send .form-note { margin: 0; }
@media (max-width: 600px) {
  .wa-send { flex-direction: column; }
  .wa-send .btn { width: 100%; padding-inline: var(--sp-4); }
}

/* Product page: ask about this tea */
.ws-product-link--wa .icon { color: #1DA851; }

/* Round chat button, bottom right on every public page */
.wa-float {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; justify-content: center; height: 56px; min-width: 56px; padding: 0 15px;
  border-radius: 999px; background: var(--forest-900); color: var(--cream-50); text-decoration: none;
  box-shadow: 0 12px 30px -10px rgba(8, 42, 31, 0.55), 0 0 0 1px rgba(201, 155, 64, 0.35);
  transition: transform var(--dur) var(--ease-out), background var(--dur-fast);
}
.wa-float .icon { width: 26px; height: 26px; flex: none; color: var(--wa-green); stroke-width: 2; }
.wa-float__label { max-width: 0; margin-left: 0; overflow: hidden; white-space: nowrap; font-weight: 600; font-size: var(--fs-sm); transition: max-width 0.35s var(--ease-out), margin 0.35s var(--ease-out); }
.wa-float:hover { background: var(--forest-700); transform: translateY(-2px); }
.wa-float:hover .wa-float__label, .wa-float:focus-visible .wa-float__label { max-width: 200px; margin-left: var(--sp-2); }
.wa-float:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 3px; }
@media (min-width: 900px) { .wa-float { right: 28px; bottom: 28px; } }
@media print { .wa-float { display: none; } }

