/* Kalaghoda Spirits — cart page (/cart). Loaded after global.css. */
:root {
  --bg: #121212;
  --band: #171717;
  --text: #ffffff;
  --muted: #767676;
  --accent: #e91e63;          /* brand pink */
  --gold: #c7931e;            /* title accent on dark */
  --gold-line: #f4b321;
  --font: "Josefin Sans", "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-editorial: cubic-bezier(.22, .61, .36, 1);
  --ease-inout: cubic-bezier(.65, 0, .35, 1);
  /* 1 design px on the 1920-wide reference */
  --u: calc(100vw / 1920);
  --s: var(--u);
}
button { font: inherit; color: inherit; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
:root {
  --line: #353535;
  --tile: #171717;
  --field: #1b1b1b;
  --apply: #323232;
}

/* ═════════════════════════ HEADER (same as the homepage navigation) ═════════════════════════ */
.site-header { position: relative; z-index: 5; height: calc(160 * var(--u)); }
.nav { position: absolute; inset: 0 0 auto 0; height: calc(160 * var(--s)); }
.nav__bag { left: calc(1422 * var(--s)); top: calc(84 * var(--s)); width: calc(24 * var(--s)); height: calc(22 * var(--s)); transition: translate .45s var(--ease-out); }

@media (min-width: 901px) {
  .nav__right { display: contents; }
  .nav__bag, .btn-outline { position: absolute; }
}
@media (max-width: 900px) {
  .site-header { height: auto; padding: 0 16px; }
  .nav {
    position: relative;
    height: 88px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .nav > * { position: static; }
  .nav__link { display: none; }
  .nav__toggle {
    display: inline-flex; flex-direction: column; gap: 6px;
    grid-column: 1; justify-self: start;
    background: none; border: 0; padding: 8px 0; cursor: pointer;
  }
  .nav__toggle span { width: 22px; height: 1.5px; background: #fff; display: block; }
  .nav__logo { grid-column: 2; grid-row: 1; width: 56px; height: 62px; }
  .nav__right { grid-column: 3; grid-row: 1; justify-self: end; display: flex; align-items: center; }
  .nav__right .btn-outline { display: none; }
  .nav__bag { width: 22px; height: 22px; margin-right: 2px; }
}
@media (max-width: 440px) { .nav__logo { width: 50px; height: 56px; } }
@media (max-width: 900px) { .nav__bag { position: relative; left: auto; top: auto; } }
@media (prefers-reduced-motion: reduce) { .nav__count, .nav__count.is-bump { transition: none; animation: none; } }

/* ═════════════════════════ CART ═════════════════════════
   Two columns on wide screens: the bottles (each on a panel in its own colour, its fruit drawn behind it) and the
   order beside them — how it reaches you, the totals, checkout — which stays in view while the bottles scroll.
   One column on phones, the order under the bottles. */
.cart-band {                      /* the middle of the page on white, like the homepage's product sections */
  --ink: #121212;
  --muted: #767676;
  --gold: #f6c24d;
  background: #fff;
  color: var(--ink);
  padding: 1px 0 0;
}
.cart {
  --panel: #ffffff;
  --panel-line: #e8e8e8;
  --tile: #ffffff;
  --soft: #5f5f5f;
  width: min(1240px, calc(100% - 64px));
  margin: clamp(22px, 2.6vw, 40px) auto 0;
}
.cart__head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.cart__title em { font-style: normal; color: var(--gold); }
.cart__title {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cart__count { font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cart__count:empty { display: none; }
.cart__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 32px;
  margin-left: -6px;
  transition: translate .45s var(--ease-out), color .35s ease;
}
.cart__back svg { width: 12px; height: auto; display: block; overflow: visible; }
.cart__back:hover { translate: -3px 0; color: var(--accent); }
.cart__back:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.cart__notice { margin-top: 18px; font-size: 15px; line-height: 1.5; letter-spacing: 0.02em; color: #b0006a; }
.cart__notice:empty { display: none; }

.cart__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  margin-top: clamp(18px, 1.8vw, 26px);
}

/* ── the bottles ── */
.rows { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.row {
  --tint: #e91e63;
  position: relative;
  display: grid;
  grid-template-columns: clamp(150px, 15vw, 210px) minmax(0, 1fr) auto;
  gap: 0 clamp(20px, 2.4vw, 36px);
  padding-right: clamp(18px, 2vw, 28px);
  background: var(--panel);
  border: 1px solid var(--panel-line);
  transition: opacity .35s ease, translate .45s var(--ease-out), border-color .4s ease;
}
.row:hover { border-color: color-mix(in srgb, var(--tint) 35%, var(--panel-line)); }
.row.is-removing { opacity: 0; translate: -14px 0; pointer-events: none; }
.row__media {
  position: relative;
  grid-row: 1 / span 2;
  min-height: clamp(150px, 12.5vw, 190px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--tint) 16%, transparent), transparent 72%),
    #faf9f7;
}
.row__botanical {
  position: absolute;
  right: -18%;
  top: -6%;
  width: 92%;
  height: auto;
  opacity: .7;
  rotate: 8deg;
  pointer-events: none;
  transition: opacity .6s ease, rotate 1.2s var(--ease-out);
}
.row__bottle { position: relative; height: 84%; width: auto; max-height: 168px; display: block; filter: drop-shadow(0 16px 14px rgba(0, 0, 0, .22)); transition: translate .6s var(--ease-out); }
.row:hover .row__bottle { translate: 0 -4px; }
.row:hover .row__botanical { opacity: .9; rotate: 4deg; }
.row__body { grid-column: 2; grid-row: 1 / span 2; align-self: center; padding: 18px 0; min-width: 0; }
.row__name {
  display: inline-block;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color .35s ease;
}
.row__name:hover { color: var(--tint); }
.row__name:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.row__meta { margin-top: 8px; font-size: 15px; letter-spacing: 0.03em; color: var(--soft); font-variant-numeric: tabular-nums; }
.row__controls { margin-top: 16px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.row__price {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.row__qty { display: flex; align-items: center; border: 1px solid #cfcfcf; color: var(--ink); }
.qty__btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: background-color .3s ease, scale .25s var(--ease-out);
}
.qty__btn svg { width: 11px; height: auto; display: block; overflow: visible; }
.qty__btn:hover:not(:disabled) { background: color-mix(in srgb, var(--tint) 14%, transparent); }
.qty__btn:active:not(:disabled) { scale: .92; }
.qty__btn:disabled { cursor: default; opacity: .35; }
.qty__btn:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.qty__value { width: 40px; text-align: center; font-size: 15px; font-weight: 600; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.row__delete {
  padding: 6px 0;
  border: 0;
  background: none;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  transition: color .3s ease, text-decoration-color .3s ease;
}
.row__delete:hover { color: var(--accent); text-decoration-color: currentColor; }
.row__delete:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.actions__continue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
  transition: color .3s ease;
}
.actions__continue::before { content: "←"; letter-spacing: 0; transition: translate .4s var(--ease-out); }
.actions__continue:hover { color: var(--ink); }
.actions__continue:hover::before { translate: -4px 0; }
.actions__continue:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.actions__continue[hidden] { display: none; }

.cart__empty { padding: clamp(40px, 6vw, 80px) clamp(24px, 4vw, 56px); background: var(--panel); border: 1px solid var(--panel-line); }
.cart__empty[hidden] { display: none; }
.cart__layout:has(.order[hidden]) { grid-template-columns: 1fr; }          /* nothing to order: the empty state takes the width */
.cart__layout:has(.order[hidden]) .cart__empty { text-align: center; }
.cart__empty-title { font-size: clamp(22px, 2vw, 30px); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.cart__empty-text { margin-top: 12px; font-size: 16px; line-height: 1.6; color: var(--soft); }
.cart__empty-cta {
  display: inline-flex; align-items: center; justify-content: center; margin-top: 28px; height: 52px; padding: 2px 32px 0;
  background: var(--ink); color: #fff; font-size: 13px; letter-spacing: 0.32em; text-transform: uppercase;
  transition: background-color .35s ease;
}
.cart__empty-cta:hover { background: var(--accent); }
.cart__empty-cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ── the order ── */
.order {
  position: sticky;
  top: 16px;
  padding: clamp(18px, 1.7vw, 26px);
  background: #faf9f7;
  border: 1px solid var(--panel-line);
}
.order[hidden] { display: none; }
.order__title { font-size: 15px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; }
.order__label { padding: 0; margin-bottom: 10px; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

.shipopt { margin: 0; padding: 0; border: 0; min-width: 0; }
.shipopt[hidden] { display: none; }
.shipopt__tiles { display: flex; flex-direction: column; gap: 8px; }
.shipopt__choice {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: center;
  padding: 11px 14px;
  background: var(--tile);
  border: 1px solid #dedede;
  color: var(--soft);
  cursor: pointer;
  transition: border-color .3s ease, background-color .3s ease, color .3s ease;
}
.shipopt__choice:hover { border-color: #b8b8b8; }
.shipopt__choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.shipopt__choice:has(input:checked) {
  color: var(--ink);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, #fff);
}
.shipopt__choice:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.shipopt__icon { grid-column: 1; grid-row: 1 / span 2; width: 26px; height: 26px; color: currentColor; transition: color .3s ease; }
.shipopt__choice:has(input:checked) .shipopt__icon { color: var(--accent); }
.shipopt__name { grid-column: 2; grid-row: 1; font-size: 15px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.3; }
.shipopt__price { grid-column: 3; grid-row: 1 / span 2; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.shipopt__note { grid-column: 2; grid-row: 2; font-size: 12.5px; line-height: 1.4; letter-spacing: 0.02em; color: var(--muted); }
.shipopt__note:empty { display: none; }

/* free shipping: bottle outlines that fill (jamun pink; mango gold once shipping is free) */
.meter { margin-top: 12px; display: flex; align-items: center; gap: 14px; }
.meter[hidden] { display: none; }
.meter__bottles { flex: none; display: flex; gap: 6px; align-items: flex-end; }
.meter__bottle { width: 11px; height: 26px; overflow: visible; }
.meter__fill {
  fill: var(--accent);
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scaleY(var(--fill, 0));
  transition: transform .7s var(--ease-out) calc(var(--n, 0) * 60ms), fill .5s ease;
}
.meter__outline { fill: none; stroke: #9a9a9a; stroke-width: 1.3; transition: stroke .5s ease; }
.meter.is-full .meter__fill { fill: var(--gold-line); }
.meter.is-full .meter__outline { stroke: var(--gold-line); }
.meter__text { margin: 0; font-size: 13.5px; line-height: 1.4; letter-spacing: 0.02em; color: #3a3a3a; }
.meter.is-full .meter__text { color: #8a5d00; }
.pickup-where { margin-top: 10px; font-size: 13.5px; line-height: 1.5; letter-spacing: 0.02em; color: #3a3a3a; }
.pickup-where[hidden] { display: none; }

.sum { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--panel-line); }
.sum__row { display: flex; justify-content: space-between; gap: 16px; font-size: 14.5px; line-height: 1.35; letter-spacing: 0.02em; color: var(--soft); }
.sum__row + .sum__row { margin-top: 6px; }
.sum__row span:last-child { color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }

.coupon { margin-top: 18px; height: 52px; display: flex; align-items: center; padding-right: 5px; background: #fff; border: 1px solid #dedede; transition: box-shadow .35s ease; }
.coupon:focus-within { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.coupon input { flex: 1; min-width: 0; height: 100%; padding: 3px 14px 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; outline: none; }
.coupon input::placeholder { color: var(--muted); opacity: 1; }
.coupon button { flex: none; width: 96px; height: 42px; padding-top: 3px; border: 0; background: #323232; color: #fff; font-size: 12px; letter-spacing: 0.3em; text-indent: 0.3em; text-transform: uppercase; cursor: pointer; transition: background-color .4s ease; }
.coupon button:hover { background: #3f3f3f; }
.coupon button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.coupon__msg { margin-top: 10px; font-size: 13px; letter-spacing: 0.02em; color: var(--muted); }
.coupon__msg:empty { display: none; }
.coupon__msg.is-ok { color: #8a5d00; }
.coupon__remove { margin-top: 8px; padding: 4px 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.coupon__remove:hover { color: var(--accent); }
.coupon__remove:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.coupon__remove[hidden] { display: none; }

.total {
  margin-top: 14px;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  border-top: 1px solid var(--panel-line);
}
.total span { font-size: 15px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.total strong { font-size: clamp(26px, 2.1vw, 32px); font-weight: 700; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }

.actions__checkout {
  width: 100%;
  height: 54px;
  margin-top: 16px;
  padding-top: 3px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .35s ease, color .35s ease;
}
.actions__checkout:hover { background: var(--accent); color: #fff; }
.actions__checkout:disabled { background: #d6d6d6; color: #7a7a7a; cursor: default; }
.actions__checkout:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.order__fine { margin-top: 14px; font-size: 12.5px; line-height: 1.5; letter-spacing: 0.02em; color: var(--muted); text-align: center; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.cart-end { height: clamp(64px, 8vw, 120px); }

/* phones: the total and Checkout at the bottom of the screen while the order panel's button is out of view */
.checkbar { display: none; }

/* ═════════════════════════ CART — tablet ═════════════════════════ */
@media (max-width: 1100px) {
  :root { --u: 1px; }
  .site-header { --s: calc(100vw / 1920); }
}
@media (max-width: 960px) {
  .cart { width: auto; margin-inline: 32px; }
  .cart__layout { grid-template-columns: 1fr; }
  .order { position: static; }
}

/* ═════════════════════════ CART — phone ═════════════════════════ */
@media (max-width: 600px) {
  .cart { margin: 32px 16px 0; }
  .cart__head { gap: 12px; }
  .row { grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; padding-right: 14px; }
  .row__media { min-height: 132px; }
  .row__body { grid-row: 1; padding: 14px 0 0; align-self: start; }
  .row__name { font-size: 19px; }
  .row__meta { font-size: 13px; margin-top: 6px; }
  .row__controls { margin-top: 12px; gap: 12px; flex-wrap: nowrap; }
  .qty__btn { width: 40px; height: 40px; }
  .qty__value { width: 34px; }
  .row__price { grid-column: 2; grid-row: 2; justify-self: start; align-self: end; padding: 8px 0 14px; font-size: 19px; }
  .order { padding: 22px 18px; }
  .checkbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid #e3e3e3; box-shadow: 0 -8px 24px rgba(0, 0, 0, .08);
    translate: 0 110%; transition: translate .35s var(--ease-out);
  }
  body.has-items:not(.checkout-in-view) .checkbar { translate: none; }
  .checkbar__total { display: flex; flex-direction: column; color: var(--ink, #121212); }
  .checkbar__total small { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: #767676; }
  .checkbar__total strong { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .checkbar__go { flex: none; height: 48px; padding: 3px 26px 0; border: 0; background: #121212; color: #fff; font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.3em; text-indent: 0.3em; text-transform: uppercase; cursor: pointer; }
  .checkbar__go:disabled { background: #d6d6d6; color: #7a7a7a; }
}
@media (max-width: 600px) and (prefers-reduced-motion: reduce) { .checkbar { transition: none; } }

/* Footer — tablet / mobile: stacked */
@media (max-width: 1100px) {
  .site-footer { --u: 1px; height: auto; padding: 72px 24px 40px; display: flex; flex-direction: column; }
  .site-footer > * { position: static; }
  .site-footer__logo { width: 104px; margin-left: 0; }
  .site-footer__tagline { margin-top: 24px; font-size: 16px; white-space: normal; }
  .site-footer__nav { margin-top: 56px; gap: 72px; }
  .site-footer__col { width: auto; }
  .site-footer__heading { font-size: 15px; }
  .site-footer__links { margin-top: 28px; }
  .site-footer__links li + li { margin-top: 18px; }
  .site-footer__links a { font-size: 15px; line-height: 1.4; }
  .site-footer__rule { margin-top: 56px; height: 1px; flex: none; }
  .site-footer__copy { order: 2; margin-top: 28px; font-size: 13px; line-height: 1.6; }
  .site-footer__social { order: 1; margin-top: 32px; gap: 20px; }
  .site-footer__social a { width: 40px; height: 40px; }
}
@media (max-width: 480px) {
  .site-footer__nav { gap: 56px; }
}
@media (min-width: 901px) { .mobile-menu { display: none !important; } }

/* ═════════════════════════ MOTION ═════════════════════════
   Short, layered entrances — transform + opacity only (fill "backwards"
   so hover states work afterwards). Value changes get a quick tick. */
@keyframes kg-rise { from { opacity: 0; translate: 0 var(--rise, 16px); } }
@keyframes kg-drop { from { opacity: 0; translate: 0 -12px; } }
@keyframes kg-tick { from { opacity: 0; translate: 0 -5px; } }
html.motion .nav > a, html.motion .nav__toggle, html.motion .nav__bag, html.motion .nav__account, html.motion .btn-outline { animation: kg-drop .9s var(--ease-out) var(--d, .05s) backwards; }
html.motion .nav__link--story { --d: .1s; }
html.motion .nav__logo { --d: .15s; }
html.motion .nav__link--cocktails { --d: .2s; }
html.motion .nav__link--partners { --d: .25s; }
html.motion .nav__bag { --d: .3s; }
html.motion .nav__account { --d: .35s; }
html.motion .btn-outline { --d: .35s; }
html.motion .cart__title { animation: kg-rise .8s var(--ease-out) .2s backwards; }
html.motion .rows > *, html.motion .cart__empty { animation: kg-rise .8s var(--ease-out) calc(.32s + var(--i, 0) * .1s) backwards; }
html.motion .order    { animation: kg-rise .9s var(--ease-out) .45s backwards; --rise: 18px; }
html.motion .actions__continue { animation: kg-rise .8s var(--ease-out) .6s backwards; --rise: 10px; }
html.motion .is-tick  { animation: kg-tick .35s var(--ease-out); }
html.motion .rv { transition: opacity .9s var(--ease-editorial) var(--rv-d, 0s), translate 1s var(--ease-out) var(--rv-d, 0s), scale 1.4s var(--ease-inout) var(--rv-d, 0s); }
html.motion .rv:not(.is-inview) { opacity: 0; translate: 0 16px; }
html.motion .rv--draw { transform-origin: left center; }
html.motion .rv--draw:not(.is-inview) { opacity: 1; translate: none; scale: 0 1; }

@media (prefers-reduced-motion: reduce) {
  .btn-outline:hover, .nav__bag:hover, .cart__back:hover { translate: none; }
  .row:hover .row__bottle, .actions__continue:hover::before { translate: none; }
  .row__botanical, .meter__fill { transition: none; }
  .qty__btn:active:not(:disabled) { scale: none; }
  .site-footer__social a:hover { transform: none; }
  .nav__link::after, .site-footer__links a::after { transition: none; }
}
