/* ============================================================================
   WC Box Configurator – Frontend Styles  (v1.1.0)
   ============================================================================ */

:root {
    --wcbc-primary:   #222222;
    --wcbc-primary-d: #333;
    --wcbc-text:      #1a1a1a;
    --wcbc-muted:     #666;
    --wcbc-border:    #e0e0e0;
    --wcbc-bg:        #f8f8f8;
    --wcbc-white:     #ffffff;
    --wcbc-radius:    8px;
    --wcbc-shadow:    0 2px 8px rgba(0,0,0,.08);
}

/* ---- Wrapper ---- */
.wcbc-configurator {
    font-family: inherit;
    color: var(--wcbc-text);
    /* max-width: 1100px; */
    /* margin: 32px auto; */
}

body.footer-on-bottom #inner-wrap {
    padding-top: 80px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}

/* ============================================================================
   STEP PROGRESS BAR
   ============================================================================ */

.wcbc-steps-header {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.wcbc-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: default;
    flex-shrink: 0;
    width: 72px;
    text-align: center;
}

.wcbc-step-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--wcbc-border);
    background: var(--wcbc-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .25s, border-color .25s;
    position: relative;
}

.wcbc-step-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--wcbc-muted);
    transition: fill .25s;
}

.wcbc-step-num  { display: none; }

.wcbc-step-label {
    font-size: 10px;
    color: var(--wcbc-muted);
    line-height: 1.3;
}

/* Active */
.wcbc-step-indicator.active .wcbc-step-icon {
    background: var(--wcbc-primary);
    border-color: var(--wcbc-primary);
}
.wcbc-step-indicator.active .wcbc-step-icon svg { fill: #fff; }
.wcbc-step-indicator.active .wcbc-step-label    { color: var(--wcbc-primary); font-weight: 600; }

/* Completed */
.wcbc-step-indicator.completed .wcbc-step-icon {
    background: #fff;
    border-color: var(--wcbc-primary);
}
.wcbc-step-indicator.completed .wcbc-step-icon::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wcbc-primary);
    font-size: 17px;
    font-weight: 700;
}
.wcbc-step-indicator.completed .wcbc-step-icon svg { opacity: 0; }

/* Skipped */
.wcbc-step-indicator.wcbc-step-skipped {
    opacity: .3;
    pointer-events: none;
}

/* Separator */
.wcbc-step-separator {
    flex: 1;
    text-align: center;
    color: var(--wcbc-border);
    font-size: 16px;
    padding-top: 14px;
    letter-spacing: 2px;
    min-width: 16px;
}

/* ============================================================================
   GALLERY BADGE
   Rendered by child theme content-single-product.php.
   Styles live in kadence-child/style.css.
   Plugin CSS only provides the --wcbc-primary colour variable reference.
   ============================================================================ */

/* ============================================================================
   STEP CONTENT
   ============================================================================ */

.wcbc-steps-body {
    padding: 32px 0;
    min-height: 280px;
}

.wcbc-step-content {
    display: none;
}
.wcbc-step-content.active {
    display: block;
    animation: wcbc-fadeIn .2s ease;
}

@keyframes wcbc-fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wcbc-step-heading {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid hsla(0, 0%, 100%, 0.2);
}

.wcbc-step-heading-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
}

.wcbc-step-icon-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid #ff7f00;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wcbc-step-icon-lg svg {
    width: 34px;
    height: 34px;
    fill: var(--wcbc-primary);
}

.wcbc-step-heading-num {
    font-size: 11px;
    color: var(--wcbc-muted);
    display: block;
    margin-bottom: 1px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.wcbc-step-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.wcbc-step-desc {
    color: var(--wcbc-muted);
    font-size: 13px;
    margin: 0 0 20px 0;
}

/* ============================================================================
   OPTION CARDS
   ============================================================================ */

.wcbc-option-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

#wcbc-box-type-cards {
    grid-template-columns: 1fr;
    gap: 16px;
}

#wcbc-box-type-cards .wcbc-option-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 16px;
    text-align: left;
}

#wcbc-box-type-cards .wcbc-option-card img {
    width: 48px;
    height: 48px;
    max-height: 48px;
    flex-shrink: 0;
    object-fit: contain;
    margin-bottom: 0;
    border-radius: 6px;
}

#wcbc-box-type-cards .wcbc-card-placeholder {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

#wcbc-box-type-cards .wcbc-card-name {
    font-size: 15px;
}

#wcbc-box-type-cards .wcbc-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.wcbc-card-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--wcbc-primary);
    white-space: nowrap;
    flex-shrink: 0;
    /* margin-right: 8px; */
}

.wcbc-card-price small {
    font-size: 12px;
    font-weight: 400;
    color: var(--wcbc-muted);
}

.wcbc-bar-price-min {
    font-size: 12px;
    color: var(--wcbc-muted);
    white-space: nowrap;
}

#wcbc-box-type-cards .wcbc-card-check {
    top: 50%;
    transform: translateY(-50%);
    right: 14px;
    display: none;
}

.wcbc-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.wcbc-option-card {
    border: 2px solid var(--wcbc-border);
    border-radius: var(--wcbc-radius);
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .1s;
    position: relative;
    background: var(--wcbc-white);
    user-select: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wcbc-option-card:hover {
    border-color: var(--wcbc-primary);
    /* box-shadow: 0 4px 12px rgba(212,160,23,.15); */
    transform: translateY(-2px);
}

.wcbc-option-card.selected {
    border-color: var(--wcbc-primary);
    /* background: #fff8e1; */
}

.wcbc-option-card img {
    width: 100%;
    max-height: 80px;
    object-fit: contain;
    margin-bottom: 8px;
    border-radius: 4px;
}

.wcbc-card-placeholder { font-size: 36px; }

.wcbc-card-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.wcbc-card-meta {
    display: block;
    font-size: 11px;
    color: var(--wcbc-muted);
    margin-top: 3px;
    line-height: 1.2;
}

.wcbc-card-check {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 14px;
    color: var(--wcbc-primary);
    font-weight: 700;
    font-size: 14px;
}

.wcbc-option-card.selected .wcbc-card-check { display: none; }

/* Color swatches */
.wcbc-color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--wcbc-border);
    flex-shrink: 0;
    display: block;
}

/* ============================================================================
   DIMENSIONS
   ============================================================================ */

.wcbc-dimensions-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.wcbc-dim-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 15px;
}

.wcbc-dim-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--wcbc-primary);
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    display: none;
}

.wcbc-dim-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid var(--wcbc-border);
    border-radius: var(--wcbc-radius);
    padding: 8px 12px;
    background: var(--wcbc-white);
    transition: border-color .2s;
}

.wcbc-dim-input-wrap:focus-within { border-color: var(--wcbc-primary); }

.wcbc-dim-input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    background: transparent;
}

.wcbc-unit {
    font-size: 13px;
    color: #565656;
    flex-shrink: 0;
}

/* ============================================================================
   QUANTITY TIERS
   ============================================================================ */

.wcbc-tiers-header,
.wcbc-tier-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 50px;
    gap: 8px;
    align-items: center;
    padding: 8px 0;
}

.wcbc-tiers-header {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    border-bottom: 2px solid #222;
    margin-bottom: 4px;
}

.wcbc-tier-row {
    border-bottom: 1px solid hsla(0, 0%, 13%, 0.236);
    font-size: 14px;
}

.wcbc-tier-row label { cursor: pointer; }

.wcbc-custom-qty {
    margin-top: 24px;
}

.wcbc-custom-qty label {
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
}

.wcbc-custom-qty-wrap {
    margin-top: 20px;
    padding: 16px;
    border: 2px dashed var(--wcbc-border);
    border-radius: var(--wcbc-radius);
}

.wcbc-custom-qty-wrap label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.wcbc-custom-qty-wrap input {
    border: 2px solid var(--wcbc-border);
    border-radius: var(--wcbc-radius);
    padding: 8px 12px;
    width: 120px;
    font-size: 16px;
    transition: border-color .2s;
}
.wcbc-custom-qty-wrap input:focus { border-color: var(--wcbc-primary); outline: none; }

/* ============================================================================
   SUMMARY
   ============================================================================ */

.wcbc-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.wcbc-summary-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--wcbc-border);
    font-size: 14px;
}

.wcbc-s-label {
    width: 40%;
    font-weight: 700;
    color: var(--wcbc-text);
}

.wcbc-price-final {
    background: #f7f7f7;
    border: 2px solid var(--wcbc-primary);
    border-radius: var(--wcbc-radius);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.wcbc-price-unit  { font-size: 15px; margin: 0 0 6px; }
.wcbc-price-total { font-size: 20px; margin: 0 0 6px; color: var(--wcbc-primary); }
.wcbc-price-vat   { font-size: 12px; color: var(--wcbc-muted); margin: 0; }

.wcbc-add-to-cart-wrap { text-align: center; }

/* ============================================================================
   FIXED BOTTOM BAR (replaces inline navigation)
   ============================================================================ */

.wcbc-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding: 16px 0 0;
}

.wcbc-bar-price {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    min-width: 0;
}

.wcbc-bar-price-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--wcbc-muted);
    white-space: nowrap;
}

#wcbc-bar-price-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--wcbc-primary);
    white-space: nowrap;
    line-height: 1.2;
}

.wcbc-bar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.wcbc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border: 2px solid var(--wcbc-primary);
    border-radius: 40px;
    background: transparent;
    color: var(--wcbc-primary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.wcbc-btn-primary {
    background: var(--wcbc-primary);
    color: #fff;
}

.wcbc-btn-primary:hover {
    background: var(--wcbc-primary-d);
    border-color: var(--wcbc-primary-d);
    color: #fff;
}

.wcbc-btn-ghost {
    background: transparent;
    border-color: var(--wcbc-border);
    color: var(--wcbc-muted);
}

.wcbc-btn-ghost:hover {
    border-color: var(--wcbc-primary);
    color: var(--wcbc-primary);
    background: transparent;
}

.wcbc-btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.wcbc-btn-pdf {
    padding: 8px 18px;
    font-size: 13px;
}

/* ============================================================================
   CHECKOUT PDF SECTION
   ============================================================================ */

.wcbc-checkout-pdf-section {
    margin: 24px 0;
    padding: 20px 24px;
    background: #fffbf0;
    border: 2px solid var(--wcbc-primary);
    border-radius: var(--wcbc-radius);
}

.wcbc-checkout-pdf-section h2 {
    font-size: 16px;
    margin: 0 0 6px;
}

.wcbc-checkout-pdf-section p {
    font-size: 13px;
    color: var(--wcbc-muted);
    margin: 0 0 14px;
}

.wcbc-checkout-pdf-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wcbc-order-pdf-section {
    margin-top: 16px;
    padding: 16px;
    background: #fffbf0;
    border: 1px solid var(--wcbc-primary);
    border-radius: var(--wcbc-radius);
    font-size: 13px;
}

/* ============================================================================
   ERRORS / HINTS / UPLOAD
   ============================================================================ */

.wcbc-field-error {
    color: #fd0000;
    font-size: 13px;
    /* min-height: 18px; */
    margin-top: 6px;
    line-height: 1.1;
}

.wcbc-hint {
    font-size: 12px;
    color: var(--wcbc-muted);
    margin-top: 10px;
}

.wcbc-upload-wrap {
    margin-top: 16px;
    padding: 16px;
    border: 2px dashed var(--wcbc-border);
    border-radius: var(--wcbc-radius);
}

.wcbc-upload-wrap label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

/* ============================================================================
   SUMMARY ACTIONS
   ============================================================================ */

.wcbc-summary-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.wcbc-btn-outline {
    background: transparent;
    border: 2px solid var(--wcbc-border);
    color: var(--wcbc-muted);
}

.wcbc-btn-outline:hover {
    border-color: var(--wcbc-primary);
    color: var(--wcbc-primary);
    background: transparent;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media ( max-width: 640px ) {
    .wcbc-steps-body         { padding: 20px 16px; }
    .wcbc-option-cards       { grid-template-columns: 1fr; }
    .wcbc-dimensions-wrap    { grid-template-columns: 1fr; }
    .wcbc-step-label         { display: none; }
    .wcbc-tiers-header,
    .wcbc-tier-row           { grid-template-columns: 1fr 1fr 50px; }
    .wcbc-summary-actions    { flex-direction: column; }
    .wcbc-summary-actions .wcbc-btn { width: 100%; justify-content: center; }
    .wcbc-btn                { padding: 8px 14px; font-size: 13px; }
}

.wcbc-price-placeholder {
    font-size: 12px;
    color: var(--wcbc-muted);
    font-weight: 400;
    font-style: italic;
}
