/* Custom Box Builder — premium gift-box experience */
.cbb-hero {
    background: linear-gradient(135deg, #fff5f8 0%, #fce8ef 45%, #fff 100%);
    border-radius: 24px;
    padding: 48px 32px;
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
}
.cbb-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(232, 76, 136, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}
.cbb-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 12px;
}
.cbb-type-card {
    background: #fff;
    border: 2px solid #f5ebe8;
    border-radius: 20px;
    padding: 28px 24px;
    height: 100%;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    text-decoration: none;
    display: block;
    color: inherit;
}
.cbb-type-card:hover {
    border-color: #e84c88;
    box-shadow: 0 16px 40px rgba(232, 76, 136, 0.14);
    transform: translateY(-4px);
    color: inherit;
}
.cbb-type-card .cbb-slots-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff5f8;
    color: #e84c88;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 14px;
}
.cbb-type-card .cbb-price {
    font-size: 1.35rem;
    font-weight: 600;
    color: #e84c88;
    margin: 12px 0 16px;
}
.cbb-builder-wrap {
    background: #faf8f7;
    border-radius: 24px;
    padding: 28px;
    position: sticky;
    top: 100px;
}
.cbb-visual-box {
    background: linear-gradient(180deg, #fff 0%, #fdf6f8 100%);
    border: 2px dashed #e8d4dc;
    border-radius: 20px;
    padding: 24px 16px 20px;
    min-height: 280px;
    margin-bottom: 24px;
    box-shadow: inset 0 2px 12px rgba(232, 76, 136, 0.06);
}
.cbb-visual-box.cbb-box-full {
    border-style: solid;
    border-color: #e84c88;
    box-shadow: 0 8px 32px rgba(232, 76, 136, 0.12);
}
.cbb-box-lid {
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #b89aa6;
    margin-bottom: 16px;
    font-weight: 600;
}
.cbb-slots-grid {
    display: grid;
    gap: 12px;
    justify-content: center;
}
.cbb-slots-grid.slots-3 {
    grid-template-columns: repeat(3, 1fr);
    max-width: 280px;
    margin: 0 auto;
}
.cbb-slots-grid.slots-6 {
    grid-template-columns: repeat(3, 1fr);
    max-width: 300px;
    margin: 0 auto;
}
.cbb-slot {
    aspect-ratio: 1;
    border-radius: 14px;
    border: 2px dashed #e0d0d6;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}
.cbb-slot:hover {
    border-color: #e84c88;
}
.cbb-slot.cbb-slot-filled {
    border-style: solid;
    border-color: #f0c4d4;
    padding: 4px;
}
.cbb-slot.cbb-slot-active {
    border-color: #e84c88;
    box-shadow: 0 0 0 3px rgba(232, 76, 136, 0.25);
}
.cbb-slot-empty i {
    font-size: 1.5rem;
    color: #ddd0d6;
}
.cbb-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}
.cbb-slot-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}
.cbb-slot-filled:hover .cbb-slot-remove {
    display: flex;
}
.cbb-product-pick {
    background: #fff;
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    height: 100%;
}
.cbb-product-pick:hover:not(.disabled) {
    border-color: #e84c88;
    box-shadow: 0 8px 24px rgba(232, 76, 136, 0.12);
    transform: translateY(-2px);
}
.cbb-product-pick.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.cbb-product-pick img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 8px;
}
.cbb-product-pick h4 {
    font-size: 14px;
    margin: 0 0 4px;
    line-height: 1.3;
}
.cbb-options-block {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #f0ebe8;
}
.cbb-options-block h5 {
    font-size: 15px;
    margin-bottom: 14px;
    font-weight: 600;
}
.cbb-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}
.cbb-radio-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px solid #f0ebe8;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    margin: 0;
    transition: border-color 0.2s, background 0.2s;
}
.cbb-radio-row input:checked + span,
.cbb-radio-row label:has(input:checked) {
    border-color: #e84c88;
    background: #fff5f8;
}
.cbb-radio-row input {
    accent-color: #e84c88;
}
.cbb-extra-fields {
    display: none;
    margin-top: 14px;
}
.cbb-extra-fields.show {
    display: block;
}
.cbb-price-summary {
    background: linear-gradient(135deg, #e84c88 0%, #d63d78 100%);
    color: #fff;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 20px;
}
.cbb-price-summary .cbb-total-label {
    font-size: 13px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.cbb-price-summary .cbb-total-amount {
    font-size: 1.75rem;
    font-weight: 700;
}
.cbb-price-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    opacity: 0.9;
    margin-top: 6px;
}
.cbb-progress {
    height: 6px;
    background: #f0ebe8;
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 16px;
}
.cbb-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #e84c88, #f5a3c0);
    border-radius: 50px;
    transition: width 0.35s ease;
}
.cbb-box-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.cbb-box-switcher a {
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 50px;
    border: 2px solid #f0ebe8;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
}
.cbb-box-switcher a.active,
.cbb-box-switcher a:hover {
    border-color: #e84c88;
    color: #e84c88;
    background: #fff5f8;
}
.cbb-add-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
@media (max-width: 991px) {
    .cbb-builder-wrap {
        position: static;
        margin-top: 32px;
    }
}
