/* Refillity: page CSS on top of the kit (only what the kit lacks). */

/* The client's logo (img/logo-source.webp, logo on black) cropped to the word mark.
   mix-blend-mode: screen drops the black ground, so it sits on the dark nav and footer. */
.brand-logo { --lh: 30px; display: block; position: relative; overflow: hidden; isolation: isolate; background: var(--p-inv-bg); width: calc(var(--lh) * 2.91); height: var(--lh); flex: none; }
.brand-logo--lg { --lh: 48px; }
.nav__logo .brand-logo img, .brand-logo img { position: absolute; width: calc(var(--lh) * 3.3); height: auto; max-width: none;
  left: calc(var(--lh) * -0.197); top: calc(var(--lh) * -1.237); mix-blend-mode: screen; }
@media (max-width: 639px) { .brand-logo { --lh: 24px; } .brand-logo--lg { --lh: 36px; } }

/* four device figures as a 2x2 block beside the station */
#station .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Shop ---------- */
.shop-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-7) var(--gutter); }
.product { grid-column: span 3; display: grid; grid-template-rows: auto 1fr; gap: var(--s-5); align-content: start; }
.product__media { position: relative; aspect-ratio: 4 / 3; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; display: grid; place-items: center; }
.product__media img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
/* Bajie's quotation thumbnails are ~100px: shown at most 2.4x, never stretched to the frame */
.product__media img.is-small { width: calc(var(--nat-w) * 2.4px); height: auto; max-width: 80%; }
.product__media img.is-render { object-fit: cover; }
.product__media img.is-contain { object-fit: contain; padding: 6%; }
@media (hover: hover) and (pointer: fine) { .product:hover .product__media img { transform: scale(1.03); } }
.product__body { display: grid; gap: var(--s-4); align-content: start; }
.product__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); }
.product__head h3 { font: 500 var(--t-card)/1.3 var(--font-text); margin: 0; }
.product__price { font: 500 var(--t-card)/1.3 var(--font-text); white-space: nowrap; }
.product__note { color: var(--muted); font-size: var(--t-small); margin: 0; }
.product .rows > li { padding-block: var(--s-2); }
.product .rows__name, .product .rows__value { font-size: var(--t-small); }
.product__opts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.product__opts .field { font-size: var(--t-label); }
.product__buy { display: flex; gap: var(--s-3); align-items: end; }
.product__buy .field { width: 96px; flex: none; }
.product__buy .btn { flex: 1; }
.product--wide { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: start; }
.product--wide > .product__media { grid-column: span 6; aspect-ratio: 4 / 3; }
.product--wide > .product__body { grid-column: 7 / -1; }

@media (max-width: 1279px) { .product { grid-column: span 6; } }
@media (max-width: 1023px) { .product--wide > .product__media, .product--wide > .product__body { grid-column: 1 / -1; } }
@media (max-width: 639px) { .shop-grid { grid-template-columns: minmax(0, 1fr); } .product, .product--wide { grid-column: 1 / -1; } .product--wide { grid-template-columns: minmax(0, 1fr); } }

/* cart */
.cart { display: grid; gap: var(--s-4); }
.cart__empty { color: var(--muted); }
.cart__line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: var(--s-4); align-items: center; padding-bottom: var(--s-4); border-bottom: 1px solid var(--line); }
.cart__thumb { width: 72px; height: 72px; border-radius: var(--r-md); background: var(--surface); overflow: hidden; display: grid; place-items: center; }
.cart__thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart__name { font-weight: 500; }
.cart__meta { color: var(--muted); font-size: var(--t-small); }
.cart__qty { display: inline-flex; align-items: center; gap: var(--s-2); margin-top: var(--s-2); }
.cart__qty button { width: 36px; height: 36px; min-width: 44px; min-height: 44px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.cart__qty button:hover { background: var(--surface); }
.cart__remove { background: none; border: 0; padding: var(--s-2) 0; min-height: 44px; color: var(--muted); font: inherit; font-size: var(--t-small); text-decoration: underline; cursor: pointer; }
.cart__sum { text-align: right; font-weight: 500; white-space: nowrap; }
.totals { display: grid; gap: var(--s-2); margin: var(--s-5) 0 0; }
.totals > div { display: flex; justify-content: space-between; gap: var(--s-4); }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.totals .totals__grand { padding-top: var(--s-3); border-top: 1px solid var(--line); font-weight: 500; font-size: var(--t-lead); }
.totals .totals__grand dt { color: var(--ink); }
.pay-choice { display: grid; gap: var(--s-3); border: 0; padding: 0; margin: 0; grid-column: 1 / -1; }
.pay-choice legend { font-size: var(--t-small); font-weight: 500; margin-bottom: var(--s-2); }
.pay-choice label { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--r-md); cursor: pointer; font-weight: 400; }
.pay-choice label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pay-choice input { margin-top: 4px; accent-color: var(--ink); width: 18px; height: 18px; }
.pay-choice b { font-weight: 500; display: block; }
@media (max-width: 1023px) { #kasse { margin-top: var(--s-8); } }
.nav__cart-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--p-accent); color: var(--p-accent-ink); font-size: 13px; font-weight: 500; }
.nav__cart-count[data-count="0"] { display: none; }
.added-note { font-size: var(--t-small); color: var(--muted); min-height: 1.5em; margin: 0; }

/* phone: the split frames keep a ratio once stacked; the step panels shorter so three steps fit two screens */
@media (max-width: 1023px) { #station .frame--fill, #shop .frame--fill { aspect-ratio: 4 / 5; height: auto; } }
@media (max-width: 639px) { #so-gehts .panel { --p-h: 168px; } }

/* client product shots on white: multiply drops the white onto the grey panel */
.product__media img.is-photo { object-fit: contain; padding: 4%; mix-blend-mode: multiply; }
.product__media img.is-small { mix-blend-mode: multiply; }
.product--wide > .product__media { background: #fff; }
.product--wide > .product__media img.is-photo { padding: 2%; }

/* station configurator: 8 places + 4 per module */
.configurator { display: grid; grid-template-columns: 120px auto 1fr; gap: var(--s-4); align-items: end; padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); }
.configurator__sum { margin: 0; padding-bottom: 10px; white-space: nowrap; color: var(--muted); }
.configurator__num { font: 500 var(--t-h3)/1 var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 4px; }
.slot-bar { display: flex; flex-direction: column-reverse; gap: 3px; align-self: center; justify-self: end; max-height: 120px; overflow: hidden; }
.slot-bar__row { display: flex; gap: 3px; }
.slot-bar__row i { width: 14px; height: 6px; border-radius: 3px; background: var(--p-accent); }
.slot-bar__row.is-base i { background: var(--ink); }
@media (max-width: 639px) { .configurator { grid-template-columns: 1fr auto; } .slot-bar { grid-column: 1 / -1; justify-self: start; flex-direction: row; flex-wrap: wrap; } }

/* footer legal links */
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); align-items: center; }
.footer__legal a { color: inherit; opacity: .75; text-decoration: none; }
.footer__legal a:hover { opacity: 1; text-decoration: underline; }

/* legal pages: one readable column */
.legal { padding-top: calc(var(--nav) + var(--s-8)); padding-bottom: var(--s-9); }
.legal__body { max-width: 72ch; display: grid; gap: var(--s-4); }
.legal__body h1 { margin-bottom: var(--s-4); }
.legal__body h2 { font-size: var(--t-h3); margin-top: var(--s-6); }
.legal__body h3 { font-size: var(--t-card); margin-top: var(--s-3); }
.legal__body p, .legal__body li { color: var(--ink); }
.legal__body ul, .legal__body ol { padding-left: 1.2em; display: grid; gap: var(--s-2); }
.ph { background: color-mix(in srgb, var(--p-accent) 28%, transparent); padding: 0 .25em; border-radius: 3px; }
.preview-note { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-md); background: var(--surface); border-left: 4px solid var(--p-accent); font-size: var(--t-small); }

/* payment step */
.pay { padding-top: calc(var(--nav) + var(--s-8)); padding-bottom: var(--s-9); }
.pay__steps { display: flex; gap: var(--s-5); list-style: none; padding: 0; margin: 0 0 var(--s-6); font-size: var(--t-small); color: var(--muted); flex-wrap: wrap; }
.pay__steps li { display: flex; align-items: center; gap: var(--s-2); }
.pay__steps b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); font-weight: 500; }
.pay__steps .is-done b { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pay__steps .is-now { color: var(--ink); font-weight: 500; }
.pay__steps .is-now b { background: var(--p-accent); border-color: var(--p-accent); color: var(--p-accent-ink); }
.pay-panel { display: grid; gap: var(--s-5); padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-lg); }
.pay-panel .form { grid-template-columns: 1fr 1fr; }
.card-brands { display: flex; gap: var(--s-2); }
.card-brands span { font: 500 11px/1 var(--font-mono); letter-spacing: .04em; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); }
.paypal-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border: 0; border-radius: 999px; background: #ffc439; color: #003087; font: 700 18px/1 var(--font-text); font-style: italic; cursor: pointer; width: 100%; }
.paypal-btn:hover { filter: brightness(.96); }
.bank { display: grid; grid-template-columns: max-content 1fr; gap: var(--s-2) var(--s-5); margin: 0; font-variant-numeric: tabular-nums; }
.bank dt { color: var(--muted); }
.bank dd { margin: 0; font-family: var(--font-mono); font-size: var(--t-small); }
.summary { display: grid; gap: var(--s-4); padding: var(--s-6); background: var(--surface); border-radius: var(--r-lg); align-content: start; }
.summary h2 { font-size: var(--t-card); margin: 0; }
.done { display: grid; gap: var(--s-5); justify-items: start; max-width: 60ch; }
.done__mark { width: 64px; height: 64px; border-radius: 50%; background: var(--p-accent); display: grid; place-items: center; }
.done__mark svg { width: 28px; height: 28px; stroke: var(--p-accent-ink); stroke-width: 2.4; fill: none; }
.done__no { font-family: var(--font-mono); font-size: var(--t-lead); }
@media (max-width: 1023px) { .summary { margin-top: var(--s-7); } }
@media (max-width: 639px) { .pay-panel { padding: var(--s-5); } .pay-panel .form { grid-template-columns: 1fr; } }

.pay-panel__top { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); }
/* the station card spans the row at every width (the 1279px rule above would narrow it) */
.product.product--wide { grid-column: 1 / -1; }
.summary .cart__line { grid-template-columns: 48px minmax(0, 1fr) auto; gap: var(--s-3); }
.summary .cart__thumb { width: 48px; height: 48px; }
.summary .cart__name { font-size: var(--t-small); }
.configurator { grid-template-columns: 150px auto 1fr; }
