/**
 * CART PAGE - DESIGN COHÉRENT AVEC LA HOMEPAGE
 * Version: 4.1.0
 * Identité visuelle: Vintage barbershop avec Impact, lettres espacées, orange #ff6b35
 */

/* =====================================================
   HEADER DE PAGE (comme homepage)
   ===================================================== */

.cart-page-header {
    padding: 4rem 0 3rem;
    background: #1a1a1a;
    border-bottom: 2px solid rgba(255, 107, 53, 0.2);
}

.cart-page-header .section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.cart-page-header .section-title {
    font-family: Impact, 'Arial Black', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: #f5f5f5;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 1rem 0;
}

.cart-page-header .section-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    letter-spacing: 0.05em;
    margin: 0;
}

/* =====================================================
   WRAPPER PRINCIPAL
   ===================================================== */

.cart-page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* =====================================================
   LAYOUT 2 COLONNES
   ===================================================== */

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 2.5rem;
    align-items: start;
}

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

/* =====================================================
   COLONNE PRODUITS
   ===================================================== */

.cart-items-column {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* =====================================================
   TABLEAU PANIER
   ===================================================== */

.woocommerce-cart-form__contents {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

/* En-tête */
.woocommerce-cart-form__contents thead {
    background: #0a0a0a;
}

.woocommerce-cart-form__contents thead th {
    padding: 1.5rem 1.25rem;
    font-family: Impact, 'Arial Black', sans-serif;
    font-size: 0.875rem;
    font-weight: 900;
    color: #f5f5f5;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-align: left;
    border-bottom: 3px solid #ff6b35;
}

.woocommerce-cart-form__contents thead th.product-remove {
    text-align: center;
}

/* Lignes produits */
.woocommerce-cart-form__contents tbody tr.cart_item {
    background: #0a0a0a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.woocommerce-cart-form__contents tbody tr.cart_item:hover {
    background: rgba(255, 107, 53, 0.03);
}

.woocommerce-cart-form__contents tbody td {
    padding: 1.75rem 1.25rem;
    vertical-align: middle;
    color: #f5f5f5;
}

/* Image produit */
.product-thumbnail {
    width: 150px !important;
}

.product-thumbnail a {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    width: 150px !important;
    height: 150px !important;
}

.product-thumbnail img {
    width: 150px !important;
    height: 150px !important;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #ff6b35;
    transition: transform 0.3s ease;
    display: block;
}

.product-thumbnail a:hover img {
    transform: scale(1.08);
}

/* Nom produit */
.product-name {
    min-width: 200px;
}

.product-name a {
    font-size: 1.125rem;
    font-weight: 700;
    color: #f5f5f5;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    display: inline-block;
}

.product-name a:hover {
    color: #ff6b35;
}

/* Variations */
.product-name .variation {
    margin-top: 0.75rem;
    font-size: 0.875rem;
}

.product-name .variation dt,
.product-name .variation dd {
    display: inline;
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
}

.product-name .variation dd p {
    display: inline;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

/* Prix */
.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ff6b35 !important;
}

.product-price .woocommerce-Price-amount {
    color: #ff6b35;
    font-weight: 700;
}

/* Sous-total */
.product-subtotal {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff6b35 !important;
}

.product-subtotal .woocommerce-Price-amount {
    color: #ff6b35;
    font-weight: 700;
}

/* Quantité */
.product-quantity {
    width: 120px;
}

.product-quantity .quantity {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-quantity input.qty,
.product-quantity input[type="number"] {
    width: 80px;
    height: 48px;
    padding: 0;
    text-align: center;
    background: #1a1a1a;
    border: 2px solid #ff6b35;
    border-radius: 8px;
    color: #f5f5f5;
    font-family: Impact, 'Arial Black', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.product-quantity input.qty:focus,
.product-quantity input[type="number"]:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
    background: #0a0a0a;
}

/* Screen reader text */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Bouton supprimer */
.product-remove {
    width: 60px;
    text-align: center;
}

.product-remove .remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #1a1a1a;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.4);
    font-size: 2rem;
    line-height: 1;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 300;
}

.product-remove .remove:hover {
    background: #c41e3a;
    border-color: #c41e3a;
    color: white;
    transform: rotate(90deg);
}

/* =====================================================
   ACTIONS (Code promo + Mettre à jour)
   ===================================================== */

.actions {
    background: #1a1a1a !important;
    padding: 2rem 1.25rem !important;
    border-top: 2px solid rgba(255, 107, 53, 0.3) !important;
}

.actions .coupon {
    display: inline-flex;
    gap: 0.75rem;
    align-items: center;
    margin-right: 1rem;
    flex-wrap: wrap;
}

.actions .coupon input[type="text"] {
    padding: 0.875rem 1.5rem;
    min-width: 220px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: #0a0a0a;
    color: #f5f5f5;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.actions .coupon input[type="text"]:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.actions .coupon input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
}

.actions button.button,
.actions .coupon-button,
.actions .update-cart-button,
.actions button[name="update_cart"] {
    padding: 0.875rem 2rem !important;
    background: #ff6b35 !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: Impact, 'Arial Black', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3) !important;
}

.actions button.button:hover:not(:disabled),
.actions .coupon-button:hover,
.actions .update-cart-button:hover:not(:disabled),
.actions button[name="update_cart"]:hover:not(:disabled) {
    background: #ff6b35 !important;
    opacity: 0.9 !important;
}

.actions button.button:disabled,
.actions .update-cart-button:disabled,
.actions button[name="update_cart"]:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
}

/* =====================================================
   COLONNE RÉCAPITULATIF (sticky)
   ===================================================== */

.cart-totals-column {
    position: sticky;
    top: 120px;
}

.cart-totals-wrapper {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Titre récapitulatif */
.cart_totals h2 {
    font-family: Impact, 'Arial Black', sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    color: #f5f5f5;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 3px solid #ff6b35;
}

/* Tableau totaux */
.cart_totals table {
    width: 100%;
    margin-bottom: 2rem;
    border-collapse: collapse;
}

.cart_totals table th,
.cart_totals table td {
    padding: 1rem 0;
    color: #f5f5f5;
    font-size: 1rem;
}

.cart_totals table th {
    text-align: left;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.95rem;
}

.cart_totals table td {
    text-align: right;
    font-weight: 700;
    font-size: 1.125rem;
}

/* Options de livraison */
.woocommerce-shipping-totals ul {
    list-style: none;
    margin: 0.5rem 0 0 0;
    padding: 0;
}

.woocommerce-shipping-totals li {
    margin-bottom: 0.75rem;
}

.woocommerce-shipping-totals input[type="radio"] {
    margin-right: 0.75rem;
    accent-color: #ff6b35;
}

.woocommerce-shipping-totals label {
    color: #f5f5f5;
    font-weight: 400;
    cursor: pointer;
    font-size: 1rem;
}

.woocommerce-shipping-destination {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.woocommerce-shipping-destination strong {
    color: #f5f5f5;
}

/* Ligne TOTAL */
.cart_totals .order-total th,
.cart_totals .order-total td {
    font-family: Impact, 'Arial Black', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(255, 107, 53, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cart_totals .order-total th {
    color: #f5f5f5;
}

.cart_totals .order-total td {
    color: #ff6b35;
}

.cart_totals .order-total .includes_tax {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.5rem;
    text-transform: none;
    letter-spacing: normal;
}

/* Bouton commander */
.wc-proceed-to-checkout {
    margin-top: 2rem;
}

.wc-proceed-to-checkout .checkout-button,
.wc-proceed-to-checkout a.checkout-button {
    display: block !important;
    width: 100% !important;
    padding: 1.5rem !important;
    background: #ff6b35 !important;
    color: white !important;
    text-align: center !important;
    text-decoration: none !important;
    border-radius: 10px !important;
    font-family: Impact, 'Arial Black', sans-serif !important;
    font-size: 1.5rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3) !important;
    cursor: pointer !important;
}

.wc-proceed-to-checkout .checkout-button:hover,
.wc-proceed-to-checkout a.checkout-button:hover {
    background: #ff6b35 !important;
    opacity: 0.9 !important;
}

/* =====================================================
   PANIER VIDE
   ===================================================== */

.cart-empty,
.woocommerce-info {
    background: #1a1a1a;
    padding: 4rem 3rem;
    border-radius: 12px;
    border: 2px solid #ff6b35;
    text-align: center;
    color: #f5f5f5;
    font-size: 1.25rem;
    margin: 3rem auto;
    max-width: 600px;
}

.cart-empty::before,
.woocommerce-info::before {
    display: none;
}

.return-to-shop {
    margin-top: 2rem;
}

.return-to-shop .button {
    display: inline-block;
    padding: 1.25rem 3rem;
    background: #ff6b35;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-family: Impact, 'Arial Black', sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.4);
}

.return-to-shop .button:hover {
    background: #c41e3a;
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(255, 107, 53, 0.6);
}

/* =====================================================
   MESSAGES & NOTIFICATIONS
   ===================================================== */

.woocommerce-message,
.woocommerce-error,
.woocommerce-notice {
    background: #1a1a1a;
    color: #f5f5f5;
    padding: 1.25rem 1.75rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #ff6b35;
    font-weight: 500;
}

.woocommerce-error {
    border-left-color: #c41e3a;
}

.woocommerce-message::before,
.woocommerce-error::before,
.woocommerce-notice::before {
    display: none;
}

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

@media (max-width: 1024px) {
    .cart-totals-column {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-page-header {
        padding: 3rem 0 2rem;
    }

    .cart-page-header .section-title {
        font-size: 2.5rem;
    }

    .cart-page-wrapper {
        padding: 2rem 1rem;
    }

    /* Masquer thead */
    .woocommerce-cart-form__contents thead {
        display: none;
    }

    /* Transformer en cards */
    .woocommerce-cart-form__contents tbody tr.cart_item {
        display: grid;
        grid-template-columns: 150px 1fr;
        gap: 1.25rem;
        padding: 1.75rem 1.25rem;
        margin-bottom: 1rem;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .product-thumbnail {
        grid-row: 1 / 5;
        width: 150px !important;
    }

    .product-thumbnail a {
        width: 150px !important;
        height: 150px !important;
    }

    .product-thumbnail img {
        width: 150px !important;
        height: 150px !important;
    }

    .product-name,
    .product-price,
    .product-quantity,
    .product-subtotal,
    .product-remove {
        grid-column: 2;
    }

    .woocommerce-cart-form__contents tbody td {
        padding: 0.5rem 0;
    }

    .woocommerce-cart-form__contents tbody td::before {
        content: attr(data-title) ": ";
        font-family: Impact, 'Arial Black', sans-serif;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.5);
        margin-right: 0.5rem;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.1em;
    }

    .product-thumbnail::before,
    .product-remove::before {
        display: none;
    }

    /* Actions mobile */
    .actions {
        grid-column: 1 / -1 !important;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .actions .coupon {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin: 0;
        gap: 0.75rem;
    }

    .actions .coupon input[type="text"] {
        width: 100%;
        min-width: 100%;
    }

    .actions button.button {
        width: 100%;
    }
}
