/* =============================================
   CART & CHECKOUT - STYLES SPÉCIFIQUES
   ============================================= */

/* =============================================
   PANIER - LAYOUT 1 COLONNE / 2 COLONNES
   ============================================= */
.cart-wrapper {
    padding: 2rem 0;
}

.cart-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.cart-primary {
    flex: 1;
    min-width: 0;
}

.cart-sidebar {
    flex: 0 0 320px;
    max-width: 320px;
    position: sticky;
    top: 2rem;
}

.cart-summary {
    background: #f8fafc;
    border: 1px solid var(--woo-border, #e2e8f0);
    border-radius: 10px;
    padding: 1.5rem;
}

.cart-summary h3 {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--primary-color, #2b6cb0);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #e2e8f0;
}

.cart-summary-row:last-child {
    border-bottom: none;
}

.cart-summary-row .label {
    color: #64748b;
}

.cart-summary-row .value {
    font-weight: 500;
    color: #1a202c;
}

.cart-summary-row.total {
    font-size: 1.1rem;
    font-weight: 700;
    padding-top: 0.8rem;
    border-top: 2px solid var(--woo-border, #e2e8f0);
    margin-top: 0.5rem;
}

.cart-summary-row.total .value {
    color: var(--primary-color, #2b6cb0);
}

.cart-summary-row.discount .value {
    color: #10b981;
}

/* Boutons du panier */
.cart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--woo-border, #e2e8f0);
}

.coupon-section {
    display: flex;
    align-items: center;
}

.coupon {
    display: flex;
    gap: 0.5rem;
}

.coupon input[type="text"] {
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--woo-border, #e2e8f0);
    border-radius: 8px;
    font-size: 0.9rem;
    min-width: 180px;
}

.coupon .button {
    padding: 0.5rem 1.2rem;
    background: var(--button-bg, #2b6cb0);
    color: var(--button-text, #ffffff);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.coupon .button:hover {
    background: var(--button-hover-bg, #1a4971);
}

.update-section .button {
    padding: 0.6rem 1.5rem;
    background: var(--button-bg, #2b6cb0);
    color: var(--button-text, #ffffff);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.update-section .button:hover {
    background: var(--button-hover-bg, #1a4971);
}

/* Panier vide */
.empty-cart-message {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-cart-icon {
    color: #cbd5e0;
    margin-bottom: 1.5rem;
}

.empty-cart-message h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1a202c;
}

.empty-cart-message p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.continue-shopping {
    display: inline-block;
    padding: 0.7rem 2rem;
    background: var(--primary-color, #2b6cb0);
    color: #fff;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.continue-shopping:hover {
    background: var(--link-hover-color, #1a4971);
    text-decoration: none;
}

.continue-shopping-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: var(--link-color, #2b6cb0);
    text-decoration: none;
    transition: color 0.2s;
}

.continue-shopping-link:hover {
    color: var(--link-hover-color, #1a4971);
    text-decoration: underline;
}

/* =============================================
   CHECKOUT - LAYOUT 1 COLONNE / 2 COLONNES
   ============================================= */
.checkout-wrapper {
    padding: 2rem 0;
}

.checkout-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.checkout-primary {
    flex: 1;
    min-width: 0;
}

.checkout-sidebar {
    flex: 0 0 340px;
    max-width: 340px;
    position: sticky;
    top: 2rem;
}

/* Formulaire checkout */
.checkout-primary .col2-set {
    display: flex;
    gap: 1.5rem;
}

.checkout-primary .col2-set > div {
    flex: 1;
}

.checkout-primary .woocommerce-billing-fields,
.checkout-primary .woocommerce-shipping-fields,
.checkout-primary .woocommerce-additional-fields {
    background: #fff;
    border: 1px solid var(--woo-border, #e2e8f0);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.checkout-primary .woocommerce-billing-fields h3,
.checkout-primary .woocommerce-shipping-fields h3,
.checkout-primary .woocommerce-additional-fields h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color, #2b6cb0);
}

/* Récapitulatif checkout */
.order-summary {
    background: #f8fafc;
    border: 1px solid var(--woo-border, #e2e8f0);
    border-radius: 10px;
    padding: 1.5rem;
}

.order-summary h3 {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--primary-color, #2b6cb0);
}

.order-items {
    margin-bottom: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-image {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
}

.order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.order-item-details {
    flex: 1;
}

.order-item-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1a202c;
}

.order-item-quantity {
    font-size: 0.75rem;
    color: #64748b;
}

.order-item-price {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1a202c;
}

.order-totals {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.9rem;
}

.order-total-row .label {
    color: #64748b;
}

.order-total-row .value {
    font-weight: 500;
    color: #1a202c;
}

.order-total-row.grand-total {
    font-size: 1.1rem;
    font-weight: 700;
    padding-top: 0.8rem;
    border-top: 2px solid var(--woo-border, #e2e8f0);
    margin-top: 0.5rem;
}

.order-total-row.grand-total .value {
    color: var(--primary-color, #2b6cb0);
}

.order-total-row.discount .value {
    color: #10b981;
}

/* =============================================
   RESPONSIVE - MOBILE FIRST
   ============================================= */

/* Tablettes et petits écrans */
@media (max-width: 1024px) {
    .cart-sidebar {
        flex: 0 0 280px;
        max-width: 280px;
    }
    
    .checkout-sidebar {
        flex: 0 0 280px;
        max-width: 280px;
    }
}

/* Mobile (1 colonne) */
@media (max-width: 768px) {
    .cart-layout,
    .checkout-layout {
        flex-direction: column;
    }
    
    .cart-primary,
    .checkout-primary {
        width: 100%;
    }
    
    .cart-sidebar,
    .checkout-sidebar {
        flex: 1;
        max-width: 100%;
        width: 100%;
        position: static;
    }
    
    .cart-summary,
    .order-summary {
        margin-top: 1rem;
    }
    
    /* Ajustements formulaire checkout */
    .checkout-primary .col2-set {
        flex-direction: column;
        gap: 0;
    }
    
    .checkout-primary .col2-set > div {
        width: 100%;
    }
    
    /* Ajustements boutons */
    .cart-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .coupon-section {
        width: 100%;
    }
    
    .coupon {
        flex-direction: column;
        width: 100%;
    }
    
    .coupon input[type="text"] {
        min-width: auto;
        width: 100%;
    }
    
    .coupon .button {
        width: 100%;
        text-align: center;
    }
    
    .update-section {
        width: 100%;
    }
    
    .update-section .button {
        width: 100%;
        text-align: center;
    }
    
    /* Ajustements des items */
    .order-item {
        padding: 0.5rem 0;
    }
    
    .order-item-image {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
    }
    
    .order-item-name {
        font-size: 0.8rem;
    }
    
    /* Titres */
    .cart-wrapper .page-title,
    .checkout-wrapper .page-title {
        font-size: 1.3rem;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .cart-summary,
    .order-summary {
        padding: 1rem;
    }
    
    .checkout-primary .woocommerce-billing-fields,
    .checkout-primary .woocommerce-shipping-fields,
    .checkout-primary .woocommerce-additional-fields {
        padding: 1rem;
    }
    
    .cart-summary-row,
    .order-total-row {
        font-size: 0.8rem;
    }
    
    .cart-summary-row.total,
    .order-total-row.grand-total {
        font-size: 0.95rem;
    }
    
    .empty-cart-message h2 {
        font-size: 1.2rem;
    }
    
    .empty-cart-icon {
        width: 60px;
        height: 60px;
    }
}