/* Checkout (separate domain). Base styles copied from the store (beats/public/css/app.css) so both look the same. */
:root {
    --black: #000;
    --ink: #111;
    --text: #1d1d1f;
    --muted: #6e6e73;
    --line: #e5e5e5;
    --soft: #f4f4f4;
    --soft-2: #ececec;
    --white: #fff;
    --red: #e4002b;
    --red-dark: #b80022;
    --green: #0a8a3c;
    /* Brand color of the store (or of the checkout itself): set by views/layout.php */
    --accent: var(--black);
    --accent-ink: var(--white);

    --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --radius: 14px;
    --radius-lg: 24px;
    --header-h: 64px;
    --gutter: clamp(16px, 4vw, 48px);
    --max: 1440px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Nothing may widen the page (full-bleed sections, carousels, off-canvas drawers); clip keeps position: sticky working */
html, body { overflow-x: clip; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body > main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3 { margin: 0; letter-spacing: -.025em; line-height: 1.05; }
p { margin: 0; }
.is-hidden { display: none !important; }

.mt { margin-top: 16px; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 14px; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 28px; border-radius: 999px;
    font-weight: 700; font-size: 15px; letter-spacing: -.005em;
    border: 2px solid transparent;
    transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
    white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn--dark { background: var(--accent); color: var(--accent-ink); }
.btn--dark:hover { background: var(--accent); filter: brightness(.85); }
.btn--light { background: var(--white); color: var(--black); }
.btn--light:hover { background: #e8e8e8; }
.btn--outline { border-color: var(--black); color: var(--black); }
.btn--outline:hover { background: var(--black); color: var(--white); }
.btn--outline-light { border-color: var(--white); color: var(--white); }
.btn--outline-light:hover { background: var(--white); color: var(--black); }
.btn--sm { height: 38px; padding: 0 20px; font-size: 14px; }
.btn--lg { height: 56px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--grow { flex: 1; }
.link { text-decoration: underline; font-size: 14px; color: var(--muted); }
.link:hover { color: var(--black); }

/* Summary rows */
.row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.row--muted { color: var(--muted); }
.row--item { font-size: 14px; }
.row--item small { color: var(--muted); }
.row--total { font-size: 18px; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 4px; }

/* Checkout */
.page { padding-top: 40px; padding-bottom: 96px; }
.page__title { font-size: clamp(36px, 5vw, 60px); font-weight: 900; letter-spacing: -.05em; margin-bottom: 32px; }
.checkout-grid { display: grid; grid-template-columns: 1fr 400px; gap: clamp(24px, 4vw, 64px); align-items: start; }
.summary { background: var(--soft); border-radius: var(--radius-lg); padding: 28px; display: grid; gap: 12px; position: sticky; top: calc(var(--header-h) + 16px); }
.summary__title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.summary__hint { font-size: 13px; color: var(--muted); }
.summary hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.summary .btn { margin-top: 4px; }
.row--discount { color: var(--green); font-weight: 600; font-size: 15px; }
.summary__saved { font-size: 13.5px; color: var(--green); font-weight: 700; }
.summary a { text-decoration: underline; }
.summary a.btn { text-decoration: none; }
.promo-code__error { color: var(--red); font-size: 13.5px; font-weight: 600; }
.alert { background: #fdecef; color: var(--red-dark); padding: 14px 20px; border-radius: 12px; font-weight: 600; margin-bottom: 24px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field--wide { grid-column: 1 / -1; }
.field select { height: 52px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 40px 0 16px; font-size: 16px; color: var(--text); font-weight: 500; outline: 0; appearance: none; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px; }
.field select:focus { border-color: var(--accent); }
.has-error select { border-color: var(--red); }
.field input { height: 52px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 16px; font-size: 16px; color: var(--text); font-weight: 500; outline: 0; transition: border-color .2s; background: var(--white); }
.field input:focus { border-color: var(--accent); }
.has-error input, .has-error select { border-color: var(--red); }
.field__error { color: var(--red); font-weight: 500; font-size: 13px; }
.field__hint { color: var(--muted); font-weight: 500; font-size: 13px; }
.field__hint.is-ok { color: var(--green); }
/* Phone with country flag (intl-tel-input) */
.field .iti { display: block; width: 100%; }
.field .iti input { width: 100%; }
.iti { --iti-border-color: var(--line); --iti-hover-color: var(--soft); --iti-dropdown-bg: var(--white); }
.iti__dropdown-content { border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .12); font-weight: 500; color: var(--text); }
.pay-options { display: grid; gap: 10px; }
.pay-option { display: flex; gap: 14px; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; padding: 16px 18px; cursor: pointer; transition: border-color .2s; }
.pay-option:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pay-option input { accent-color: var(--accent); width: 18px; height: 18px; }
.pay-option span { display: grid; }
.pay-option small { color: var(--muted); font-size: 13px; }

/* 3-step checkout */
.co .page__title { margin-bottom: 20px; }
.co-steps { list-style: none; margin: 0 0 28px; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.co-steps li { display: flex; align-items: center; }
.co-steps li + li::before { content: ""; width: 28px; height: 1.5px; background: var(--line); margin: 0 6px 0 0; }
.co-steps button { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--muted); padding: 6px 4px; }
.co-steps button:disabled { cursor: default; }
.co-steps button span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; border: 1.5px solid var(--line); }
.co-steps .is-current button { color: var(--text); }
.co-steps .is-current button span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.co-steps .is-done button { color: var(--text); }
.co-steps .is-done button span { background: var(--green); border-color: var(--green); color: var(--white); font-size: 0; }
.co-steps .is-done button span::after { content: "✓"; font-size: 13px; }
.co-form { display: grid; gap: 14px; align-content: start; }
.co-step { border: 1.5px solid var(--line); border-radius: 20px; padding: 22px 24px; transition: border-color .2s; scroll-margin-top: calc(var(--header-h) + 16px); }
.co-step.is-open { border-color: var(--accent); }
.co-step__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.co-step__head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; }
.co-step__head h2 span { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 14px; }
.co-step:not(.is-open):not(.is-done) .co-step__head h2 { color: var(--muted); }
.co-step:not(.is-open):not(.is-done) .co-step__head h2 span { background: var(--soft-2); color: var(--muted); }
.co-step.is-done .co-step__head h2 span { background: var(--green); font-size: 0; }
.co-step.is-done .co-step__head h2 span::after { content: "✓"; font-size: 14px; }
.co-step__summary { margin: 10px 0 0 42px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.co-step__body { margin-top: 20px; }
.co-step__body .btn { margin-top: 20px; }
.co-note { font-size: 13px; color: var(--muted); margin-top: 12px; }
.co-label { font-weight: 700; font-size: 14px; margin: 22px 0 10px; }
.pay-option.is-static { cursor: default; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.co-secure { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); margin-bottom: 16px; }
.co-secure svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--green); stroke-width: 2; margin-top: 1px; }
.co-payment { min-height: 220px; }
.co-status { font-size: 14px; color: var(--muted); margin-top: 12px; min-height: 1.2em; }
.co-accepts { font-size: 12.5px; color: var(--muted); margin: 14px 0 8px; }
.co-sim { background: var(--soft); border-radius: 16px; padding: 20px; display: grid; gap: 8px; }
.co-sim p { color: var(--muted); font-size: 14px; }
.co-sim .btn { margin-top: 8px; }
.co-sim.is-off { background: #fff7e6; }
.co-sim a { text-decoration: underline; }
.co-aside .summary { position: sticky; top: calc(var(--header-h) + 16px); }
.co-aside { transition: opacity .2s; }
.co-aside.is-loading { opacity: .5; pointer-events: none; }
.ship-options { display: grid; gap: 10px; }
.ship-option .ship-option__text { flex: 1; }
.ship-option small strong { color: var(--black); font-weight: 600; }
.ship-option__price { font-weight: 600; white-space: nowrap; display: block !important; }
.ship-option__price s { color: var(--muted); font-weight: 400; margin-right: 4px; }
.success__icon--wait { background: var(--soft); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: nl-spin .8s linear infinite; }
.success a { text-decoration: underline; }
.success a.btn { text-decoration: none; }
@media (max-width: 734px) {
    .co-step { padding: 18px 16px; border-radius: 16px; }
    .co-step__summary { margin-left: 0; }
    .co-steps li + li::before { width: 14px; }
    .co-aside { order: -1; }
    .co-aside .summary { position: static; }
}

.success { text-align: center; display: grid; justify-items: center; gap: 16px; max-width: 640px; }
.success .page__title { margin: 0; }
.success__icon { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.success__icon svg { width: 34px; fill: none; stroke: var(--accent-ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.success__box { width: 100%; text-align: left; position: static; margin: 16px 0; }
@keyframes nl-spin { to { rotate: 360deg; } }

/* ==========================================================================
   Checkout domain: header, footer, layout
   ========================================================================== */
[hidden] { display: none !important; }
.co-header { border-bottom: 1px solid var(--line); background: var(--white); position: sticky; top: 0; z-index: 10; }
.co-header__inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.co-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; letter-spacing: -.03em; color: var(--black); }
.co-brand img { max-height: 32px; width: auto; }
.co-brand__dot { width: 22px; height: 22px; border-radius: 50%; border: 6px solid var(--red); }
.co-header__secure { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.co-header__secure svg { width: 16px; height: 16px; fill: none; stroke: var(--green); stroke-width: 2; }
.co-back { margin-bottom: 12px; font-size: 14px; }
.co-back a { color: var(--muted); }
.co-back a:hover { color: var(--black); text-decoration: underline; }
.co-footer { background: var(--soft); padding: 32px 0 40px; font-size: 13px; color: var(--muted); }
.co-footer .container { display: grid; gap: 6px; }
.co-footer b { color: var(--text); }
.co-footer a { text-decoration: underline; }
.co-footer__links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; }
.co-footer__small { margin-top: 10px; font-size: 12px; }
.checkout-legal a { text-decoration: underline; }
.success { margin: 0 auto; }
.co-footer__powered { margin-top: 10px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.co-footer__powered img { height: 16px; width: auto; }

/* Checkout's own home page (opened without coming from a store) */
.co-home { text-align: center; display: grid; justify-items: center; gap: 18px; max-width: 620px; margin: 0 auto; padding-top: clamp(48px, 10vw, 120px); padding-bottom: clamp(64px, 12vw, 140px); }
.co-home__logo { max-height: 72px; max-width: 260px; width: auto; }
.co-home__mark { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.co-home__mark svg { width: 32px; height: 32px; fill: none; stroke: var(--accent-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.co-home h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; }
.co-home p { color: var(--muted); font-size: 17px; line-height: 1.55; }
.co-home__badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.co-home__badges span { display: inline-flex; align-items: center; gap: 6px; }
.co-home__badges svg { width: 16px; height: 16px; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 900px) {
    .checkout-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .fields { grid-template-columns: 1fr; }
    .co-header__secure { font-size: 12.5px; }
    .page { padding-top: 24px; padding-bottom: 64px; }
}