/* ==========================================================================
   KABUKI V2 - PANIER (CART) & CHECKOUT
   Thème : Jade Impérial & Papier de Riz
   Un voyage chromatique qui quitte l'Atlas (Ambre) pour le Palais (Jade & Or).
   ========================================================================== */

/* ATMOSPHÈRE JADE IMPÉRIAL (Transition chromatique) */
body.woocommerce-cart #dragon-bg,
body.woocommerce-checkout #dragon-bg {
    display: none !important;
}

body.woocommerce-cart .atmosphere-layer,
body.woocommerce-checkout .atmosphere-layer {
    background: #080a09 !important;
    /* Retour au Noir Jade profond */
}

body.woocommerce-cart .hero-fog,
body.woocommerce-checkout .hero-fog {
    opacity: 0.6 !important;
    filter: sepia(0.3) hue-rotate(140deg) brightness(1.4) contrast(1.1) blur(3px) !important;
    background:
        radial-gradient(circle at 50% 50%, rgba(42, 58, 48, 0.4) 0%, transparent 80%),
        url("../hero/images/fog.webp") center center / cover no-repeat !important;
    mix-blend-mode: screen !important;
}

.cart-container {
    max-width: 1000px;
    /* Plus serré pour le texte vide */
    margin: 140px auto 100px;
    padding: 120px 40px;
    color: #f2e6d5;
    min-height: 50vh;

    /* On efface le "pavé" pour laisser toute la place au Jade */
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 10;
}

/* On supprime les grosses bordures dorées de tête et de pied qui font "pavé" */
.cart-container::before,
.cart-container::after {
    display: none;
}

/* Titre de Section (Lueur de Lune) */
.editorial-header {
    text-align: center;
    margin-bottom: 100px;
    position: relative;
}

.editorial-header .subtitle {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6em;
    color: #7a9a8a;
    /* Vert Céladon discret */
    margin-bottom: 25px;
}

.editorial-header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 300;
    letter-spacing: 0.1em;
    color: #f2e6d5;
    text-shadow: 0 0 30px rgba(122, 154, 138, 0.3);
    margin: 0;
}

/* Tableau WooCommerce - Style Haute Couture */
.woocommerce-cart-form {
    background: transparent;
    padding: 0;
}

.shop_table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 15px;
    text-align: left;
}

.shop_table thead th {
    padding: 25px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: #7a9a8a;
    border-bottom: 1px solid rgba(122, 154, 138, 0.2);
}

.shop_table td {
    padding: 35px 25px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(212, 165, 116, 0.05);
    border-bottom: 1px solid rgba(212, 165, 116, 0.05);
    vertical-align: middle;
}

.shop_table tr td:first-child {
    border-left: 1px solid rgba(212, 165, 116, 0.05);
}

.shop_table tr td:last-child {
    border-right: 1px solid rgba(212, 165, 116, 0.05);
}

/* Image Produit */
.product-thumbnail img {
    width: 100px;
    height: auto;
    border: 1px solid rgba(122, 154, 138, 0.3);
    filter: sepia(0.2) contrast(1.1);
}

.product-name a {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    color: #f2e6d5;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: all 0.4s ease;
}

.product-name a:hover {
    color: #d4a574;
    padding-left: 5px;
}

.product-price,
.product-subtotal {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #d4a574;
}

/* Quantité */
.quantity input {
    background: rgba(122, 154, 138, 0.05);
    border: 1px solid rgba(122, 154, 138, 0.2);
    color: #f2e6d5;
    padding: 10px;
    width: 60px;
    text-align: center;
}

/* BOUTONS KABUKI - Style Minimaliste Aura */
button.button,
a.button.checkout-button,
.actions .button,
.return-to-shop .button {
    background: transparent !important;
    border: 1px solid rgba(242, 230, 213, 0.25) !important;
    color: rgba(242, 230, 213, 0.8) !important;
    padding: 12px 30px !important;
    text-transform: uppercase !important;
    font-size: 9px !important;
    font-weight: 300 !important;
    letter-spacing: 0.6em !important;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    cursor: pointer !important;
    border-radius: 0 !important;
    display: inline-block !important;
    text-decoration: none !important;
    margin: 20px auto !important;
}

button.button:hover,
a.button.checkout-button:hover,
.return-to-shop .button:hover {
    background: transparent !important;
    border-color: rgba(242, 230, 213, 1) !important;
    color: rgba(242, 230, 213, 1) !important;
    letter-spacing: 0.7em !important;
    box-shadow: 0 0 30px rgba(122, 154, 138, 0.15);
}

/* Totaux du Panier */
.cart-collaterals {
    margin-top: 80px;
    display: flex;
    justify-content: flex-end;
}

.cart_totals {
    width: 100%;
    max-width: 500px;
    background: rgba(122, 154, 138, 0.03);
    border: 1px solid rgba(212, 165, 116, 0.15);
    padding: 60px;
}

.cart_totals h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 300;
    margin-bottom: 40px;
    color: #d4a574;
    text-align: center;
}

.order-total strong {
    font-size: 24px;
    color: #d4a574;
}

/* Panier Vide */
.cart-empty {
    text-align: center;
    padding: 120px 0;
}

.cart-empty p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    margin-bottom: 50px;
    opacity: 0.9;
    color: #f2e6d5;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   CHECKOUT SPECIFIC STYLES (Finaliser la commande)
   ========================================================================== */

.woocommerce-checkout .col2-set {
    margin-bottom: 60px;
}

/* Style des Formulaires (Style Laque Noire & Fil d'Or) */
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout select,
.woocommerce-checkout textarea,
.select2-container--default .select2-selection--single {
    background: rgba(0, 0, 0, 0.4) !important;
    /* Très sombre mais laisse passer un peu de Jade */
    border: none !important;
    border-bottom: 1px solid rgba(212, 165, 116, 0.3) !important;
    /* Ligne d'Or fine */
    color: #f2e6d5 !important;
    padding: 12px 5px !important;
    border-radius: 0 !important;
    width: 100% !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    height: auto !important;
    outline: none !important;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    box-shadow: none !important;
}

/* Effet au Focus : La ligne s'illumine */
.woocommerce-checkout input:focus,
.woocommerce-checkout textarea:focus {
    background: rgba(0, 0, 0, 0.6) !important;
    border-bottom-color: #d4a574 !important;
    padding-left: 15px !important;
    /* Petit décalage élégant */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
}

.woocommerce-checkout label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    /* Espacement noble */
    color: rgba(122, 154, 138, 0.8);
    /* Jade estompé */
    margin-bottom: 5px;
    margin-top: 30px;
    text-align: left !important;
    /* Alignement à gauche pour plus de sérieux */
}

/* On retire l'astérisque rouge moche */
.woocommerce-checkout .required {
    color: #d4a574 !important;
    text-decoration: none !important;
}

.woocommerce-checkout h3#order_review_heading,
.woocommerce-checkout h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 300;
    color: #d4a574;
    margin: 60px 0 30px;
    text-align: center;
    letter-spacing: 0.05em;
}

/* Tableau de commande final */
#order_review {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(122, 154, 138, 0.1);
    padding: 40px;
}

#payment {
    background: transparent !important;
    margin-top: 40px;
}

.wc_payment_methods {
    list-style: none !important;
    padding: 0 !important;
}

.payment_box {
    background: rgba(122, 154, 138, 0.05) !important;
    color: #e8dcc8 !important;
    font-size: 12px !important;
    padding: 20px !important;
    margin-top: 15px !important;
}

/* Message Promo en tête */
.woocommerce-info {
    border-top: 2px solid #7a9a8a !important;
    background: rgba(122, 154, 138, 0.05) !important;
    color: #f2e6d5 !important;
    padding: 20px !important;
    font-size: 13px;
    margin-bottom: 40px !important;
    text-align: center;
}

.woocommerce-info a {
    color: #d4a574 !important;
    text-decoration: none;
    font-weight: bold;
}

/* ==========================================================================
   MOBILE & RESPONSIVE REFINEMENT
   ========================================================================== */

@media (max-width: 768px) {
    .cart-container {
        padding: 60px 15px;
        margin-top: 80px;
        margin-left: 36px;
        width: calc(100% - 46px);
        max-width: none;
    }

    .woocommerce-checkout .col2-set .col-1,
    .woocommerce-checkout .col2-set .col-2 {
        width: 100% !important;
        float: none !important;
    }

    .form-row {
        width: 100% !important;
        margin-bottom: 20px !important;
    }

    .editorial-header {
        margin-bottom: 40px;
    }

    .editorial-header h1 {
        font-size: 32px;
    }

    /* TABLEAU MOBILE - Passage en mode Bloc */
    .shop_table,
    .shop_table thead,
    .shop_table tbody,
    .shop_table th,
    .shop_table td,
    .shop_table tr {
        display: block;
        width: 100%;
    }

    .shop_table thead {
        display: none;
        /* On cache les entêtes sur mobile */
    }

    .shop_table tr {
        margin-bottom: 30px;
        border: 1px solid rgba(212, 165, 116, 0.1);
        background: rgba(255, 255, 255, 0.02);
        padding: 20px;
    }

    .shop_table td {
        border: none !important;
        padding: 10px 0 !important;
        text-align: center !important;
        position: relative;
    }

    .product-thumbnail img {
        width: 120px;
        margin: 0 auto;
    }

    .product-name a {
        font-size: 18px;
        display: block;
        line-height: 1.3;
    }

    /* ACTIONS & COUPON */
    .actions {
        padding: 20px 0 !important;
    }

    .coupon {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    /* INPUT CODE PROMO - ADIEU LE BLANC */
    .coupon input#coupon_code {
        background: rgba(8, 10, 9, 0.8) !important;
        border: 1px solid rgba(122, 154, 138, 0.4) !important;
        color: #f2e6d5 !important;
        height: 50px !important;
        width: 100% !important;
        text-align: center;
        font-family: 'Inter', sans-serif;
        font-size: 12px;
        letter-spacing: 0.1em;
    }

    .actions .button,
    .coupon .button {
        width: 100% !important;
        padding: 15px !important;
    }

    /* TOTALS */
    .cart_totals {
        padding: 30px 20px;
        margin-top: 40px;
    }

    .cart_totals h2 {
        font-size: 24px;
    }
}