/* RunIO shop — structure + motion. Kits re-skin via --rs-* tokens. */
:root {
	--rs-bg: #fff;
	--rs-fg: #111;
	--rs-muted: color-mix(in srgb, var(--rs-fg) 55%, transparent);
	--rs-line: color-mix(in srgb, var(--rs-fg) 12%, transparent);
	--rs-soft: color-mix(in srgb, var(--rs-fg) 5%, transparent);
	--rs-accent: #111;
	--rs-on-accent: #fff;
	--rs-radius: 16px;
	--rs-font: inherit;
	--rs-display: inherit;
	--rs-ease: cubic-bezier(.16, 1, .3, 1);
}
.rs-media-fallback { display: block; width: 100%; aspect-ratio: 4 / 5; background: var(--rs-color, #ddd); border-radius: inherit; }
.screen-reader-text:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- buttons / qty ---- */
.rs-add, .rs-checkout {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: 0 1.4rem; border: 0; border-radius: 99px;
	background: var(--rs-accent); color: var(--rs-on-accent) !important; font: 600 1rem var(--rs-font); text-decoration: none; cursor: pointer;
	transition: transform .35s var(--rs-ease), opacity .3s, background-color .3s;
}
.rs-add:hover:not(:disabled), .rs-checkout:hover:not(:disabled) { transform: translateY(-1px); }
.rs-add:disabled, .rs-checkout:disabled { opacity: .4; cursor: not-allowed; }
.rs-add.is-added { animation: rs-pop .5s var(--rs-ease); }
.rs-add--sm { min-height: 2.4rem; padding: 0 1rem; font-size: .88rem; }
@keyframes rs-pop { 40% { transform: scale(1.06); } }
.rs-qty { display: inline-flex; align-items: center; border: 1px solid var(--rs-line); border-radius: 99px; overflow: hidden; }
.rs-qty button { width: 2.6rem; height: 3rem; border: 0; background: none; color: inherit; font-size: 1.2rem; cursor: pointer; }
.rs-qty button:disabled { opacity: .3; }
/* themes (Astra) pad inputs globally — that clipped the digit */
.rs-qty input, .rs-qty output { width: 2.4rem; height: 3rem; padding: 0 !important; margin: 0; box-shadow: none !important; line-height: 3rem; text-align: center; border: 0 !important; background: none !important; color: inherit; font: 600 1rem var(--rs-font); -moz-appearance: textfield; }
.rs-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.rs-qty--sm button { width: 2rem; height: 2.2rem; font-size: 1rem; }
.rs-qty--sm output { width: 1.6rem; font-size: .9rem; }

/* ---- grid ---- */
.rs-tools { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.rs-chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.rs-chip { padding: .5rem 1rem; border: 1px solid var(--rs-line); border-radius: 99px; background: none; color: inherit; font: 500 .9rem var(--rs-font); cursor: pointer; transition: background-color .25s, color .25s; }
.rs-chip span { opacity: .5; margin-left: .2rem; }
.rs-chip[aria-pressed="true"] { background: var(--rs-fg); color: var(--rs-bg); border-color: var(--rs-fg); }
.rs-sort select { padding: .55rem 2rem .55rem 1rem; border: 1px solid var(--rs-line); border-radius: 99px; background: transparent; color: inherit; font: 500 .9rem var(--rs-font); }
.rs-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.rs-card { position: relative; display: grid; grid-template-rows: auto 1fr; margin: 0; border-radius: var(--rs-radius); background: var(--rs-bg); animation: rs-in .7s var(--rs-ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes rs-in { from { opacity: 0; transform: translateY(14px); } }
.rs-card[hidden] { display: none; }
.rs-card__media { display: block; overflow: hidden; border-radius: var(--rs-radius); background: var(--rs-soft); }
.rs-card__media > * { display: block; width: 100%; transition: transform .8s var(--rs-ease); }
.rs-card__media img { aspect-ratio: 4 / 5; object-fit: cover; }
.rs-card:hover .rs-card__media > * { transform: scale(1.04); }
.rs-badge { position: absolute; top: .8rem; left: .8rem; padding: .3rem .7rem; border-radius: 99px; background: var(--rs-bg); color: var(--rs-fg); font: 700 .72rem var(--rs-font); letter-spacing: .04em; text-transform: uppercase; }
.rs-card.is-out .rs-card__media { opacity: .5; }
.rs-card__body { padding: 1rem .2rem 0; display: grid; gap: .3rem; align-content: start; }
.rs-card__title { margin: 0 !important; font: 600 1.15rem/1.2 var(--rs-display); }
.rs-card__title a { color: inherit; text-decoration: none; }
.rs-card__title a::after { content: ""; position: absolute; inset: 0 0 4rem; } /* whole card clickable, except the buy row */
.rs-card__sub { margin: 0; color: var(--rs-muted); font-size: .9rem; }
.rs-quick { position: relative; z-index: 1; display: grid; gap: .6rem; margin-top: .4rem; }
.rs-mini { display: flex; gap: .3rem; flex-wrap: wrap; }
.rs-mini label { cursor: pointer; }
.rs-mini input { position: absolute; opacity: 0; pointer-events: none; }
.rs-mini span { display: inline-block; padding: .25rem .6rem; border: 1px solid var(--rs-line); border-radius: 99px; font-size: .78rem; transition: background-color .2s, color .2s; }
.rs-mini input:checked + span { background: var(--rs-fg); color: var(--rs-bg); border-color: var(--rs-fg); }
.rs-mini input:focus-visible + span { outline: 2px solid var(--rs-accent); outline-offset: 2px; }
.rs-mini .is-out span { opacity: .35; text-decoration: line-through; }
.rs-card__foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.rs-card__price { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- product page ---- */
.rs-product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: start; }
.rs-product__media { position: sticky; top: 6rem; border-radius: var(--rs-radius); overflow: hidden; background: var(--rs-soft); }
.rs-product__media > * { display: block; width: 100%; }
.rs-product__media img { aspect-ratio: 4 / 5; object-fit: cover; }
.rs-eyebrow { margin: 0 0 .6rem; font: 600 .78rem var(--rs-font); letter-spacing: .1em; text-transform: uppercase; color: var(--rs-muted); }
.rs-product__title { margin: 0 0 .5rem !important; font: 400 clamp(2.4rem, 5vw, 4.2rem)/1 var(--rs-display) !important; }
.rs-product__sub { margin: 0 0 1.5rem; color: var(--rs-muted); font-size: 1.1rem; }
.rs-price { display: flex; align-items: baseline; gap: .6rem; margin: 0 0 1.4rem; font: 700 1.6rem var(--rs-font); font-variant-numeric: tabular-nums; }
.rs-price s { font-size: 1rem; font-weight: 400; color: var(--rs-muted); }
.rs-variants { border: 0; margin: 0 0 1.4rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.rs-variants legend { width: 100%; margin-bottom: .6rem; font: 600 .78rem var(--rs-font); letter-spacing: .1em; text-transform: uppercase; color: var(--rs-muted); }
.rs-pill { position: relative; display: grid; gap: .1rem; padding: .7rem 1.1rem; border: 1px solid var(--rs-line); border-radius: 14px; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.rs-pill input { position: absolute; opacity: 0; pointer-events: none; }
.rs-pill span { font-weight: 600; }
.rs-pill small { color: var(--rs-muted); font-variant-numeric: tabular-nums; }
.rs-pill:has(input:checked) { border-color: var(--rs-fg); box-shadow: inset 0 0 0 1px var(--rs-fg); }
.rs-pill:has(input:focus-visible) { outline: 2px solid var(--rs-accent); outline-offset: 2px; }
.rs-pill.is-out { opacity: .4; cursor: not-allowed; }
.rs-buy__row { display: flex; gap: .7rem; flex-wrap: wrap; }
.rs-buy__row .rs-add { flex: 1 1 12rem; }
.rs-stock { min-height: 1.4em; margin: .7rem 0 0; color: #c2410c; font-size: .9rem; font-weight: 600; }
.rs-attrs { margin: 2rem 0 0; border-top: 1px solid var(--rs-line); }
.rs-attrs div { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--rs-line); }
.rs-attrs dt { color: var(--rs-muted); }
.rs-attrs dd { margin: 0; text-align: right; font-weight: 500; }
.rs-product__desc { max-width: 68ch; margin: clamp(3rem, 6vw, 5rem) 0 0; }
@media (max-width: 860px) { .rs-product { grid-template-columns: 1fr; } .rs-product__media { position: static; } }

/* ---- bag: floating button, drawer, toast ---- */
.rs-bag-fab { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 80; display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border: 0; border-radius: 50%; background: var(--rs-accent); color: var(--rs-on-accent); cursor: pointer; box-shadow: 0 14px 40px -12px rgb(0 0 0 / .45); }
.rs-bag-fab[hidden] { display: none; }
.rs-bag-fab svg { width: 1.5rem; height: 1.5rem; }
.rs-bag-fab .rs-count { position: absolute; top: -.2rem; right: -.2rem; min-width: 1.4rem; height: 1.4rem; padding: 0 .3rem; border-radius: 99px; background: var(--rs-fg); color: var(--rs-bg); font: 700 .75rem/1.4rem var(--rs-font); text-align: center; }
.rs-bag-fab.is-bump { animation: rs-pop .55s var(--rs-ease); }
.rs-drawer { position: fixed; inset: 0 0 0 auto; width: min(440px, 100vw); height: 100dvh; max-height: none; margin: 0 0 0 auto; padding: 0; border: 0; background: var(--rs-bg); color: var(--rs-fg); font-family: var(--rs-font); box-shadow: -30px 0 80px -30px rgb(0 0 0 / .4); }
.rs-drawer[open] { animation: rs-slide .5s var(--rs-ease); }
@keyframes rs-slide { from { transform: translateX(100%); } }
.rs-drawer::backdrop { background: rgb(10 10 10 / .45); backdrop-filter: blur(3px); }
.rs-drawer__inner { display: grid; grid-template-rows: auto auto 1fr auto; height: 100%; }
.rs-drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 1.3rem 1.4rem .6rem; }
.rs-drawer__head h2 { margin: 0 !important; font: 400 1.8rem var(--rs-display) !important; color: var(--rs-fg) !important; }
.rs-x { width: 2.4rem; height: 2.4rem; border: 1px solid var(--rs-line); border-radius: 50%; background: none; color: inherit; font-size: 1.3rem; cursor: pointer; }
.rs-ship { padding: 0 1.4rem; font-size: .85rem; }
.rs-ship p { margin: .4rem 0; }
.rs-ship__bar { height: 5px; border-radius: 99px; background: var(--rs-soft); overflow: hidden; }
.rs-ship__bar span { display: block; height: 100%; background: var(--rs-accent); border-radius: inherit; transition: width .6s var(--rs-ease); }
.rs-lines { overflow-y: auto; padding: .8rem 1.4rem; }
.rs-lines[aria-busy="true"] { opacity: .6; }
.rs-lines__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.rs-line { display: grid; grid-template-columns: 4.6rem 1fr auto; gap: .9rem; align-items: start; margin: 0; animation: rs-in .4s var(--rs-ease); }
.rs-line__media { display: block; border-radius: 10px; overflow: hidden; background: var(--rs-soft); }
.rs-line__media img, .rs-line__media .rs-media-fallback { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.rs-line__body { display: grid; gap: .15rem; }
.rs-line__title { color: inherit; font-weight: 600; text-decoration: none; }
.rs-line__label { color: var(--rs-muted); font-size: .85rem; }
.rs-line__row { display: flex; align-items: center; gap: .8rem; margin-top: .4rem; }
.rs-line__rm { border: 0; background: none; padding: 0; color: var(--rs-muted); font-size: .82rem; text-decoration: underline; cursor: pointer; }
.rs-line__price { font-weight: 600; font-variant-numeric: tabular-nums; }
.rs-note { margin: 0 0 1rem; padding: .7rem .9rem; border-radius: 10px; background: color-mix(in srgb, #f59e0b 15%, transparent); font-size: .88rem; }
.rs-empty { display: grid; justify-items: start; gap: 1rem; padding: 2rem 0; }
.rs-drawer__foot { padding: 1rem 1.4rem calc(1.2rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--rs-line); display: grid; gap: .8rem; }
.rs-drawer__foot:empty { display: none; }
.rs-totals { margin: 0; display: grid; gap: .3rem; }
.rs-totals div { display: flex; justify-content: space-between; }
.rs-totals dt { color: var(--rs-muted); }
.rs-totals dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.rs-totals__grand dt, .rs-totals__grand dd { color: var(--rs-fg); font-size: 1.15rem; font-weight: 700; }
.rs-checkout { width: 100%; min-height: 3.4rem; }
.rs-fine { margin: 0; text-align: center; font-size: .78rem; color: var(--rs-muted); }
.rs-toast { position: fixed; left: 50%; bottom: 1.4rem; z-index: 120; translate: -50% calc(100% + 2rem); visibility: hidden; max-width: calc(100vw - 2rem); padding: .8rem 1.2rem; border-radius: 99px; background: var(--rs-fg); color: var(--rs-bg); font: 500 .92rem var(--rs-font); box-shadow: 0 12px 40px -12px rgb(0 0 0 / .5); transition: translate .5s var(--rs-ease), visibility 0s .5s; pointer-events: none; }
.rs-toast.is-on { translate: -50% 0; visibility: visible; transition: translate .5s var(--rs-ease); }

/* ---- order confirmation ---- */
.rs-order { max-width: 560px; margin-inline: auto; display: grid; gap: 1rem; justify-items: center; text-align: center; }
.rs-order__mark { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--rs-soft); font-size: 2rem; }
.rs-order__mark.is-paid { background: var(--rs-accent); color: var(--rs-on-accent); animation: rs-pop .7s var(--rs-ease); }
.rs-order__title { margin: 0 !important; font: 400 clamp(2rem, 5vw, 3rem)/1.05 var(--rs-display) !important; outline: none; }
.rs-order__ref { margin: 0; color: var(--rs-muted); }
.rs-order__items { list-style: none; margin: 0; padding: 0; width: 100%; border-top: 1px solid var(--rs-line); }
.rs-order__items li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--rs-line); text-align: left; }
.rs-order .rs-totals { width: 100%; }

@media (prefers-reduced-motion: reduce) { .rs-card, .rs-line, .rs-drawer[open], .rs-add.is-added, .rs-bag-fab.is-bump { animation: none !important; } .rs-toast { transition: none; } }
