/* =====================================================================
 * Store-branded bag / checkout / order pages.
 * Loaded only by resources/views/themes/checkout/layout.blade.php, after
 * kit.css and the active theme's file (which set the --sf-* tokens).
 *
 * The bag, delivery form, shipping options, pay step and order page are
 * shared Livewire views built with Tailwind utilities. They keep their
 * markup, wire bindings and ids; this file re-skins them with the store's
 * tokens (fonts, colours, radius, button style) and adds the pieces that
 * checkout needs: header, progress steps, shipping option cards, a
 * collapsible order summary and a sticky pay bar on mobile.
 *
 * Scope: html[data-theme] .ck (page) and .ck-* (chrome). Nothing leaks to
 * the rest of the app. 4/8 spacing. Touch targets >= 44px.
 * ===================================================================== */

/* ---- Tokens the default theme does not define ---------------------- */
html[data-theme="default"] {
    --sf-font-display: "Tenor Sans", "Helvetica Neue", Arial, sans-serif;
    --sf-font-body: "Tenor Sans", "Helvetica Neue", Arial, sans-serif;
    --sf-display-tracking: -0.005em;
    --sf-btn-tracking: 0.04em;
}
html[data-theme="default"][data-hero-tone="dark"] {
    --sf-paper: #0a0a0a;
    --sf-ink: #f4f4f4;
    --sf-muted: #bebebe;
    --sf-line: #2e2e2e;
    --sf-soft: #181818;
    --sf-accent: #f4f4f4;
    --sf-on-accent: #0a0a0a;
    --sf-sale: #ff8a7a;
}
html[data-theme][data-hero-tone="dark"] { color-scheme: dark; }

html[data-theme] {
    /* Checkout-local tokens derived from the store's. */
    --ck-field-line: color-mix(in srgb, var(--sf-ink) 42%, var(--sf-paper));
    --ck-field-bg: var(--sf-paper);
    --ck-card-bg: var(--sf-paper);
    --ck-card-line: var(--sf-line);
    --ck-radius: var(--sf-radius);
    --ck-border-w: 1px;
    --ck-head-h: 56px;
    --ck-focus: var(--sf-ink);
    --ck-pad: 20px;
}
@media (min-width: 768px) {
    html[data-theme] { --ck-head-h: 72px; --ck-pad: 32px; }
}

/* ---- Page shell ----------------------------------------------------- */
html[data-theme] body.ck-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--sf-paper);
    color: var(--sf-ink);
    font-family: var(--sf-font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}
html[data-theme] body.ck-body *,
html[data-theme] body.ck-body *::before,
html[data-theme] body.ck-body *::after { box-sizing: border-box; }
html[data-theme] .ck-main { flex: 1 0 auto; }
html[data-theme] .ck-wrap {
    width: 100%;
    max-width: var(--sf-max, 1360px);
    margin: 0 auto;
    padding-left: var(--sf-gutter, 16px);
    padding-right: var(--sf-gutter, 16px);
}
html[data-theme] .ck-skip {
    position: absolute; left: 8px; top: 8px; z-index: 100;
    padding: 12px 16px; background: var(--sf-ink); color: var(--sf-paper);
    text-decoration: none; font-size: 14px;
}
html[data-theme] .ck-skip:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html[data-theme] .ck-preview { padding: 8px var(--sf-gutter, 16px); background: var(--sf-ink); color: var(--sf-paper); font-size: 14px; text-align: center; }

/* ---- Header --------------------------------------------------------- */
html[data-theme] .ck-head {
    position: sticky; top: 0; z-index: 30;
    background: var(--sf-nav-bg, var(--sf-paper));
    color: var(--sf-nav-ink, var(--sf-ink));
    border-bottom: 1px solid var(--sf-line);
}
html[data-theme] .ck-head__in {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    min-height: var(--ck-head-h);
}
html[data-theme] .ck-head a { color: inherit; text-decoration: none; }
html[data-theme] .ck-head__back,
html[data-theme] .ck-head__bag {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px; min-width: 44px;
    font-size: 14px; font-weight: 500;
    color: inherit;
}
html[data-theme] .ck-head__back { justify-self: start; opacity: .78; }
html[data-theme] .ck-head__bag { justify-self: end; justify-content: flex-end; }
html[data-theme] .ck-head__back:hover,
html[data-theme] .ck-head__bag:hover { opacity: 1; }
html[data-theme] .ck-head__back:hover span { text-decoration: underline; text-underline-offset: 4px; }
html[data-theme] .ck-head__back span,
html[data-theme] .ck-head__bag-label {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
@media (min-width: 640px) {
    html[data-theme] .ck-head__back span,
    html[data-theme] .ck-head__bag-label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
}
html[data-theme] .ck-head__count {
    display: inline-grid; place-items: center;
    min-width: 20px; height: 20px; padding: 0 4px;
    border-radius: 999px;
    background: var(--sf-accent); color: var(--sf-on-accent);
    font-size: 12px; font-weight: 600; line-height: 1;
}
html[data-theme] .ck-brand {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; max-width: 56vw;
    font-family: var(--sf-font-display);
    font-weight: var(--sf-display-weight);
    text-transform: var(--sf-display-transform);
    letter-spacing: var(--sf-display-tracking);
    font-size: 20px; line-height: 1.1;
}
html[data-theme] .ck-brand__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] .ck-brand__logo { width: 32px; height: 32px; object-fit: cover; border-radius: var(--ck-radius); flex: none; }
@media (min-width: 768px) {
    html[data-theme] .ck-brand { font-size: 24px; max-width: 40vw; }
}

/* ---- Footer --------------------------------------------------------- */
html[data-theme] .ck-foot {
    border-top: 1px solid var(--sf-line);
    background: var(--sf-paper);
    color: var(--sf-muted);
    font-size: 14px;
    padding: 24px 0 calc(24px + env(safe-area-inset-bottom));
}
html[data-theme] .ck-foot__in {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
}
html[data-theme] .ck-foot__name { color: var(--sf-ink); }
html[data-theme] .ck-powered {
    margin-left: auto;
    display: inline-flex; align-items: center; min-height: 32px;
    font-size: 12px; color: var(--sf-muted);
    text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;
}
html[data-theme] .ck-powered:hover { color: var(--sf-ink); text-decoration-color: currentColor; }
@media (max-width: 639px) {
    html[data-theme] .ck-foot__in { flex-direction: column; align-items: flex-start; }
    html[data-theme] .ck-powered { margin-left: 0; }
}

/* ---- Focus (3px, token ink) ---------------------------------------- */
html[data-theme] .ck-head a:focus-visible,
html[data-theme] .ck-foot a:focus-visible,
html[data-theme] .ck a:focus-visible,
html[data-theme] .ck button:focus-visible,
html[data-theme] .ck summary:focus-visible,
html[data-theme] .ck input:focus-visible,
html[data-theme] .ck select:focus-visible,
html[data-theme] .ck textarea:focus-visible,
html[data-theme] .ck label:has(input:focus-visible) {
    outline: 3px solid var(--ck-focus) !important;
    outline-offset: 2px !important;
    box-shadow: none;
}

/* ---- Page container & headings ------------------------------------- */
html[data-theme] .ck { background: var(--sf-paper); color: var(--sf-ink); font-family: var(--sf-font-body); font-size: 16px; }
html[data-theme] .ck > .max-w-7xl,
html[data-theme] .ck > .max-w-2xl,
html[data-theme] .ck > [class*="max-w-"] {
    max-width: var(--sf-max, 1360px) !important;
    padding: 32px var(--sf-gutter, 16px) 80px !important;
}
@media (min-width: 1024px) {
    html[data-theme] .ck > .max-w-7xl,
    html[data-theme] .ck > .max-w-2xl,
    html[data-theme] .ck > [class*="max-w-"] { padding-top: 48px !important; padding-bottom: 96px !important; }
}
html[data-theme] .ck h1,
html[data-theme] .ck h2,
html[data-theme] .ck h3 {
    font-family: var(--sf-font-display);
    font-weight: var(--sf-display-weight);
    text-transform: var(--sf-display-transform);
    letter-spacing: var(--sf-display-tracking);
    color: var(--sf-ink);
    margin: 0;
}
html[data-theme] .ck h1 { font-size: 32px; line-height: var(--sf-display-leading, 1.08); }
html[data-theme] .ck h2 { font-size: 24px; line-height: 1.15; }
html[data-theme] .ck h3 { font-size: 20px; line-height: 1.2; }
html[data-theme] .ck h4 { font-family: var(--sf-font-body); }
@media (min-width: 1024px) {
    html[data-theme] .ck h1 { font-size: 48px; }
}
html[data-theme] .ck .ck-pagehead { margin: 0 0 24px; padding: 0; border: 0; text-align: left; background: none; }
html[data-theme] .ck .ck-title { display: flex; align-items: baseline; gap: 12px; }
html[data-theme] .ck .ck-count {
    font-family: var(--sf-font-body); font-size: 16px; font-weight: 500; letter-spacing: 0; text-transform: none;
    color: var(--sf-muted);
}

/* ---- Progress steps ------------------------------------------------- */
html[data-theme] .ck-steps {
    display: flex; align-items: center;
    list-style: none; margin: 0 0 32px; padding: 0;
}
html[data-theme] .ck-steps__item {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; color: var(--sf-muted); white-space: nowrap;
}
html[data-theme] .ck-steps__item:not(:first-child) { flex: 1 1 auto; }
html[data-theme] .ck-steps__item:not(:first-child)::before {
    content: ""; flex: 1 1 8px; min-width: 8px; height: 1px; margin: 0 8px;
    background: var(--sf-line);
}
html[data-theme] .ck-steps__item.is-done:not(:first-child)::before,
html[data-theme] .ck-steps__item.is-current:not(:first-child)::before { background: var(--sf-ink); }
html[data-theme] .ck-steps__n {
    display: inline-grid; place-items: center; flex: none;
    width: 24px; height: 24px; border-radius: 999px;
    border: 1px solid var(--ck-field-line);
    font-size: 12px; font-weight: 600; line-height: 1;
    background: var(--sf-paper); color: var(--sf-muted);
}
html[data-theme] .ck-steps__item.is-current { color: var(--sf-ink); font-weight: 600; }
html[data-theme] .ck-steps__item.is-current .ck-steps__n { background: var(--sf-accent); border-color: var(--sf-accent); color: var(--sf-on-accent); }
html[data-theme] .ck-steps__item.is-done { color: var(--sf-ink); }
html[data-theme] .ck-steps__item.is-done .ck-steps__n { border-color: var(--sf-ink); color: var(--sf-ink); }
@media (max-width: 639px) {
    html[data-theme] .ck-steps__item:not(.is-current) .ck-steps__label {
        position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
    }
}

/* ---- Utility re-mapping (Tailwind classes -> store tokens) ---------- */
html[data-theme] .ck .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html[data-theme] .ck .opacity-50 { opacity: .5; }
html[data-theme] .ck .cursor-not-allowed { cursor: not-allowed; }
html[data-theme] .ck i.fas, html[data-theme] .ck i.fa { display: none; }

/* surfaces */
html[data-theme] .ck .bg-white { background-color: var(--ck-card-bg) !important; }
html[data-theme] .ck .bg-gray-50,
html[data-theme] .ck .bg-gray-100,
html[data-theme] .ck .bg-gray-200,
html[data-theme] .ck .bg-slate-50,
html[data-theme] .ck .bg-slate-100,
html[data-theme] .ck .bg-blue-50,
html[data-theme] .ck .bg-blue-100,
html[data-theme] .ck .bg-yellow-50,
html[data-theme] .ck .bg-green-50,
html[data-theme] .ck .bg-green-100,
html[data-theme] .ck .bg-purple-50,
html[data-theme] .ck .bg-purple-100\/50,
html[data-theme] .ck .bg-purple-100,
html[data-theme] .ck .bg-purple-200,
html[data-theme] .ck .bg-amber-50,
html[data-theme] .ck .bg-amber-100,
html[data-theme] .ck .bg-emerald-100,
html[data-theme] .ck .bg-indigo-100 { background-color: var(--sf-soft) !important; }
html[data-theme] .ck .bg-white\/60 { background-color: var(--sf-paper) !important; }
html[data-theme] .ck .bg-gradient-to-r,
html[data-theme] .ck .bg-gradient-to-br { background-image: none !important; }
html[data-theme] .ck .bg-red-50 { background-color: var(--sf-soft) !important; }
html[data-theme] .ck .bg-black,
html[data-theme] .ck .bg-gray-900,
html[data-theme] .ck .bg-gray-800,
html[data-theme] .ck .bg-red-600,
html[data-theme] .ck .bg-blue-600,
html[data-theme] .ck .bg-blue-500,
html[data-theme] .ck .bg-green-500,
html[data-theme] .ck .bg-purple-500 { background-color: var(--sf-accent) !important; color: var(--sf-on-accent) !important; }
html[data-theme] .ck .text-white { color: var(--sf-on-accent) !important; }

/* text */
html[data-theme] .ck .text-gray-900,
html[data-theme] .ck .text-gray-800,
html[data-theme] .ck .text-gray-700,
html[data-theme] .ck .text-black,
html[data-theme] .ck .text-slate-900,
html[data-theme] .ck .text-slate-800,
html[data-theme] .ck .text-slate-700,
html[data-theme] .ck .text-blue-800,
html[data-theme] .ck .text-blue-700,
html[data-theme] .ck .text-blue-600,
html[data-theme] .ck .text-blue-400,
html[data-theme] .ck .text-green-800,
html[data-theme] .ck .text-green-700,
html[data-theme] .ck .text-green-600,
html[data-theme] .ck .text-green-500,
html[data-theme] .ck .text-green-400,
html[data-theme] .ck .text-yellow-800,
html[data-theme] .ck .text-yellow-700,
html[data-theme] .ck .text-purple-900,
html[data-theme] .ck .text-purple-800,
html[data-theme] .ck .text-purple-700,
html[data-theme] .ck .text-purple-600,
html[data-theme] .ck .text-purple-500,
html[data-theme] .ck .text-amber-700,
html[data-theme] .ck .text-amber-600,
html[data-theme] .ck .text-emerald-600,
html[data-theme] .ck .text-indigo-600 { color: var(--sf-ink) !important; }
html[data-theme] .ck .text-gray-600,
html[data-theme] .ck .text-gray-500,
html[data-theme] .ck .text-gray-400,
html[data-theme] .ck .text-slate-600,
html[data-theme] .ck .text-slate-500,
html[data-theme] .ck .text-slate-400 { color: var(--sf-muted) !important; }
html[data-theme] .ck .text-red-800,
html[data-theme] .ck .text-red-700,
html[data-theme] .ck .text-red-600,
html[data-theme] .ck .text-red-500,
html[data-theme] .ck .text-red-400 { color: var(--sf-sale) !important; }

/* borders, radius, shadow */
html[data-theme] .ck .border-gray-100,
html[data-theme] .ck .border-gray-200,
html[data-theme] .ck .border-gray-300,
html[data-theme] .ck .border-slate-100,
html[data-theme] .ck .border-slate-200,
html[data-theme] .ck .border-slate-200\/80,
html[data-theme] .ck .border-blue-200,
html[data-theme] .ck .border-green-200,
html[data-theme] .ck .border-yellow-200,
html[data-theme] .ck .border-purple-200,
html[data-theme] .ck .border-purple-200\/60,
html[data-theme] .ck .border-amber-200 { border-color: var(--sf-line) !important; }
html[data-theme] .ck .divide-gray-100 > * + *,
html[data-theme] .ck .divide-gray-200 > * + * { border-color: var(--sf-line) !important; }
html[data-theme] .ck .border-red-200,
html[data-theme] .ck .border-red-300,
html[data-theme] .ck .border-red-500 { border-color: var(--sf-sale) !important; }
html[data-theme] .ck .rounded-md,
html[data-theme] .ck .rounded-lg,
html[data-theme] .ck .rounded-xl,
html[data-theme] .ck .rounded-2xl,
html[data-theme] .ck .rounded-3xl { border-radius: var(--ck-radius) !important; }
html[data-theme] .ck .shadow-sm,
html[data-theme] .ck .shadow-md,
html[data-theme] .ck .shadow-lg,
html[data-theme] .ck .shadow-xl,
html[data-theme] .ck .shadow-2xl { box-shadow: none !important; }
html[data-theme] .ck .hover\:scale-105:hover,
html[data-theme] .ck .active\:scale-\[0\.98\]:active { transform: none !important; }

/* alerts: soft block with a left rule in the sale colour for errors */
html[data-theme] .ck .bg-red-50.border,
html[data-theme] .ck .bg-red-50.border-2 {
    border-width: 1px 1px 1px 4px !important;
}
html[data-theme] .ck .bg-blue-50.border,
html[data-theme] .ck .bg-green-50.border,
html[data-theme] .ck .bg-yellow-50.border { border-left-width: 4px !important; border-left-color: var(--sf-ink) !important; }

/* ---- Cards (delivery, shipping, payment, bag list) ------------------ */
html[data-theme] .ck .rounded-2xl.border,
html[data-theme] .ck .rounded-xl.border.overflow-hidden {
    border-width: var(--ck-border-w) !important;
    border-color: var(--ck-card-line) !important;
    background: var(--ck-card-bg) !important;
}
html[data-theme] .ck .rounded-2xl.border.p-6 { padding: var(--ck-pad) !important; }
html[data-theme] .ck .rounded-2xl.border.p-4 { padding: var(--ck-pad) !important; }
/* the little coloured icon discs beside section titles */
html[data-theme] .ck .w-10.h-10.rounded-full,
html[data-theme] .ck .w-16.h-16.rounded-full { display: none !important; }
html[data-theme] .ck label svg,
html[data-theme] .ck label > span > svg { display: none; }
html[data-theme] .ck .text-purple-600.font-semibold { color: var(--sf-muted) !important; font-weight: 400; }
html[data-theme] .ck .text-center.sm\:text-left { text-align: left; }
html[data-theme] .ck .flex.flex-col.sm\:flex-row.sm\:items-center.mb-6 { align-items: flex-start; }

/* ---- Form fields ---------------------------------------------------- */
html[data-theme] .ck label.block {
    margin: 0 0 8px !important;
    font-size: 14px; font-weight: 600; color: var(--sf-ink);
    line-height: 1.3;
}
html[data-theme] .ck label.block span { display: inline; }
html[data-theme] .ck input[type="text"],
html[data-theme] .ck input[type="email"],
html[data-theme] .ck input[type="tel"],
html[data-theme] .ck input[type="number"],
html[data-theme] .ck select,
html[data-theme] .ck textarea {
    display: block; width: 100%;
    min-height: 48px;
    padding: 12px 16px !important;
    background-color: var(--ck-field-bg) !important;
    color: var(--sf-ink) !important;
    border: 1px solid var(--ck-field-line) !important;
    border-radius: var(--ck-radius) !important;
    font-family: var(--sf-font-body);
    font-size: 16px !important; line-height: 1.4;
    box-shadow: none !important;
    transition: border-color .15s ease, background-color .15s ease;
    appearance: none; -webkit-appearance: none;
}
html[data-theme] .ck input:hover,
html[data-theme] .ck select:hover { border-color: var(--sf-ink) !important; }
html[data-theme] .ck input:focus,
html[data-theme] .ck select:focus { border-color: var(--sf-ink) !important; }
html[data-theme] .ck input::placeholder,
html[data-theme] .ck textarea::placeholder { color: var(--sf-muted); opacity: 1; }
html[data-theme] .ck select {
    padding-right: 44px !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat; background-position: right 16px center;
}
html[data-theme] .ck select:disabled { opacity: .6; cursor: not-allowed; }
html[data-theme] .ck input[class*="border-red"],
html[data-theme] .ck select[class*="border-red"] { border-color: var(--sf-sale) !important; }
/* validation glyphs inside inputs (error text under the field says it already) */
html[data-theme] .ck input + div.absolute { display: none; }
html[data-theme] .ck select + div.absolute svg { color: var(--sf-muted); display: none; }
html[data-theme] .ck .relative.pr-12, html[data-theme] .ck input.pr-12 { padding-right: 16px !important; }
html[data-theme] .ck [id$="-error"] { margin-top: 8px !important; }
html[data-theme] .ck [id$="-error"] svg { display: none; }
html[data-theme] .ck .text-xs { font-size: 12px; line-height: 1.4; }

/* ---- Buttons -------------------------------------------------------- */
html[data-theme] .ck .ck-cta,
html[data-theme] .ck #shipping-rates-btn,
html[data-theme] .ck [data-ck="modal-confirm"],
html[data-theme] .ck .bg-black.text-white.rounded-md,
html[data-theme] .ck a.bg-black {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; min-height: 52px; padding: 12px 24px !important;
    background: var(--sf-accent) !important; color: var(--sf-on-accent) !important;
    border: var(--ck-border-w) solid var(--sf-accent) !important;
    border-radius: var(--sf-radius-btn) !important;
    font-family: var(--sf-font-body); font-size: 16px; line-height: 1.2;
    font-weight: var(--sf-btn-weight);
    text-transform: var(--sf-btn-transform); letter-spacing: var(--sf-btn-tracking);
    text-decoration: none; cursor: pointer; box-shadow: none !important;
    transition: box-shadow .15s ease, transform .1s ease, opacity .15s ease;
}
html[data-theme] .ck .ck-cta--inline { width: auto; display: inline-flex; margin-top: 24px; }
html[data-theme] .ck .ck-cta:hover,
html[data-theme] .ck #shipping-rates-btn:hover,
html[data-theme] .ck [data-ck="modal-confirm"]:hover,
html[data-theme] .ck .bg-black:hover { box-shadow: inset 0 0 0 999px rgba(127, 127, 127, .22) !important; }
html[data-theme] .ck .ck-cta:active,
html[data-theme] .ck #shipping-rates-btn:active,
html[data-theme] .ck [data-ck="modal-confirm"]:active { transform: translateY(1px); }
html[data-theme] .ck .ck-cta:disabled,
html[data-theme] .ck #shipping-rates-btn:disabled,
html[data-theme] .ck [data-ck="modal-confirm"]:disabled { opacity: .5; cursor: not-allowed; box-shadow: none !important; transform: none; }
html[data-theme] .ck #shipping-rates-btn span { display: inline-flex; align-items: center; gap: 8px; }
html[data-theme] .ck #shipping-rates-btn .hidden { display: none; }
html[data-theme] .ck #shipping-rates-btn.opacity-50 { opacity: .5; }

html[data-theme] .ck [data-ck="modal-back"],
html[data-theme] .ck .ck-back {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 12px 16px;
    background: transparent !important; color: var(--sf-ink) !important;
    border: 1px solid var(--ck-field-line) !important;
    border-radius: var(--sf-radius-btn) !important;
    font-size: 16px; font-weight: 500; text-decoration: none; cursor: pointer;
}
html[data-theme] .ck .ck-back { display: flex; width: 100%; margin-top: 16px; border-color: transparent !important; text-decoration: underline; text-underline-offset: 4px; }
html[data-theme] .ck [data-ck="modal-back"]:hover,
html[data-theme] .ck .ck-back:hover { border-color: var(--sf-ink) !important; }
html[data-theme] .ck .ck-clear {
    min-height: 44px; padding: 0 8px; background: none; border: 0; cursor: pointer;
    font-size: 14px; color: var(--sf-muted);
    text-decoration: underline; text-underline-offset: 3px;
}
html[data-theme] .ck .ck-clear:hover { color: var(--sf-ink); }
html[data-theme] .ck button:disabled { cursor: not-allowed; }
/* secondary utility buttons (remove, qty) */
html[data-theme] .ck [data-lw="removeItem"] { min-width: 44px; min-height: 44px; color: var(--sf-muted) !important; border-radius: var(--ck-radius) !important; }
html[data-theme] .ck [data-lw="removeItem"]:hover { color: var(--sf-sale) !important; background: var(--sf-soft); }

/* ---- Bag (cart) ----------------------------------------------------- */
html[data-theme] .ck--cart .lg\:col-span-2 > .rounded-xl { border-width: 0 !important; background: transparent !important; }
html[data-theme] .ck--cart .ck-pagehead {
    margin: 0; padding: 0 0 16px; border-bottom: 1px solid var(--sf-ink);
}
html[data-theme] .ck--cart .ck-pagehead > div { flex-direction: row !important; align-items: center !important; justify-content: space-between !important; gap: 16px; }
html[data-theme] .ck--cart .ck-pagehead > div > * { margin-top: 0 !important; }
html[data-theme] .ck--cart .divide-y > div { padding: 24px 0 !important; background: transparent !important; }
html[data-theme] .ck--cart .divide-y > div:hover { background: transparent !important; }
html[data-theme] .ck--cart img { border-radius: var(--ck-radius); }
html[data-theme] .ck--cart .border-2 { border-width: 1px !important; border-color: var(--ck-field-line) !important; }
html[data-theme] .ck--cart .rounded-lg.overflow-hidden,
html[data-theme] .ck--cart .rounded-xl.overflow-hidden { border-radius: var(--ck-radius) !important; }
html[data-theme] .ck--cart [data-lw="decrementQuantity"],
html[data-theme] .ck--cart [data-lw="incrementQuantity"] { background: transparent !important; color: var(--sf-ink) !important; min-width: 44px; min-height: 44px; }
html[data-theme] .ck--cart [data-lw="decrementQuantity"]:hover,
html[data-theme] .ck--cart [data-lw="incrementQuantity"]:hover { background: var(--sf-soft) !important; }
html[data-theme] .ck--cart .text-xl.font-bold,
html[data-theme] .ck--cart .text-lg.font-bold { font-variant-numeric: tabular-nums; }
html[data-theme] .ck--cart .lg\:col-span-1 > .ck-summary,
html[data-theme] .ck-summary { background: var(--sf-soft) !important; border: var(--ck-border-w) solid var(--ck-card-line) !important; border-radius: var(--ck-radius) !important; overflow: hidden; }
html[data-theme] .ck--cart .ck-summary { position: sticky; top: calc(var(--ck-head-h) + 16px); }
html[data-theme] .ck--cart .ck-summary-head { padding: 20px 24px; border-bottom: 1px solid var(--sf-line); background: transparent; }
html[data-theme] .ck--cart .ck-summary .px-6 { padding-left: 24px !important; padding-right: 24px !important; }
html[data-theme] .ck--cart .ck-summary .bg-gray-50 { background: transparent !important; }
html[data-theme] .ck--cart .ck-summary .ck-title { font-size: 24px; }
html[data-theme] .ck--cart .border-t-2 { border-top-width: 1px !important; border-color: var(--sf-ink) !important; }
html[data-theme] .ck--cart .text-center.py-16 { padding: 64px 0; }
html[data-theme] .ck--cart .text-center.py-16 svg { display: none; }
html[data-theme] .ck--cart .text-center.py-16 .ck-title { justify-content: center; margin-bottom: 8px; }
html[data-theme] .ck--cart .text-center.py-16 .ck-cta--inline { margin-top: 8px; }

/* ---- Delivery / shipping / pay (checkout) --------------------------- */
html[data-theme] .ck--checkout .space-y-3 > .ck-banner,
html[data-theme] .ck--checkout .mb-6.space-y-3:empty { display: none; }
html[data-theme] .ck--checkout #address-complete-notice { padding: 16px !important; font-size: 14px; }
html[data-theme] .ck--checkout #address-complete-notice svg { display: none; }
html[data-theme] .ck--checkout #address-complete-notice .ml-3 { margin-left: 0; }
html[data-theme] .ck--checkout #address-complete-notice h3 { font-family: var(--sf-font-body); font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; }
html[data-theme] .ck--checkout #shipping-rates-loading-banner { background: var(--sf-soft) !important; color: var(--sf-ink) !important; border: 1px solid var(--sf-line) !important; padding: 16px 20px !important; }
html[data-theme] .ck--checkout #shipping-rates-loading-banner * { color: var(--sf-ink) !important; }
html[data-theme] .ck--checkout #shipping-rates-loading-banner h4 { font-family: var(--sf-font-body); font-size: 16px; }
html[data-theme] .ck--checkout #shipping-rates-loading-banner .rounded-full.bg-white\/10 { display: none; }
html[data-theme] .ck--checkout #shipping-rates-loading-banner.flex { display: flex; }
html[data-theme] .ck--checkout #shipping-rates-loading-banner.hidden { display: none; }
html[data-theme] .ck--checkout .space-y-6 > div > .flex.items-start.justify-between h3 {
    font-family: var(--sf-font-body); font-size: 16px; font-weight: 600; text-transform: none; letter-spacing: 0;
}

/* shipping option cards */
html[data-theme] .ck [data-lw="selectShippingRate"] {
    position: relative;
    display: flex; flex-direction: row !important; align-items: flex-start; gap: 16px;
    min-height: 72px; padding: 16px 48px 16px 16px;
    background: var(--ck-card-bg);
    border: 1px solid var(--ck-field-line) !important;
    border-radius: var(--ck-radius) !important;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
html[data-theme] .ck [data-lw="selectShippingRate"]:hover { border-color: var(--sf-ink) !important; background: var(--sf-soft); }
html[data-theme] .ck [data-lw="selectShippingRate"]:has(input:checked) {
    border-color: var(--sf-ink) !important;
    box-shadow: inset 0 0 0 1px var(--sf-ink) !important;
    background: var(--sf-soft);
}
html[data-theme] .ck [data-lw="selectShippingRate"] img { width: 40px; height: 40px; border-radius: 999px; background: var(--sf-soft); flex: none; object-fit: cover; }
html[data-theme] .ck [data-lw="selectShippingRate"] .flex-1 > div:first-child { flex-direction: row !important; align-items: flex-start; justify-content: space-between; gap: 16px; }
html[data-theme] .ck [data-lw="selectShippingRate"] h4 { font-size: 16px; font-weight: 600; margin: 0; }
html[data-theme] .ck [data-lw="selectShippingRate"] .text-xl { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
html[data-theme] .ck [data-lw="selectShippingRate"] .text-right { text-align: right; padding-left: 0; }
html[data-theme] .ck [data-lw="selectShippingRate"] > div[class*="absolute"] {
    position: absolute !important; top: 16px !important; right: 16px !important; bottom: auto !important; left: auto !important;
    align-self: auto;
}
html[data-theme] .ck [data-lw="selectShippingRate"] > div[class*="absolute"] .rounded-full {
    display: grid !important; place-items: center; width: 24px; height: 24px;
    background: var(--sf-accent) !important; color: var(--sf-on-accent) !important;
}
html[data-theme] .ck [data-lw="selectShippingRate"] > div[class*="absolute"] svg { display: block; width: 14px; height: 14px; }
html[data-theme] .ck [data-lw="selectShippingRate"] > div[class*="absolute"] ~ * { }
html[data-theme] .ck [data-lw="selectShippingRate"] .text-right { margin-right: 0; }
html[data-theme] .ck [data-lw="selectShippingRate"]:has(> div[class*="absolute"]) .flex-1 > div:first-child .text-right { padding-right: 0; }

/* order total inside the payment card */
html[data-theme] .ck--checkout .p-4.border.rounded-xl,
html[data-theme] .ck--checkout .mb-6.p-4.bg-gray-50 { border-radius: var(--ck-radius) !important; }
html[data-theme] .ck--checkout .mb-6.p-4.border h3 { font-family: var(--sf-font-body); font-size: 16px; font-weight: 600; text-transform: none; letter-spacing: 0; }
html[data-theme] .ck--checkout .mb-6.p-4.bg-gray-50 h3 { font-family: var(--sf-font-body); font-size: 16px; font-weight: 600; text-transform: none; letter-spacing: 0; }
html[data-theme] .ck--checkout .text-lg.font-bold { font-variant-numeric: tabular-nums; }

/* coupon */
html[data-theme] .ck [data-testid="coupon-field"] input { text-transform: uppercase; min-height: 44px; }
html[data-theme] .ck [data-testid="coupon-field"] button[wire\:click="applyCoupon"] {
    min-height: 44px; padding: 8px 16px; border-radius: var(--sf-radius-btn) !important;
    background: var(--sf-accent); color: var(--sf-on-accent);
    border: 1px solid var(--sf-accent);
    font-weight: var(--sf-btn-weight); font-size: 14px; cursor: pointer;
}
html[data-theme] .ck [data-testid="coupon-field"] button[wire\:click="removeCoupon"] { min-width: 32px; min-height: 32px; }

/* sticky pay bar (mobile) */
html[data-theme] .ck-paybar {
    position: sticky; bottom: 0; z-index: 20;
    margin: 0 calc(var(--ck-pad) * -1);
    padding: 12px var(--ck-pad) calc(12px + env(safe-area-inset-bottom));
    background: var(--ck-card-bg);
    border-top: 1px solid var(--sf-line);
}
html[data-theme] .ck-paybar .ck-cta { font-size: 16px; padding-left: 16px !important; padding-right: 16px !important; text-align: center; }
html[data-theme] .ck-paybar .ck-cta > span { text-align: center; }
@media (min-width: 1024px) {
    html[data-theme] .ck-paybar { position: static; margin: 0; padding: 0; border: 0; background: none; }
}

/* ---- Order summary (collapsible on mobile) -------------------------- */
html[data-theme] .ck-aside .ck-summary { position: static; }
html[data-theme] .ck-summary__head { padding: 0; }
html[data-theme] .ck-summary__toggle {
    display: flex; align-items: center; gap: 12px; width: 100%;
    min-height: 64px; padding: 12px 16px;
    background: transparent; border: 0; color: var(--sf-ink); text-align: left; cursor: pointer;
    font-family: var(--sf-font-body);
}
html[data-theme] .ck-summary__title { flex: 1 1 auto; display: grid; gap: 2px; min-width: 0; }
html[data-theme] .ck-summary__h { font-family: var(--sf-font-display); font-weight: var(--sf-display-weight); text-transform: var(--sf-display-transform); letter-spacing: var(--sf-display-tracking); font-size: 20px; line-height: 1.15; }
html[data-theme] .ck-summary__meta { font-size: 14px; color: var(--sf-muted); }
html[data-theme] .ck-summary__total { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
html[data-theme] .ck-summary__chev { flex: none; transition: transform .2s ease; }
html[data-theme] .ck-summary__chev.is-open { transform: rotate(180deg); }
html[data-theme] .ck-summary__body { display: none; }
html[data-theme] .ck-summary__body.is-open { display: block; border-top: 1px solid var(--sf-line); }
html[data-theme] .ck-summary__body .max-h-80 { max-height: 320px; }
html[data-theme] .ck-summary__body .bg-gray-50.rounded-xl { background: var(--ck-card-bg) !important; border: 1px solid var(--sf-line); }
html[data-theme] .ck-summary__body h4 { font-size: 14px !important; font-weight: 600; }
html[data-theme] .ck-summary__body img { border-radius: var(--ck-radius) !important; }
@media (max-width: 1023px) {
    html[data-theme] .ck-aside { order: -1; margin-top: 0 !important; margin-bottom: 24px; }
    html[data-theme] .ck-summary__body .px-6 { padding-left: 16px !important; padding-right: 16px !important; }
}
@media (min-width: 1024px) {
    html[data-theme] .ck-aside .ck-summary { position: sticky; top: calc(var(--ck-head-h) + 24px); }
    html[data-theme] .ck-summary__toggle { pointer-events: none; min-height: 0; padding: 24px 24px 16px; }
    html[data-theme] .ck-summary__chev,
    html[data-theme] .ck-summary__total { display: none; }
    html[data-theme] .ck-summary__h { font-size: 24px; }
    html[data-theme] .ck-summary__body,
    html[data-theme] .ck-summary__body.is-open { display: block; border-top: 0; }
}

/* ---- Modals --------------------------------------------------------- */
html[data-theme] .ck [role="dialog"] { z-index: 60 !important; }
html[data-theme] .ck [role="dialog"] .bg-slate-950\/65,
html[data-theme] .ck [role="dialog"] .bg-gray-500 { background-color: rgba(0, 0, 0, .6) !important; backdrop-filter: none; }
html[data-theme] .ck [role="dialog"] .inline-block.bg-white,
html[data-theme] .ck [role="dialog"] .bg-white.rounded-3xl,
html[data-theme] .ck [role="dialog"] .bg-white.rounded-lg {
    background: var(--ck-card-bg) !important; color: var(--sf-ink);
    border: 1px solid var(--sf-line) !important; border-radius: var(--ck-radius) !important;
}
html[data-theme] .ck [role="dialog"] h3 { font-size: 24px; font-weight: var(--sf-display-weight); line-height: 1.15; }
html[data-theme] .ck [data-ck="modal-icon"] {
    background: var(--sf-soft) !important; color: var(--sf-ink) !important;
    border: 1px solid var(--sf-line); border-radius: var(--ck-radius) !important;
}
html[data-theme] .ck [data-ck="modal-icon"] svg { color: var(--sf-ink) !important; }
html[data-theme] .ck [role="dialog"] .bg-slate-50 { border: 1px solid var(--sf-line); }
html[data-theme] .ck [role="dialog"] button:not([data-ck]):not([data-lw]) { border-radius: var(--sf-radius-btn) !important; }
html[data-theme] .ck [role="dialog"] .rounded-lg.bg-blue-100,
html[data-theme] .ck [role="dialog"] .rounded-lg.bg-emerald-100,
html[data-theme] .ck [role="dialog"] .rounded-lg.bg-indigo-100 { border-radius: var(--ck-radius) !important; }
html[data-theme] .ck [role="dialog"] .bg-blue-600 { min-height: 48px; font-weight: var(--sf-btn-weight); }

/* made-to-order badge + popover */
html[data-theme] .ck .rounded-full.bg-amber-50 { border-radius: var(--sf-radius-btn) !important; }
html[data-theme] .ck .bg-white.border-amber-200 { box-shadow: 0 8px 24px rgba(0, 0, 0, .18) !important; }

/* ---- Order status (success) ---------------------------------------- */
html[data-theme] .ck--success .max-w-xl { margin-left: 0; margin-right: 0; text-align: left; max-width: 640px; }
html[data-theme] .ck--success .max-w-xl h2 { font-size: 48px; line-height: 1.02; margin-bottom: 16px; }
html[data-theme] .ck--success .max-w-xl p { color: var(--sf-muted); max-width: 60ch; }
html[data-theme] .ck--success .max-w-xl p:first-of-type { font-size: 20px; line-height: 1.4; color: var(--sf-ink); }
html[data-theme] .ck--success .ck-back { display: inline-flex; width: auto; margin-top: 0; padding-left: 0; justify-content: flex-start; }
html[data-theme] .ck--success .mt-16 { margin-top: 48px; }
html[data-theme] .ck--success dl > div.py-6 {
    border: 1px solid var(--sf-line); border-radius: var(--ck-radius);
    padding: var(--ck-pad); margin-top: 16px; background: var(--ck-card-bg);
}
html[data-theme] .ck--success dl.divide-y > div + div { border-top-width: 1px; }
html[data-theme] .ck--success .mt-6.border-t { border-top: 0; }
html[data-theme] .ck--success a.bg-black { font-size: 16px; }

/* ---- Reduced motion ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html[data-theme] .ck * { transition: none !important; animation: none !important; }
}

/* =====================================================================
 * Per-theme character
 * ===================================================================== */

/* -- Basic / Default: quiet, centred wordmark, pill buttons ----------- */
html[data-theme="default"] .ck-brand,
html[data-theme="minimalist"] .ck-brand { letter-spacing: 0.02em; }
html[data-theme="minimalist"] .ck--success .max-w-xl h2,
html[data-theme="default"] .ck--success .max-w-xl h2 { font-weight: 400; }

/* -- Classic / Editorial: serif, hairlines, small radius --------------- */
html[data-theme="editorial"] { --ck-field-bg: #fffdf9; }
html[data-theme="editorial"] .ck-head { border-bottom-color: var(--sf-ink); }
html[data-theme="editorial"] .ck-brand { font-style: italic; font-size: 24px; }
html[data-theme="editorial"] .ck-title,
html[data-theme="editorial"] .ck h1 { font-style: italic; }
html[data-theme="editorial"] .ck-steps__n { font-family: var(--sf-font-display); font-size: 14px; border-radius: 2px; }
html[data-theme="editorial"] .ck-summary { background: var(--sf-soft) !important; }
html[data-theme="editorial"] .ck--cart .ck-pagehead { border-bottom: 3px double var(--sf-ink); }

/* -- Peak / Kinetic: ink bar, Anton, red action, hard corners ---------- */
html[data-theme="kinetic"] {
    --ck-head-bg: #0b0b0b;
    --ck-border-w: 1px;
}
html[data-theme="kinetic"] .ck-head { background: #0b0b0b; color: #f5f5f2; border-bottom: 4px solid var(--sf-accent); }
html[data-theme="kinetic"] .ck-head a:focus-visible { outline-color: #f5f5f2 !important; }
html[data-theme="kinetic"] .ck-head__in { grid-template-columns: 1fr auto; }
html[data-theme="kinetic"] .ck-head__back { display: none; }
html[data-theme="kinetic"] .ck-brand { grid-column: 1; justify-self: start; font-size: 28px; }
html[data-theme="kinetic"] .ck-head__bag { grid-column: 2; }
html[data-theme="kinetic"] .ck-head__count { background: var(--sf-accent); color: #0b0b0b; border-radius: 0; }
html[data-theme="kinetic"] .ck h1 { font-size: 48px; }
html[data-theme="kinetic"] .ck h2 { font-size: 28px; }
html[data-theme="kinetic"] .ck-steps__n { border-radius: 0; }
html[data-theme="kinetic"] .ck-steps__item.is-current .ck-steps__n { background: var(--sf-accent); border-color: var(--sf-accent); color: #0b0b0b; }
html[data-theme="kinetic"] .ck-steps__item.is-current { color: var(--sf-ink); }
html[data-theme="kinetic"] .ck-steps__label { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; font-weight: 700; }
html[data-theme="kinetic"] .ck-cta,
html[data-theme="kinetic"] .ck #shipping-rates-btn { min-height: 56px; font-size: 16px; }
html[data-theme="kinetic"] .ck [data-lw="selectShippingRate"]:has(input:checked) { border-color: var(--sf-ink) !important; box-shadow: inset 6px 0 0 var(--sf-accent), inset 0 0 0 1px var(--sf-ink) !important; padding-left: 24px; }
html[data-theme="kinetic"] .ck [data-lw="selectShippingRate"] img { border-radius: 0; }
html[data-theme="kinetic"] .ck-summary__toggle { background: #0b0b0b; color: #f5f5f2; }
html[data-theme="kinetic"] .ck-summary__h,
html[data-theme="kinetic"] .ck-summary__total,
html[data-theme="kinetic"] .ck-summary__meta { color: #f5f5f2; }
html[data-theme="kinetic"] .ck-summary__meta { opacity: .75; }
html[data-theme="kinetic"] .ck-summary__toggle:focus-visible { outline-color: var(--sf-accent) !important; }
html[data-theme="kinetic"] .ck--success .max-w-xl h2 { font-size: 64px; }
html[data-theme="kinetic"] .ck-foot { background: #0b0b0b; color: #a3a3a0; border-top: 4px solid var(--sf-accent); }
html[data-theme="kinetic"] .ck-foot .ck-foot__name { color: #f5f5f2; }
html[data-theme="kinetic"] .ck-foot .ck-powered { color: #a3a3a0; }
html[data-theme="kinetic"] .ck-foot .ck-powered:hover { color: #f5f5f2; }
html[data-theme="kinetic"] .ck-foot a:focus-visible { outline-color: #f5f5f2 !important; }
html[data-theme="kinetic"][data-hero-tone="dark"] .ck-head { background: #171717; }
html[data-theme="kinetic"][data-hero-tone="dark"] .ck-summary__toggle { background: #171717; }
html[data-theme="kinetic"][data-hero-tone="dark"] .ck-foot { background: #171717; }

/* -- Raw / Brutalist: mono, 2px ink borders, offset shadows ------------ */
html[data-theme="brutalist"] {
    --ck-border-w: 2px;
    --ck-field-line: var(--sf-ink);
    --ck-card-line: var(--sf-ink);
}
html[data-theme="brutalist"] .ck-head { border-bottom: 2px solid var(--sf-ink); }
html[data-theme="brutalist"] .ck-head__in { grid-template-columns: 1fr auto; }
html[data-theme="brutalist"] .ck-head__back { display: none; }
html[data-theme="brutalist"] .ck-brand { grid-column: 1; justify-self: start; font-size: 22px; }
html[data-theme="brutalist"] .ck-head__bag { grid-column: 2; font-family: var(--sf-font-body); }
html[data-theme="brutalist"] .ck-head__count { border-radius: 0; background: var(--sf-red, var(--sf-ink)); color: #fff; }
html[data-theme="brutalist"] .ck h1 { font-size: 40px; }
html[data-theme="brutalist"] .ck-steps__n { border-radius: 0; border-width: 2px; border-color: var(--sf-ink); }
html[data-theme="brutalist"] .ck-steps__item::before { height: 2px !important; }
html[data-theme="brutalist"] .ck-steps__item.is-current .ck-steps__n { background: var(--sf-red, var(--sf-accent)); border-color: var(--sf-ink); color: #fff; }
html[data-theme="brutalist"] .ck-steps__label { font-size: 12px; text-transform: uppercase; font-weight: 700; }
html[data-theme="brutalist"] .ck input[type="text"],
html[data-theme="brutalist"] .ck input[type="email"],
html[data-theme="brutalist"] .ck input[type="tel"],
html[data-theme="brutalist"] .ck select { border-width: 2px !important; }
html[data-theme="brutalist"] .ck .rounded-2xl.border,
html[data-theme="brutalist"] .ck--cart .lg\:col-span-1 > .ck-summary,
html[data-theme="brutalist"] .ck-summary { border-width: 2px !important; border-color: var(--sf-ink) !important; box-shadow: 6px 6px 0 var(--sf-ink) !important; }
html[data-theme="brutalist"] .ck--cart .lg\:col-span-2 > .rounded-xl { box-shadow: none !important; }
html[data-theme="brutalist"] .ck-cta,
html[data-theme="brutalist"] .ck #shipping-rates-btn,
html[data-theme="brutalist"] .ck [data-ck="modal-confirm"] { border-width: 2px !important; border-color: var(--sf-ink) !important; box-shadow: 4px 4px 0 var(--sf-ink) !important; min-height: 56px; }
html[data-theme="brutalist"] .ck-cta:hover,
html[data-theme="brutalist"] .ck #shipping-rates-btn:hover,
html[data-theme="brutalist"] .ck [data-ck="modal-confirm"]:hover { box-shadow: 2px 2px 0 var(--sf-ink) !important; transform: translate(2px, 2px); }
html[data-theme="brutalist"] .ck-cta:disabled { box-shadow: none !important; transform: none; }
html[data-theme="brutalist"] .ck [data-lw="selectShippingRate"] { border-width: 2px !important; }
html[data-theme="brutalist"] .ck [data-lw="selectShippingRate"]:has(input:checked) { background: var(--sf-ink) !important; color: var(--sf-paper); box-shadow: 4px 4px 0 var(--sf-red, var(--sf-ink)) !important; }
html[data-theme="brutalist"] .ck [data-lw="selectShippingRate"]:has(input:checked) * { color: var(--sf-paper) !important; }
html[data-theme="brutalist"] .ck [data-lw="selectShippingRate"]:has(input:checked) > div[class*="absolute"] .rounded-full { background: var(--sf-paper) !important; color: var(--sf-ink) !important; }
html[data-theme="brutalist"] .ck [data-lw="selectShippingRate"] img { border-radius: 0; }
html[data-theme="brutalist"] .ck-summary__toggle { border-bottom: 2px solid var(--sf-ink); }
html[data-theme="brutalist"] .ck-foot { border-top: 2px solid var(--sf-ink); }
html[data-theme="brutalist"] .ck--success .max-w-xl h2 { font-size: 56px; }
html[data-theme="brutalist"] .ck-paybar { border-top-width: 2px; border-top-color: var(--sf-ink); }
html[data-theme="brutalist"][data-hero-tone="dark"] .ck-cta,
html[data-theme="brutalist"][data-hero-tone="dark"] .ck #shipping-rates-btn { box-shadow: 4px 4px 0 var(--sf-soft) !important; }

/* -- Elite: dark luxury, serif display, light pill actions ------------- */
html[data-theme="elite"] {
    --ck-card-bg: var(--sf-soft);
    --ck-field-bg: #0f0f11;
    --ck-field-line: rgba(255, 255, 255, 0.28);
    --ck-pad: 24px;
}
@media (min-width: 768px) { html[data-theme="elite"] { --ck-pad: 32px; } }
html[data-theme="elite"] .ck-head { background: rgba(17, 17, 19, .96); }
html[data-theme="elite"] .ck-brand { font-size: 26px; font-weight: 500; letter-spacing: .01em; }
html[data-theme="elite"] .ck h1 { font-size: 40px; font-weight: 500; }
html[data-theme="elite"] .ck h2 { font-size: 28px; }
html[data-theme="elite"] .ck .ck-pagehead { margin-bottom: 24px; }
html[data-theme="elite"] .ck-steps__n { border-color: rgba(255, 255, 255, .28); background: transparent; }
html[data-theme="elite"] .ck-steps__item.is-current .ck-steps__n { background: var(--sf-ink); border-color: var(--sf-ink); color: var(--sf-on-accent); }
html[data-theme="elite"] .ck input[type="text"],
html[data-theme="elite"] .ck input[type="email"],
html[data-theme="elite"] .ck input[type="tel"],
html[data-theme="elite"] .ck select { border-radius: 12px !important; }
html[data-theme="elite"] .ck input:-webkit-autofill { -webkit-text-fill-color: var(--sf-ink); box-shadow: 0 0 0 1000px #0f0f11 inset; }
html[data-theme="elite"] .ck [data-lw="selectShippingRate"] { border-radius: 16px !important; background: #121214; }
html[data-theme="elite"] .ck [data-lw="selectShippingRate"]:hover { background: #1b1c20; }
html[data-theme="elite"] .ck [data-lw="selectShippingRate"]:has(input:checked) { background: #1f2024; border-color: var(--sf-ink) !important; }
html[data-theme="elite"] .ck-summary { background: var(--sf-soft) !important; border-radius: 16px !important; }
html[data-theme="elite"] .ck .rounded-2xl.border { border-radius: 16px !important; }
html[data-theme="elite"] .ck-cta,
html[data-theme="elite"] .ck #shipping-rates-btn { min-height: 56px; }
html[data-theme="elite"] .ck-paybar { background: rgba(23, 24, 27, .98); }
html[data-theme="elite"] .ck--success .max-w-xl h2 { font-size: 56px; font-weight: 500; }
html[data-theme="elite"] .ck-foot { background: var(--sf-nav-bg); }

/* =====================================================================
 * Round 1 corrections
 * ===================================================================== */
html[data-theme] .ck .text-amber-900,
html[data-theme] .ck .text-amber-800,
html[data-theme] .ck .text-amber-700 { color: var(--sf-ink) !important; }
html[data-theme] .ck .text-amber-700 { color: var(--sf-muted) !important; }
html[data-theme] .ck .bg-amber-50.border-amber-200 {
    border-width: 0 0 0 4px !important; border-left-color: var(--sf-ink) !important;
    background: var(--sf-soft) !important; padding: 16px 20px !important;
}
html[data-theme] .ck .bg-amber-50 .bg-amber-100.rounded-full { display: none !important; }
html[data-theme] .ck .bg-amber-50 .space-x-3 { gap: 0; }
html[data-theme] .ck .bg-amber-50 .space-y-1 > p { margin: 0 0 4px; }
html[data-theme] .ck .bg-amber-50 p.font-semibold { font-size: 14px; }
html[data-theme] .ck .bg-amber-50 p { font-size: 14px; line-height: 1.5; max-width: 80ch; }

html[data-theme] .ck .ck-pagehead .ck-title { margin-bottom: 24px; }
html[data-theme] .ck .ck-pagehead .ck-steps { margin-bottom: 8px; }
html[data-theme] .ck--cart .ck-pagehead .ck-title { margin-bottom: 0; }

/* Column order: summary on top (collapsed) on mobile, right column on desktop */
@media (max-width: 1023px) {
    html[data-theme] .ck--checkout .lg\:grid { display: flex; flex-direction: column; }
    html[data-theme] .ck--checkout .ck-aside { order: -1; margin-top: 0; margin-bottom: 24px; }
    html[data-theme] .ck--checkout .lg\:grid > .order-2 { order: 2; margin-top: 0; }
}
@media (min-width: 1024px) {
    html[data-theme] .ck--checkout .ck-aside { order: 2; align-self: start; position: sticky; top: calc(var(--ck-head-h) + 24px); }
}

/* Payment card: left aligned, compact empty state; no card-in-card look */
html[data-theme] .ck--checkout .text-center.py-8 { text-align: left; padding: 8px 0 0; }
html[data-theme] .ck--checkout .text-center.py-8 h3 { font-family: var(--sf-font-body); font-size: 16px; font-weight: 600; text-transform: none; letter-spacing: 0; margin-bottom: 4px; }
html[data-theme] .ck--checkout .text-center.py-8 .w-16 { display: none; }
html[data-theme] .ck--checkout .ck-card-gap { margin-top: 24px; }

/* Success: two-column info block aligns at the top on desktop */
html[data-theme] .ck--success .grid > .mt-16 { margin-top: 32px; }
@media (min-width: 768px) {
    html[data-theme] .ck--success .grid > .mt-16 { margin-top: 0; }
}
html[data-theme] .ck--success .grid h3 { font-size: 20px; }

/* Body copy: neutral tracking so every theme's text stays evenly spaced */
html[data-theme] body.ck-body, html[data-theme] .ck { letter-spacing: 0; }
html[data-theme] .ck h1, html[data-theme] .ck h2, html[data-theme] .ck h3 { letter-spacing: var(--sf-display-tracking); }

/* Bag: the list is open on the page (hairline rows), only the summary is a card */
html[data-theme] .ck--cart .lg\:col-span-2 > div.rounded-xl.border {
    border-width: 0 !important; box-shadow: none !important; background: transparent !important; overflow: visible;
}
html[data-theme] .ck--cart .divide-y > div { border-bottom: 1px solid var(--sf-line); }
html[data-theme] .ck--cart .divide-y > div:last-child { border-bottom: 0; }
html[data-theme] .ck--cart .divide-y { border: 0 !important; }
html[data-theme] .ck--cart .divide-y > * + * { border-top-width: 0 !important; }

/* Bag rows on mobile: thumbnail left, details right */
@media (max-width: 639px) {
    html[data-theme] .ck--cart .divide-y > div > .flex.flex-col {
        display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 16px; align-items: start;
    }
    html[data-theme] .ck--cart .divide-y > div > .flex.flex-col > * { margin: 0 !important; }
    html[data-theme] .ck--cart .divide-y > div > .flex.flex-col > .self-center { align-self: start; }
    html[data-theme] .ck--cart .divide-y .text-center,
    html[data-theme] .ck--cart .divide-y [class*="sm:text-right"] { text-align: left; }
    html[data-theme] .ck--cart .divide-y > div { padding: 20px 0 !important; }
}
@media (max-width: 639px) {
    html[data-theme] .ck--cart .divide-y > div > .flex.flex-col > .flex-1 { position: relative; }
    html[data-theme] .ck--cart [data-lw="removeItem"] { position: absolute; top: -12px; right: -12px; }
    html[data-theme] .ck--cart .divide-y h3 { padding-right: 32px; }
    html[data-theme] .ck--cart .divide-y .justify-center.sm\:justify-start { justify-content: flex-start; }
    html[data-theme] .ck--cart .divide-y .border-t { margin-top: 16px !important; padding-top: 16px !important; }
}
