/* Storefront components. Colours and fonts come from tokens.css only (no hex
   values here). Every interactive element has distinct hover, pressed
   (:active), keyboard focus and disabled looks; status never relies on colour
   alone (each also has a word and a shape).
   Breakpoint: 760px — below it the phone layout (drawer, chips, bottom bar). */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 15px; line-height: 1.55; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before { transition: none !important; animation: none !important; } }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--brand); color: var(--on-brand); padding: 10px 14px; border-radius: var(--radius-btn); z-index: 100; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font-size: 11.5px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--text-2); font-weight: 600; }
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; flex: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 24px; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 14.5px; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-p { background: var(--brand); color: var(--on-brand); }
.btn-p:hover { background: var(--brand-hover); }
.btn-p:active { background: var(--brand-active); }
.btn-s { background: var(--surface); color: var(--brand); border-color: var(--brand); }
.btn-s:hover { background: var(--surface-alt); color: var(--brand-hover); border-color: var(--brand-hover); }
.btn-s:active { background: var(--surface-alt); color: var(--brand-active); border-color: var(--brand-active); box-shadow: inset 0 0 0 1px var(--brand-active); }
.btn-block { width: 100%; }
.btn:disabled, .add:disabled, .btn[aria-disabled="true"] { background: var(--disabled-bg); color: var(--disabled-text); border-color: var(--disabled-bg); box-shadow: none; cursor: not-allowed; }
.link { color: var(--brand); font-weight: 600; text-decoration: none; font-size: 14px; background: none; border: 0; padding: 0; cursor: pointer; }
.link:hover { color: var(--brand-hover); text-decoration: underline; text-underline-offset: 3px; }
.link:active { color: var(--brand-active); }
/* Links inside running text are underlined, so they don't rely on colour. */
p .link, p a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- header ---------- */
/* Scrolling announcement bar (markup: announcement_bar() in inc/layout.php). */
.announce { position: relative; display: flex; align-items: center; background: var(--surface-alt); color: var(--text); border-bottom: 1px solid var(--border); font-size: 13px; }
.marquee { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(to right, transparent, black 32px, black calc(100% - 32px), transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.marquee-group { display: flex; list-style: none; margin: 0; padding: 0; }
.marquee-group li { white-space: nowrap; padding: 8px 0; }
.marquee-group li::after { content: "•"; content: "•" / ""; margin: 0 22px; color: var(--text-2); }
.marquee-group a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.marquee-group a:hover { color: var(--brand-hover); }
.marquee-group a:active { color: var(--brand-active); }
@keyframes marquee { to { transform: translateX(-50%); } }
.announce:hover .marquee-track, .announce:focus-within .marquee-track, .announce.paused .marquee-track { animation-play-state: paused; }
.marquee-toggle { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin: 0 6px; border: 0; border-radius: 50%; background: none; color: var(--text-2); cursor: pointer; }
.marquee-toggle:hover { background: var(--surface); color: var(--brand); }
.marquee-toggle:active { color: var(--brand-active); }
.marquee-toggle .icon { width: 16px; height: 16px; }
.marquee-toggle .i-play, .announce.paused .marquee-toggle .i-pause { display: none; }
.announce.paused .marquee-toggle .i-play { display: block; }
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; scrollbar-width: none; mask-image: none; }
  .marquee-group[aria-hidden] { display: none; }
  .marquee-toggle { display: none; }
}
.hdr { background: var(--bg); border-bottom: 1px solid var(--border); }
.hdr-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; padding: 16px 0; }
.hdr-left { display: flex; align-items: center; gap: 4px; }
.logo { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; }
.logo .w { font-family: var(--display); font-size: 25px; color: var(--brand); letter-spacing: .5px; }
.logo .s { font-size: 9.5px; letter-spacing: 3px; text-transform: uppercase; color: var(--logo-gold); margin-top: 5px; }

.search { position: relative; max-width: 520px; width: 100%; justify-self: center; }
.search-box { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border-control); border-radius: 999px; padding: 0 6px 0 16px; height: 44px; }
.search-box:hover { border-color: var(--text-2); }
.search-box:focus-within { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 2px; }
.search-box input::placeholder { color: var(--placeholder); opacity: 1; }
.search-box .icon { width: 18px; height: 18px; color: var(--text-2); }
.search-box input { border: 0; outline: 0; background: none; font-size: 14px; width: 100%; min-width: 0; height: 100%; }
.search-box input::-webkit-search-cancel-button { display: none; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  list-style: none; margin: 0; padding: 6px; }
.suggest li { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.suggest li:hover { background: var(--surface-alt); }
/* Keyboard highlight: a bar as well as the tint, which alone is too faint. */
.suggest li[aria-selected="true"] { background: var(--surface-alt); box-shadow: inset 3px 0 0 var(--brand); }
.suggest .thumb { width: 40px; height: 40px; border-radius: 6px; }
.suggest .thumb .icon { width: 22px; height: 22px; }
.suggest small { display: block; color: var(--text-2); font-size: 12px; }
.suggest b { font-variant-numeric: tabular-nums; font-size: 13.5px; }
.suggest .all { display: block; grid-template-columns: none; color: var(--brand); font-weight: 600; text-align: center; border-top: 1px solid var(--border); margin-top: 4px; border-radius: 0 0 6px 6px; }
.suggest .empty { display: block; color: var(--text-2); cursor: default; }

.icons { display: flex; gap: 4px; }
.ibtn { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: none; border: 0; cursor: pointer;
  min-width: 48px; min-height: 44px; font-size: 11px; border-radius: 8px; text-decoration: none; color: var(--text); padding: 0 4px; }
.ibtn:hover { color: var(--brand); }
.ibtn:active { color: var(--brand-active); }
.ibtn[aria-current] { color: var(--brand); }
.count { position: absolute; top: 2px; right: 6px; background: var(--brand); color: var(--on-brand); font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px;
  display: grid; place-items: center; padding: 0 4px; font-style: normal; }
.count:empty { display: none; }

.msearch, .chips { display: none; }

/* ---------- placeholder art (until product photos exist) ---------- */
.ph { position: relative; display: grid; place-items: center; background: var(--surface-alt); overflow: hidden; }
.ph .icon { width: 34%; max-width: 92px; height: auto; aspect-ratio: 1; stroke: var(--gold); stroke-width: 1.2; }
/* Fill the frame and crop evenly from the centre: as a grid item the image
   kept its own height and only its bottom was cut. */
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- sections ---------- */
section.blk { padding: 44px 0; }
section.band { background: var(--surface-alt); }
.sh { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.sh h2 { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.15; margin: 4px 0 0; text-wrap: balance; }

/* Homepage strip of arch-shaped tiles (categories, then occasions). One row;
   scrolls sideways when there are more tiles than fit. */
.strip { padding: 26px 0 10px; }
.cats { display: flex; gap: 24px; overflow-x: auto; padding: 10px 2px 14px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.cat { position: relative; flex: 0 0 136px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; text-align: center; }
.cat .arch { display: grid; place-items: center; width: 100%; aspect-ratio: 136 / 116; overflow: hidden;
  border-radius: 68px 68px 16px 16px; background: var(--surface-alt); border: 1px solid var(--border); transition: transform .2s, border-color .2s; }
.cat .arch img { width: 100%; height: 100%; object-fit: cover; }
.cat .arch .icon { width: 40%; height: auto; aspect-ratio: 1; stroke: var(--gold); stroke-width: 1.2; }
.cat-name { font-size: 15px; font-weight: 500; line-height: 1.25; color: var(--text); }
.cat:hover .arch { border-color: var(--gold); transform: translateY(-3px); }
.cat:hover .cat-name { color: var(--brand); }
.cat:active .arch { transform: none; border-color: var(--brand-active); }
.cat:active .cat-name { color: var(--brand-active); }
/* When the row overflows: fade the cut-off edge and offer arrows to mouse users
   (touch and trackpads just swipe; keyboard focus scrolls tiles into view). */
.cats-wrap { position: relative; }
.cats-wrap.more-right .cats { mask-image: linear-gradient(to right, black calc(100% - 72px), transparent); }
.cats-wrap.more-left .cats { mask-image: linear-gradient(to left, black calc(100% - 72px), transparent); }
.cats-wrap.more-left.more-right .cats { mask-image: linear-gradient(to right, transparent, black 72px, black calc(100% - 72px), transparent); }
.cats-nav { position: absolute; top: 68px; transform: translateY(-50%); z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-control); box-shadow: var(--shadow); cursor: pointer; font-size: 24px; line-height: 1; padding: 0 0 3px; }
.cats-nav:hover { color: var(--brand); border-color: var(--brand); }
.cats-nav:active { color: var(--brand-active); border-color: var(--brand-active); }
.cats-nav.prev { left: -6px; }
.cats-nav.next { right: -6px; }
@media (hover: none) { .cats-nav { display: none !important; } }
.cat-badge { position: absolute; top: -6px; right: 6px; background: var(--surface); color: var(--brand); border: 1px solid var(--border); border-radius: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 3px 7px; line-height: 1.2; }

/* ---------- product card ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 18px; }
.grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Homepage "Popular at PondyTrésor": one compact row of four. */
section.popular { padding: 32px 0 36px; }
.popular .sh { margin-bottom: 18px; align-items: baseline; }
.pc { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.pc .ph { aspect-ratio: 1; border-radius: var(--radius) var(--radius) 0 0; }
.pc .b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pc .cat-l { font-size: 11.5px; color: var(--text-2); letter-spacing: .3px; }
.pc h3 { font-size: 14.5px; font-weight: 500; margin: 0; line-height: 1.35; }
.pc .name { text-decoration: none; }
.pc .name:hover { color: var(--brand); }
.pc .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.price { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.add { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: 1px solid var(--brand); color: var(--brand); background: var(--surface); border-radius: var(--radius-btn); min-height: 38px; padding: 0 14px; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.add:hover, .add.done { background: var(--brand); color: var(--on-brand); }
.add.done:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
/* Icon-only Add to Cart (cart, then a tick once added). */
.add.add-ic { padding: 0; width: 42px; }
.add-ic .icon { width: 21px; height: 21px; stroke-width: 1.8; }
.btn.add-ic .icon { width: 26px; height: 26px; }
.add:active, .add.done:active { background: var(--brand-active); border-color: var(--brand-active); color: var(--on-brand); }
.tag { position: absolute; top: 10px; left: 10px; background: var(--surface); color: var(--brand); font-size: 11px; font-weight: 700; letter-spacing: .4px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--border); }
.avail { font-size: 12px; color: var(--success); }
.avail.low { color: var(--warning); }
.avail.out { color: var(--text-2); }
/* A shape per state (full / half / empty) next to the words, so stock never
   depends on colour. The "/ ''" keeps screen readers to the words alone. */
.avail::before { content: "●"; content: "●" / ""; margin-right: 5px; font-size: .85em; }
.avail.low::before { content: "◐"; content: "◐" / ""; }
.avail.out::before { content: "○"; content: "○" / ""; }
/* Compact card: 4:3 photo with stock on it, then one line of name · price · button. */
.pc-compact .ph { aspect-ratio: 4 / 3; }
.ph-stock { position: absolute; left: 10px; bottom: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; font-size: 11.5px; font-weight: 600; line-height: 1.3; }
.pc-compact .b { flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; }
.pc-compact h3 { flex: 1; min-width: 0; font-size: 14px; }
.pc-compact .name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-compact .price { font-size: 15px; flex: none; }
.pc-compact .add { flex: none; min-height: 34px; padding: 0 12px; font-size: 12.5px; }
.pc-compact .add.add-ic { padding: 0; width: 38px; }

/* Homepage rhythm: a little tighter than other pages (Popular sets its own). */
.home section.blk:not(.popular) { padding: 36px 0; }

/* ---------- budget tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tile { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; min-height: 64px; transition: border-color .2s; }
.tile:hover { border-color: var(--brand); }
.tile:hover b, .tile:hover span { color: var(--brand); }
.tile:active { border-color: var(--brand-active); box-shadow: inset 0 0 0 1px var(--brand-active); }
.tile b { font-family: var(--display); font-weight: 400; font-size: 18px; }
.tile span { color: var(--gold); font-size: 18px; }

/* ---------- listing view ---------- */
.crumbs { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.list-head h1 { font-family: var(--display); font-weight: 400; font-size: 34px; margin: 0 0 4px; line-height: 1.15; }
.list-head p { margin: 0; color: var(--text-2); font-size: 14px; }
.list-head .list-intro { color: var(--text); max-width: 60ch; margin-bottom: 4px; font-size: 15px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 18px 0 22px; }
.subchips { display: flex; flex-wrap: wrap; gap: 8px; margin-right: auto; }
.chip { font-size: 13px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; background: var(--surface); white-space: nowrap; }
.chip:hover { border-color: var(--brand); }
.chip:active { border-color: var(--brand-active); color: var(--brand-active); }
.chip[aria-current] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.toolbar label { font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.toolbar select { border: 1px solid var(--border-control); background: var(--surface); border-radius: var(--radius-btn); padding: 7px 10px; font-size: 13.5px; }
.toolbar select:hover { border-color: var(--text-2); }
.toolbar input[type="checkbox"] { accent-color: var(--brand); width: 16px; height: 16px; }
.more { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }
.more:empty { display: none; }
.nf-title { font-family: var(--display); font-weight: 400; color: var(--text); font-size: 30px; margin: 0 0 8px; }
.empty-state { text-align: center; padding: 40px 16px; color: var(--text-2); }
.empty-state h2 { font-family: var(--display); font-weight: 400; color: var(--text); font-size: 24px; margin: 0 0 8px; }

/* ---------- footer ---------- */
.ftr { background: var(--surface-alt); border-top: 1px solid var(--border); padding: 18px 0; font-size: 14px; }
.fbot { color: var(--text-2); font-size: 12.5px; display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.fbrand { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.fsocial { display: inline-flex; gap: 2px; }
.fsocial a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--text-2); }
.fsocial a:hover { color: var(--brand); background: var(--surface); }
.fsocial a:active { color: var(--brand-active); }
.fsocial .icon { width: 19px; height: 19px; }
.fphones { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 4px; color: var(--text); }
.fphones .icon { width: 17px; height: 17px; color: var(--brand); margin-right: 2px; }
.fphones a { color: var(--text); text-decoration: none; min-height: 24px; display: inline-flex; align-items: center; }
.fphones a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.fphones a:active { color: var(--brand-active); }
.fmap { display: inline-flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; min-height: 24px; }
.fmap .icon { width: 18px; height: 18px; color: var(--brand); }
.fmap:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.fmap:active { color: var(--brand-active); }
.mbar { display: none; }

/* ---------- dialogs: drawer, bag, quick view ---------- */
dialog { border: 0; padding: 0; background: var(--bg); color: var(--text); max-width: 100%; max-height: 100%; }
dialog::backdrop { background: var(--scrim); }
body:has(dialog[open]) { overflow: hidden; }
.sheet { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(420px, 100%); height: 100%; display: none; flex-direction: column; }
.sheet[open] { display: flex; }
.sheet.left { inset: 0 auto 0 0; width: min(340px, 86%); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.sheet-head h2 { font-family: var(--display); font-weight: 400; font-size: 22px; margin: 0; }
.sheet-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.sheet-foot { border-top: 1px solid var(--border); padding: 16px 18px; background: var(--surface); }
.x { background: none; border: 0; width: 44px; height: 44px; font-size: 26px; line-height: 1; cursor: pointer; color: var(--text-2); border-radius: 8px; }
.x:hover { color: var(--text); }

.drawer-nav h3 { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-2); margin: 18px 0 6px; font-weight: 600; }
.drawer-nav h3:first-child { margin-top: 0; }
.drawer-nav details, .drawer-nav .solo { border-bottom: 1px solid var(--border); }
.drawer-nav summary, .drawer-nav .solo { display: flex; justify-content: space-between; align-items: center; min-height: 48px; font-weight: 600; cursor: pointer; text-decoration: none; list-style: none; }
.drawer-nav summary::-webkit-details-marker { display: none; }
.drawer-nav summary::after { content: "+"; color: var(--text-2); font-weight: 400; font-size: 18px; }
.drawer-nav details[open] summary::after { content: "–"; }
.drawer-nav details a { display: flex; justify-content: space-between; padding: 10px 12px; text-decoration: none; color: var(--text-2); }
.drawer-nav details a small { font-size: 12px; }

.bag-lines { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.bag-line { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; }
.bag-line .ph { width: 56px; height: 56px; border-radius: 8px; }
.bag-line .ph .icon { width: 28px; }
.bag-line .nm { display: block; font-size: 14px; font-weight: 500; line-height: 1.3; text-decoration: none; }
.bag-line .nm:hover { color: var(--brand); }
.bag-line small { display: block; color: var(--text-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.bag-line .pz-line { color: var(--text-2); overflow-wrap: anywhere; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-control); border-radius: var(--radius-btn); background: var(--surface); }
.qty button { width: 32px; height: 32px; border: 0; background: none; cursor: pointer; font-size: 16px; border-radius: var(--radius-btn); }
.qty button:hover { background: var(--surface-alt); color: var(--brand); }
.qty button:active { background: var(--border); color: var(--brand-active); }
.qty span { min-width: 22px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.bag-empty { color: var(--text-2); font-size: 14px; margin: 0 0 18px; }
.bag-total { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.bag-note { font-size: 12.5px; color: var(--text-2); margin: 0 0 14px; }
.form h3 { font-family: var(--display); font-weight: 400; font-size: 19px; margin: 0 0 4px; }
.form > p { font-size: 13.5px; color: var(--text-2); margin: 0 0 14px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field input, .field textarea { width: 100%; font-size: 15px; padding: 10px 12px; border: 1px solid var(--border-control); border-radius: var(--radius-btn); background: var(--surface); }
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); opacity: 1; }
.field input:hover, .field textarea:hover { border-color: var(--text-2); }
.field input:focus, .field textarea:focus { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 1px; }
/* Invalid: red edge, thicker, plus the message below (role="status"). */
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
.field input[aria-invalid="true"]:focus { outline-color: var(--error); }
.field textarea { min-height: 76px; resize: vertical; }
.form-status { font-size: 13.5px; margin-top: 10px; }
.form-status.ok, .pz-status.ok { color: var(--success); }
.form-status.err, .pz-status.err { color: var(--error); font-weight: 600; }
.form-status.ok::before, .pz-status.ok::before { content: "✓ "; content: "✓ " / ""; }
.form-status.err::before, .pz-status.err::before { content: "⚠ "; content: "⚠ " / ""; }
.or { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 12.5px; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- product page ---------- */
.pdp { padding-top: 24px; }
.pdp .crumbs { margin-bottom: 16px; }
.pdp-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.pdp-media { aspect-ratio: 1; border-radius: 14px; position: sticky; top: 16px; }
.pdp-media .icon { width: 30%; }
.pdp-info { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pdp-info h1 { font-family: var(--display); font-weight: 400; font-size: 38px; line-height: 1.12; margin: 0; text-wrap: balance; }
.pdp-info .cat-l { font-size: 12.5px; color: var(--text-2); letter-spacing: .3px; }
.pdp-price { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.pdp-price .price { font-size: 26px; }
.pdp-price .avail { font-size: 13.5px; }
.pdp-desc { color: var(--text); max-width: 60ch; }
.pdp-occasions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }

/* personalisation form + review */
.pz-form { background: var(--surface-alt); border-radius: var(--radius); padding: 18px; display: grid; gap: 4px; }
.pz-form h2 { font-family: var(--display); font-weight: 400; font-size: 21px; margin: 0; color: var(--text); }
.pz-form > p { margin: 0 0 10px; font-size: 13.5px; color: var(--text-2); }
.pz-form .field input, .pz-form .field textarea { background: var(--surface); }
.pz-photo { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.pz-preview { width: 96px; height: 96px; border-radius: 8px; flex: none; background: var(--surface); border: 1px dashed var(--gold); }
.pz-preview .icon { width: 44%; }
.pz-photo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.pz-photo-actions .btn { min-height: 40px; padding: 0 16px; background: var(--surface); }
#pzFile:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.pz-status { margin: 0; font-size: 12.5px; color: var(--text-2); }
.pz-status.ok { font-weight: 600; }
.review { width: min(520px, calc(100% - 32px)); border-radius: 14px; margin: auto; }
.review-body { display: grid; grid-template-columns: 140px 1fr; gap: 18px; padding: 18px; }
.review-pic { aspect-ratio: 1; border-radius: 10px; }
.review-pic .icon { width: 40%; }
.review-info b { font-family: var(--display); font-weight: 400; font-size: 19px; }
.review-info dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 10px 0; font-size: 14px; }
.review-info dt { color: var(--text-2); }
.review-info dd { margin: 0; overflow-wrap: anywhere; }
.review-note { font-size: 12.5px; color: var(--text-2); margin: 0; }
.review-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); background: var(--surface); }
.pdp-buy { display: flex; gap: 12px; align-items: stretch; }
.pdp-buy .pdp-add { flex: 1; }
.qty-lg { border-radius: var(--radius-btn); }
.qty-lg button { width: 44px; height: 46px; font-size: 18px; }
.qty-lg input { width: 44px; border: 0; text-align: center; font-size: 15px; background: none; -moz-appearance: textfield; font-variant-numeric: tabular-nums; }
.qty-lg input::-webkit-inner-spin-button, .qty-lg input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-facts { list-style: none; margin: 4px 0 0; padding: 14px 0 0; border-top: 1px solid var(--border); display: grid; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.pdp-facts b { color: var(--text); font-variant-numeric: tabular-nums; }
.buybar { display: none; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--text); color: var(--on-brand); padding: 10px 18px; border-radius: 999px; font-size: 14px;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 90; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- tablet ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.g3, .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .hdr-row { gap: 8px; padding: 10px 0 8px; }
  .logo .w { font-size: 21px; }
  .logo .s { font-size: 8.5px; letter-spacing: 2px; }
  .hdr-row .search { display: none; }
  .ibtn .lbl { display: none; }
  .msearch { display: block; max-width: none; margin: 0 0 10px; }
  .msearch .search-box { height: 42px; }
  .chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 12px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }


  section.blk { padding: 30px 0; }
  .sh h2 { font-size: 24px; }
  .strip { padding: 16px 0 4px; }
  .cats { gap: 14px; padding-bottom: 8px; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
  .cat { flex-basis: 92px; gap: 8px; }
  .cat .arch { border-radius: 46px 46px 12px 12px; }
  .cat-name { font-size: 13px; }
  .cat-badge { font-size: 9.5px; padding: 2px 5px; right: 2px; }
  .grid, .grid.g3, .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  section.popular { padding: 24px 0 28px; }
  .popular .sh h2 { font-size: 24px; }
  .pc .b { padding: 10px 10px 12px; }
  .pc h3 { font-size: 13.5px; }
  .price { font-size: 15px; }
  .pc .row { flex-direction: column; align-items: stretch; gap: 8px; }
  .add { width: 100%; min-height: 40px; }
  /* The icon button is small enough to sit beside the price. */
  .pc .row:has(.add-ic) { flex-direction: row; align-items: center; }
  .add.add-ic { width: 42px; }
  /* Two narrow columns can't fit everything on one line: name on top, then
     price and button. The one-column layout below goes back to one line. */
  .pc-compact .b { flex-wrap: wrap; gap: 6px 8px; padding: 9px 10px 10px; }
  .pc-compact h3 { flex: 1 0 100%; font-size: 13.5px; }
  .pc-compact .price { margin-right: auto; }
  .pc-compact .add { width: auto; min-height: 34px; padding: 0 10px; }
  .pc-compact .add.add-ic { width: 38px; padding: 0; }
  .ph-stock { left: 8px; bottom: 8px; font-size: 10.5px; padding: 2px 7px; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tile { padding: 14px; min-height: 64px; }
  .tile b { font-size: 16px; }
  .list-head h1 { font-size: 27px; }
  .subchips { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; margin-right: 0; }
  .home section.blk:not(.popular) { padding: 28px 0; }
  .ftr { padding-bottom: calc(18px + 66px + env(safe-area-inset-bottom, 0px)); }

  .mbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0px); }
  .mbar a, .mbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 10px; font-size: 11px; text-decoration: none; color: var(--text-2);
    position: relative; background: none; border: 0; cursor: pointer; }
  .mbar [aria-current] { color: var(--brand); }
  .mbar [aria-current]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; background: var(--brand); }
  .mbar .count { top: 4px; right: calc(50% - 22px); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }


  .pdp { padding-top: 14px; }
  .pdp-grid { grid-template-columns: 1fr; gap: 20px; }
  .pdp-media { position: relative; top: auto; aspect-ratio: 4 / 3; }
  .pdp-info h1 { font-size: 28px; }
  .pdp-price .price { font-size: 22px; }
  /* The product page swaps the quick-links bar for a buy bar. */
  .product-page .mbar { display: none; }
  .buybar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--border); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .buybar > div { display: flex; flex-direction: column; min-width: 0; }
  .buybar-name { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .buybar .btn { flex: none; min-width: 150px; }
  .review { width: 100%; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .review-body { grid-template-columns: 96px 1fr; gap: 14px; padding: 16px; }
  .review-actions { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .review-actions .btn { flex: 1; }
}

/* Very narrow phones: one card per row so names and buttons stay usable. */
@media (max-width: 359px) {
  .grid.g4 { grid-template-columns: 1fr; }
  .pc-compact .b { flex-wrap: nowrap; }
  .pc-compact h3 { flex: 1 1 auto; }
}
