/* ============================================================
   PANIER CUSTOM BOX BUILDER - STYLE FINAL
   ============================================================ */

/* Reset et Container */
.cbb-cart-page {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.cbb-cart-page-title {
    font-size: 32px;
    font-weight: 600;
    color: #F98C6E;
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

/* Layout principal */
.cbb-cart-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 30px;
    align-items: start;
}

/* ============ COLONNE PRINCIPALE (GAUCHE) ============ */
.cbb-cart-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Sections communes */
.cbb-gift-box-section,
.cbb-extras-section {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.cbb-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #2D3748;
    margin: 0 0 24px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 2px solid #F7FAFC;
}

.cbb-section-icon {
    font-size: 24px;
}

/* Box line (pour chaque box) */
.cbb-box-line {
    background: #F7FAFC;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #E2E8F0;
}

.cbb-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E2E8F0;
}

.cbb-box-title-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.cbb-box-qty-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 8px;
    padding: 6px 12px;
    border: 1px solid #E2E8F0;
}

.cbb-box-qty-minus,
.cbb-box-qty-plus {
    background: #F98C6E;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cbb-box-qty-minus:hover,
.cbb-box-qty-plus:hover {
    background: #E67A5C;
    transform: scale(1.05);
}

.cbb-box-qty-display {
    font-weight: 600;
    color: #2D3748;
    min-width: 30px;
    text-align: center;
}

.cbb-box-title {
    font-size: 18px;
    font-weight: 600;
    color: #F98C6E;
    margin: 0;
}

.cbb-box-actions {
    display: flex;
    gap: 8px;
}

.cbb-modify-box-btn,
.cbb-remove-box-btn {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cbb-modify-box-btn {
    background: white;
    color: #F98C6E;
    border: 1px solid #F98C6E;
}

.cbb-modify-box-btn:hover {
    background: #F98C6E;
    color: white;
}

.cbb-remove-box-btn {
    background: #FEE2E2;
    color: #DC2626;
    padding: 6px 12px;
    border: none;
}

.cbb-remove-box-btn:hover {
    background: #DC2626;
    color: white;
}

/* Contenu de la box */
.cbb-box-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.extras-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: white;
    border-radius: 8px;
}

.extras-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.extras-name {
    font-size: 14px;
    font-weight: 500;
    color: #2D3748;
}

.extras-qty,
.extras-message {
    font-size: 12px;
    color: #718096;
}

.extras-message {
    font-style: italic;
}

.extras-price {
    font-size: 15px;
    font-weight: 600;
    color: #F98C6E;
}

/* Total de la box */
.cbb-box-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid #E2E8F0;
    font-size: 16px;
}

.cbb-box-total strong {
    color: #2D3748;
}

.cbb-box-total strong:last-child {
    color: #F98C6E;
    font-size: 18px;
}

/* Section Hors de boîte */
.extras-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.extras-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.extras-line[data-cart-key] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #F7FAFC;
    border-radius: 10px;
    margin-bottom: 12px;
}

.extras-line[data-cart-key] .extras-info {
    display: flex;
    flex-direction: row;
    gap: 16px;
    flex: 1;
}

.extras-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.extras-qty-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cbb-qty-minus,
.cbb-qty-plus {
    background: white;
    border: 1px solid #E2E8F0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    color: #4A5568;
    transition: all 0.2s ease;
}

.cbb-qty-minus:hover,
.cbb-qty-plus:hover {
    background: #F98C6E;
    color: white;
    border-color: #F98C6E;
}

.extras-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.cbb-remove-extra-btn {
    background: none;
    border: none;
    color: #DC2626;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cbb-remove-extra-btn:hover {
    color: #991B1B;
}

/* Sous-totaux */
.cbb-section-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid #E2E8F0;
    font-size: 16px;
    font-weight: 600;
}

.cbb-section-subtotal-label {
    color: #4A5568;
}

.cbb-section-subtotal-amount {
    color: #F98C6E;
    font-size: 18px;
}

/* ============ SIDEBAR (DROITE) ============ */
.cbb-cart-sidebar {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Panneau Détails des prix */
.cbb-price-details-panel {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.cbb-price-details-title {
    font-size: 20px;
    font-weight: 600;
    color: #2D3748;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #F7FAFC;
}

.cbb-price-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 14px;
}

.cbb-price-line-label {
    color: #4A5568;
}

.cbb-price-line-value {
    font-weight: 600;
    color: #2D3748;
}

.cbb-price-line.subtotal {
    border-top: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
    margin: 8px 0;
    font-size: 15px;
}

.cbb-price-line.total {
    border-top: 2px solid #2D3748;
    margin-top: 12px;
    padding-top: 16px;
    font-size: 18px;
}

.cbb-price-line.total .cbb-price-line-label {
    font-weight: 700;
    color: #2D3748;
}

.cbb-price-line.total .cbb-price-line-value {
    font-weight: 700;
    color: #F98C6E;
    font-size: 22px;
}

.cbb-price-line.loyalty-points .cbb-price-line-value {
    color: #10B981;
}

/* Code promotionnel */
.cbb-promo-code-section {
    margin: 20px 0;
}

.cbb-promo-code-input-group {
    display: flex;
    gap: 8px;
}

.cbb-promo-code-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.cbb-promo-code-input:focus {
    border-color: #F98C6E;
}

.cbb-promo-code-apply-btn {
    padding: 12px 24px;
    background: #F98C6E;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cbb-promo-code-apply-btn:hover {
    background: #e67a5a;
    transform: translateY(-1px);
}

/* Bouton checkout */
.cbb-checkout-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: #F98C6E;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin-top: 16px;
}

.cbb-checkout-btn:hover {
    background: #e67a5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 140, 110, 0.4);
    text-decoration: none;
    color: white;
}

/* Bouton Créer nouvelle box */
.cbb-create-box-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: white;
    color: #F98C6E;
    border: 2px solid #F98C6E;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.cbb-create-box-btn:hover {
    background: #F98C6E;
    color: white;
    transform: translateY(-1px);
    text-decoration: none;
}

/* Message personnalisé */
.cbb-custom-message-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.cbb-custom-message-text {
    font-size: 14px;
    color: #4A5568;
    margin: 0 0 12px 0;
}

.cbb-custom-message-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease;
}

.cbb-custom-message-textarea:focus {
    border-color: #F98C6E;
}

.cbb-submit-btn {
    width: 100%;
    padding: 10px 20px;
    background: #F98C6E;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s ease;
}

.cbb-submit-btn:hover {
    background: #e67a5a;
}

/* ============ PANIER VIDE ============ */
.cbb-cart-empty {
    text-align: center;
    padding: 80px 40px;
}

.cbb-cart-empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.cbb-cart-empty-title {
    font-size: 28px;
    font-weight: 600;
    color: #2D3748;
    margin: 0 0 12px 0;
}

.cbb-cart-empty-text {
    font-size: 16px;
    color: #718096;
    margin: 0 0 32px 0;
}

.cbb-cart-empty-cta {
    display: inline-block;
    padding: 14px 32px;
    background: #F98C6E;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.cbb-cart-empty-cta:hover {
    background: #e67a5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 140, 110, 0.3);
    text-decoration: none;
    color: white;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .cbb-cart-layout {
        grid-template-columns: 1fr;
    }

    .cbb-cart-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .cbb-cart-page {
        padding: 0 12px;
        margin: 20px auto;
    }

    .cbb-cart-page-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .cbb-gift-box-section,
    .cbb-extras-section,
    .cbb-price-details-panel {
        padding: 20px;
        border-radius: 12px;
    }

    .cbb-box-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .extras-line[data-cart-key] {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .extras-actions {
        flex-direction: row;
        justify-content: space-between;
    }
}
