/* Crackers shop: one dramatic night-sky hero, then a quiet white shop where photos and prices read first.
   Orange is only for actions and discount badges; green only for savings and WhatsApp. */

:root {
  --night: #0e1d22;      /* hero, footer, cart bar */
  --night-2: #17363f;    /* hero glow */
  --ember: #ff5b2e;      /* buttons, discount badge, cart count */
  --ember-deep: #e8431a; /* numbers on light backgrounds */
  --ink: #14201f;        /* text, dark buttons */
  --muted: #586866;      /* secondary text */
  --line: #dde4e2;       /* borders, rules */
  --surface: #f2f5f4;    /* photo areas, panels, chips */
  --paper: #ffffff;      /* page */
  --green: #12834a;      /* savings, WhatsApp */
  --r-lg: 16px; --r-md: 12px; --r-sm: 8px;
  --font: "Bricolage Grotesque", Inter, ui-sans-serif, system-ui, sans-serif;
  --font-display: Poppins, ui-sans-serif, system-ui, sans-serif;

  --green-text: #0f7a43; /* savings text: keeps 4.5:1 on the surface colour too */
  --red: #b3261e;
  --red-tint: #fdeceb;
  --on-night: #b9c9c6;   /* secondary text on the night background */
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
  font-optical-sizing: auto;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
s { text-decoration-thickness: 1px; }

:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }

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

.skip {
  position: absolute; left: 0.75rem; top: -4rem; z-index: 50;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 999px;
  background: var(--ember); color: var(--ink); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 0.75rem; }

.container { width: 100%; max-width: 76rem; margin: 0 auto; padding: 0 1.25rem; }
.container--narrow { max-width: 48rem; }

.section { padding: 3.5rem 0; }
.section--surface { background: var(--surface); }

.hero__title, .page-title, .section-title, .block-title, .empty__title,
.panel__title, .step__num, .footer__name, .brand { font-family: var(--font-display); }

.page-title {
  font-size: clamp(2rem, 6vw, 3rem); line-height: 1.1; font-weight: 600;
  letter-spacing: -0.02em; margin-bottom: 1.75rem;
}
.section-title {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem); line-height: 1.15; font-weight: 600; letter-spacing: -0.02em;
}
.block-title { font-size: 1.3rem; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; margin: 2.5rem 0 0.75rem; }
.muted { color: var(--muted); }

.link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 700; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.link:hover { color: var(--ember-deep); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0.55rem 1.4rem;
  border: 1.5px solid transparent; border-radius: 999px; background: none;
  font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer;
}
.btn--primary { background: var(--ember); color: var(--ink); }
.btn--primary:hover { background: #ff7754; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #2b3b39; }
.btn--whatsapp { background: var(--green); color: #fff; }
.btn--whatsapp:hover { background: #0e6d3d; }
.btn--xl { min-height: 56px; padding: 0.8rem 2rem; font-size: 1.1rem; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.link-button {
  min-height: 44px; padding: 0 0.25rem; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-size: 0.875rem; font-weight: 500;
  text-decoration: underline; text-underline-offset: 3px;
}
.link-button:hover { color: var(--ink); }

/* ---------- Header ---------- */
.topbar { background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 64px; }

.brand {
  display: flex; align-items: center; gap: 0.5rem; min-width: 0; min-height: 44px;
  font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; text-decoration: none;
}
.brand__mark { flex: none; width: 22px; height: 22px; color: var(--ember); }
.brand__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.nav { display: flex; align-items: center; gap: 0.15rem; flex: none; }
.nav__link {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; padding: 0 0.7rem;
  border-radius: 999px; font-weight: 600; text-decoration: none;
}
.nav__link:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav__cart { margin-left: 0.3rem; padding: 0 1rem; border: 1.5px solid currentColor; }
.nav__cart:hover { text-decoration: none; background: var(--surface); }
.badge {
  display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 0.4rem; margin-right: -0.45rem;
  border-radius: 999px; background: var(--ember); color: var(--ink); font-size: 0.8rem; font-weight: 800; line-height: 1;
}

.topbar--over { position: absolute; top: 0; left: 0; right: 0; z-index: 10; background: transparent; color: #fff; border-bottom-color: rgba(255, 255, 255, 0.14); }
.topbar--over .nav__cart:hover { background: rgba(255, 255, 255, 0.1); }

@media (max-width: 479.98px) {
  .nav__about { display: none; }
  .brand { font-size: 0.9rem; }
  .brand__name { -webkit-line-clamp: 3; }
  .nav__link { padding: 0 0.6rem; }
  .nav__cart { padding: 0 0.85rem; }
}

.messages { display: grid; gap: 0.5rem; margin-top: 1.25rem; }
.messages__item { padding: 0.75rem 1rem; border-radius: var(--r-md); background: var(--surface); }
.messages__item--error { background: var(--red-tint); color: var(--red); }

/* ---------- Home hero ---------- */
.hero {
  position: relative; overflow: hidden; display: flex; align-items: flex-end;
  min-height: min(88svh, 46rem); color: #fff;
  background:
    radial-gradient(70% 50% at 45% 112%, rgba(255, 91, 46, 0.42), rgba(255, 91, 46, 0) 70%),
    radial-gradient(55% 60% at 95% -5%, var(--night-2), rgba(23, 54, 63, 0) 72%),
    var(--night);
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__inner { position: relative; padding-top: calc(64px + 3rem); padding-bottom: 4rem; pointer-events: none; }
.hero__inner a { pointer-events: auto; }
.hero__title {
  max-width: 11ch; font-size: clamp(2.75rem, 9vw, 5.75rem); line-height: 1.05;
  font-weight: 600; letter-spacing: -0.025em;
  overflow-wrap: normal; hyphens: manual;
}
.hero__lede { max-width: 34ch; margin-top: 1.25rem; font-size: 1.15rem; color: #d5e2df; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.25rem; margin-top: 2rem; }
.hero__note { max-width: 24ch; font-size: 0.875rem; color: var(--on-night); }

/* ---------- Home sections ---------- */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; margin-bottom: 1.5rem; }

.steps { display: grid; gap: 2rem 1.5rem; margin-top: 2rem; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.step { display: grid; align-content: start; gap: 0.3rem; padding-top: 1rem; border-top: 2px solid var(--ink); }
.step__num { margin-bottom: 0.35rem; font-size: 2.5rem; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; color: var(--ember-deep); }
.step__title { font-size: 1.1rem; font-weight: 700; }
.step__text { color: var(--muted); }

.visit { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
@media (min-width: 640px) { .visit { grid-template-columns: repeat(3, auto); justify-content: start; gap: 3.5rem; } }
.visit__label { font-weight: 700; margin-bottom: 0.25rem; }

/* ---------- Catalogue ---------- */
.search {
  display: flex; align-items: center; gap: 0.25rem; max-width: 34rem; margin-bottom: 1rem;
  padding: 4px 4px 4px 1.25rem; border-radius: 999px; background: var(--surface);
}
.search:focus-within { box-shadow: 0 0 0 3px var(--ember); }
.search input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; font-size: 1rem; }
.search input:focus-visible { outline: none; }
.search input::placeholder { color: var(--muted); }

.chips {
  display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none;
  margin: 0 -1.25rem 1.75rem; padding: 0.4rem 1.25rem;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.15rem;
  border-radius: 999px; background: var(--surface); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.chip:hover { background: #e4ebe9; }
.chip.is-active { background: var(--ink); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 0.75rem; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem 1.25rem; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.empty { display: grid; justify-items: start; gap: 0.6rem; padding: 1.5rem 0; }
.empty__title { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; }

/* ---------- Product tile ---------- */
.card { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.card__media {
  position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1;
  border-radius: var(--r-lg); background: var(--surface); overflow: hidden;
}
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tag {
  position: absolute; top: 0.6rem; left: 0.6rem; padding: 0.2rem 0.65rem; border-radius: 999px;
  background: var(--ember); color: var(--ink); font-size: 0.8rem; font-weight: 800; line-height: 1.35;
}

.card__form { position: absolute; right: 0.5rem; bottom: 0.5rem; }
.btn--add { padding: 0.5rem 1.2rem; background: var(--paper); color: var(--ink); border-color: var(--ink); box-shadow: 0 2px 8px rgba(20, 32, 31, 0.14); }
.btn--add:hover { background: var(--ink); color: #fff; }
.card__form .stepper { display: none; }
.card__form.is-in-cart .stepper { display: flex; }
.card__form.is-in-cart .btn--add { display: none; }

.stepper { display: flex; align-items: center; width: max-content; padding: 0 2px; border-radius: 999px; background: var(--night); color: #fff; }
.stepper button {
  width: 44px; height: 44px; border: 0; border-radius: 999px; background: none; color: #fff;
  font-size: 1.35rem; font-weight: 700; line-height: 1; cursor: pointer;
}
.stepper button:hover { background: rgba(255, 255, 255, 0.14); }
.stepper button:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.stepper output { min-width: 1.6rem; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }

.card__body { display: grid; gap: 0.1rem; }
.card__name { font-size: 1rem; font-weight: 600; line-height: 1.3; }
.card__unit { font-size: 0.875rem; color: var(--muted); }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.5rem; margin-top: 0.25rem; }
.price__now { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; }
.price__was { font-size: 0.875rem; color: var(--muted); }

.card--soldout .card__media img { filter: grayscale(1); opacity: 0.5; }
.soldout {
  position: absolute; right: 0.5rem; bottom: 0.5rem; padding: 0.5rem 1rem; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 0.875rem; font-weight: 700;
}

.is-busy { opacity: 0.65; pointer-events: none; }

/* ---------- Cart bar and notice ---------- */
.cartbar {
  position: fixed; z-index: 30; left: 50%; bottom: max(0.75rem, env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.75rem; width: min(40rem, calc(100% - 1.5rem));
  padding: 0.4rem 0.4rem 0.4rem 1.25rem; border-radius: 999px;
  background: var(--night); color: #fff; text-decoration: none; box-shadow: 0 12px 32px rgba(14, 29, 34, 0.28);
}
.cartbar__count { font-weight: 600; white-space: nowrap; }
.cartbar__total { margin-left: auto; font-size: 1.1rem; font-weight: 800; white-space: nowrap; }
.cartbar__go {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.15rem; border-radius: 999px;
  background: var(--ember); color: var(--ink); font-weight: 700; white-space: nowrap;
}
.has-cartbar .footer { padding-bottom: 7rem; }

.notice {
  position: fixed; z-index: 40; left: 50%; bottom: 5.5rem; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 2rem); padding: 0.75rem 1.1rem; border-radius: var(--r-md);
  background: var(--night); color: #fff; font-weight: 500; text-align: center; box-shadow: 0 12px 32px rgba(14, 29, 34, 0.28);
}

/* ---------- Cart and checkout layout ---------- */
.split { display: grid; gap: 2.5rem; }
@media (min-width: 52rem) {
  .split { grid-template-columns: minmax(0, 1fr) 22rem; gap: 3.5rem; align-items: start; }
  .split__aside { position: sticky; top: 1.5rem; }
}

.lines { border-top: 1px solid var(--line); }
.line { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 1rem; align-items: start; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.line__thumb { width: 80px; height: 80px; border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.line__thumb img { width: 100%; height: 100%; object-fit: cover; }
.line__name { font-weight: 700; line-height: 1.3; }
.line__meta { margin: 0.2rem 0 0.65rem; font-size: 0.875rem; color: var(--muted); }
.line__form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; }
.line__total { font-size: 1.05rem; font-weight: 800; white-space: nowrap; }

.panel { padding: 22px; border-radius: var(--r-lg); background: var(--surface); }
.panel__title { margin-bottom: 1rem; font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
.panel__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-top: 1.25rem; }

.summary { display: grid; gap: 0.5rem; }
.summary__row { display: flex; justify-content: space-between; gap: 1rem; }
.summary dt { color: var(--muted); }
.summary dd { font-weight: 600; white-space: nowrap; }
.summary__save dt,
.summary__save dd { color: var(--green-text); }
.summary__total { margin-top: 0.35rem; padding-top: 0.75rem; border-top: 1.5px solid var(--ink); font-size: 1.3rem; }
.summary__total dt,
.summary__total dd { color: var(--ink); font-weight: 800; }
.summary--page { max-width: 24rem; margin: 1rem 0 0 auto; }

.mini { display: grid; gap: 0.6rem; margin-bottom: 1.1rem; }
.mini li { display: flex; justify-content: space-between; gap: 1rem; }
.mini li span:last-child { font-weight: 700; white-space: nowrap; }
.mini--ruled { gap: 0; margin-bottom: 0; border-top: 1px solid var(--line); }
.mini--ruled li { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }

/* ---------- Checkout form ---------- */
.form { display: grid; gap: 1.25rem; align-content: start; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 700; }
.field input,
.field textarea {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--paper); font-size: 1rem; line-height: 1.4;
}
.field textarea { resize: vertical; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(255, 91, 46, 0.25); }
.field--error input,
.field--error textarea { border-color: var(--red); }
.field__error { color: var(--red); font-size: 0.875rem; font-weight: 600; }
.form__note { max-width: 46ch; color: var(--muted); font-size: 0.95rem; }
.alert { padding: 0.9rem 1.1rem; border-radius: var(--r-md); background: var(--red-tint); color: var(--red); font-weight: 500; }
.alert a { color: var(--red); font-weight: 700; }
.alert p + p { margin-top: 0.25rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Order saved ---------- */
.nowrap { white-space: nowrap; }
.done-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.75rem; }
.done-head .page-title { margin-bottom: 0; }
.tick { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--green); color: #fff; }
.send { display: grid; justify-items: start; gap: 1.1rem; padding: 1.5rem; border-radius: var(--r-lg); background: var(--surface); }
.send p { max-width: 46ch; }
.note { margin-top: 0.75rem; }
.back { margin-top: 2rem; }

/* ---------- About ---------- */
.about { display: grid; gap: 2.5rem; }
@media (min-width: 52rem) { .about--map { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5rem; align-items: start; } }
.prose { display: grid; gap: 1rem; max-width: 60ch; font-size: 1.05rem; }
.facts { display: grid; gap: 1.1rem; margin-top: 2rem; }
.facts dt { font-weight: 700; }
.facts dd { color: var(--muted); }
.facts dd a { display: inline-block; padding: 0.8rem 0; margin: -0.8rem 0; color: var(--ink); font-weight: 600; }
.map { height: 24rem; border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.map iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- Footer ---------- */
.footer { padding: 3rem 0; background: var(--night); color: var(--on-night); }
.footer__inner { display: grid; gap: 2rem; }
@media (min-width: 640px) { .footer__inner { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer__name { margin-bottom: 0.35rem; color: #fff; font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.footer__title { margin-bottom: 0.35rem; color: #fff; font-weight: 700; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; }
.footer__list p + p { margin-top: 0; }
