/* ==========================================================================
   Diwali Sweets — styles
   Layout: festive catalogue — slim announcement bar, sticky header, split hero
   with an arched brass-plate frame, 4/3/2-column product grid, drawer cart,
   modal checkout. Single warm light theme by design (no dark backgrounds).
   ========================================================================== */

:root {
  color-scheme: light;

  /* Colour */
  --cream: #FFF8EF;        /* page background */
  --cream-deep: #FBEEDD;   /* section bands */
  --paper: #FFFFFF;        /* cards, panels */
  --maroon: #5A1A20;       /* primary text */
  --maroon-soft: #7E4B45;  /* secondary text */
  --coral: #EF7B63;        /* light coral accent */
  --coral-wash: #FDE4DB;
  --saffron: #F4A12A;      /* saffron-orange accent */
  --saffron-deep: #E08A12;
  --gold: #C29A45;         /* festive detail */
  --gold-soft: #EAD7A8;
  --line: #EFDDC8;
  --danger: #B3261E;
  --ok: #2F6B3A;
  --ok-wash: #E8F3EA;
  --shadow: 0 1px 2px rgba(90, 26, 32, .06), 0 10px 28px -12px rgba(90, 26, 32, .22);

  /* Type */
  --font-display: "Rozha One", "Georgia", "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: .8125rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.2rem + 2vw, 2.4rem);
  --step-4: clamp(2.4rem, 1.4rem + 4vw, 4rem);

  --radius: 18px;
  --radius-sm: 10px;
  --wrap: 1200px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--maroon);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
/* Paint the phone's top safe-area band under the sticky header */
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--cream);
}

img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: .005em; }
h3 { font-family: var(--font-body); font-weight: 700; font-size: var(--step-1); }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 700px) {
  .wrap {
    padding-left: max(32px, env(safe-area-inset-left, 0px));
    padding-right: max(32px, env(safe-area-inset-right, 0px));
  }
}

.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-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--maroon); color: var(--cream); padding: 8px 14px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; border-radius: 6px; }

.muted { color: var(--maroon-soft); }
.fine { font-size: var(--step--1); color: var(--maroon-soft); line-height: 1.5; }
.placeholder { color: var(--maroon-soft); font-style: italic; }
.eyebrow {
  font-size: var(--step--1); font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--coral); margin-bottom: .5rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: .7rem 1.4rem; border-radius: 999px;
  font-weight: 700; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--saffron); color: var(--maroon); }
.btn--primary:hover { background: var(--saffron-deep); }
.btn--dark { background: var(--maroon); color: var(--cream); }
.btn--dark:hover { background: #431217; }
.btn--ghost { background: transparent; color: var(--maroon); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--coral); color: var(--maroon); background: var(--coral-wash); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: transparent; color: var(--maroon); cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--coral-wash); }

/* ---------- A. Announcement bar ---------- */
.announce {
  background: linear-gradient(90deg, var(--coral-wash), #FFE9C9 50%, var(--coral-wash));
  border-bottom: 1px solid var(--gold-soft);
  font-size: var(--step--1); font-weight: 600; letter-spacing: .04em;
}
.announce__inner { display: flex; align-items: center; justify-content: center; gap: .75rem; padding-block: .45rem; text-align: center; }
.announce__lamp { width: 8px; height: 8px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--saffron); flex: none; box-shadow: 0 0 0 3px rgba(244, 161, 42, .2); }

/* ---------- B. Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(255, 248, 239, .94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; margin-right: auto; }
.brand__mark {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, var(--saffron) 0 30%, transparent 31%),
              radial-gradient(circle at 50% 50%, var(--coral-wash) 0 62%, transparent 63%);
  box-shadow: inset 0 0 0 2px var(--gold);
}
.brand__name { font-family: var(--font-display); font-size: 1.45rem; line-height: 1; color: var(--maroon); }

.nav__list { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav__list a { display: block; padding: .5rem .9rem; border-radius: 999px; text-decoration: none; font-weight: 600; }
.nav__list a:hover { background: var(--coral-wash); }
.nav__toggle { display: none; }
.header__actions { display: flex; align-items: center; gap: .15rem; }

.cart-btn__count {
  position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--coral); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; font-variant-numeric: tabular-nums; line-height: 1;
}
.cart-btn__count.is-empty { background: var(--gold-soft); color: var(--maroon); }
.cart-btn__count.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.3); } }

@media (max-width: 760px) {
  .nav { order: 3; }
  .nav__toggle {
    display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
    background: transparent; cursor: pointer;
  }
  .nav__toggle:hover { background: var(--coral-wash); }
  .nav__toggle-bars, .nav__toggle-bars::before, .nav__toggle-bars::after {
    display: block; width: 20px; height: 2px; background: var(--maroon); border-radius: 2px; position: relative; content: "";
  }
  .nav__toggle-bars::before { position: absolute; top: -6px; }
  .nav__toggle-bars::after { position: absolute; top: 6px; }
  .nav__toggle[aria-expanded="true"] .nav__toggle-bars { background: transparent; }
  .nav__toggle[aria-expanded="true"] .nav__toggle-bars::before { top: 0; transform: rotate(45deg); }
  .nav__toggle[aria-expanded="true"] .nav__toggle-bars::after { top: 0; transform: rotate(-45deg); }
  .nav__list {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: var(--cream); border-bottom: 1px solid var(--line);
    padding: .5rem max(16px, env(safe-area-inset-right, 0px)) 1rem max(16px, env(safe-area-inset-left, 0px));
    box-shadow: 0 12px 20px -16px rgba(90, 26, 32, .35);
  }
  .nav__list:not(.is-open) { display: none; }
  .nav__list a { padding: .85rem .5rem; border-radius: var(--radius-sm); }
  .brand__name { font-size: 1.25rem; }
}

/* ---------- C. Hero ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 5vw, 4rem); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__copy { min-width: 0; }
.hero h1 { font-size: var(--step-4); max-width: 13ch; }
.hero__lede { font-size: var(--step-1); color: var(--maroon-soft); max-width: 40ch; margin-top: 1rem; }
.hero__cta { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__facts {
  list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  font-size: var(--step--1); color: var(--maroon-soft);
}
.hero__facts li { display: flex; align-items: center; gap: .5rem; }
.hero__facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.hero__facts strong { color: var(--maroon); }

.hero__art { margin: 0; position: relative; justify-self: center; width: min(100%, 480px); }
/* Arched frame, echoing a temple doorway; the uploaded photo sits inside uncropped */
.arch {
  position: relative; aspect-ratio: 4 / 4.4; max-width: 100%;
  border-radius: 999px 999px var(--radius) var(--radius);
  background: #fff;   /* matches the photo backgrounds so the plate floats */
  border: 2px solid var(--gold-soft);
  box-shadow: var(--shadow), inset 0 0 0 8px var(--paper), inset 0 0 0 9px var(--gold-soft);
  display: grid; place-items: center; padding: 18% 10% 10%;
}
.arch img { width: 100%; height: 100%; object-fit: contain; }
.hero__art figcaption {
  position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%);
  background: var(--paper); border: 1px solid var(--gold-soft); border-radius: 999px;
  padding: .35rem 1rem; font-size: var(--step--1); font-weight: 600; white-space: nowrap; box-shadow: var(--shadow);
}

@media (max-width: 820px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { width: min(100%, 360px); order: -1; }
  .arch { aspect-ratio: 4 / 3.6; }
}

/* Beaded divider — the rim of a brass thali */
.beads {
  height: 8px; max-width: var(--wrap); margin: 0 auto;
  background: radial-gradient(circle, var(--gold) 0 2px, transparent 2.5px) center / 12px 8px repeat-x;
  opacity: .7;
}

/* ---------- D. Catalogue ---------- */
.shop { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.shop__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem 2rem; margin-bottom: 2rem; }
.shop__head h2 { font-size: var(--step-3); margin-bottom: .4rem; }
.search { width: min(100%, 340px); }
.search__label { display: block; font-size: var(--step--1); font-weight: 700; margin-bottom: .35rem; }
.search__field {
  display: flex; align-items: center; gap: .5rem; padding: 0 .9rem;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; color: var(--maroon-soft);
}
.search__field:focus-within { border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(244, 161, 42, .25); }
.search__field input { flex: 1; min-width: 0; border: 0; background: transparent; padding: .7rem 0; outline: none; color: var(--maroon); }
.search__status { font-size: var(--step--1); color: var(--maroon-soft); min-height: 1.4em; margin-top: .3rem; }

.grid {
  /* Flex rather than grid so a short final row (10 items) sits centred */
  --cols: 2; --gap: clamp(.75rem, 2vw, 1.5rem);
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap);
}
.grid > .card { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); }
@media (min-width: 900px) { .grid { --cols: 3; } }
@media (min-width: 1180px) { .grid { --cols: 4; } }
@media (max-width: 340px) { .grid { --cols: 1; } }

.card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden; min-width: 0;
  border: 1px solid rgba(239, 221, 200, .7);
}
.card__media { aspect-ratio: 3 / 2; background: #fff; padding: 6px; border-bottom: 1px solid var(--line); }
.card__media img { width: 100%; height: 100%; object-fit: contain; }
.card__body { padding: clamp(.75rem, 2vw, 1.1rem); display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.card__name { font-family: var(--font-display); font-size: clamp(1.1rem, .95rem + .6vw, 1.35rem); line-height: 1.15; }
.card__price { font-variant-numeric: tabular-nums; font-weight: 700; font-size: var(--step-1); }
.card__price span { font-weight: 500; font-size: var(--step--1); color: var(--maroon-soft); }

.weights { border: 0; padding: 0; margin: 0; min-width: 0; }
.weights legend { font-size: var(--step--1); font-weight: 600; color: var(--maroon-soft); padding: 0; margin-bottom: .35rem; }
.weights__opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.weights input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.weights label {
  display: grid; place-items: center; min-height: 38px; padding: 0 2px;
  border: 1.5px solid var(--line); border-radius: 8px; cursor: pointer;
  font-size: .8rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums;
  transition: background-color .15s, border-color .15s;
}
.weights label:hover { border-color: var(--coral); }
.weights input:checked + label { background: var(--coral-wash); border-color: var(--coral); color: var(--maroon); }
.weights input:focus-visible + label { outline: 3px solid var(--saffron); outline-offset: 1px; }
@media (max-width: 520px) { .weights__opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card__foot { margin-top: auto; display: flex; flex-direction: column; gap: .55rem; }
.card__total { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--step--1); color: var(--maroon-soft); }
.card__total strong { color: var(--maroon); font-size: var(--step-0); font-variant-numeric: tabular-nums; }
.card .btn { min-height: 44px; padding: .55rem .8rem; width: 100%; }

/* Buy / sell / profit for the selected pack */
.prices { margin: 0; display: grid; gap: .25rem; font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.prices > div, .totals > div { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.prices dt { color: var(--maroon-soft); }
.prices dd { margin: 0; font-weight: 700; color: var(--maroon); }
.prices [data-vendor] { font-size: var(--step-0); }
.prices__profit, .totals__profit {
  background: var(--ok-wash); color: var(--ok); border-radius: 8px; padding: .3rem .55rem; margin-top: .15rem;
}
.prices__profit dt, .prices__profit dd, .totals__profit dt, .totals__profit dd { color: var(--ok); font-weight: 700; }

.totals { margin: 0; display: grid; gap: .4rem; font-variant-numeric: tabular-nums; }
.totals dt { color: var(--maroon-soft); }
.totals dd { margin: 0; font-weight: 700; }
.totals > div:first-child dt { color: var(--maroon); font-weight: 600; font-size: var(--step-1); }
.totals > div:first-child dd { font-family: var(--font-display); font-weight: 400; font-size: var(--step-2); }
.totals__profit { padding: .5rem .7rem; }

.empty-search { text-align: center; padding: 3rem 1rem; display: grid; gap: 1rem; justify-items: center; }

.notice {
  margin-top: clamp(2rem, 5vw, 3rem);
  background: var(--paper); border: 1px solid var(--gold-soft); border-left: 4px solid var(--saffron);
  border-radius: var(--radius-sm); padding: 1.1rem 1.25rem; display: grid; gap: .35rem; max-width: 820px;
}
.notice p { color: var(--maroon-soft); }

/* ---------- G. About ---------- */
.about { background: var(--cream-deep); border-block: 1px solid var(--line); }
.about__inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1.5rem 4rem; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.about h2 { font-size: var(--step-3); }
.about__body { display: grid; gap: 1rem; max-width: 62ch; font-size: var(--step-1); color: var(--maroon-soft); }
@media (max-width: 760px) { .about__inner { grid-template-columns: 1fr; } }

/* ---------- Policies ---------- */
.policies { padding-block: clamp(2rem, 5vw, 3.5rem); }
.policies__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.policies article { padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-sm); display: grid; gap: .5rem; align-content: start; background: var(--paper); }
.policies article:target { border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(244, 161, 42, .2); }
.policies p { font-size: .95rem; color: var(--maroon-soft); }
@media (max-width: 760px) { .policies__grid { grid-template-columns: 1fr; } }

/* ---------- H. Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--cream); padding-bottom: env(safe-area-inset-bottom, 0px); }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-block: 2.5rem 1.5rem; }
.footer__brand { display: grid; gap: .4rem; }
.footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.footer__links a { text-decoration: none; font-weight: 600; }
.footer__links a:hover { color: var(--coral); text-decoration: underline; }
.footer__contact { display: grid; gap: .25rem; align-content: start; }
.footer__label { font-weight: 700; }
.footer__legal { padding-block: 1rem 1.5rem; border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--maroon-soft); }
@media (max-width: 760px) { .footer__inner { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ---------- Dialog shared ---------- */
dialog { padding: 0; border: 0; color: var(--maroon); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(58, 18, 22, .38); }
body.has-dialog { overflow: hidden; }

/* ---------- E. Cart drawer ---------- */
.drawer { margin: 0 0 0 auto; height: 100%; width: min(100%, 440px); }
.drawer[open] { animation: slide-in .22s ease-out; }
@keyframes slide-in { from { transform: translateX(24px); opacity: .6; } }
.drawer__panel {
  height: 100%; background: var(--cream); display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: var(--step-2); }
.drawer__body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }
.drawer__foot { border-top: 1px solid var(--line); padding: 1rem 1.25rem 1.25rem; display: grid; gap: .75rem; background: var(--paper); }

.cart-empty { text-align: center; padding: 3rem 1rem; display: grid; gap: .6rem; justify-items: center; }
.cart-empty p:first-child { font-family: var(--font-display); font-size: var(--step-2); }
.cart-empty .btn { margin-top: .75rem; }

.cart-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.cart-item {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: .3rem .85rem;
  background: var(--paper); border-radius: 12px; padding: .75rem; border: 1px solid var(--line);
}
.cart-item img { grid-row: span 3; width: 72px; height: 54px; object-fit: contain; background: #fff; border-radius: 8px; }
.cart-item__top { display: flex; justify-content: space-between; gap: .5rem; align-items: start; }
.cart-item__name { font-weight: 700; line-height: 1.3; }
.cart-item__meta { font-size: var(--step--1); color: var(--maroon-soft); font-variant-numeric: tabular-nums; }
.cart-item__row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cart-item__sums { display: grid; justify-items: end; gap: .1rem; }
.cart-item__line { font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-item__profit { font-size: var(--step--1); font-weight: 700; color: var(--ok); font-variant-numeric: tabular-nums; }
.remove-btn {
  border: 0; background: transparent; color: var(--maroon-soft); cursor: pointer;
  font-size: var(--step--1); font-weight: 600; text-decoration: underline; padding: .25rem; min-height: 32px;
}
.remove-btn:hover { color: var(--danger); }

.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--cream); }
.qty button { width: 34px; height: 34px; border: 0; background: transparent; border-radius: 50%; cursor: pointer; font-size: 1.1rem; font-weight: 700; color: var(--maroon); }
.qty button:hover:not([disabled]) { background: var(--coral-wash); }
.qty button[disabled] { opacity: .35; cursor: not-allowed; }
.qty input {
  width: 3ch; border: 0; background: transparent; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield; padding: 0;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.subtotal { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--step-1); }
.subtotal strong { font-variant-numeric: tabular-nums; font-size: var(--step-2); font-family: var(--font-display); font-weight: 400; }

/* ---------- F. Checkout modal ---------- */
.modal { margin: auto; width: min(100% - 24px, 920px); max-height: calc(100% - 24px); }
.modal__panel {
  background: var(--cream); border-radius: var(--radius); box-shadow: var(--shadow);
  max-height: calc(100dvh - 24px); overflow-y: auto; padding: clamp(1rem, 3vw, 1.75rem);
}
.modal__head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; margin-bottom: 1.25rem; }
.modal__head h2 { font-size: var(--step-3); }

.checkout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 760px) { .checkout { grid-template-columns: 1fr; } .checkout .summary { order: -1; } }

#order-form { display: grid; gap: .9rem; }
.field { display: grid; gap: .3rem; min-width: 0; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .7rem .85rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--maroon); min-height: 46px;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(244, 161, 42, .25); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field__hint { font-size: var(--step--1); color: var(--maroon-soft); }
.field__error, .form-error { font-size: var(--step--1); color: var(--danger); font-weight: 600; }
.field__error:empty, .form-error:empty { display: none; }

.summary { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.1rem; display: grid; gap: .75rem; }
.summary h3 { font-size: var(--step-0); }
.summary__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.summary__list li { display: flex; justify-content: space-between; gap: .75rem; font-size: .95rem; padding-bottom: .5rem; border-bottom: 1px dashed var(--line); }
.summary__list li span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

.review { display: grid; gap: 1rem; }
.review h3 { margin-top: .5rem; }
.review__details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .5rem 1.25rem; margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.1rem; }
.review__details dt { font-weight: 700; font-size: .9rem; }
.review__details dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
@media (max-width: 520px) { .review__details { grid-template-columns: 1fr; } .review__details dd { margin-bottom: .4rem; } }
.review__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: flex-end; margin-top: .5rem; }

.result { display: grid; gap: .75rem; }
.result__msg { background: #FFF1D9; border: 1px solid var(--gold-soft); border-left: 4px solid var(--saffron); border-radius: var(--radius-sm); padding: 1rem 1.1rem; display: grid; gap: .4rem; }
.result__msg strong { font-size: var(--step-1); }
.result__msg.is-sent { background: #EAF4EC; border-left-color: var(--ok); }
.result__label { font-weight: 700; }
.result__text { width: 100%; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .85rem; line-height: 1.5; padding: .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); color: var(--maroon); resize: vertical; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px);
  background: var(--maroon); color: var(--cream); padding: .7rem 1.1rem; border-radius: 999px; font-weight: 600;
  font-size: .95rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 80;
  max-width: calc(100% - 32px); text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Checkout extras ---------- */
.link-btn {
  justify-self: start; display: inline-flex; align-items: center; gap: .35rem; margin-top: .15rem;
  border: 0; background: transparent; padding: .25rem 0; cursor: pointer;
  color: var(--maroon); font-weight: 600; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--coral); }

.confirm { display: grid; gap: 1rem; }
.confirm__head { display: flex; align-items: center; gap: .9rem; background: var(--ok-wash); border-radius: var(--radius-sm); padding: 1rem 1.1rem; }
.confirm__tick { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; }
.confirm__title { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.1; color: var(--ok); }
.confirm__id { font-size: .95rem; font-variant-numeric: tabular-nums; }
.confirm .review__actions { justify-content: flex-start; }

.totals .totals__profit dt, .totals .totals__profit dd { color: var(--ok); font-weight: 700; }

/* ---------- Bulk ordering on cards ---------- */
.card__rate { font-size: var(--step--1); color: var(--maroon-soft); margin-top: .25rem; font-variant-numeric: tabular-nums; }
.packs { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.packs label { font-size: var(--step--1); font-weight: 600; color: var(--maroon-soft); }
.packs .qty input { width: 4ch; }
.prices__for { font-size: var(--step--1); font-weight: 600; color: var(--maroon); }
.cart-item .qty input { width: 4ch; }

/* ---------- Hero runner + profit badge ---------- */
.runner { position: relative; width: 100%; height: 100%; }
.runner img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transform: scale(.96); transition: opacity .35s ease, transform .35s ease;
}
.runner img.is-active { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .runner img { transition: none; transform: none; } }

.hero__profit {
  margin-top: 30px; text-align: center; display: grid; gap: .15rem;
  background: var(--ok-wash); border: 1px solid rgba(47, 107, 58, .18); border-radius: var(--radius-sm); padding: .8rem 1rem;
}
.hero__profit-pct { font-family: var(--font-display); font-size: var(--step-3); line-height: 1.05; color: var(--ok); font-variant-numeric: tabular-nums; }
.hero__profit-detail { font-size: var(--step--1); color: var(--maroon-soft); font-variant-numeric: tabular-nums; }

.prices .pct {
  display: inline-block; margin-left: .3rem; padding: 0 .4rem; border-radius: 999px;
  background: var(--ok); color: #fff; font-size: .72rem; line-height: 1.5; font-variant-numeric: tabular-nums; vertical-align: 1px;
}
/* Name pill sits on the frame's bottom edge, profit box below it */
.hero__art figcaption { position: relative; left: auto; bottom: auto; transform: none; width: max-content; max-width: 100%; margin: -18px auto 0; z-index: 1; }
.hero__profit { margin-top: 14px; }

.prices > div { flex-wrap: wrap; }
.prices dd { margin-left: auto; }

/* ---------- Brand lockup ---------- */
.brand__text { display: grid; line-height: 1; gap: 3px; }
.brand__tag { font-size: .62rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--coral); }

/* ---------- Agent bar (above hero) ---------- */
.agentbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.agentbar__inner { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; padding-block: .6rem; }
.agentbar__text { font-size: .92rem; color: var(--maroon-soft); min-width: 0; }
.agentbar__text strong { color: var(--maroon); }
.agentbar__actions { display: flex; gap: .5rem; }
.btn--sm { min-height: 38px; padding: .35rem 1rem; font-size: .9rem; }

/* ---------- Sign-up / login dialogs ---------- */
.modal--narrow { width: min(100% - 24px, 520px); }
.stack-form { display: grid; gap: .9rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 420px) { .field-row { grid-template-columns: 1fr; } }
.field-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.field-group legend { font-weight: 700; padding: 0; margin-bottom: .35rem; }
.link-btn--inline { display: inline; padding: 0; margin: 0; font-size: inherit; }
.demo-hint { font-size: var(--step--1); color: var(--maroon-soft); background: var(--cream-deep); border: 1px dashed var(--gold-soft); border-radius: 8px; padding: .45rem .7rem; font-variant-numeric: tabular-nums; }
.prices__note { font-size: .72rem; color: var(--maroon-soft); margin-top: -.25rem; }

/* ---------- Ellaam logo ---------- */
.brand__logo { height: 40px; width: auto; flex: none; }
.footer__logo { width: 150px; height: auto; margin-bottom: .25rem; }
@media (max-width: 760px) { .brand__logo { height: 34px; } }
.brand__name, .brand__tag { white-space: nowrap; }
@media (max-width: 760px) {
  .header__inner { gap: .5rem; }
  .brand { gap: .45rem; min-width: 0; }
  .brand__name { font-size: 1.12rem; }
  .brand__tag { font-size: .56rem; letter-spacing: .14em; }
  .header__actions .icon-btn { width: 40px; height: 40px; }
}
/* Agent bar now sits at the very top of the page */
.agentbar { background: var(--cream-deep); border-bottom: 1px solid var(--gold-soft); }
.agentbar__inner { padding-block: .45rem; }
@media (max-width: 520px) {
  .agentbar__inner { flex-wrap: nowrap; }
  .agentbar__text { font-size: .8rem; line-height: 1.35; }
  .agentbar .btn--sm { min-height: 34px; padding: .3rem .8rem; font-size: .82rem; }
}
.agentbar .btn { white-space: nowrap; flex: none; }
.agentbar__actions { flex: none; }
.agentbar__short { display: none; font-weight: 700; color: var(--maroon); }
@media (max-width: 520px) {
  .agentbar__long { display: none; }
  .agentbar__short { display: inline; }
}
/* Max 3 product cards per row (wider cards) */
@media (min-width: 1180px) { .grid { --cols: 3; } }
