/* Checkout Page Redesign Styles (Segmented in checkout.css) */

.woocommerce-checkout .entry-header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

.woocommerce-checkout .entry-title {
    font-size: 42px;
    font-weight: 300;
    color: #111827;
    margin: 0;
    letter-spacing: -0.02em;
}

/* Page Outer Container */
.woocommerce-checkout .woocommerce {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* Coupon Notice Bar at Top */
.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info {
    margin-bottom: 24px;
}

/* Main Checkout Form Grid (2-Column Desktop Layout) */
@media (min-width: 992px) {
    .woocommerce-checkout form.woocommerce-checkout {
        display: grid;
        grid-template-columns: 1fr 440px;
        gap: 60px;
        align-items: start;
    }

    .woocommerce-checkout #customer_details {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
    }

    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
    }
}

/* Section Titles (Coordonnées, Adresse de facturation, etc.) */
.woocommerce-checkout h3 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-top: 0;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

/* Form Fields Styling (Inputs, Selects, Labels) */
.woocommerce-checkout .form-row {
    margin-bottom: 18px !important;
    padding: 0 !important;
    width: 100% !important;
}

.woocommerce-checkout .form-row-first {
    width: 48% !important;
    float: left !important;
    clear: none !important;
}

.woocommerce-checkout .form-row-last {
    width: 48% !important;
    float: right !important;
    clear: none !important;
}

@media (max-width: 640px) {
    .woocommerce-checkout .form-row-first,
    .woocommerce-checkout .form-row-last {
        width: 100% !important;
        float: none !important;
    }
}

.woocommerce-checkout .form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 6px;
}

.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row textarea,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .select2-container--default .select2-selection--single {
    width: 100% !important;
    height: 48px !important;
    padding: 10px 16px !important;
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #111827 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    outline: none !important;
}

.woocommerce-checkout .form-row textarea {
    height: 110px !important;
    padding: 12px 16px !important;
    resize: vertical;
}

.woocommerce-checkout .form-row input.input-text:focus,
.woocommerce-checkout .form-row textarea:focus,
.woocommerce-checkout .form-row select:focus {
    border-color: #1c90a1 !important;
    box-shadow: 0 0 0 3px rgba(28, 144, 161, 0.15) !important;
}

/* Right Side: Order Review Summary Box */
.woocommerce-checkout #order_review_heading {
    display: none; /* Subsumed inside order review container header */
}

.woocommerce-checkout #order_review {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.woocommerce-checkout #order_review::before {
    content: "Résumé de la commande";
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

/* Order Summary Table */
.woocommerce-checkout table.shop_table {
    width: 100%;
    border-collapse: collapse;
    border: none;
    margin-bottom: 24px;
}

.woocommerce-checkout table.shop_table th,
.woocommerce-checkout table.shop_table td {
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
    background: transparent;
    font-size: 14px;
    color: #374151;
}

.woocommerce-checkout table.shop_table thead th {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    padding-bottom: 12px;
}

.woocommerce-checkout table.shop_table td.product-name {
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.woocommerce-checkout table.shop_table td.product-name .product-quantity {
    font-weight: 700;
    color: #6b7280;
    margin-left: 6px;
}

.woocommerce-checkout table.shop_table td.product-total {
    text-align: right;
    font-weight: 700;
    color: #111827;
}

/* Subtotal & Total Rows */
.woocommerce-checkout table.shop_table tr.cart-subtotal th,
.woocommerce-checkout table.shop_table tr.cart-subtotal td {
    font-size: 15px;
    color: #4b5563;
}

.woocommerce-checkout table.shop_table tr.order-total th,
.woocommerce-checkout table.shop_table tr.order-total td {
    border-top: 2px solid #e5e7eb;
    border-bottom: none;
    padding-top: 20px;
    padding-bottom: 10px;
}

.woocommerce-checkout table.shop_table tr.order-total th {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.woocommerce-checkout table.shop_table tr.order-total td {
    text-align: right;
    font-size: 24px;
    font-weight: 800;
    color: #111827;
}

/* Payment Methods Box */
.woocommerce-checkout #payment {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #f0f0f0;
}

.woocommerce-checkout #payment ul.payment_methods {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    border-bottom: 1px solid #e5e7eb;
}

.woocommerce-checkout #payment ul.payment_methods li {
    margin-bottom: 12px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.woocommerce-checkout #payment ul.payment_methods li label {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-left: 8px;
    cursor: pointer;
}

.woocommerce-checkout #payment div.payment_box {
    background: #f3f4f6;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
}

/* Primary CTA Button: Place Order */
.woocommerce-checkout #payment #place_order,
.woocommerce-checkout .place-order button#place_order {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 16px 24px !important;
    background-color: #262626 !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: 8px !important;
    border: none !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    margin-top: 16px !important;
}

.woocommerce-checkout #payment #place_order:hover,
.woocommerce-checkout .place-order button#place_order:hover {
    background-color: #000000 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18) !important;
}
