/**
 * wizard.css — Glove Configurator
 * Child theme: /assets/css/wizard.css
 *
 * Design system:
 *  - Nike aesthetic: Futura-adjacent type, stark black/white, surgical spacing
 *  - Monochrome base with leather-tan accent (#C4915A) for glove context
 *  - Desktop: 55/45 grid split (scene / wizard panel)
 *  - Mobile (<1024px): stacked scene → FAB → bottom-sheet modal
 *  - Motion: slide transitions via transform/opacity, no layout thrash
 *
 * Tokens (override in :root or child theme to re-skin):
 *  --wiz-bg, --wiz-panel-bg, --wiz-accent, --wiz-text, --wiz-muted,
 *  --wiz-border, --wiz-radius, --wiz-font-display, --wiz-font-body
 *
 * @package NinePositions\GloveWizard
 * @version 1.0.0
 */

/* ─────────────────────────────────────────────────────────────────────────────
   0. Imports & tokens
───────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700&family=Barlow:wght@300;400;500&display=swap');

:root {
    /* Brand */
    --wiz-black       : #0a0a0a;
    --wiz-white       : #ffffff;
    --wiz-accent      : #C4915A;   /* leather tan */
    --wiz-accent-dark : #9E6E3C;
    --wiz-oos-red     : #C0392B;

    /* Surfaces */
    --wiz-scene-bg    : #111111;
    --wiz-panel-bg    : #ffffff;
    --wiz-mini-bg     : #f5f5f5;
    --wiz-input-bg    : #fafafa;
    --wiz-summary-bg  : #f9f6f2;   /* warm tint for summary */

    /* Type */
    --wiz-font-display: 'Barlow Condensed', 'Impact', sans-serif;
    --wiz-font-body   : 'Barlow', 'Helvetica Neue', Arial, sans-serif;
    --wiz-text        : #0a0a0a;
    --wiz-text-muted  : #6b6b6b;
    --wiz-text-faint  : #aaaaaa;

    /* Borders */
    --wiz-border      : #e0e0e0;
    --wiz-border-dark : #c0c0c0;

    /* Radius */
    --wiz-radius      : 4px;
    --wiz-radius-lg   : 8px;
    --wiz-radius-pill : 999px;

    /* Spacing */
    --wiz-gap         : 20px;
    --wiz-pad         : 24px;
    --wiz-pad-sm      : 16px;

    /* Motion */
    --wiz-ease        : cubic-bezier(0.4, 0, 0.2, 1);
    --wiz-dur         : 320ms;
    --wiz-dur-fast    : 160ms;

    /* Layout */
    --wiz-panel-w     : 420px;
    --wiz-scene-ratio : 1;         /* square on mobile, taller on desktop */
    --wiz-progress-h  : 3px;
    --wiz-footer-h    : 68px;
    --wiz-header-h    : 72px;
    --wiz-mini-h      : 38px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   1. Reset scope (scoped to .wiz-* to not conflict with WC/theme)
───────────────────────────────────────────────────────────────────────────── */

.wiz-layout,
.wiz-layout * {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────────────────────────────────────────
   2. Ghost layer — hidden cgkit swatches
───────────────────────────────────────────────────────────────────────────── */

.wiz-cgkit-ghost {
    position   : absolute;
    width      : 1px;
    height     : 1px;
    overflow   : hidden;
    clip       : rect(0 0 0 0);
    white-space: nowrap;
    /* NOT display:none — buttons must be clickable by JS */
    pointer-events: none;  /* no accidental interaction */
}
/* But allow programmatic .click() to fire */
.wiz-cgkit-ghost button {
    pointer-events: all;
}

/* ─────────────────────────────────────────────────────────────────────────────
   3. Layout — desktop grid
───────────────────────────────────────────────────────────────────────────── */

.wiz-layout {
    display       : grid;
    grid-template-columns: 1fr var(--wiz-panel-w);
    grid-template-rows   : 1fr;
    min-height    : 580px;
    border        : 1px solid var(--wiz-border);
    border-radius : var(--wiz-radius-lg);
    overflow      : hidden;
    background    : var(--wiz-panel-bg);
    font-family   : var(--wiz-font-body);
    position      : relative;
}

/* ─────────────────────────────────────────────────────────────────────────────
   4. Scene pane
───────────────────────────────────────────────────────────────────────────── */

.wiz-scene-pane {
    background : var(--wiz-scene-bg);
    position   : relative;
    overflow   : hidden;
    display    : flex;
    align-items: center;
    justify-content: center;
}

.wiz-canvas-mount {
    width : 100%;
    height: 100%;
    position: absolute;
    inset : 0;
}

.wiz-canvas-mount canvas {
    display: block;
    width  : 100% !important;
    height : 100% !important;
}

/* Scene loader */
.wiz-scene-loader {
    position       : absolute;
    inset          : 0;
    display        : flex;
    flex-direction : column;
    align-items    : center;
    justify-content: center;
    gap            : 12px;
    background     : var(--wiz-scene-bg);
    color          : rgba(255,255,255,.5);
    font-family    : var(--wiz-font-body);
    font-size      : 12px;
    letter-spacing : .08em;
    text-transform : uppercase;
    transition     : opacity var(--wiz-dur) var(--wiz-ease);
    z-index        : 5;
}
.wiz-scene-loader--hidden {
    opacity        : 0;
    pointer-events : none;
}
.wiz-scene-loader-ring {
    width         : 36px;
    height        : 36px;
    border        : 2px solid rgba(255,255,255,.15);
    border-top-color: var(--wiz-accent);
    border-radius : 50%;
    animation     : wiz-spin 1s linear infinite;
}
@keyframes wiz-spin { to { transform: rotate(360deg); } }

/* Scene controls */
.wiz-scene-controls {
    position: absolute;
    top     : 14px;
    right   : 14px;
    display : flex;
    gap     : 6px;
    z-index : 10;
}
.wiz-icon-btn {
    width          : 34px;
    height         : 34px;
    border-radius  : var(--wiz-radius);
    background     : rgba(255,255,255,.1);
    border         : 1px solid rgba(255,255,255,.15);
    color          : rgba(255,255,255,.8);
    font-size      : 16px;
    display        : flex;
    align-items    : center;
    justify-content: center;
    cursor         : pointer;
    transition     : background var(--wiz-dur-fast), color var(--wiz-dur-fast);
    line-height    : 1;
}
.wiz-icon-btn:hover {
    background: rgba(255,255,255,.22);
    color     : #fff;
}
.wiz-icon-btn--active {
    background  : var(--wiz-accent);
    border-color: var(--wiz-accent-dark);
    color       : #fff;
}

/* Scene label */
.wiz-scene-label {
    position   : absolute;
    bottom     : 14px;
    left       : 50%;
    transform  : translateX(-50%);
    font-family: var(--wiz-font-display);
    font-size  : 10px;
    font-weight: 600;
    letter-spacing: .18em;
    color      : rgba(255,255,255,.35);
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   5. Wizard panel shell
───────────────────────────────────────────────────────────────────────────── */

.wiz-panel {
    display       : flex;
    flex-direction: column;
    background    : var(--wiz-panel-bg);
    overflow      : hidden;
    position      : relative;
}

/* Progress bar */
.wiz-progress-bar {
    height    : var(--wiz-progress-h);
    background: var(--wiz-border);
    flex-shrink: 0;
}
.wiz-progress-fill {
    height    : 100%;
    background: var(--wiz-black);
    transition: width var(--wiz-dur) var(--wiz-ease);
    transform-origin: left;
}

/* Mini summary */
.wiz-mini-summary {
    padding       : 6px var(--wiz-pad);
    min-height    : var(--wiz-mini-h);
    max-height    : 130px;                                /* two-zone: cap growth */
    background    : var(--wiz-mini-bg);
    border-bottom : 1px solid var(--wiz-border);
    display       : flex;
    flex-wrap     : wrap;
    align-items   : flex-start;
    gap           : 6px;
    flex-shrink   : 0;
    overflow-y    : auto;                                 /* scroll independently */
    overflow-x    : hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--wiz-border) transparent;
}
.wiz-mini-summary::-webkit-scrollbar        { width: 4px; }
.wiz-mini-summary::-webkit-scrollbar-track { background: transparent; }
.wiz-mini-summary::-webkit-scrollbar-thumb { background: var(--wiz-border); border-radius: 2px; }

.wiz-mini-summary-empty {
    font-size  : 11px;
    color      : var(--wiz-text-faint);
    font-family: var(--wiz-font-body);
}

.wiz-mini-pill {
    display       : flex;
    align-items   : center;
    gap           : 5px;
    padding       : 3px 9px 3px 6px;
    background    : var(--wiz-white);
    border        : 1px solid var(--wiz-border);
    border-radius : var(--wiz-radius-pill);
    font-size     : 11px;
    color         : var(--wiz-text);
    white-space   : nowrap;
    font-family   : var(--wiz-font-body);
}
.wiz-mini-pill strong {
    font-weight: 500;
}
.wiz-pill-dot {
    width        : 10px;
    height       : 10px;
    border-radius: 3px;
    flex-shrink  : 0;
    border       : 1px solid rgba(0,0,0,.1);
}

/* Header */
.wiz-header {
    padding       : 14px var(--wiz-pad) 12px;
    border-bottom : 1px solid var(--wiz-border);
    display       : flex;
    align-items   : flex-end;
    justify-content: space-between;
    flex-shrink   : 0;
    min-height    : var(--wiz-header-h);
}
.wiz-step-counter {
    font-family : var(--wiz-font-body);
    font-size   : 11px;
    font-weight : 400;
    color       : var(--wiz-text-muted);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 4px;
    display     : flex;
    gap         : 4px;
}
.wiz-step-name {
    font-family   : var(--wiz-font-display);
    font-size     : 22px;
    font-weight   : 700;
    color         : var(--wiz-black);
    letter-spacing: .01em;
    text-transform: uppercase;
    line-height   : 1;
}
.wiz-price {
    font-family   : var(--wiz-font-display);
    font-size     : 20px;
    font-weight   : 600;
    color         : var(--wiz-black);
    letter-spacing: .02em;
    white-space   : nowrap;
    padding-bottom: 2px;
}
.wiz-price .woocommerce-Price-amount { font: inherit; }

/* ─────────────────────────────────────────────────────────────────────────────
   6. Slide viewport & transitions
───────────────────────────────────────────────────────────────────────────── */

.wiz-slide-viewport {
    flex    : 1;
    overflow: hidden;
    position: relative;
}

.wiz-slide {
    position  : absolute;
    inset     : 0;
    padding   : var(--wiz-pad);
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform var(--wiz-dur) var(--wiz-ease),
                opacity   var(--wiz-dur) var(--wiz-ease);
    will-change: transform, opacity;
    scrollbar-width: thin;
    scrollbar-color: var(--wiz-border) transparent;
}
.wiz-slide::-webkit-scrollbar { width: 4px; }
.wiz-slide::-webkit-scrollbar-track { background: transparent; }
.wiz-slide::-webkit-scrollbar-thumb { background: var(--wiz-border); border-radius: 2px; }

.wiz-slide--active {
    transform     : translateX(0);
    opacity       : 1;
    pointer-events: auto;
    z-index       : 2;
}
.wiz-slide--prev {
    transform     : translateX(-28px);
    opacity       : 0;
    pointer-events: none;
    z-index       : 1;
}
.wiz-slide--next {
    transform     : translateX(28px);
    opacity       : 0;
    pointer-events: none;
    z-index       : 1;
}
.wiz-slide--conditional-hidden {
    display: none !important;
}

/* Slides loading placeholder */
.wiz-slides-loading {
    display        : flex;
    align-items    : center;
    justify-content: center;
    height         : 100%;
}
.wiz-slides-loading-dots {
    display: flex;
    gap    : 6px;
}
.wiz-slides-loading-dots span {
    width           : 6px;
    height          : 6px;
    border-radius   : 50%;
    background      : var(--wiz-border-dark);
    animation       : wiz-pulse 1.2s ease-in-out infinite;
}
.wiz-slides-loading-dots span:nth-child(2) { animation-delay: .2s; }
.wiz-slides-loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes wiz-pulse { 0%,100%{opacity:.3} 50%{opacity:1} }

/* ─────────────────────────────────────────────────────────────────────────────
   7. Grouped slide — radio options
───────────────────────────────────────────────────────────────────────────── */

.wiz-group {
    margin-bottom: var(--wiz-gap);
}
.wiz-group:last-child { margin-bottom: 0; }

.wiz-group-label {
    font-family   : var(--wiz-font-display);
    font-size     : 11px;
    font-weight   : 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color         : var(--wiz-text-muted);
    margin-bottom : 8px;
}
.wiz-group-label--sub {
    margin-top: 14px;
    color     : var(--wiz-black);
}

.wiz-radio-grid {
    display       : flex;
    flex-direction: column;
    gap           : 6px;
}

.wiz-radio-opt {
    display        : flex;
    align-items    : center;
    gap            : 12px;
    padding        : 12px 14px;
    border         : 1px solid var(--wiz-border);
    border-radius  : var(--wiz-radius);
    background     : transparent;
    cursor         : pointer;
    transition     : border-color var(--wiz-dur-fast),
                     background   var(--wiz-dur-fast),
                     box-shadow   var(--wiz-dur-fast);
    text-align     : left;
    font-family    : var(--wiz-font-body);
    width          : 100%;
    position       : relative;
}
.wiz-radio-opt:hover {
    border-color: var(--wiz-black);
}
.wiz-radio-opt--selected {
    border-color: var(--wiz-black);
    background  : #f8f8f8;
    box-shadow  : inset 0 0 0 1px var(--wiz-black);
}
.wiz-radio-opt:focus-visible {
    outline     : 2px solid var(--wiz-accent);
    outline-offset: 2px;
}
.wiz-radio-opt.wiz-oos {
    opacity: .4;
    cursor : not-allowed;
}

.wiz-radio-dot {
    width         : 18px;
    height        : 18px;
    border-radius : 50%;
    border        : 1.5px solid var(--wiz-border-dark);
    flex-shrink   : 0;
    display       : flex;
    align-items   : center;
    justify-content: center;
    transition    : border-color var(--wiz-dur-fast), background var(--wiz-dur-fast);
    position      : relative;
}
.wiz-radio-opt--selected .wiz-radio-dot {
    border-color: var(--wiz-black);
    background  : var(--wiz-black);
}
.wiz-radio-opt--selected .wiz-radio-dot::after {
    content      : '';
    width        : 7px;
    height       : 7px;
    border-radius: 50%;
    background   : var(--wiz-white);
    position     : absolute;
}

.wiz-radio-label {
    font-size  : 14px;
    font-weight: 400;
    color      : var(--wiz-black);
    line-height: 1.2;
}
.wiz-radio-sub {
    display    : block;
    font-size  : 11px;
    color      : var(--wiz-text-muted);
    margin-top : 2px;
    font-weight: 300;
}

.wiz-oos-badge {
    margin-left  : auto;
    font-family  : var(--wiz-font-display);
    font-size    : 10px;
    font-weight  : 700;
    letter-spacing: .08em;
    color        : var(--wiz-oos-red);
    border       : 1px solid var(--wiz-oos-red);
    border-radius: 2px;
    padding      : 1px 5px;
    text-transform: uppercase;
}

/* ─────────────────────────────────────────────────────────────────────────────
   8. Color swatch slide
───────────────────────────────────────────────────────────────────────────── */

.wiz-color-intro {
    font-size    : 13px;
    color        : var(--wiz-text-muted);
    line-height  : 1.5;
    margin-bottom: 16px;
    font-family  : var(--wiz-font-body);
    font-weight  : 300;
}

.wiz-color-divider {
    height       : 1px;
    background   : var(--wiz-border);
    margin       : 18px 0;
}

.wiz-swatch-grid {
    display              : grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap                  : 10px;
    margin-bottom        : 4px;
}

.wiz-swatch {
    position      : relative;
    display       : flex;
    flex-direction: column;
    align-items   : center;
    gap           : 5px;
    cursor        : pointer;
    border        : none;
    background    : transparent;
    padding       : 0;
}
.wiz-swatch:focus-visible {
    outline       : 2px solid var(--wiz-accent);
    outline-offset: 3px;
    border-radius : var(--wiz-radius);
}

.wiz-swatch-dot {
    width         : 100%;
    aspect-ratio  : 1;
    border-radius : var(--wiz-radius);
    transition    : transform var(--wiz-dur-fast) var(--wiz-ease),
                    box-shadow var(--wiz-dur-fast) var(--wiz-ease);
}
.wiz-swatch-dot--bordered {
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
}

.wiz-swatch:hover .wiz-swatch-dot {
    transform : scale(1.1);
    box-shadow: 0 3px 8px rgba(0,0,0,.2);
}
.wiz-swatch--selected .wiz-swatch-dot {
    transform  : scale(1.06);
    box-shadow : 0 0 0 2.5px var(--wiz-white),
                 0 0 0 4.5px var(--wiz-black);
}

.wiz-swatch-check {
    position      : absolute;
    top           : 4px;
    right         : 4px;
    width         : 16px;
    height        : 16px;
    border-radius : 50%;
    background    : var(--wiz-black);
    color         : var(--wiz-white);
    font-size     : 10px;
    font-weight   : 700;
    display       : none;
    align-items   : center;
    justify-content: center;
    line-height   : 1;
}
.wiz-swatch--selected .wiz-swatch-check {
    display: flex;
}

.wiz-swatch-name {
    font-family: var(--wiz-font-body);
    font-size  : 10px;
    color      : var(--wiz-text-muted);
    text-align : center;
    line-height: 1.2;
    white-space: nowrap;
    overflow   : hidden;
    text-overflow: ellipsis;
    max-width  : 100%;
}
.wiz-swatch--selected .wiz-swatch-name {
    color      : var(--wiz-black);
    font-weight: 500;
}

/* OOS swatch */
.wiz-swatch--oos {
    opacity: .35;
    cursor : not-allowed;
}
.wiz-swatch-oos-cross {
    position   : absolute;
    inset      : 0;
    border-radius: var(--wiz-radius);
    overflow   : hidden;
}
.wiz-swatch-oos-cross::before {
    content   : '';
    position  : absolute;
    top       : 50%;
    left      : 0;
    right     : 0;
    height    : 1.5px;
    background: rgba(192,57,43,.7);
    transform : rotate(-35deg) translateY(-50%);
}

/* ─────────────────────────────────────────────────────────────────────────────
   9. Summary slide
───────────────────────────────────────────────────────────────────────────── */

.wiz-summary {
    display       : flex;
    flex-direction: column;
    gap           : 0;
}

.wiz-summary-header {
    display        : flex;
    justify-content: space-between;
    align-items    : center;
    margin-bottom  : 14px;
}
.wiz-summary-design-id {
    font-family   : var(--wiz-font-display);
    font-size     : 12px;
    font-weight   : 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color         : var(--wiz-text-muted);
    padding       : 3px 9px;
    border        : 1px solid var(--wiz-border);
    border-radius : var(--wiz-radius-pill);
}
.wiz-summary-edit-all {
    font-family: var(--wiz-font-body);
    font-size  : 12px;
    color      : var(--wiz-text-muted);
    background : none;
    border     : none;
    cursor     : pointer;
    text-decoration: underline;
    padding    : 0;
}
.wiz-summary-edit-all:hover { color: var(--wiz-black); }

.wiz-summary-rows {
    border-top: 1px solid var(--wiz-border);
}

.wiz-summary-row {
    display        : flex;
    justify-content: space-between;
    align-items    : center;
    padding        : 9px 0;
    border-bottom  : 1px solid var(--wiz-border);
}
.wiz-summary-key {
    font-size  : 12px;
    color      : var(--wiz-text-muted);
    font-family: var(--wiz-font-body);
    flex-shrink: 0;
    margin-right: 8px;
}
.wiz-summary-right {
    display    : flex;
    align-items: center;
    gap        : 8px;
}
.wiz-summary-val {
    display    : flex;
    align-items: center;
    gap        : 6px;
    font-size  : 13px;
    font-weight: 500;
    color      : var(--wiz-black);
    font-family: var(--wiz-font-body);
}
.wiz-summary-val--empty {
    font-weight: 300;
    color      : var(--wiz-text-faint);
    font-style : italic;
}
.wiz-summary-dot {
    width        : 12px;
    height       : 12px;
    border-radius: 3px;
    border       : 1px solid rgba(0,0,0,.1);
    flex-shrink  : 0;
}
.wiz-summary-edit {
    font-size  : 11px;
    color      : var(--wiz-accent-dark);
    background : none;
    border     : none;
    cursor     : pointer;
    padding    : 0;
    font-family: var(--wiz-font-body);
    text-decoration: underline;
    white-space: nowrap;
}
.wiz-summary-edit:hover { color: var(--wiz-black); }

/* Personalization */
.wiz-summary-personalization {
    margin-top: 18px;
}
.wiz-embroidery-wrap {
    position : relative;
    margin-top: 6px;
}
.wiz-embroidery-input {
    width        : 100%;
    font-family  : var(--wiz-font-body);
    font-size    : 14px;
    padding      : 10px 50px 10px 12px;
    border       : 1px solid var(--wiz-border-dark);
    border-radius: var(--wiz-radius);
    background   : var(--wiz-input-bg);
    color        : var(--wiz-black);
    transition   : border-color var(--wiz-dur-fast);
    outline      : none;
}
.wiz-embroidery-input:focus {
    border-color: var(--wiz-black);
}
.wiz-embroidery-count {
    position   : absolute;
    right      : 10px;
    top        : 50%;
    transform  : translateY(-50%);
    font-size  : 11px;
    color      : var(--wiz-text-faint);
    font-family: var(--wiz-font-body);
    pointer-events: none;
}

/* Lead time notice */
.wiz-summary-leadtime {
    margin-top   : 14px;
    padding      : 10px 12px;
    background   : var(--wiz-summary-bg);
    border       : 1px solid var(--wiz-border);
    border-radius: var(--wiz-radius);
    font-size    : 12px;
    color        : var(--wiz-text-muted);
    display      : flex;
    gap          : 8px;
    align-items  : flex-start;
    font-family  : var(--wiz-font-body);
    line-height  : 1.5;
}
.wiz-leadtime-icon { font-size: 14px; flex-shrink: 0; }

/* ─────────────────────────────────────────────────────────────────────────────
   10. Footer navigation
───────────────────────────────────────────────────────────────────────────── */

.wiz-footer {
    padding       : 12px var(--wiz-pad);
    border-top    : 1px solid var(--wiz-border);
    display       : flex;
    gap           : 8px;
    align-items   : center;
    flex-shrink   : 0;
    min-height    : var(--wiz-footer-h);
    background    : var(--wiz-panel-bg);
}

.wiz-btn {
    font-family: var(--wiz-font-display);
    font-size  : 14px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border     : none;
    border-radius: var(--wiz-radius);
    cursor     : pointer;
    display    : flex;
    align-items: center;
    gap        : 6px;
    transition : background var(--wiz-dur-fast), opacity var(--wiz-dur-fast), color var(--wiz-dur-fast);
    white-space: nowrap;
    padding    : 0 16px;
    height     : 44px;
}
.wiz-btn:focus-visible {
    outline      : 2px solid var(--wiz-accent);
    outline-offset: 2px;
}

.wiz-btn-back {
    flex-shrink: 0;
    background : transparent;
    border     : 1px solid var(--wiz-border-dark);
    color      : var(--wiz-black);
    width      : 44px;
    padding    : 0;
    justify-content: center;
}
.wiz-btn-back:hover:not(:disabled) {
    background: var(--wiz-mini-bg);
}
.wiz-btn-back:disabled {
    opacity: .3;
    cursor : not-allowed;
}
.wiz-btn-back-label {
    display: none; /* icon only on desktop */
}

.wiz-btn-next {
    flex      : 1;
    background: var(--wiz-black);
    color     : var(--wiz-white);
    justify-content: center;
}
.wiz-btn-next:hover { opacity: .82; }

.wiz-btn-atc {
    flex      : 1;
    background: var(--wiz-black);
    color     : var(--wiz-white);
    justify-content: center;
}
.wiz-btn-atc:hover { opacity: .82; }
.wiz-btn-atc[aria-disabled="true"] {
    background: #d0d0d0;
    color     : #888;
    cursor    : not-allowed;
}
.wiz-btn-atc--ready {
    background: var(--wiz-black) !important;
    color     : var(--wiz-white) !important;
    cursor    : pointer !important;
}
/* Accent the ATC button on summary slide */
.wiz-slide--active[data-type="summary"] ~ .wiz-footer .wiz-btn-atc--ready {
    background: var(--wiz-accent) !important;
}

.wiz-btn-icon {
    font-size  : 16px;
    line-height: 1;
}

/* OOS form message */
.wiz-oos-message {
    padding    : var(--wiz-pad);
    font-family: var(--wiz-font-body);
    font-size  : 14px;
    color      : var(--wiz-oos-red);
}

/* ─────────────────────────────────────────────────────────────────────────────
   11. Mobile — FAB + bottom-sheet modal
───────────────────────────────────────────────────────────────────────────── */

.wiz-mobile-fab {
    display  : none; /* shown by JS on mobile */
    position : fixed;
    bottom   : 20px;
    left     : 50%;
    transform: translateX(-50%);
    z-index  : 900;
    background   : var(--wiz-black);
    color        : var(--wiz-white);
    border       : none;
    border-radius: var(--wiz-radius-pill);
    padding      : 0 24px;
    height       : 52px;
    font-family  : var(--wiz-font-display);
    font-size    : 14px;
    font-weight  : 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor       : pointer;
    display      : flex;
    align-items  : center;
    gap          : 10px;
    box-shadow   : 0 4px 20px rgba(0,0,0,.35);
    transition   : box-shadow var(--wiz-dur-fast), opacity var(--wiz-dur-fast);
    white-space  : nowrap;
}
.wiz-mobile-fab:hover { opacity: .88; }

.wiz-fab-icon { font-size: 18px; }
.wiz-fab-price {
    font-weight: 400;
    opacity    : .7;
    font-size  : 13px;
    font-family: var(--wiz-font-body);
}
.wiz-fab-price .woocommerce-Price-amount { font: inherit; }

/* Modal overlay */
.wiz-mobile-modal {
    position  : fixed;
    inset     : 0;
    z-index   : 1000;
    display   : flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
    transition: none;
}
.wiz-mobile-modal--open { pointer-events: auto; }

.wiz-mobile-modal-backdrop {
    position  : absolute;
    inset     : 0;
    background: rgba(0,0,0,0);
    transition: background var(--wiz-dur) var(--wiz-ease);
    cursor    : pointer;
}
.wiz-mobile-modal--open .wiz-mobile-modal-backdrop {
    background: rgba(0,0,0,.55);
}

.wiz-mobile-modal-inner {
    position        : relative;
    background      : var(--wiz-panel-bg);
    border-radius   : 16px 16px 0 0;
    height          : 90vh;
    max-height      : 90vh;
    overflow        : hidden;
    display         : flex;
    flex-direction  : column;
    transform       : translateY(100%);
    transition      : transform var(--wiz-dur) var(--wiz-ease);
    box-shadow      : 0 -4px 32px rgba(0,0,0,.2);
}
.wiz-mobile-modal--open .wiz-mobile-modal-inner {
    transform: translateY(0);
}

.wiz-mobile-handle {
    display        : flex;
    justify-content: center;
    padding        : 10px 0 4px;
    flex-shrink    : 0;
}
.wiz-mobile-handle span {
    width        : 36px;
    height       : 4px;
    border-radius: 2px;
    background   : var(--wiz-border-dark);
}

/* Body scroll lock when modal open */
body.wiz-modal-active { overflow: hidden; }

/* ─────────────────────────────────────────────────────────────────────────────
   12. Responsive breakpoints
───────────────────────────────────────────────────────────────────────────── */

/* Tablet — collapse panel width */
@media (max-width: 1200px) {
    :root { --wiz-panel-w: 360px; }
}

/* Mobile — full stacked layout */
@media (max-width: 1023px) {
    .wiz-layout {
        grid-template-columns: 1fr;
        grid-template-rows   : 300px 1fr;
        min-height           : 0;
        border               : none;
        border-radius        : 0;
    }

    /* Panel hidden on mobile — moved into modal by WizardController */
    .wiz-layout > .wiz-panel {
        display: none;
    }

    .wiz-mobile-fab {
        display: flex;
    }

    .wiz-scene-pane {
        border-radius: var(--wiz-radius-lg);
        overflow     : hidden;
        margin       : 0 16px;
    }

    /* In modal, panel takes full height of modal-inner */
    .wiz-mobile-modal-inner .wiz-panel {
        display  : flex;
        flex     : 1;
        min-height: 0;
        max-height: calc(90vh - 30px);
    }

    .wiz-mini-summary { display: none; }  /* hidden outside modal on mobile */

    /* Inside modal: collapsible summary strip */
    .wiz-mobile-modal-inner .wiz-mini-summary {
        display       : flex;
        max-height    : 40px;
        overflow      : hidden;
        cursor        : pointer;
        transition    : max-height 0.32s var(--wiz-ease);
        align-items   : center;
        padding       : 0 var(--wiz-pad);
    }
    .wiz-mobile-modal-inner .wiz-mini-summary.is-open {
        max-height    : 220px;
        overflow-y    : auto;
        overflow-x    : hidden;
        align-items   : flex-start;
        padding-top   : 6px;
        padding-bottom: 6px;
        cursor        : default;
    }
    .wiz-sum-toggle {
        display       : flex;
        align-items   : center;
        gap           : 6px;
        font-size     : 11px;
        font-family   : var(--wiz-font-body);
        color         : var(--wiz-text-muted);
        white-space   : nowrap;
        border        : none;
        background    : transparent;
        padding       : 0;
        flex-shrink   : 0;
        cursor        : pointer;
    }
    .wiz-sum-toggle-arrow {
        display       : inline-block;
        transition    : transform 0.32s var(--wiz-ease);
    }
    .wiz-mini-summary.is-open .wiz-sum-toggle-arrow {
        transform     : rotate(90deg);
    }

    .wiz-step-name { font-size: 18px; }
    .wiz-swatch-grid { grid-template-columns: repeat(auto-fill, minmax(52px,1fr)); }
}

/* Tiny screens */
@media (max-width: 400px) {
    :root {
        --wiz-pad   : 16px;
        --wiz-pad-sm: 12px;
    }
    .wiz-swatch-grid { grid-template-columns: repeat(auto-fill, minmax(44px,1fr)); }
}

/* ─────────────────────────────────────────────────────────────────────────────
   13. Shoptimizer overrides — neutralise conflicting theme styles
───────────────────────────────────────────────────────────────────────────── */

/* Shoptimizer resets on .variations table — not used in wizard */
.wiz-form table.variations { display: none !important; }

/* cgkit default swatch list — hidden; wizard replaces it */
.wiz-cgkit-ghost ul.cgkit-attribute-swatches {
    /* already visually hidden by the ghost wrapper, but belt-and-suspenders: */
    visibility: hidden;
    position  : absolute;
}

/* Shoptimizer single_variation_wrap — keep in DOM for WC JS, hide visually */
.single_variation_wrap .woocommerce-variation-price,
.single_variation_wrap .woocommerce-variation-availability {
    display: none;
}

/* Preserve WC variation add-to-cart quantity input inside .wiz-btn-atc form flow */
.wiz-form .quantity { display: none; } /* Qty hidden — custom gloves are qty 1 */

/* ─────────────────────────────────────────────────────────────────────────────
   14. Print
───────────────────────────────────────────────────────────────────────────── */

@media print {
    .wiz-mobile-fab,
    .wiz-mobile-modal,
    .wiz-scene-controls,
    .wiz-footer { display: none !important; }

    .wiz-layout {
        grid-template-columns: 1fr;
        border               : 1px solid #ccc;
    }
    .wiz-summary { break-inside: avoid; }
}

/* ─── Hide default WooCommerce add-to-cart (wizard has its own #wiz-btn-atc) ─── */
.single_add_to_cart_button:not(#wiz-btn-atc),
.quantity:has(+ .single_add_to_cart_button:not(#wiz-btn-atc)) {
    display : none !important;
}
