/*
 * Rice & Spice storefront — Phase 8.
 *
 * Design tokens below match the confirmed live-site palette (see
 * docs/CURRENT-SITE-UX-AUDIT.md: dark-brown text rgb(36,26,16); and the
 * approved-baseline mirror at ricespice-ch/src/homepage-source-mirror.html,
 * which carries the same values plus the rest of this token set) —
 * docs/UX-SPECIFICATION.md: "Preserve the Rice & Spice branding, warm
 * off-white background, dark-brown type, burnt-orange action accent,
 * rounded pills/cards." This file is an original implementation for
 * this plugin, not copied from that reference file.
 */

#rso-storefront {
	--rso-bg: #f6f7f1;
	--rso-surface: #ffffff;
	--rso-surface-2: #f0ede4;
	--rso-ink: #241a10;
	--rso-ink-soft: #6b5d4d;
	--rso-ink-faint: #9a8c79;
	--rso-line: #e8e1d2;
	/* 2026-08-18 owner decision: the action colour is the logo green,
	   not the old burnt orange. Errors and sold-out states move to the
	   explicit danger tokens below so "problem" never reads as "go". */
	--rso-accent: #46a500;
	--rso-accent-deep: #35800a;
	--rso-accent-tint: #eaf6df;
	--rso-danger: #b3261e;
	--rso-danger-deep: #8c1d17;
	--rso-danger-tint: #fdecea;
	--rso-success: #4c7a2e;
	--rso-success-tint: #eaf1e2;
	--rso-shadow: 0 1px 2px rgba(36, 26, 16, .06), 0 8px 24px -12px rgba(36, 26, 16, .18);
	--rso-shadow-lg: 0 20px 60px -20px rgba(36, 26, 16, .35);
	--rso-radius-s: 10px;
	--rso-radius-m: 16px;
	--rso-radius-l: 22px;
	--rso-font-display: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI Rounded", ui-rounded, "Segoe UI", Roboto, system-ui, sans-serif;
	--rso-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--rso-focus: #1857c4;

	font-family: var(--rso-font-body);
	color: var(--rso-ink);
	background: var(--rso-bg);
	line-height: 1.45;
}

@media (prefers-color-scheme: dark) {
	#rso-storefront:not([data-theme="light"]) {
		--rso-bg: #18130d;
		--rso-surface: #221a11;
		--rso-surface-2: #2b2116;
		--rso-ink: #f3ecdf;
		--rso-ink-soft: #c7b9a4;
		--rso-ink-faint: #8d7c66;
		--rso-line: #3a2d1d;
		--rso-accent: #6cc832;
		--rso-accent-deep: #8ed95e;
		--rso-accent-tint: #1e3312;
		--rso-danger: #ff6b63;
		--rso-danger-deep: #ff8f88;
		--rso-danger-tint: #3a1c19;
		--rso-success: #8fc65e;
		--rso-success-tint: #26311c;
		--rso-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
		--rso-shadow-lg: 0 20px 60px -20px rgba(0, 0, 0, .7);
	}
}

#rso-storefront * { box-sizing: border-box; }
#rso-storefront img { max-width: 100%; display: block; }
/*
 * Deliberately no `color: inherit` here even though it would read as
 * the obvious reset: #rso-storefront (an ID selector) beats every
 * class-based button color rule below it in specificity regardless of
 * source order, which silently forced every button — including
 * .rso-add-btn and .rso-primary-btn's white-on-accent text and
 * .rso-chip-btn[aria-pressed="true"]'s light-on-dark text — back to the
 * dark base ink color, making them unreadable against their own
 * backgrounds. Caught by loading this file in a real browser (see
 * tests/manual-storefront-harness.html), not by reading the CSS.
 * font: inherit alone is enough for what this reset is actually for
 * (buttons not using the UA stylesheet's own font); every button
 * variant below sets its own explicit, correctly-cascading color.
 */
#rso-storefront button { font: inherit; }
#rso-storefront h1, #rso-storefront h2, #rso-storefront h3 { font-family: var(--rso-font-display); margin: 0; }
#rso-storefront p { margin: 0; }
#rso-storefront .rso-visually-hidden {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
#rso-storefront :focus-visible {
	outline: 3px solid var(--rso-focus);
	outline-offset: 2px;
	border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
	#rso-storefront *, #rso-storefront *::before, #rso-storefront *::after {
		animation-duration: .001ms !important;
		transition-duration: .001ms !important;
		scroll-behavior: auto !important;
	}
}
#rso-storefront .rso-noscript { padding: 16px; text-align: center; color: var(--rso-ink-soft); }

/* --- Layout --- */
#rso-storefront .rso-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 16px 96px;
}
@media (min-width: 980px) {
	#rso-storefront .rso-layout { grid-template-columns: 1fr 360px; gap: 40px; align-items: start; padding-bottom: 40px; }
}
#rso-storefront .rso-main { min-width: 0; }

/* --- Header (2026-08-18 redesign, owner-approved) ---
 *
 * Sticky slim top bar (brand | search | phone + basket), then a quiet
 * meta row (address · open state), then the order card: segmented
 * service control with live sublabels, the delivery-zone chip, and the
 * compact free-delivery/ETA facts. The postcode form and scheduling
 * keep living in the mode panel directly beneath the card.
 */
#rso-storefront .rso-topbar {
	position: sticky; top: 0; z-index: 30; /* also the anchor for the mobile search overlay */
	background: color-mix(in srgb, var(--rso-surface) 90%, transparent);
	backdrop-filter: saturate(1.4) blur(14px);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	border-bottom: 1px solid var(--rso-line);
	/* Background bleeds to the screen edges; the CONTENT stays aligned
	   with the menu container below (owner decision 2026-08-18 v2). */
	margin: 0 calc(50% - 50vw);
	padding: 0 calc(50vw - 50%);
}
#rso-storefront .rso-topbar-inner {
	display: flex; align-items: center; gap: clamp(10px, 2vw, 20px);
	padding: clamp(12px, 1.8vw, 16px) 0;
}
#rso-storefront .rso-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; flex: 0 1 auto; min-width: 0; border-radius: 8px; text-decoration: none; }
#rso-storefront .rso-brand-row { display: flex; align-items: center; gap: 10px; }
#rso-storefront .rso-brand:focus-visible { outline: 3px solid var(--rso-focus); outline-offset: 3px; }
#rso-storefront .rso-mark svg { display: block; height: clamp(34px, 3.8vw, 46px); width: auto; }
#rso-storefront .rso-word { flex: none;
	font-family: var(--rso-font-display);
	font-size: clamp(1.2rem, 2.1vw, 1.5rem); font-weight: 800;
	letter-spacing: -.015em; line-height: 1.1; white-space: nowrap;
}
#rso-storefront .rso-word .w-rice { color: #46a500; }
#rso-storefront .rso-word .w-spice { color: #35800a; }
#rso-storefront .rso-word .w-tld { color: var(--rso-ink-faint); font-weight: 700; }
/* width:0 + min-width:100% keeps the address from widening the brand
   column — it truncates to the lockup's own width instead of pushing
   the brand name into ellipsis. */
#rso-storefront .rso-brand-address { font-size: clamp(.68rem, 1vw, .8rem); color: var(--rso-ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 0; min-width: 100%; }
#rso-storefront .rso-search-toggle { display: none; }
#rso-storefront .rso-actions { display: flex; align-items: center; gap: 10px; flex: none; }
#rso-storefront .rso-phone-btn {
	display: flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border-radius: 50%; color: var(--rso-ink);
	background: var(--rso-surface-2); border: 1px solid var(--rso-line); text-decoration: none;
}
#rso-storefront .rso-phone-btn:hover { background: var(--rso-ink); border-color: var(--rso-ink); color: var(--rso-bg); }
#rso-storefront .rso-phone-btn:focus-visible, #rso-storefront .rso-basket-btn:focus-visible { outline: 3px solid var(--rso-focus); outline-offset: 2px; }
#rso-storefront .rso-phone-btn svg { width: 18px; height: 18px; }
#rso-storefront .rso-basket-btn {
	display: flex; align-items: center; gap: 9px; border: 0; cursor: pointer;
	font-family: var(--rso-font-display); font-weight: 700; font-size: .95rem; color: #fff;
	background: var(--rso-accent); border-radius: 999px; padding: 10px 18px; min-height: 44px;
	box-shadow: 0 6px 18px -6px rgba(70, 165, 0, .5);
}
#rso-storefront .rso-basket-btn:hover { background: var(--rso-ink); color: var(--rso-bg); }
#rso-storefront .rso-basket-btn svg { width: 18px; height: 18px; }
#rso-storefront .rso-basket-btn-count { background: rgba(255, 255, 255, .25); border-radius: 999px; padding: 1px 8px; font-size: .82rem; }
#rso-storefront .rso-header { padding-top: clamp(12px, 2vw, 18px); }
#rso-storefront .rso-status { flex: none; margin-left: clamp(14px, 2.5vw, 36px);
	display: inline-flex; align-items: center; gap: 8px;
	font-size: .84rem; font-weight: 700; font-family: var(--rso-font-display);
	padding: 5px 12px; border-radius: 999px; background: var(--rso-surface-2);
	width: fit-content; border: 1px solid var(--rso-line);
}
#rso-storefront .rso-status[data-open="true"] { background: var(--rso-success-tint); color: var(--rso-success); border-color: color-mix(in srgb, var(--rso-success) 25%, transparent); }
#rso-storefront .rso-status[data-open="false"] { background: #f7f0dc; color: #8a6d1f; border-color: #e2d3a4; }
#rso-storefront .rso-status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }

/* --- Order card --- */
#rso-storefront .rso-ordercard {
	display: flex; align-items: center; gap: clamp(12px, 2vw, 24px);
	background: var(--rso-surface); border: 1px solid var(--rso-line);
	border-radius: 18px; box-shadow: var(--rso-shadow);
	padding: clamp(10px, 1.6vw, 14px) clamp(12px, 2vw, 20px);
	margin-top: clamp(12px, 2vw, 18px);
}
#rso-storefront .rso-service-selector {
	display: flex; gap: 2px; flex: none;
	background: var(--rso-surface-2); border: 1px solid var(--rso-line);
	border-radius: 999px; padding: 4px;
}
#rso-storefront .rso-service-btn {
	border: 0; background: transparent; padding: 7px clamp(12px, 1.6vw, 18px); min-height: 48px;
	border-radius: 999px; font-family: var(--rso-font-display);
	color: var(--rso-ink-soft); cursor: pointer; text-align: center; white-space: nowrap;
	transition: background .18s, color .18s, box-shadow .18s;
}
@media (prefers-reduced-motion: reduce) { #rso-storefront .rso-service-btn { transition: none; } }
#rso-storefront .rso-service-btn:hover { color: var(--rso-ink); }
#rso-storefront .rso-service-btn[aria-pressed="true"] { background: var(--rso-surface); color: var(--rso-accent-deep); box-shadow: var(--rso-shadow); }
#rso-storefront .rso-service-btn-label { display: block; font-size: .92rem; font-weight: 700; }
#rso-storefront .rso-service-btn-sub { display: block; font-size: .72rem; font-weight: 500; color: var(--rso-ink-faint); margin-top: 1px; }
#rso-storefront .rso-service-btn[aria-pressed="true"] .rso-service-btn-sub { color: var(--rso-ink-soft); }
#rso-storefront .rso-zone { display: flex; align-items: center; gap: 11px; flex: none; }
#rso-storefront .rso-zone[hidden] { display: none; }
#rso-storefront .rso-zone-ico {
	display: flex; align-items: center; justify-content: center; width: 38px; height: 38px;
	border-radius: 11px; background: var(--rso-accent-tint); color: var(--rso-accent-deep); flex: none;
}
#rso-storefront .rso-zone-ico svg { width: 19px; height: 19px; }
#rso-storefront .rso-zone-txt { display: flex; flex-direction: column; }
#rso-storefront .rso-zone-txt .k { font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rso-ink-faint); }
#rso-storefront .rso-zone-txt .v { font-size: 1.02rem; font-weight: 800; color: var(--rso-ink); line-height: 1.15; font-variant-numeric: tabular-nums; }
#rso-storefront .rso-zone-input {
	font-family: inherit; font-size: 1.02rem; font-weight: 800; color: var(--rso-ink);
	font-variant-numeric: tabular-nums; line-height: 1.15;
	width: 5.5ch; min-height: 0; padding: 0 2px;
	border: 0; border-bottom: 2px solid var(--rso-accent); border-radius: 0;
	background: transparent; outline: none;
}
#rso-storefront .rso-zone-input::placeholder { color: var(--rso-ink-faint); font-weight: 600; font-size: .9rem; }
#rso-storefront .rso-zone-input:focus-visible { outline: 3px solid var(--rso-focus); outline-offset: 2px; border-radius: 4px; }
#rso-storefront .rso-zone-message:empty { display: none; }
#rso-storefront .rso-zone-message { max-width: 480px; }
#rso-storefront .rso-zone-btn {
	font-family: var(--rso-font-display); font-size: .85rem; font-weight: 700; cursor: pointer;
	color: var(--rso-accent-deep); background: transparent;
	border: 1.5px solid color-mix(in srgb, var(--rso-accent) 45%, transparent);
	border-radius: 999px; padding: 7px 14px; min-height: 40px; white-space: nowrap;
}
#rso-storefront .rso-zone-btn:hover { background: var(--rso-ink); border-color: var(--rso-ink); color: var(--rso-bg); }
#rso-storefront .rso-zone-btn:focus-visible { outline: 3px solid var(--rso-focus); outline-offset: 2px; }
#rso-storefront .rso-facts { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 26px); margin-inline: auto; }
#rso-storefront .rso-facts[hidden] { display: none; }
#rso-storefront .rso-fact { text-align: right; }
#rso-storefront .rso-fact .v { font-size: .95rem; font-weight: 700; white-space: nowrap; }
#rso-storefront .rso-fact .k { font-size: .76rem; color: var(--rso-ink-soft); white-space: nowrap; }
#rso-storefront .rso-fact-progress { text-align: left; min-width: 210px; }
#rso-storefront .rso-fact-progress .v { font-size: .92rem; color: var(--rso-accent-deep); white-space: normal; }
#rso-storefront .rso-fact-progress .k { margin-top: 2px; }
#rso-storefront .rso-fact-progress .bar { height: 4px; border-radius: 999px; background: var(--rso-surface-2); margin-top: 5px; overflow: hidden; }
#rso-storefront .rso-fact-progress .bar span { display: block; height: 100%; border-radius: 999px; background: var(--rso-accent); transition: width .3s; }
@media (prefers-reduced-motion: reduce) { #rso-storefront .rso-fact-progress .bar span { transition: none; } }
#rso-storefront .rso-fact-progress.is-unlocked .v { color: var(--rso-success); }
#rso-storefront .rso-fact-progress.is-unlocked .bar span { background: var(--rso-success); }
#rso-storefront .rso-booking-link { display: inline-flex; align-items: center; width: fit-content; margin-top: 12px; text-decoration: none; }
#rso-storefront .rso-postcode-form {
	margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end;
	background: var(--rso-surface); border: 1px solid var(--rso-line);
	border-radius: var(--rso-radius-m); padding: 14px; max-width: 420px;
}
#rso-storefront .rso-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 140px; }
#rso-storefront .rso-field label { font-size: .8rem; font-weight: 700; }
#rso-storefront .rso-field input, #rso-storefront .rso-field select {
	min-height: 44px; padding: 8px 12px; border-radius: var(--rso-radius-s);
	border: 1px solid var(--rso-line); background: var(--rso-surface); color: var(--rso-ink); font-size: .95rem;
}
#rso-storefront .rso-hint { font-size: .78rem; color: var(--rso-ink-soft); flex-basis: 100%; }
#rso-storefront .rso-message {
	margin-top: 10px; padding: 10px 14px; border-radius: var(--rso-radius-s);
	font-size: .86rem; background: var(--rso-surface-2);
}
#rso-storefront .rso-message[data-tone="success"] { background: var(--rso-success-tint); color: var(--rso-success); }
#rso-storefront .rso-message[data-tone="error"] { background: var(--rso-danger-tint); color: var(--rso-danger); }
/* The undo banner packs text + an inline "Undo" action side by side; the
   delivery message (progress bar above its text) relies on .rso-message's
   own plain block stacking instead — an explicit modifier class rather
   than a :has() structural selector, since this project doesn't assume
   a browser-support floor recent enough to rely on that. */
#rso-storefront .rso-message-inline { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
#rso-storefront .rso-schedule { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
#rso-storefront .rso-schedule-toggle { display: flex; gap: 8px; }
#rso-storefront .rso-chip-btn {
	border: 1px solid var(--rso-line); background: var(--rso-surface); color: var(--rso-ink-soft);
	font-weight: 700; font-family: var(--rso-font-display); font-size: .82rem;
	padding: 9px 16px; min-height: 44px; border-radius: 999px; cursor: pointer;
}
#rso-storefront .rso-chip-btn[aria-pressed="true"] { background: var(--rso-ink); color: var(--rso-bg); border-color: var(--rso-ink); }

/* --- Search --- */
/* No top margin: it is a header column now, not a row beneath one. */
#rso-storefront .rso-search { min-width: 0; }
#rso-storefront .rso-search-field { position: relative; }
#rso-storefront .rso-search-field input {
	width: 100%; min-height: 46px; padding: 10px 16px; border-radius: 999px;
	border: 1px solid var(--rso-line); background: var(--rso-surface); color: var(--rso-ink); font-size: .95rem;
}
#rso-storefront .rso-search-reset {
	margin-top: 8px; background: none; border: 1px dashed var(--rso-line); border-radius: 999px;
	padding: 8px 14px; min-height: 40px; font-weight: 700; font-family: var(--rso-font-display);
	font-size: .8rem; color: var(--rso-ink-soft); cursor: pointer;
}

/* --- Category nav --- */
#rso-storefront .rso-cat-wrap {
	position: sticky; top: var(--rso-topbar-h, 64px); z-index: 20;
	background: var(--rso-bg); border-bottom: 1px solid var(--rso-line);
	margin-top: 8px; display: flex; align-items: center; position: sticky;
}
#rso-storefront .rso-cat-nav {
	flex: 1; min-width: 0;
	padding: 12px 0; display: flex; gap: 8px; overflow-x: auto;
	scrollbar-width: none;
}
#rso-storefront .rso-cat-nav::-webkit-scrollbar { display: none; }
#rso-storefront .rso-cat-arrow {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
	display: flex; align-items: center; justify-content: center;
	width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
	color: var(--rso-ink-soft); background: var(--rso-surface);
	border: 1px solid var(--rso-line); box-shadow: var(--rso-shadow);
}
#rso-storefront .rso-cat-arrow:hover { color: var(--rso-ink); }
#rso-storefront .rso-cat-arrow[hidden] { display: none; }
#rso-storefront .rso-cat-arrow svg { width: 15px; height: 15px; }
#rso-storefront .rso-cat-arrow-left { left: -4px; }
#rso-storefront .rso-cat-arrow-right { right: -4px; }
/* Soft fades under the arrows so the strip visibly continues. */
#rso-storefront .rso-cat-arrow-left::before, #rso-storefront .rso-cat-arrow-right::before {
	content: ""; position: absolute; top: 50%; transform: translateY(-50%);
	width: 56px; height: 44px; pointer-events: none; z-index: -1;
}
#rso-storefront .rso-cat-arrow-left::before { left: -6px; background: linear-gradient(90deg, var(--rso-bg) 40%, transparent); }
#rso-storefront .rso-cat-arrow-right::before { right: -6px; background: linear-gradient(270deg, var(--rso-bg) 40%, transparent); }
#rso-storefront .rso-cat-pill {
	flex: none; border: 1px solid var(--rso-line); background: var(--rso-surface);
	color: var(--rso-ink-soft); font-family: var(--rso-font-display); font-weight: 700;
	font-size: .82rem; padding: 9px 16px; min-height: 44px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
#rso-storefront .rso-cat-pill[aria-current="true"] { background: var(--rso-ink); color: var(--rso-bg); border-color: var(--rso-ink); }
#rso-storefront .rso-cat-pill:hover:not([aria-current="true"]) { background: var(--rso-line); }
#rso-storefront .rso-cat-pill:focus-visible { outline: none; background: var(--rso-line); box-shadow: 0 0 0 2px var(--rso-ink-faint); }

/* --- Menu sections --- */
#rso-storefront .rso-section { margin-top: 30px; scroll-margin-top: calc(var(--rso-topbar-h, 64px) + 64px); }
#rso-storefront .rso-section h2 {
	font-size: clamp(1.35rem, 2.4vw, 1.65rem); font-weight: 800;
	letter-spacing: -.015em; line-height: 1.2;
}
#rso-storefront .rso-section h2:focus, #rso-storefront .rso-section h2:focus-visible {
	outline: none; background: var(--rso-surface-2);
	border-radius: 12px; padding: 4px 14px; margin-left: -14px;
	width: fit-content;
}
#rso-storefront .rso-product-list { list-style: none; margin: 12px 0 0; padding: 0; }
#rso-storefront .rso-product-card {
	display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--rso-line); align-items: flex-start;
}
#rso-storefront .rso-product-list > li:first-child .rso-product-card { border-top: none; }
#rso-storefront .rso-product-main { flex: 1; min-width: 0; }
#rso-storefront .rso-product-name { font-family: var(--rso-font-display); font-weight: 700; font-size: .98rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#rso-storefront .rso-product-price { margin-top: 6px; font-weight: 800; font-family: var(--rso-font-display); font-size: .92rem; }
#rso-storefront .rso-product-desc { margin-top: 6px; color: var(--rso-ink-soft); font-size: .84rem; }
#rso-storefront .rso-product-thumb { flex: none; width: 96px; height: 96px; border-radius: var(--rso-radius-s); overflow: hidden; background: var(--rso-surface-2); }
#rso-storefront .rso-product-thumb img { width: 100%; height: 100%; object-fit: cover; }
#rso-storefront .rso-product-actions { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
#rso-storefront .rso-badge {
	font-size: .68rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
	background: var(--rso-surface-2); color: var(--rso-ink-soft); white-space: nowrap;
}
#rso-storefront .rso-badge-soldout { background: var(--rso-danger-tint); color: var(--rso-danger); }
/* Required = red star + red tag; optional = green tag (owner decision
   2026-08-18). The star is decorative (aria-hidden) — the badge text is
   what assistive tech reads. */
#rso-storefront .rso-required-star { color: #c62828; font-weight: 800; font-size: 1.05em; line-height: 1; margin-left: 2px; }
#rso-storefront .rso-badge-required { background: #fdecea; color: #c62828; }
#rso-storefront .rso-badge-optional { background: var(--rso-success-tint); color: var(--rso-success); }
#rso-storefront .rso-add-btn {
	border: 0; background: var(--rso-accent); color: #fff; font-weight: 800;
	font-family: var(--rso-font-display); font-size: .84rem; min-height: 44px; min-width: 44px;
	padding: 10px 18px; border-radius: 999px; cursor: pointer;
}
#rso-storefront .rso-add-btn:hover { background: var(--rso-ink); color: var(--rso-bg); }
#rso-storefront .rso-add-btn.rso-in-cart { background: var(--rso-accent-deep); }
#rso-storefront .rso-add-btn[aria-disabled="true"] { background: var(--rso-surface-2); color: var(--rso-ink-faint); cursor: not-allowed; }
#rso-storefront .rso-product-card[data-purchasable="false"] .rso-product-main { opacity: .55; }
#rso-storefront .rso-product-card[data-purchasable="false"] .rso-product-thumb { opacity: .55; }

/* --- Modal / drawer (product customization + mobile basket) --- */
#rso-storefront .rso-overlay {
	position: fixed; inset: 0; background: rgba(20, 14, 8, .5); z-index: 100;
	display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 640px) {
	#rso-storefront .rso-overlay { align-items: center; padding: 20px; }
}
#rso-storefront .rso-dialog {
	background: var(--rso-surface); width: 100%; max-width: 560px; max-height: 92vh;
	border-radius: var(--rso-radius-l) var(--rso-radius-l) 0 0; overflow-y: auto; position: relative;
	padding-bottom: env(safe-area-inset-bottom, 0);
}
@media (min-width: 640px) {
	#rso-storefront .rso-dialog { border-radius: var(--rso-radius-l); }
}
#rso-storefront .rso-dialog-header { position: sticky; top: 0; background: var(--rso-surface); padding: 16px 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--rso-line); z-index: 2; }
#rso-storefront .rso-dialog-title { font-size: 1.15rem; font-weight: 800; }
#rso-storefront .rso-dialog-close {
	flex: none; width: 40px; height: 40px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--rso-accent); color: #fff; border: 0;
	cursor: pointer; font-size: 1.2rem; line-height: 1;
}
#rso-storefront .rso-dialog-close:hover { background: var(--rso-ink); color: var(--rso-bg); }
#rso-storefront .rso-dialog-body { padding: 20px; }
#rso-storefront .rso-dialog-footer {
	position: sticky; bottom: 0; background: var(--rso-surface); padding: 14px 20px;
	border-top: 1px solid var(--rso-line); display: flex; gap: 12px; z-index: 2;
}
#rso-storefront .rso-option-group { margin: 0 0 22px; padding: 0; border: 0; }
#rso-storefront .rso-option-group legend { padding: 0; width: 100%; }
#rso-storefront .rso-group-heading { display: flex; align-items: center; gap: 8px; font-weight: 800; font-family: var(--rso-font-display); font-size: .95rem; }
#rso-storefront .rso-group-instructions { margin-top: 2px; font-size: .8rem; color: var(--rso-ink-soft); }
#rso-storefront .rso-option-group[data-invalid="true"] .rso-group-heading { color: var(--rso-danger); }
#rso-storefront .rso-option-group[data-invalid="true"] { outline: 2px solid var(--rso-accent); outline-offset: 6px; border-radius: 8px; }
#rso-storefront .rso-group-error { color: var(--rso-danger); font-size: .8rem; margin-top: 4px; font-weight: 700; }
#rso-storefront .rso-choice-row {
	display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--rso-line);
}
#rso-storefront .rso-option-group > .rso-choice-row:first-of-type { border-top: none; }
#rso-storefront .rso-choice-row label { flex: 1; display: flex; justify-content: space-between; gap: 10px; align-items: center; cursor: pointer; }
#rso-storefront .rso-choice-row input[type="checkbox"], #rso-storefront .rso-choice-row input[type="radio"] { width: 20px; height: 20px; flex: none; }
#rso-storefront .rso-choice-price { color: var(--rso-ink-soft); font-size: .84rem; white-space: nowrap; }
#rso-storefront .rso-choice-row[data-unavailable="true"] { opacity: .55; }
#rso-storefront .rso-choice-unavailable-note { font-size: .76rem; color: var(--rso-danger); }
#rso-storefront .rso-stepper { display: inline-flex; align-items: center; gap: 8px; }
#rso-storefront .rso-stepper button:hover { background: var(--rso-ink); border-color: var(--rso-ink); color: var(--rso-bg); }
#rso-storefront .rso-stepper button {
	width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--rso-line);
	background: var(--rso-surface-2); font-weight: 800; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
	line-height: 1; padding: 0;
}
#rso-storefront .rso-stepper output { min-width: 1.5em; text-align: center; font-variant-numeric: tabular-nums; }
#rso-storefront .rso-primary-btn {
	flex: 1; border: 0; background: var(--rso-accent); color: #fff; font-family: var(--rso-font-display);
	font-weight: 800; font-size: .94rem; padding: 14px; min-height: 48px; border-radius: 999px; cursor: pointer;
}
#rso-storefront .rso-primary-btn:hover { background: var(--rso-ink); color: var(--rso-bg); }
#rso-storefront .rso-primary-btn[disabled] { background: var(--rso-surface-2); color: var(--rso-ink-faint); cursor: not-allowed; }

/* --- Basket --- */
#rso-storefront .rso-basket {
	background: var(--rso-surface); border: 1px solid var(--rso-line); border-radius: var(--rso-radius-l);
	padding: 20px; box-shadow: var(--rso-shadow); display: none;
}
@media (min-width: 980px) {
	#rso-storefront .rso-basket {
		display: block; position: sticky; align-self: start;
		top: calc(var(--rso-topbar-h, 64px) + 76px);
		max-height: calc(100vh - var(--rso-topbar-h, 64px) - 96px);
		overflow-y: auto;
	}
}
#rso-storefront .rso-basket h2 { font-size: 1.05rem; font-weight: 800; }
#rso-storefront .rso-basket-empty { margin-top: 20px; text-align: center; color: var(--rso-ink-faint); padding: 20px 0; }
#rso-storefront .rso-basket-lines { list-style: none; margin: 12px 0 0; padding: 0; }
#rso-storefront .rso-basket-line { padding: 12px 0; border-top: 1px solid var(--rso-line); }
#rso-storefront .rso-basket-lines > li:first-child .rso-basket-line { border-top: none; }
#rso-storefront .rso-basket-line-top { display: flex; justify-content: space-between; gap: 10px; }
#rso-storefront .rso-basket-line-name { font-weight: 700; font-size: .88rem; font-family: var(--rso-font-display); }
#rso-storefront .rso-basket-line-price { font-weight: 800; font-size: .86rem; white-space: nowrap; }
#rso-storefront .rso-basket-line-options { margin-top: 4px; font-size: .78rem; color: var(--rso-ink-soft); }
#rso-storefront .rso-basket-line-actions { margin-top: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#rso-storefront .rso-basket-line[data-unavailable="true"] .rso-basket-line-top, #rso-storefront .rso-basket-line[data-unavailable="true"] .rso-basket-line-options { opacity: .55; }
#rso-storefront .rso-basket-line-unavailable { margin-top: 6px; font-size: .8rem; font-weight: 700; color: var(--rso-danger); }
#rso-storefront .rso-basket-fulfilment { font-size: .84rem; color: var(--rso-ink-soft); padding-bottom: 10px; border-bottom: 1px solid var(--rso-line); margin-bottom: 4px; }
#rso-storefront .rso-basket-fulfilment strong { color: var(--rso-ink); font-family: var(--rso-font-display); }
#rso-storefront .rso-link-btn {
	background: none; border: 0; padding: 6px 0; min-height: 32px; color: var(--rso-ink-soft);
	font-size: .8rem; font-weight: 700; cursor: pointer; text-decoration: underline;
}
#rso-storefront .rso-progress {
	-webkit-appearance: none; appearance: none; width: 100%; height: 6px; border: 0; border-radius: 999px;
	overflow: hidden; margin-bottom: 6px;
}
#rso-storefront .rso-progress::-webkit-progress-bar { background: var(--rso-surface-2); border-radius: 999px; }
#rso-storefront .rso-progress::-webkit-progress-value { background: var(--rso-success); border-radius: 999px; }
#rso-storefront .rso-progress::-moz-progress-bar { background: var(--rso-success); border-radius: 999px; }
#rso-storefront .rso-coupon-section, #rso-storefront .rso-tip-section, #rso-storefront .rso-notes-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--rso-line); }
#rso-storefront .rso-field-label { display: block; font-size: .82rem; font-weight: 700; margin-bottom: 8px; }
#rso-storefront .rso-coupon-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
#rso-storefront .rso-coupon-list li { display: flex; justify-content: space-between; align-items: center; font-size: .84rem; background: var(--rso-success-tint); color: var(--rso-success); padding: 6px 10px; border-radius: var(--rso-radius-s); }
#rso-storefront .rso-coupon-list li .rso-link-btn { color: inherit; }
#rso-storefront .rso-coupon-form { display: flex; gap: 8px; }
#rso-storefront .rso-coupon-form input {
	flex: 1; min-height: 40px; padding: 8px 12px; border-radius: var(--rso-radius-s);
	border: 1px solid var(--rso-line); background: var(--rso-surface); color: var(--rso-ink); font-size: .88rem;
}
#rso-storefront .rso-tip-presets { display: flex; gap: 8px; flex-wrap: wrap; }
#rso-storefront .rso-notes-section textarea {
	width: 100%; min-height: 60px; padding: 10px 12px; border-radius: var(--rso-radius-s);
	border: 1px solid var(--rso-line); background: var(--rso-surface); color: var(--rso-ink);
	font-family: inherit; font-size: .86rem; resize: vertical;
}
#rso-storefront .rso-basket-totals { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--rso-line); display: flex; flex-direction: column; gap: 6px; }
#rso-storefront .rso-basket-totals-row { display: flex; justify-content: space-between; font-size: .86rem; color: var(--rso-ink-soft); }
#rso-storefront .rso-basket-totals-row-total { font-weight: 800; font-family: var(--rso-font-display); font-size: 1.02rem; color: var(--rso-ink); margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--rso-line); }
#rso-storefront .rso-checkout-link {
	margin-top: 14px; display: flex; justify-content: center; width: 100%; min-height: 48px;
	border: 0; background: var(--rso-accent); color: #fff; font-family: var(--rso-font-display);
	font-weight: 800; font-size: .94rem; padding: 14px; border-radius: 999px; text-decoration: none; align-items: center;
}
#rso-storefront .rso-checkout-link:hover { background: var(--rso-ink); color: var(--rso-bg); }
#rso-storefront .rso-mobile-bar {
	position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
	background: var(--rso-accent-deep); color: #fff; border-radius: 999px; padding: 14px 20px;
	display: flex; align-items: center; justify-content: center; gap: 8px;
	box-shadow: var(--rso-shadow-lg); border: 0; font-family: var(--rso-font-display);
	font-weight: 800; font-size: .95rem; cursor: pointer; min-height: 52px; width: calc(100% - 32px);
	padding-bottom: calc(14px + env(safe-area-inset-bottom, 0));
}
#rso-storefront .rso-mobile-bar:hover, #rso-storefront .rso-mobile-bar:active { background: var(--rso-ink); color: var(--rso-bg); }
@media (min-width: 980px) { #rso-storefront .rso-mobile-bar { display: none; } }
#rso-storefront .rso-mobile-bar[hidden] { display: none; }

/* --- Loading / error states --- */
#rso-storefront .rso-loading { padding: 24px; text-align: center; color: var(--rso-ink-soft); }
#rso-storefront .rso-error-banner {
	margin: 12px 0; padding: 14px 16px; border-radius: var(--rso-radius-m);
	background: var(--rso-danger-tint); color: var(--rso-danger); display: flex;
	justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
#rso-storefront .rso-error-banner button {
	border: 1px solid currentColor; background: transparent; color: inherit; font-weight: 700;
	padding: 8px 14px; min-height: 40px; border-radius: 999px; cursor: pointer;
}
#rso-storefront .rso-empty-state { padding: 32px 0; text-align: center; color: var(--rso-ink-soft); }

/* 200% browser zoom / narrow widths: nothing above uses fixed px widths
   for text containers, and the grid collapses to one column below
   980px — verified interactively, see tests/manual-storefront-harness.html. */


/* --- Header responsive collapse --- */
@media (max-width: 1023px) {
	#rso-storefront .rso-ordercard { flex-wrap: wrap; }
#rso-storefront .rso-service-selector { flex: 1 1 100%; }
#rso-storefront .rso-service-btn { flex: 1; }
#rso-storefront .rso-zone { flex: 1 1 auto; }
#rso-storefront .rso-facts { margin-inline: auto; flex: 0 1 auto; justify-content: center; gap: 16px; }
#rso-storefront .rso-fact { text-align: left; }
}

@media (max-width: 639px) {
	/* One line on phones: search collapses to an icon that opens an
	   overlay row under the bar (owner decision 2026-08-18). */
	#rso-storefront .rso-topbar-inner { gap: 6px; padding: 8px 10px; }
#rso-storefront .rso-brand { gap: 6px; }
#rso-storefront .rso-actions { margin-left: auto; }
#rso-storefront .rso-search { display: none; }
#rso-storefront .rso-topbar.rso-search-open .rso-search {
		display: block; position: absolute; left: 0; right: 0; top: 100%;
		padding: 8px 14px 10px; background: var(--rso-surface);
		border-bottom: 1px solid var(--rso-line); box-shadow: var(--rso-shadow);
	}
#rso-storefront .rso-search-toggle {
		display: flex; align-items: center; justify-content: center; flex: none;
		width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
		color: var(--rso-ink); background: transparent; border: 0;
	}
#rso-storefront .rso-search-toggle:active { background: var(--rso-surface-2); }
#rso-storefront .rso-search-toggle svg { width: 21px; height: 21px; }
#rso-storefront .rso-search-toggle:focus-visible { outline: 3px solid var(--rso-focus); outline-offset: 2px; }
#rso-storefront .rso-brand-address { font-size: .55rem; }
#rso-storefront .rso-status-extra { display: none; }
#rso-storefront .rso-status { font-size: .72rem; padding: 3px 8px; gap: 5px; }
#rso-storefront .rso-basket-btn { padding: 8px 12px; min-height: 40px; }
#rso-storefront .rso-brand { gap: 7px; min-width: 0; }
#rso-storefront .rso-mark svg { height: 24px; }
#rso-storefront .rso-word { font-size: .88rem; }
#rso-storefront .rso-phone-btn { display: none; }
#rso-storefront .rso-basket-btn-amount { display: none; }
#rso-storefront .rso-search-field input { min-height: 42px; padding: 8px 13px; }
#rso-storefront .rso-service-btn { padding: 7px 6px; }
#rso-storefront .rso-service-btn-sub { font-size: .68rem; }
#rso-storefront .rso-zone { flex: 1 1 100%; }
#rso-storefront .rso-facts { margin-inline: 0; flex: 1 1 100%; justify-content: space-between; gap: 10px; }
}

/* --- Basket line icon actions (2026-08-19) --- */
#rso-storefront .rso-icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
	border: 1px solid var(--rso-line); background: var(--rso-surface); color: var(--rso-ink-soft);
}
#rso-storefront .rso-icon-btn { padding: 0; /* Hello Elementor's button reset pads 8px 16px, which leaves a 34px border-box button a 0px content box and flex-shrinks the icon to invisible (live finding 2026-08-19) */ }
#rso-storefront .rso-icon-btn svg { width: 16px; height: 16px; min-width: 16px; flex: 0 0 auto; }
#rso-storefront .rso-icon-btn:hover { background: var(--rso-ink); border-color: var(--rso-ink); color: var(--rso-bg); }
#rso-storefront .rso-icon-btn-danger { color: var(--rso-danger); }
#rso-storefront .rso-icon-btn-danger:hover { background: var(--rso-danger); border-color: var(--rso-danger); color: #fff; }
