/* Cart Page Custom Styles v2 */
.woocommerce-cart .cart-page {
    /* Main wrapper styles if needed */
}

.woocommerce-cart h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 2rem;
    position: relative;
    letter-spacing: -0.02em;
}

/* 2-Column Layout Setup found in HTML, styles below affect components */

/* Left Column: Cart Form */
.woocommerce-cart-form {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
}

/* Cart Table Styling */
.cart-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.cart-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #8898aa;
    letter-spacing: 1px;
    padding: 1.5rem 1rem;
    border-bottom: 2px solid #f6f9fc;
    font-weight: 700;
}

.cart-table tbody tr td {
    border-bottom: 1px solid #f6f9fc;
    padding: 2rem 1rem;
    vertical-align: middle;
}

.cart-table tbody tr:last-child td {
    border-bottom: none;
}

/* Product Info */
.product-thumbnail img {
    width: 100px;
    height: 100px; /* Force square for consistency */
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.product-name a {
    color: #32325d;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    margin-bottom: 0.5rem;
}

.product-name a:hover {
    color: #ff9800;
}

.product-price {
    font-weight: 600;
    color: #525f7f;
}

/* Quantity Selector */
.quantity {
    display: inline-flex;
    align-items: center;
    background: #f6f9fc;
    border-radius: 50px;
    padding: 5px;
    border: 1px solid #e9ecef;
}

.quantity input.qty {
    background: transparent;
    border: none;
    width: 50px;
    text-align: center;
    font-weight: 700;
    color: #32325d;
    height: 40px;
}

.quantity input.qty:focus {
    outline: none;
}

/* Remove Button */
.product-remove {
    text-align: right;
}

.product-remove .remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #fff;
    color: #f5365c;
    box-shadow: 0 3px 10px rgba(245, 54, 92, 0.1);
    transition: all 0.2s;
    text-decoration: none;
    font-size: 1.2rem;
}

.product-remove .remove:hover {
    background-color: #f5365c;
    color: #fff;
    box-shadow: 0 3px 10px rgba(245, 54, 92, 0.3);
    transform: translateY(-2px);
}

/* Coupon & Actions */
.actions {
    padding-top: 2rem !important;
}

.coupon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coupon .input-text {
    border: 1px solid #e9ecef !important;
    border-radius: 10px !important;
    padding: 0.75rem 1.25rem !important;
    font-size: 0.9rem !important;
    background: #f6f9fc !important;
    min-width: 250px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

.coupon .button {
    color: #333 !important;
    border: 1px solid #fbbf24 !important;
    background-color: initial !important;
    border-radius: var(--bs-border-radius-pill) !important;
    font-weight: 500 !important;
    font-size: 15px !important;
}

button[name="update_cart"] {
    color: #000 !important;
    border: 1px solid #fbbf24 !important;
    background-color: initial !important;
    border-radius: var(--bs-border-radius-pill) !important;
    font-weight: 500 !important;
    font-size: 15px !important;
}

button[name="update_cart"]:hover, .coupon .button:hover {
    background-color: #fbbf24 !important;
    color: #fff !important;
}

/* Right Column: Cart Totals */
.cart-collaterals {
    position: sticky;
    top: 20px;
}

.cart_totals {
    background: #0A5C74; /* Dark theme for contrast */
    padding: 2.5rem;
    border-radius: 20px;
    color: white;
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
    position: relative;
    overflow: hidden;
}

.cart_totals::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.cart_totals h2 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}

.cart_totals table.shop_table {
    width: 100%;
    margin-bottom: 2rem;
}

.cart_totals th {
    color: #ced4da;
    font-weight: 400;
    padding: 1rem 0;
    text-align: left;
}

.cart_totals td {
    color: white;
    font-weight: 700;
    text-align: right;
    padding: 1rem 0;
}

.cart_totals .order-total th,
.cart_totals .order-total td {
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 1.4rem;
    padding-top: 1.5rem;
    color: #ff9800;
}

/* Checkout Button */
.wc-proceed-to-checkout .checkout-button {
    background: #ff9800;
    color: white;
    display: block;
    width: 100%;
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    text-decoration: none;
    border: none;
}

.wc-proceed-to-checkout .checkout-button:hover {
    background: #f57c00;
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.woocommerce .cart-collaterals .cart_totals, .woocommerce-page .cart-collaterals .cart_totals{
    width: 100%;
}
.cart_totals .order-total th, .cart_totals .order-total td{
    color: #fde298;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button{
    background-color: #ffe8b3;
    color: #333;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 15px;
    border-radius: 999px;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover{
    background-color: #fada8e;
    color: #333;
}

/* Detailed Responsive Fixes */
@media (max-width: 991px) {
    .cart-page .row {
        flex-direction: column;
    }
    
    .col-lg-8, .col-lg-4 {
        width: 100%;
        max-width: 100%;
    }
    
    .cart-collaterals {
        margin-top: 2rem;
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-table thead { display: none; }
    .cart-table tbody tr {
        display: block;
        background: white;
        margin-bottom: 1rem;
        padding: 1rem;
        border-radius: 12px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    .cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
        border-bottom: 1px solid #f0f0f0;
    }
    .cart-table td:last-child { border-bottom: none; }
    .cart-table td::before {
        content: attr(data-title);
        font-weight: 600;
        color: #8898aa;
    }
    .product-thumbnail, .product-thumbnail img {
        width: 100%;
        height: auto;
        justify-content: center;
    }
    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    .coupon {
        width: 100%;
        flex-direction: column;
    }
    .coupon .input-text { width: 100%; margin-right: 0 !important; }
    .coupon .button { width: 100%; }
}

/* Checkout Page Styles */
.woocommerce-checkout .woocommerce h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

/* Layout - 2 Columns */
/* Layout - 2 Columns */
.woocommerce-checkout .col2-set {
    width: 65%;
    float: left;
    padding-right: 30px;
}

.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
    width: 100%;
    float: none;
    clear: both;
    margin-bottom: 2rem;
}

.woocommerce-checkout .woocommerce-checkout-review-order {
    width: 35%;
    float: right;
}

/* Ensure no flex interference */
.woocommerce-checkout .col2-set {
    display: block;
}

/* Clearfix for floats */
.woocommerce-checkout form.checkout::after {
    content: "";
    display: table;
    clear: both;
}

/* Form Fields */
.woocommerce-billing-fields__field-wrapper, .woocommerce-additional-fields__field-wrapper {
    background: #fff;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
}

.woocommerce-checkout input.input-text,
.woocommerce-checkout select {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    background: #fcfcfc;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s;
}

.woocommerce-checkout input.input-text:focus,
.woocommerce-checkout select:focus {
    border-color: #fbbf24;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

/* Labels */
.woocommerce-checkout label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Order Review Box (Sticky) */
.woocommerce-checkout-review-order-table, 
#payment {
    /* background: #fff; */
    border-radius: 20px;
    overflow: hidden;
}

#order_review_heading {
    margin-top: 0;
    padding-top: 0;
}

.woocommerce-checkout-review-order {
    position: sticky;
    top: 20px;
    background: #0A5C74;
    padding: 2rem;
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 20px 40px rgba(10, 92, 116, 0.2);
}

.woocommerce-checkout-review-order h3#order_review_heading {
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

/* Review Table Override Colors */
.woocommerce-checkout-review-order table.shop_table {
    border: none;
    margin-bottom: 2rem;
}

.woocommerce-checkout-review-order table.shop_table th,
.woocommerce-checkout-review-order table.shop_table td {
    background: transparent !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #e2e8f0;
    font-weight: 500;
}

.woocommerce-checkout-review-order table.shop_table tfoot th,
.woocommerce-checkout-review-order table.shop_table tfoot td {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.woocommerce-checkout-review-order .order-total th,
.woocommerce-checkout-review-order .order-total td {
    color: #fbbf24;
    font-size: 1.4rem;
    border-bottom: none;
}

/* Payment Methods */
#payment {
    background: transparent !important;
}

#payment ul.payment_methods {
    border-bottom: none !important;
    padding: 0 !important;
}

#payment ul.payment_methods li {
    background: rgba(255,255,255,0.05);
    margin-bottom: 10px;
    padding: 1rem;
    border-radius: 10px;
    list-style: none;
}

#payment div.payment_box {
    background-color: rgba(0,0,0,0.2) !important;
    color: #e2e8f0 !important;
    border-radius: 8px;
    margin-top: 1rem;
    padding: 1rem;
}

#payment div.payment_box::before {
    display: none;
}

/* Place Order Button */
#place_order {
    display: block;
    width: 100%;
    margin-top: 2rem;
    background: #ffe8b3;
    color: #333;
    text-transform: uppercase;
    border: none;
    transition: all 0.3s;
    cursor: pointer;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 15px;
    border-radius: 999px;
}

#place_order:hover {
    background: #fada8e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(251, 191, 36, 0.3);
}

/* Terms and Conditions */
.woocommerce-terms-and-conditions-wrapper {
    margin-top: 1.5rem;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.wc_payment_methods.payment_methods.methods label {
    font-weight: 600;
    color: #fbbf24;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 991px) {
    .woocommerce-checkout .col2-set,
    .woocommerce-checkout .woocommerce-checkout-review-order {
        width: 100%;
        float: none;
        padding: 0;
    }
    
    .woocommerce-checkout .woocommerce-checkout-review-order {
        margin-top: 2rem;
        position: static;
    }
}

/* Order Received / Thank You Page Refinements */
.woocommerce-order-received .woocommerce-thankyou-order-received {
    text-align: center;
    padding: 3rem 1rem;
    font-size: 1.5rem;
    color: #1a1a1a;
    font-weight: 700;
}

.woocommerce-order-received .woocommerce-thankyou-order-received::before {
    content: '✓';
    display: block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    background: #0A5C74;
    color: #fbbf24;
    font-size: 3rem;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 25px rgba(10, 92, 116, 0.2);
}

.woocommerce-order-received ul.woocommerce-thankyou-order-details {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    list-style: none;
    padding: 2rem;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    margin-bottom: 3rem;
    border: 1px solid rgba(0,0,0,0.03);
}

.woocommerce-order-received ul.woocommerce-thankyou-order-details li {
    text-align: left;
    border-right: 1px solid #f1f5f9;
    padding-right: 2rem;
}

.woocommerce-order-received ul.woocommerce-thankyou-order-details li:last-child {
    border-right: none;
    padding-right: 0;
}

.woocommerce-order-received ul.woocommerce-thankyou-order-details li strong {
    display: block;
    color: #1a1a1a;
    font-size: 1.1rem;
    margin-top: 5px;
}

/* Order Details Table in Thank You Page */
.woocommerce-order-details, 
.woocommerce-customer-details {
    background: #0A5C74;
    padding: 2.5rem;
    border-radius: 20px;
    color: white;
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.woocommerce-order-details h2, 
.woocommerce-customer-details h2 {
    color: white !important;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}

.woocommerce-order-details table.shop_table {
    width: 100%;
    color: #e2e8f0;
    border: none;
}

.woocommerce-order-details table.shop_table th,
.woocommerce-order-details table.shop_table td {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: transparent !important;
    color: #fff;
}

.woocommerce-order-details table.shop_table tfoot th {
    color: #ced4da;
    font-weight: 400;
}

.woocommerce-order-details table.shop_table tfoot td {
    font-weight: 700;
    text-align: right;
}

.woocommerce-order-details .woocommerce-table__product-name a {
    color: #fbbf24;
}

.woocommerce-customer-details address {
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 12px;
    font-style: normal;
    background: rgba(255,255,255,0.03);
}

@media (max-width: 768px) {
    .woocommerce-order-received ul.woocommerce-thankyou-order-details {
        flex-direction: column;
        gap: 1rem;
    }
    .woocommerce-order-received ul.woocommerce-thankyou-order-details li {
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
        padding-right: 0;
        padding-bottom: 1rem;
    }
}
