.kbp-box-calculator {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
    font-family: inherit;
}

/* -------- FORM COLUMN -------- */

.kbp-form-column {
    min-width: 0;
}

.kbp-field-group {
    margin-bottom: 28px;
}

.kbp-field-group h4 {
    margin: 0 0 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
}

.kbp-dims-row {
    display: flex;
    gap: 10px;
}

.kbp-dims-row input,
#kbp_qty {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d5d5d5;
    border-radius: 6px;
    font-size: 0.95rem;
}

#kbp_qty {
    max-width: 160px;
}

/* -------- SWATCHES -------- */

.kbp-swatch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}

.kbp-swatch {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border: 2px solid #e2e2e2;
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.kbp-swatch:hover {
    border-color: #b8b8b8;
}

.kbp-swatch.is-selected {
    border-color: #2c6e49;
    box-shadow: 0 0 0 1px #2c6e49;
}

.kbp-swatch input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.kbp-swatch-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    overflow: hidden;
    background: #f4f4f4;
}

.kbp-swatch-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.kbp-swatch-label {
    font-size: 0.8rem;
    text-align: center;
    line-height: 1.2;
    color: #333;
}

/* -------- PRICE BREAKS TABLE -------- */

.kbp-price-breaks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.kbp-price-breaks-table th,
.kbp-price-breaks-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #ececec;
}

.kbp-price-breaks-table th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #888;
    border-bottom: 1px solid #ddd;
}

.kbp-price-breaks-table .kbp-tier-qty,
.kbp-price-breaks-table .kbp-tier-price {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #333;
    white-space: nowrap;
}

.kbp-price-breaks-table tr.is-active-tier {
    background: #eaf3ee;
}

.kbp-price-breaks-table tr.is-active-tier td {
    font-weight: 600;
    color: #1f4a30;
}

.kbp-price-breaks-note {
    margin: 8px 0 0;
    font-size: 0.75rem;
    color: #888;
}

/* -------- MIN ORDER WARNING -------- */

.kbp-min-order-warning {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 6px;
    background: #fdecec;
    color: #a33a3a;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* -------- STICKY PREVIEW COLUMN -------- */

.kbp-preview-column {
    position: relative;
}

.kbp-preview-sticky {
    position: sticky;
    top: 24px;
    border: 1px solid #e2e2e2;
    border-radius: 12px;
    padding: 20px;
    background: #fafafa;
}

.kbp-preview-title {
    margin: 0 0 14px;
    font-size: 1.05rem;
}

.kbp-preview-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ececec;
    margin-bottom: 16px;
}

.kbp-preview-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.kbp-preview-summary {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kbp-preview-summary li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #333;
}

.kbp-preview-swatch-icon {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    overflow: hidden;
    flex: 0 0 auto;
    background: #eee;
}

.kbp-preview-swatch-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kbp-preview-dims-icon,
.kbp-preview-qty-icon {
    width: 28px;
    text-align: center;
    color: #999;
    flex: 0 0 auto;
}

.kbp-preview-price {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 14px;
    margin-bottom: 14px;
    border-top: 1px solid #e2e2e2;
}

.kbp-price-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

#kbp_price {
    font-size: 1.6rem;
    font-weight: 600;
}

.kbp-add-btn {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: #279989;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.kbp-add-btn:hover {
    background: #1f7d70;
}

.kbp-add-btn:disabled {
    background: #94c2bb;
    cursor: not-allowed;
}

/* -------- RESPONSIVE -------- */

@media (max-width: 780px) {
    .kbp-box-calculator {
        grid-template-columns: 1fr;
    }

    .kbp-preview-sticky {
        position: static;
    }
}