/* The Cookie Company shop (store.thecookiecompany.co.in), in the website's look: a warm brown page, baby-blue
   cards, dark brown and butter, Agharti in lowercase, buttons with a solid shadow they press into. */

@font-face { font-family: "Agharti"; src: url("/shop/fonts/agharti.woff2") format("woff2"); font-weight: 1 100; font-display: swap; }
@font-face { font-family: "Spartan"; src: url("/shop/fonts/spartan-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --brown: #8a6e5a;
  --dark: #362618;
  --dark-2: #4a3626;
  --butter: #ffffa8;
  --butter-soft: #fffbd2;
  --cream: #fefae7;
  --paper: #fffdf5;
  --baby: #d5ebf8;
  --caramel: #b4521b;
  --muted: #6f5a49; /* 6.2:1 on cream */
  --danger: #a3301c;
  --line: rgba(54, 38, 24, 0.13);
  --line-strong: rgba(54, 38, 24, 0.2);
  --display: "Agharti", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --text: "Spartan", ui-sans-serif, system-ui, "Segoe UI", Arial, sans-serif;
  --wide: "wght" 84, "wdth" 100;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--brown); }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--brown); color: var(--dark); font: 400 15px/1.5 var(--text); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--caramel); outline-offset: 2px; }
::selection { background: var(--butter); color: var(--dark); }
.i { width: 20px; height: 20px; flex: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 10px; background: var(--butter); color: var(--dark); font-weight: 700; }
.skip:focus { top: 12px; }

/* Agharti as the website sets it */
.d { font-family: var(--display); font-variation-settings: var(--wide); font-weight: 400; letter-spacing: 0.04em; text-transform: lowercase; }
.m { white-space: nowrap; }
.rs { font-family: var(--text); font-size: 0.74em; letter-spacing: 0; margin-right: 0.04em; } /* Agharti has no ₹ */

/* ---------------------------------------------------------------- the bar at the top */
.bar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 12px 16px;
  background: rgba(138, 110, 90, 0.92); backdrop-filter: blur(8px);
}
body:has(.step) .bar, body:has(.welcome) .bar, body:has(.welcome) .foot, body:has(.step) .foot { display: none; }
.bar__logo { display: block; color: var(--butter); border-radius: 8px; }
.bar__logo svg { display: block; width: auto; height: 46px; aspect-ratio: 2.2385; fill: currentColor; }
.bar__cart {
  position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--butter); color: var(--dark); transition: transform 0.12s;
}
.bar__cart:active { transform: scale(0.95); }
.bar__count {
  position: absolute; top: -6px; right: -6px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px;
  background: var(--dark); color: var(--butter); font-size: 11.5px; font-weight: 700; line-height: 21px; text-align: center;
}

main { flex: 1; width: 100%; outline: none; }
.foot { padding: 28px 16px calc(28px + var(--safe-bottom)); text-align: center; font-size: 13px; }
.foot a { color: var(--butter); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
body:has(.cartbar) .foot { padding-bottom: calc(110px + var(--safe-bottom)); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 14px;
  background: var(--dark); color: var(--butter); text-decoration: none;
  font: 400 21px/1 var(--display); font-variation-settings: var(--wide); letter-spacing: 0.04em; text-transform: lowercase;
  box-shadow: 4px 4px 0 rgba(54, 38, 24, 0.38);
  transition: transform 0.12s, box-shadow 0.12s, background-color 0.15s;
}
.btn:hover { background: var(--dark-2); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 rgba(54, 38, 24, 0.38); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; box-shadow: 4px 4px 0 rgba(54, 38, 24, 0.2); }
.btn--wide { width: 100%; min-height: 56px; }
.btn--light { background: var(--cream); color: var(--dark); }
.btn--light:hover { background: var(--butter-soft); }
.link { padding: 0; border: 0; background: none; color: var(--caramel); font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- the shop */
.shop { max-width: 1180px; margin: 0 auto; padding: 0 6px 40px; }
.shop__head { padding: 12px 12px 26px; text-align: center; }
.shop__title { margin: 0; font-size: clamp(88px, 22vw, 180px); line-height: 0.78; color: var(--dark); }
.shop__intro { max-width: 26ch; margin: 20px auto 0; color: var(--butter); font-size: clamp(20px, 5vw, 30px); line-height: 1.05; }
.shop__tools { display: grid; gap: 12px; max-width: 580px; margin: 0 auto; padding: 0 12px 18px; }
.search { position: relative; }
.search .i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; width: 18px; height: 18px; }
.search input {
  width: 100%; height: 50px; padding: 0 46px; border: 0; border-radius: 999px; background: var(--cream); font-size: 16px;
}
.search input::placeholder { color: #7d6857; }
.search input:focus { outline: none; box-shadow: 0 0 0 3px var(--butter); }
.search input::-webkit-search-cancel-button { display: none; }
.search__clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 999px; background: none; color: var(--muted); }
.search__clear:hover { background: var(--butter-soft); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -12px; padding: 2px 12px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 10px 17px 9px; border: 0; border-radius: 999px; background: var(--cream); color: var(--dark);
  font: 400 18px/1 var(--display); font-variation-settings: var(--wide); letter-spacing: 0.04em; text-transform: lowercase;
  transition: background-color 0.15s, color 0.15s;
}
.chip:hover { background: var(--butter-soft); }
.chip[aria-pressed="true"] { background: var(--dark); color: var(--butter); }
@media (min-width: 640px) { .chips { justify-content: center; } }

.notice { margin: 0 6px 16px; padding: 18px 20px; border-radius: 20px; background: var(--cream); text-align: center; }
.notice__title { margin: 0; font-size: 30px; line-height: 1; }
.notice__text { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.notice--big { padding: 56px 24px; }
.notice--big .notice__title { font-size: 34px; }

/* two, three or four to a row, a short last row centred (as on the website's store) */
.grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.grid > li { flex: 0 0 calc((100% - 6px) / 2); min-width: 0; }
@media (min-width: 768px) { .grid > li { flex-basis: calc((100% - 12px) / 3); } }
@media (min-width: 1200px) { .grid > li { flex-basis: calc((100% - 18px) / 4); } }
.card { display: flex; flex-direction: column; height: 100%; padding: 12px 12px 16px; border-radius: 18px; background: var(--baby); text-align: center; }
.card__photo { display: grid; place-items: center; width: 100%; max-width: 260px; aspect-ratio: 1; margin: 0 auto; }
.card__photo img { width: 100%; height: 100%; object-fit: contain; }
.card__none { color: rgba(54, 38, 24, 0.25); font-size: 64px; }
.card__name { margin: 4px 0 0; font-size: clamp(24px, 6.4vw, 38px); line-height: 0.9; }
.card__kind { margin: 6px 0 0; font-size: 15px; line-height: 1.15; color: rgba(54, 38, 24, 0.8); }
.card__text { max-width: 30ch; margin: 8px auto 0; font-size: 12.5px; line-height: 1.4; text-transform: lowercase; color: rgba(54, 38, 24, 0.9);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__foot { margin-top: auto; padding-top: 12px; }
.card__price { margin: 0; font-size: 25px; line-height: 1; }
.card__buy { display: flex; justify-content: center; margin-top: 10px; }
.card__buy .btn { min-height: 44px; padding: 0 24px; font-size: 20px; }
@media (min-width: 640px) { .card { padding: 14px 20px 22px; } }

.stepper { display: inline-flex; align-items: center; gap: 0; min-height: 44px; padding: 0 4px; }
.stepper button { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: none; color: inherit; }
.stepper button:hover { background: rgba(255, 255, 255, 0.1); }
.stepper .i { width: 17px; height: 17px; }
.stepper__n { min-width: 32px; text-align: center; font-variant-numeric: tabular-nums; }

/* the cart bar at the foot of the shop */
.cartbar { position: fixed; inset: auto 0 0; z-index: 20; max-width: 460px; margin: 0 auto; padding: 0 16px calc(14px + var(--safe-bottom)); }
.cartbar .btn { justify-content: space-between; width: 100%; min-height: 58px; padding: 0 20px; font-size: 20px; }
.cartbar__left { display: inline-flex; align-items: center; gap: 14px; }
.cartbar__bag { position: relative; display: inline-grid; }
.cartbar__n { position: absolute; top: -8px; right: -11px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--butter); color: var(--dark); font: 700 11px/18px var(--text); text-align: center; }

/* ---------------------------------------------------------------- a page on the brown (cart, order placed) */
.page { max-width: 560px; margin: 0 auto; padding: 4px 12px 140px; }
.page__head { display: flex; align-items: center; gap: 10px; padding: 6px 0 12px; }
.page__title { margin: 0; font-size: 38px; line-height: 1; }
.back { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 13px; background: var(--cream); color: var(--dark); text-decoration: none; }
.back:hover { background: var(--butter-soft); }
.panel { border-radius: 22px; background: var(--paper); }
.panel + .panel { margin-top: 8px; }

.lines { margin: 0; padding: 0 16px; list-style: none; }
.line { display: flex; gap: 12px; padding: 14px 0; }
.line + .line { border-top: 1px solid var(--line); }
.line__photo { display: grid; place-items: center; width: 66px; height: 66px; flex: none; overflow: hidden; border-radius: 13px; background: var(--baby); }
.line__photo img { width: 100%; height: 100%; object-fit: contain; }
.line__body { flex: 1; min-width: 0; }
.line__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.line__name { margin: 0; font-size: 23px; line-height: 0.95; }
.line__each { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.line__remove { display: grid; place-items: center; width: 34px; height: 34px; margin: -6px -6px 0 0; border: 0; border-radius: 999px; background: none; color: var(--muted); }
.line__remove:hover { background: var(--butter-soft); color: var(--danger); }
.line__remove .i { width: 16px; height: 16px; }
.line__bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 999px; background: var(--cream); color: var(--dark); }
.qty button:hover { background: var(--butter-soft); }
.qty .i { width: 15px; height: 15px; }
.qty__n { width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.line__total { font-size: 22px; }

.sums { padding: 16px 20px; font-size: 14px; }
.sum { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.sum + .sum { margin-top: 6px; }
.sum span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
.sum--total { margin-top: 10px !important; padding-top: 10px; border-top: 1px solid var(--line-strong); color: var(--dark); }
.sum--total span { font-size: 26px; line-height: 1; }
.sums__note { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.sums__warn { margin: 10px 0 0; color: var(--caramel); font-size: 13px; font-weight: 700; }

.fixed { position: fixed; inset: auto 0 0; z-index: 20; max-width: 460px; margin: 0 auto; padding: 0 16px calc(14px + var(--safe-bottom)); }

/* ---------------------------------------------------------------- the welcome screen */
.welcome { display: flex; flex-direction: column; max-width: 460px; min-height: 100dvh; margin: 0 auto; }
.welcome__photo { position: relative; flex: 1; min-height: 38dvh; overflow: hidden; }
.welcome__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.welcome__logo { position: absolute; left: 20px; top: 20px; color: var(--butter); filter: drop-shadow(0 2px 10px rgba(54, 38, 24, 0.45)); }
.welcome__logo svg { display: block; height: 56px; width: auto; aspect-ratio: 2.2385; fill: currentColor; }
.welcome__sheet { position: relative; z-index: 1; margin-top: -32px; padding: 32px 24px calc(40px + var(--safe-bottom)); border-radius: 28px 28px 0 0; background: var(--cream); }
.welcome__title { margin: 0; text-align: center; font-size: 46px; line-height: 0.9; }
.welcome__points { display: grid; gap: 16px; margin: 26px 0 0; padding: 0; list-style: none; }
.point { display: flex; align-items: flex-start; gap: 12px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.point strong { color: var(--dark); }
.point__icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 999px; background: var(--butter); color: var(--dark); }
.point__icon .i { width: 18px; height: 18px; }
.welcome .btn { margin-top: 30px; }

/* ---------------------------------------------------------------- checkout steps */
.step { display: flex; flex-direction: column; max-width: 560px; min-height: 100dvh; margin: 0 auto; background: var(--paper); }
@media (min-width: 600px) { .step { min-height: calc(100dvh - 40px); margin: 20px auto; border-radius: 24px; overflow: hidden; } }
.step__head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); background: rgba(255, 253, 245, 0.94); backdrop-filter: blur(8px); }
.step__head .back { background: none; }
.step__head .back:hover { background: var(--cream); }
.step__title { margin: 0; font-size: 32px; line-height: 1; }
.step__count { margin-left: auto; padding-right: 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.step__body { flex: 1; display: grid; align-content: start; gap: 14px; padding: 16px; }
.step__foot { position: sticky; bottom: 0; z-index: 5; padding: 12px 16px calc(14px + var(--safe-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.step__error { margin: 0 0 10px; color: var(--danger); font-size: 13.5px; font-weight: 700; text-align: center; }
.step__error:empty { display: none; }

.field { display: grid; gap: 5px; margin: 0; }
.field > span, .field > label { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.field input, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 15px; background: #fff; font-size: 16px;
}
.field textarea { min-height: 86px; resize: vertical; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder { color: #8a7563; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--caramel); box-shadow: 0 0 0 3px rgba(180, 82, 27, 0.2); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field__error { margin: 0; color: var(--danger); font-size: 13px; font-weight: 700; }
.field__error:empty { display: none; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 12px; }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.labels { display: flex; gap: 8px; }
.labels button {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 0; border-radius: 999px;
  background: var(--cream); color: var(--dark); font-size: 13.5px; font-weight: 700;
}
.labels button[aria-pressed="true"] { background: var(--dark); color: var(--butter); }
.labels .i { width: 15px; height: 15px; }

/* the map: the pin stays in the middle and the map moves under it */
.mapbox { position: relative; flex: 1; min-height: 52dvh; background: var(--cream); }
.mapbox__map { position: absolute; inset: 0; }
.mapbox__pin { position: absolute; left: 50%; top: 50%; z-index: 500; width: 40px; height: 52px; transform: translate(-50%, -100%); color: var(--dark); pointer-events: none; filter: drop-shadow(0 4px 6px rgba(54, 38, 24, 0.35)); }
.mapbox__pin svg { width: 100%; height: 100%; }
.mapbox__dot { position: absolute; left: 50%; top: 50%; z-index: 499; width: 10px; height: 5px; border-radius: 50%; background: rgba(54, 38, 24, 0.35); transform: translate(-50%, -50%); pointer-events: none; }
.mapbox__locate { position: absolute; right: 12px; bottom: 14px; z-index: 600; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 0; border-radius: 999px; background: var(--paper); color: var(--dark); font-weight: 700; font-size: 13.5px; box-shadow: 0 4px 16px rgba(54, 38, 24, 0.25); }
.mapbox__locate .i { width: 17px; height: 17px; }
.spot { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.spot .i { margin-top: 1px; }
.spot__text { min-width: 0; }
.spot__place { margin: 0; font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spot__hint { margin: 1px 0 0; color: var(--muted); font-size: 12.5px; }
.leaflet-container { font: inherit; background: var(--cream); }

.card2 { padding: 14px; border-radius: 18px; background: var(--cream); }
.card2__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.card2__label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.card2__main { margin: 0; font-weight: 700; }
.card2__line { margin: 1px 0 0; color: var(--muted); font-size: 13.5px; }
.review-lines { margin: 0; padding: 0; list-style: none; }
.review-lines li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; }
.review-lines li + li { border-top: 1px solid var(--line); }
.review-lines .d { font-size: 21px; }
.review-lines small { color: var(--muted); font-size: 13px; }
.pay-note { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }

/* slide to order */
.slide { position: relative; height: 60px; border-radius: 18px; background: var(--dark); color: var(--butter); overflow: hidden; touch-action: none; user-select: none; }
.slide__label { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 16px 0 66px; font-size: clamp(15px, 4.6vw, 19px); white-space: nowrap; text-align: center; pointer-events: none; transition: opacity 0.15s; }
.slide__fill { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(255, 255, 168, 0.16); pointer-events: none; }
.slide__knob {
  position: absolute; left: 5px; top: 5px; z-index: 1; display: grid; place-items: center; width: 50px; height: 50px; border: 0; border-radius: 14px;
  background: var(--butter); color: var(--dark); cursor: grab; touch-action: none;
}
.slide__knob:active { cursor: grabbing; }
.slide__knob .i { width: 22px; height: 22px; }
.slide.is-busy .slide__knob { animation: pulse 1s ease-in-out infinite; }
.slide:not(.is-dragging) .slide__knob, .slide:not(.is-dragging) .slide__fill { transition: transform 0.25s, width 0.25s; }
@keyframes pulse { 50% { opacity: 0.5; } }

/* ---------------------------------------------------------------- order placed */
.placed { display: grid; justify-items: center; gap: 12px; padding: 32px 20px 22px; text-align: center; }
.placed__tick { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 999px; background: var(--butter); color: var(--dark); }
.placed__tick .i { width: 32px; height: 32px; stroke-width: 2.6; }
.placed__title { margin: 0; font-size: 48px; line-height: 0.9; }
.placed__text { margin: 0; max-width: 36ch; color: var(--muted); font-size: 14.5px; }
.placed__number { padding: 5px 14px; border-radius: 999px; background: var(--cream); font-weight: 700; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
