/* ================================================================
   DeadWake Bow Configurator — Frontend Styles
   ================================================================ */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
    --dwbc-accent:        #ed4040;
    --dwbc-accent-light:  #feecec;
    --dwbc-accent-dark:   #b52121;
    --dwbc-success:       #059669;
    --dwbc-error:         #DC2626;
    --dwbc-border:        #E5E7EB;
    --dwbc-text:          #111827;
    --dwbc-text-muted:    #6B7280;
    --dwbc-bg:            #FFFFFF;
    --dwbc-bg-section:    #F9FAFB;
    --dwbc-radius:        8px;
    --dwbc-radius-sm:     5px;
    --dwbc-swatch-size:   40px;
    --dwbc-swatch-width:  52px;
    --dwbc-shadow:        0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --dwbc-shadow-lg:     0 10px 25px rgba(0,0,0,.15);
}

/* ── Outer wrapper ──────────────────────────────────────────────── */
.dwbc-configurator {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    gap: 0 28px;
    margin: 24px 0;
    font-family: inherit;
    color: var(--dwbc-text);
}

/* ── SVG Preview ────────────────────────────────────────────────── */
/*
 * --dwbc-header-h: set this to your theme's sticky header height via JS or inline style.
 * Defaults to 32px (WP admin bar). Override in your theme: e.g. --dwbc-header-h: 80px
 */
:root { --dwbc-header-h: 32px; }


/* Shared: vertical flex centering */
.dwbc-preview-wrap,
.dwbc-no-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.dwbc-preview-wrap {
    grid-row: 1 / 2;
    grid-column: 1 / 2;
    position: sticky;
    top: var(--dwbc-header-h);
    height: calc(100vh - var(--dwbc-header-h));
    height: calc(100dvh - var(--dwbc-header-h));
    overflow: hidden;
    background: #656565;
    border-radius: var(--dwbc-radius);
}

.dwbc-sections {
    grid-row: 1 / 2;
    grid-column: 2 / 3;
}

.dwbc-preview-img-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none; /* let our JS handle all pointer/touch events */
    cursor: grab;
}
.dwbc-preview-img-wrap.is-dragging { cursor: grabbing; }

/* Inline SVG preview — height:100% fills viewport wrap by default.
   width is set by JS only when zooming (width-driven sizing for accurate viewBox math). */
.dwbc-preview-svg-wrap svg {
    display: block;
    height: 100% !important;
    width: auto;
    max-width: 100%;
}
/* Bitmap img fallback — CSS transform for zoom */
.dwbc-preview-img-wrap .dwbc-preview-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
}

/* Zoom reset button */
.dwbc-zoom-reset {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 4px 10px;
    background: rgba(0,0,0,.45);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 0.7em;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: .04em;
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
    z-index: 2;
}
.dwbc-preview-img-wrap.is-zoomed .dwbc-zoom-reset {
    opacity: 1;
    pointer-events: auto;
}

/* No-preview placeholder (shown before SVG is uploaded) */
.dwbc-no-preview {
    gap: 12px;
    height: 100%;
    width: 100%;
    padding: 24px;
    box-sizing: border-box;
}

.dwbc-no-preview-icon {
    width: 48px;
    height: 120px;
    color: rgba(255,255,255,.18);
}

.dwbc-no-preview-label {
    font-size: 0.75em;
    font-weight: 600;
    color: rgba(255,255,255,.35);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.dwbc-no-preview-hint {
    font-size: 0.7em;
    color: rgba(255,255,255,.2);
    text-align: center;
    line-height: 1.4;
}

.dwbc-preview-label {
    font-size: 0.7em;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.45);
    margin-bottom: 8px;
}

.dwbc-preview-note {
    font-size: 0.65em;
    color: rgba(255,255,255,.6);
    margin-top: 8px;
    line-height: 1.4;
}

/* ── Sections (color column only) ──────────────────────────────── */
.dwbc-section {
    background: var(--dwbc-bg);
    border: 1px solid var(--dwbc-border);
    border-radius: var(--dwbc-radius);
    padding: 20px 24px;
    margin-bottom: 16px;
}

.dwbc-section-title {
    font-size: 0.8em;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--dwbc-accent);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--dwbc-accent-light);
}

/* ── Field wrapper ──────────────────────────────────────────────── */
.dwbc-field-wrap {
    margin-bottom: 20px;
}
.dwbc-field-wrap:last-child {
    margin-bottom: 0;
}

.dwbc-field-label {
    display: block;
    font-size: 0.8em;
    font-weight: 600;
    color: var(--dwbc-text);
    margin-bottom: 2px;
}

.dwbc-field-note {
    display: block;
    font-size: 0.6em;
    font-weight: 400;
    color: var(--dwbc-text-muted);
    margin: 5px 0 8px 0;
}

/* Conditional field animation */
.dwbc-conditional {
    transition: opacity .2s ease;
}

/* ── Select ─────────────────────────────────────────────────────── */
.dwbc-select {
    width: 100%;
    max-width: 340px;
    padding: 9px 12px;
    border: 1px solid var(--dwbc-border);
    border-radius: var(--dwbc-radius-sm);
    font-size: 0.875em;
    background: var(--dwbc-bg);
    color: var(--dwbc-text);
    appearance: auto;
    cursor: pointer;
    transition: border-color .15s;
}
.dwbc-select:focus {
    outline: none;
    border-color: var(--dwbc-accent);
    box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

/* ── Specs above (bow specs + addons, full-width above grid) ───── */
.dwbc-specs-above {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}
.dwbc-specs-above .dwbc-section {
    flex: 1;
    min-width: 240px;
    margin-bottom: 0;
}

/* ── Swatches ─ responsive CSS grid, fills 100% of column ───────── */
.dwbc-swatches {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 56px, 1fr ) );
    gap: 6px;
    width: 100%;
    isolation: isolate; /* new stacking context so z-index works within */
}
/* Hidden input sits outside the grid */
.dwbc-swatches input[type=hidden] {
    display: none;
}

.dwbc-swatch {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    background: none;
    border: 2px solid var(--dwbc-border);
    border-radius: var(--dwbc-radius-sm);
    cursor: pointer;
    transition: border-color .15s, transform .1s, box-shadow .15s;
    width: 100%;
    min-height: var(--dwbc-swatch-size);
    overflow: hidden;
}
.dwbc-swatch:hover {
    border-color: var(--dwbc-accent);
    transform: scale(1.04);
    z-index: 2;
    overflow: visible;
}
.dwbc-swatch.is-selected {
    border-color: var(--dwbc-accent);
    box-shadow: 0 0 0 2px var(--dwbc-accent);
    z-index: 1;
    overflow: visible;
}
.dwbc-swatch.is-selected::after {
    content: '✓';
    position: absolute;
    top: 1px; right: 2px;
    font-size: 9px;
    color: #fff;
    background: var(--dwbc-accent);
    border-radius: 50%;
    width: 13px; height: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Bare (no anodizing) — icon instead of color swatch */
.dwbc-swatch.is-bare { background: var(--dwbc-bg-section); }
.dwbc-swatch-bare {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: var(--dwbc-swatch-size);
    font-size: 20px;
    color: var(--dwbc-text-muted);
    line-height: 1;
}

.dwbc-swatch-color {
    display: block;
    width: 100%;
    height: var(--dwbc-swatch-size);
    border-radius: 2px 2px 0 0;
}

.dwbc-swatch-special {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: var(--dwbc-swatch-size);
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    color: var(--dwbc-accent);
    background: var(--dwbc-accent-light);
    padding: 2px;
    line-height: 1.2;
}

/* Color name label */
.dwbc-swatch-name {
    display: block;
    width: 100%;
    font-size: 0.7em;
    font-weight: 500;
    color: var(--dwbc-text-muted);
    text-align: center;
    padding: 2px 2px 1px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dwbc-swatch.is-selected .dwbc-swatch-name { color: var(--dwbc-accent); font-weight: 700; }

.dwbc-swatch-price {
    font-size: 0.8em;
    font-weight: 600;
    color: var(--dwbc-accent);
    padding: 0 2px 2px;
    line-height: 1;
}

/* ── Price bar — static, compact, unobtrusive ───────────────────── */
.dwbc-price-bar {
    grid-column: 2 / 3;
    padding: 12px 0 4px;
    border-top: 1px solid var(--dwbc-border);
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Shared row layout: label left, value right */
.dwbc-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.dwbc-price-label {
    font-size: 0.7em;
    color: var(--dwbc-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.dwbc-base-price {
    font-size: 0.875em;
    font-weight: 500;
    color: var(--dwbc-text-muted);
}

.dwbc-price-breakdown {
    font-size: 0.65em;
    color: var(--dwbc-text-muted);
    padding: 4px 0 2px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.dwbc-price-breakdown:empty { display: none; }

.dwbc-breakdown-item {
    display: flex;
    justify-content: space-between;
    font-size: 1em;
    color: var(--dwbc-text-muted);
    padding: 1px 0;
    border-bottom: 1px dashed var(--dwbc-border);
}

.dwbc-price-row--total {
    border-top: 1px solid var(--dwbc-border);
    padding-top: 6px;
    margin-top: 4px;
}

.dwbc-total-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--dwbc-text);
}

/* ── Modal ──────────────────────────────────────────────────────── */
.dwbc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
}

.dwbc-modal {
    background: var(--dwbc-bg);
    border-radius: 12px;
    padding: 28px;
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--dwbc-shadow-lg);
    position: relative;
}

/* Two-column body: SVG left, config table right */
.dwbc-modal-body {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 24px;
    margin-bottom: 20px;
    align-items: start;
}

.dwbc-modal-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #656565;
    border-radius: var(--dwbc-radius);
    padding: 16px;
    min-height: 320px;
}
.dwbc-modal-preview svg,
.dwbc-modal-preview img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
}
.dwbc-modal-preview .dwbc-no-preview {
    color: rgba(255,255,255,.4);
    font-size: 0.7em;
}

.dwbc-modal-details { display: flex; flex-direction: column; }

.dwbc-modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75em;
    margin-bottom: 0;
}
.dwbc-modal-table td {
    padding: 6px 0;
    border-bottom: 1px solid var(--dwbc-border);
    vertical-align: middle;
}
.dwbc-modal-table td:first-child {
    color: var(--dwbc-text-muted);
    width: 44%;
    padding-right: 8px;
    font-size: 0.7em;
}
.dwbc-modal-table td:last-child {
    font-weight: 500;
}
.dwbc-modal-total td {
    font-weight: 700;
    font-size: 0.9em;
    border-bottom: none;
    padding-top: 10px;
    color: var(--dwbc-accent);
}

@media (max-width: 600px) {
    .dwbc-modal-body { grid-template-columns: 1fr; }
    .dwbc-modal { max-width: 100%; padding: 18px; }
}

/* ── Special finish popup ─────────────────────────────────────── */
.dwbc-special-popup-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 100000;
    backdrop-filter: blur(3px);
}
.dwbc-special-popup {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.dwbc-special-popup-inner {
    background: var(--dwbc-bg);
    border-radius: 14px;
    padding: 32px 28px 24px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--dwbc-shadow-lg);
    text-align: center;
    position: relative;
}
.dwbc-special-popup-close {
    position: absolute;
    top: 12px; right: 14px;
    background: none; border: none;
    font-size: 18px; cursor: pointer;
    color: var(--dwbc-text-muted); padding: 4px;
    line-height: 1;
}
.dwbc-special-popup-close:hover { color: var(--dwbc-text); }
.dwbc-special-popup-note {
    font-size: 0.8em;
    line-height: 1.7;
    color: var(--dwbc-text-muted);
    margin-bottom: 14px;
    text-align: left;
}
.dwbc-special-popup-link {
    display: inline-block;
    font-size: 0.75em;
    color: var(--dwbc-accent);
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 600;
}
.dwbc-special-popup-link:hover { text-decoration: underline; }
.dwbc-special-popup-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.dwbc-special-popup-confirm {
    padding: 9px 18px;
    background: var(--dwbc-accent);
    color: #fff; border: none;
    border-radius: var(--dwbc-radius);
    font-size: 0.8em; font-weight: 700;
    cursor: pointer; font-family: inherit;
    transition: background .15s;
}
.dwbc-special-popup-confirm:hover { background: var(--dwbc-accent-dark); }

.dwbc-modal-actions {
    display: flex;
    gap: 10px;
}

.dwbc-modal-edit {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--dwbc-border);
    border-radius: var(--dwbc-radius);
    background: var(--dwbc-bg);
    font-size: 0.875em;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s;
}
.dwbc-modal-edit:hover { border-color: var(--dwbc-accent); }

/* Shared: modal confirm + builder add-to-cart buttons */
.dwbc-modal-confirm,
.dwbc-add-to-cart-btn {
    background: var(--dwbc-accent);
    color: #fff;
    border: none;
    border-radius: var(--dwbc-radius);
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, transform .1s;
}
.dwbc-modal-confirm:hover,
.dwbc-add-to-cart-btn:hover  { background: var(--dwbc-accent-dark); }
.dwbc-modal-confirm:active,
.dwbc-add-to-cart-btn:active { transform: scale(.98); }
.dwbc-modal-confirm:disabled { background: var(--dwbc-text-muted); cursor: not-allowed; }

/* Modal confirm — full width inside modal actions */
.dwbc-modal-confirm {
    flex: 2;
    padding: 12px 20px;
    font-size: 0.9em;
}

/* Builder page Add to Cart button */
.dwbc-add-to-cart-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.8em;
    white-space: nowrap;
}
.dwbc-cart-arrow { font-size: 0.875em; }

/* Price bar actions row — full width, buttons side by side */
.dwbc-price-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.dwbc-price-bar-actions .dwbc-add-to-cart-btn {
    flex: 1;
    justify-content: center;
}

.dwbc-modal-pdf {
    padding: 10px 14px;
    background: var(--dwbc-bg-section);
    border: 1px solid var(--dwbc-border);
    border-radius: var(--dwbc-radius);
    font-size: 0.8em;
    font-weight: 600;
    color: var(--dwbc-text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: border-color .15s, color .15s;
    white-space: nowrap;
}
.dwbc-modal-pdf:hover { border-color: var(--dwbc-accent); color: var(--dwbc-accent); }

.dwbc-modal-feedback {
    margin-top: 14px;
    font-size: 0.8em;
    text-align: center;
    font-weight: 600;
    min-height: 20px;
}
.dwbc-modal-feedback.is-success { color: var(--dwbc-success); }
.dwbc-modal-feedback.is-error   { color: var(--dwbc-error); }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 860px) {
    .dwbc-configurator {
        grid-template-columns: 1fr;
    }
    .dwbc-preview-wrap {
        grid-row: 1;
        grid-column: 1;
        height: 50vh;
        position: relative;
        top: auto;
    }
    .dwbc-preview-img-wrap {
        height: 50vh;
    }
    .dwbc-preview-svg-wrap svg {
        height: 50vh;
        width: auto;
    }
    .dwbc-sections {
        grid-row: 2;
        grid-column: 1;
    }
    .dwbc-price-bar {
        grid-column: 1;
        grid-row: 3;
    }
    .dwbc-specs-above .dwbc-section {
        min-width: 100%;
    }
    .dwbc-total-price { font-size: 20px; }
}

/* ================================================================
   Standalone builder page additions
   ================================================================ */

.dwbc-builder-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 80px;
}

/* ── Model selector bar ─────────────────────────────────────────── */
.dwbc-model-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dwbc-model-bar-label {
    font-size: 0.8em;
    font-weight: 600;
    color: var(--dwbc-text-muted);
    white-space: nowrap;
}

.dwbc-model-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    text-transform: uppercase;
}

.dwbc-model-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 18px;
    border: 2px solid var(--dwbc-border);
    border-radius: var(--dwbc-radius);
    text-decoration: none !important;
    color: var(--dwbc-text-muted) !important;
    font-size: 0.875em;
    font-weight: 600;
    transition: border-color .15s, color .15s;
    background: var(--dwbc-bg);
}

.dwbc-model-tab:hover {
    border-color: var(--dwbc-accent);
    color: var(--dwbc-accent) !important;
}

.dwbc-model-tab.is-active {
    border-color: var(--dwbc-accent);
    background: var(--dwbc-accent-light);
    color: var(--dwbc-accent) !important;
}

.dwbc-model-tab-price {
    font-size: 0.7em;
    font-weight: 400;
    margin-top: 2px;
    opacity: .7;
}

/* ── Model header ───────────────────────────────────────────────── */
.dwbc-model-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    background: var(--dwbc-bg-section);
    border: 1px solid var(--dwbc-border);
    border-left: 4px solid var(--dwbc-accent);
    border-radius: var(--dwbc-radius);
    padding: 20px 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dwbc-model-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--dwbc-text);
}

.dwbc-model-desc {
    font-size: 0.875em;
    color: var(--dwbc-text-muted);
    margin: 0;
}

.dwbc-model-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

.dwbc-spec-pill {
    display: flex;
    flex-direction: column;
    background: var(--dwbc-bg);
    border: 1px solid var(--dwbc-border);
    border-radius: var(--dwbc-radius-sm);
    padding: 8px 12px;
    min-width: 130px;
}

.dwbc-spec-size {
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--dwbc-accent);
    margin-bottom: 3px;
}

.dwbc-spec-detail {
    font-size: 0.7em;
    color: var(--dwbc-text-muted);
    line-height: 1.5;
}

@media (max-width: 680px) {
    .dwbc-model-header { flex-direction: column; }
    .dwbc-model-specs  { margin-left: 0; }
}

/* ================================================================
   Button groups (spec selectors)
   ================================================================ */

.dwbc-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dwbc-opt-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 14px 8px;
    min-width: 72px;
    background: var(--dwbc-bg);
    border: 2px solid var(--dwbc-border);
    border-radius: var(--dwbc-radius);
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .1s;
    text-align: center;
    font-family: inherit;
    gap: 2px;
}
.dwbc-opt-btn:hover {
    border-color: var(--dwbc-accent);
    background: var(--dwbc-accent-light);
    transform: translateY(-1px);
    z-index: 1;
}
.dwbc-opt-btn.is-selected {
    border-color: var(--dwbc-accent);
    background: var(--dwbc-accent-light);
    box-shadow: 0 0 0 2px var(--dwbc-accent);
}
.dwbc-opt-btn.is-selected::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--dwbc-accent);
}

.dwbc-btn-label {
    font-size: 1em;
    font-weight: 600;
    color: var(--dwbc-text);
    line-height: 1.2;
}
.dwbc-opt-btn.is-selected .dwbc-btn-label,
.dwbc-addon-yes.is-selected .dwbc-btn-label,
.dwbc-module-yes.is-selected .dwbc-btn-label { color: var(--dwbc-accent); }

.dwbc-btn-sub {
    font-size: 0.8em;
    color: var(--dwbc-text-muted);
    line-height: 1.2;
}

.dwbc-btn-price {
    font-size: 0.8em;
    font-weight: 700;
    color: var(--dwbc-success);
    margin-top: 2px;
}

/* ── Field label row ──────────────────────────────────────────── */
.dwbc-field-label-row {
    display: block;
    margin-bottom: 6px;
}

/* ── Field description (shown only when set in admin) ─────────── */
.dwbc-field-description {
    font-size: 0.6em;
    color: var(--dwbc-text-muted);
    line-height: 1.5;
    margin-bottom: 10px;
}
.dwbc-field-description a {
    color: var(--dwbc-accent);
    text-decoration: none;
    margin-left: 6px;
}
.dwbc-field-description a:hover { text-decoration: underline; }

@media (max-width: 480px) {
    .dwbc-btn-group { gap: 6px; }
    .dwbc-opt-btn   { min-width: 60px; padding: 8px 10px; }
    .dwbc-btn-label { font-size: 0.875em; }
}

/* ── Image swatches ──────────────────────────────────────────────── */
.dwbc-swatch-image {
    display: block;
    width: 100%;
    height: var(--dwbc-swatch-size);
    background-size: cover;
    background-position: center;
    border-radius: 3px 3px 0 0;
}

/* ── Multi-select button group ───────────────────────────────────── */
.dwbc-btn-group--multi .dwbc-opt-btn {
    border-style: dashed;
}
.dwbc-btn-group--multi .dwbc-opt-btn:hover,
.dwbc-btn-group--multi .dwbc-opt-btn.is-selected {
    border-style: solid;
}
.dwbc-btn-group--multi .dwbc-opt-btn.is-selected::after {
    /* checkmark instead of triangle */
    content: '✓';
    position: absolute;
    top: 3px; right: 4px;
    font-size: 9px;
    color: var(--dwbc-accent);
    border: none;
    width: auto; height: auto;
}

/* ── Add-on toggle ───────────────────────────────────────────────── */
.dwbc-addon-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: visible;
}
.dwbc-addon-toggle {
    display: inline-flex;
    gap: 8px;
}
.dwbc-addon-yes.is-selected {
    background: var(--dwbc-accent-light);
    border-color: var(--dwbc-accent);
    color: var(--dwbc-accent);
}
.dwbc-addon-color-label {
    font-size: 0.75em;
    font-weight: 600;
    color: var(--dwbc-text-muted);
    margin-bottom: 4px;
}

/* ── Module select ───────────────────────────────────────────────── */
.dwbc-module-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: visible;
}
.dwbc-module-picker {
    padding: 12px;
    background: var(--dwbc-bg-section);
    border: 1px solid var(--dwbc-border);
    border-radius: var(--dwbc-radius);
}
.dwbc-module-pick-label {
    display: block;
    margin-bottom: 10px;
}
.dwbc-module-yes.is-selected {
    background: var(--dwbc-accent-light);
    border-color: var(--dwbc-accent);
}

/* ── Share button — styled like a secondary opt-btn ──────────────── */
.dwbc-share-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 7px 12px;
    background: transparent;
    border: 1px solid var(--dwbc-border);
    border-radius: var(--dwbc-radius);
    font-size: 0.75em;
    font-weight: 600;
    color: var(--dwbc-text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: border-color .15s, color .15s, background .15s;
    white-space: nowrap;
}
.dwbc-share-btn:hover {
    border-color: var(--dwbc-accent);
    color: var(--dwbc-accent);
    background: var(--dwbc-accent-light);
}
.dwbc-share-btn.is-copied {
    border-color: var(--dwbc-success);
    color: var(--dwbc-success);
    background: #f0fdf4;
}
.dwbc-share-icon { font-size: 0.8em; }

.dwbc-share-feedback {
    font-size: 0.7em;
    font-weight: 500;
    color: var(--dwbc-success);
    padding: 2px 0;
    text-align: right;
    max-height: 0;
    overflow: hidden;
    transition: max-height .2s ease;
}
.dwbc-share-feedback.is-visible { max-height: 24px; }

@media (max-width: 680px) {
    .dwbc-price-bar-actions { width: 100%; justify-content: flex-end; }
    .dwbc-add-to-cart-btn   { flex: 1; justify-content: center; }
}

/* ── Product page CTA button ─────────────────────────────────────── */
/* ── Production lead time notice (product page) ──────────────── */
.dwbc-lead-time {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    padding: 10px 14px;
    margin: 0 0 12px;
    border-radius: 4px;
    font-size: 0.8em;
    line-height: 1.4;
    border-style: solid;
    border-width: 1px 1px 1px 4px;
}
/* Amber (default) */
.dwbc-lead-time--amber {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #f59e0b;
}
.dwbc-lead-time--amber .dwbc-lead-time-label,
.dwbc-lead-time--amber .dwbc-lead-time-note  { color: #92400e; }
.dwbc-lead-time--amber .dwbc-lead-time-value { color: #78350f; }
/* Green */
.dwbc-lead-time--green {
    background: #f0fdf4;
    border-color: #bbf7d0;
    border-left-color: #16a34a;
}
.dwbc-lead-time--green .dwbc-lead-time-label,
.dwbc-lead-time--green .dwbc-lead-time-note  { color: #166534; }
.dwbc-lead-time--green .dwbc-lead-time-value { color: #14532d; }
/* Red */
.dwbc-lead-time--red {
    background: #fef2f2;
    border-color: #fecaca;
    border-left-color: #ef4444;
}
.dwbc-lead-time--red .dwbc-lead-time-label,
.dwbc-lead-time--red .dwbc-lead-time-note  { color: #991b1b; }
.dwbc-lead-time--red .dwbc-lead-time-value { color: #7f1d1d; }

.dwbc-lead-time-label { font-weight: 600; white-space: nowrap; }
.dwbc-lead-time-value { font-weight: 700; }
.dwbc-lead-time-note  { width: 100%; margin: 4px 0 0; font-size: 0.75em; }

.dwbc-product-cta { margin: 16px 0; }
.dwbc-cta-button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: var(--dwbc-accent);
    color: #fff !important;
    border-radius: var(--dwbc-radius);
    font-size: 0.9em;
    font-weight: 700;
    text-decoration: none !important;
    transition: filter .15s, transform .1s;
    box-sizing: border-box;
}
.dwbc-cta-button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.dwbc-cta-icon  { font-size: 20px; width: 20px; height: 20px; line-height: 1; flex-shrink: 0; }
.dwbc-cta-arrow { margin-left: auto; font-size: 18px; }
.dwbc-cta-note  { font-size: 0.75em; color: var(--dwbc-text-muted); margin: 8px 0 0; }

/* ── Bow product page: hide WC add-to-cart form ──────────────────── */
.dwbc-bow-product form.cart,
.dwbc-bow-product .quantity,
.dwbc-bow-product .single_add_to_cart_button { display: none !important; }

/* ── Split color redesign ────────────────────────────────────────── */
.dwbc-split-single-icon,
.dwbc-split-dual-icon {
    font-size: 20px;
    width: 100%;
    height: var(--dwbc-swatch-size);
    background: transparent;
    color: var(--dwbc-text-muted);
}
.dwbc-split-color-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;           /* small gap — toggle is tight above the swatch grid */
}
.dwbc-split-toggle-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.dwbc-split-toggle-note {
    font-size: 0.7em;
    color: var(--dwbc-text-muted);
}
/* The toggle only needs 2 cells — don't stretch to fill whole width */
.dwbc-split-toggle-group {
    grid-template-columns: repeat(2, minmax(56px, 80px)) !important;
    width: auto !important;
}
.dwbc-split-cols {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    overflow: visible;
}
.dwbc-split-color-col {
    flex: 1;
    min-width: 180px;
    overflow: visible;
}
.dwbc-split-color-label {
    display: inline-block;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--dwbc-accent);
    background: var(--dwbc-accent-light);
    border-radius: 4px;
    padding: 2px 8px;
    margin-bottom: 8px;
}
/* Single wrap visibility controlled entirely by JS updateConditionalFields */
.dwbc-single-color-wrap { }
