/**
 * WooCommerce Cart Page - Custom Styling
 * Matches Figma Design: 2-column layout
 */

/* ========================================
   PAGE BACKGROUND
======================================== */
body.woocommerce-cart,
body.woocommerce-cart .entry-content,
body.woocommerce-cart .site-content,
body.woocommerce-cart main {
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
}

/* Remove dark breadcrumb/page header background */
body.woocommerce-cart .page-header,
body.woocommerce-cart .page-header-page,
body.woocommerce-cart .page-header-catalog,
body.woocommerce-cart .woocommerce-page-header,
body.woocommerce-cart .storefront-page-header {
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
}

/* Elementor dark background fix */
.elementor-4468 .elementor-element.elementor-element-9701511 {
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
}

/* ========================================
   HIDE SHIPPING CALCULATOR FORM
======================================== */
body.woocommerce-cart .shipping-calculator-form,
body.woocommerce-cart .woocommerce-shipping-calculator {
    display: none !important;
}

/* ========================================
   PAGE LAYOUT - 2 COLUMNS SIDE BY SIDE
======================================== */
body.woocommerce-cart .woocommerce {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 40px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 40px 20px !important;
    background: #FFFFFF !important;
}

/* Cart Form (Left Side - Table) */
body.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper {
    width: 100% !important;
    flex: 0 0 100% !important;
}

body.woocommerce-cart form.woocommerce-cart-form {
    flex: 1 1 60% !important;
    max-width: 65% !important;
}

/* Cart Collaterals (Right Side - Order Summary) */
body.woocommerce-cart .cart-collaterals {
    flex: 1 1 30% !important;
    max-width: 32% !important;
}

/* ========================================
   CART TABLE
======================================== */
body.woocommerce-cart table.shop_table.cart {
    background: #FFFFFF !important;
    border-radius: 0px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border: none !important;
    margin-bottom: 20px !important;
}

/* ========================================
   TABLE HEADER - DARK TEAL
======================================== */
body.woocommerce-cart table.shop_table.cart thead,
body.woocommerce-cart table.shop_table.cart thead tr,
body.woocommerce-cart table.shop_table thead {
    background: #3A5F79 !important;
    background-color: #3A5F79 !important;
}

body.woocommerce-cart table.shop_table.cart thead th,
body.woocommerce-cart table.shop_table thead th,
body.woocommerce-cart .woocommerce-cart-form table thead th {
    background: #3A5F79 !important;
    background-color: #3A5F79 !important;
    color: #FFFFFF !important;
    padding: 18px 15px !important;
    text-align: center !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: capitalize !important;
    letter-spacing: 0.3px !important;
    border: none !important;
    font-family: 'Poppins', sans-serif !important;
}

body.woocommerce-cart table.shop_table.cart thead th:first-child {
    border-radius: 0 0 0 0 !important;
    text-align: left !important;
    padding-left: 20px !important;
}

body.woocommerce-cart table.shop_table.cart thead th:last-child {
    border-radius: 0 0 0 0 !important;
}

/* ========================================
   TABLE BODY ROWS
======================================== */
body.woocommerce-cart table.shop_table.cart tbody tr.cart_item {
    background: #FFFFFF !important;
    border-bottom: 1px solid #E5E7EB !important;
}

body.woocommerce-cart table.shop_table.cart tbody tr.cart_item:last-of-type {
    border-bottom: none !important;
}

body.woocommerce-cart table.shop_table.cart td {
    padding: 20px 15px !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    color: #9F9F9F !important;
    border: none !important;
    vertical-align: middle !important;
    background: transparent !important;
}

body.woocommerce-cart td.product-quantity {
    text-align: center !important;
}

body.woocommerce-cart .quantity {
    width: 100px !important;
}

/* Product Thumbnail */
body.woocommerce-cart td.product-thumbnail {
    width: 100px !important;
    text-align: center !important;
}

body.woocommerce-cart td.product-thumbnail img {
    max-width: 80px !important;
    height: auto !important;
    border-radius: 0px !important;
}

/* Product Name */
body.woocommerce-cart td.product-name {
    font-weight: 500 !important;
    color: #374151 !important;
}

body.woocommerce-cart td.product-name a {
    color: #374151 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

body.woocommerce-cart td.product-name a:hover {
    color: #3A5F79 !important;
}

/* Product Price */
body.woocommerce-cart td.product-price {
    text-align: center !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    color: #9F9F9F !important;
}

body.woocommerce-cart td.product-price .amount,
body.woocommerce-cart td.product-price .woocommerce-Price-amount {
    color: #9F9F9F !important;
}

body.woocommerce-cart td.product-price bdi {
    color: #9F9F9F !important;
}

/* Product Subtotal */
body.woocommerce-cart td.product-subtotal {
    text-align: center !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    color: #9F9F9F !important;
}

body.woocommerce-cart td.product-subtotal .amount,
body.woocommerce-cart td.product-subtotal .woocommerce-Price-amount {
    color: #9F9F9F !important;
}

body.woocommerce-cart td.product-subtotal bdi {
    color: #9F9F9F !important;
}

/* ========================================
   QUANTITY SELECTOR
======================================== */
body.woocommerce-cart .quantity {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #D1D5DB !important;
    border-radius: 0px !important;
    overflow: hidden !important;
    background: #FFFFFF !important;
    height: 40px !important;
    margin: 0 auto !important;
}

body.woocommerce-cart .quantity .label,
body.woocommerce-cart .quantity label.label,
body.woocommerce-cart .quantity .screen-reader-text {
    display: none !important;
}

body.woocommerce-cart .quantity .qty-box {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    height: 100% !important;
    width: 100% !important;
}

/* Minus Button */
body.woocommerce-cart .quantity .decrease,
body.woocommerce-cart .quantity span.decrease {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 30px !important;
    width: 30px !important;
    height: 100% !important;
    background: #FFFFFF !important;
    color: #000000 !important;
    border: none !important;
    border-right: 1px solid #E5E7EB !important;
    cursor: pointer !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

body.woocommerce-cart .quantity .decrease:hover {
    background: #F3F4F6 !important;
}

/* Plus Button */
body.woocommerce-cart .quantity .increase,
body.woocommerce-cart .quantity span.increase {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 30px !important;
    width: 30px !important;
    height: 100% !important;
    background: #8A8F91 !important;
    color: #FFFFFF !important;
    border: none !important;
    border-left: 1px solid #8A8F91 !important;
    cursor: pointer !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

body.woocommerce-cart .quantity .increase:hover {
    background: #6B7280 !important;
}

/* Quantity Input */
body.woocommerce-cart .quantity input.qty,
body.woocommerce-cart input[type="number"].qty {
    display: inline-block !important;
    visibility: visible !important;
    width: 40px !important;
    min-width: 40px !important;
    flex-grow: 0 !important;
    height: 100% !important;
    border: none !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #0A0A0A !important;
    background: #FFFFFF !important;
    padding: 0 8px !important;
    margin: 0 !important;
    -moz-appearance: textfield !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    opacity: 1 !important;
    box-shadow: none !important;
}

body.woocommerce-cart .quantity input.qty:focus {
    outline: none !important;
    box-shadow: none !important;
}

body.woocommerce-cart .quantity input.qty::-webkit-outer-spin-button,
body.woocommerce-cart .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* ========================================
   REMOVE/TRASH BUTTON
======================================== */
body.woocommerce-cart td.product-remove {
    text-align: center !important;
    width: 60px !important;
}

body.woocommerce-cart td.product-remove a,
body.woocommerce-cart a.mf-remove {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0px !important;
    color: #DC2626 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

body.woocommerce-cart td.product-remove a:hover,
body.woocommerce-cart a.mf-remove:hover {
    background: transparent !important;
    opacity: 0.7 !important;
}

body.woocommerce-cart td.product-remove a i,
body.woocommerce-cart a.mf-remove i {
    color: #DC2626 !important;
    background-image: url('../../../../assets/img/del\ icon.svg') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    font-size: 0 !important;
    width: 20px !important;
    height: 20px !important;
    display: inline-block !important;
}

/* ========================================
   HIDE UNWANTED ELEMENTS
======================================== */
/* Hide yellow Back to Shop button */
body.woocommerce-cart a.btn-shop,
body.woocommerce-cart .btn-shop {
    display: none !important;
}

/* Hide Update Cart button */
body.woocommerce-cart button[name="update_cart"],
body.woocommerce-cart .btn-update {
    display: none !important;
}

/* Hide Coupon section */
body.woocommerce-cart .coupon,
body.woocommerce-cart .col-coupon {
    display: none !important;
}

/* Hide Actions row background */
body.woocommerce-cart table.shop_table tr td.actions {
    display: none !important;
}

/* Hide empty columns in cart-collaterals */
body.woocommerce-cart .cart-collaterals .row .col-md-4.col-colla:empty,
body.woocommerce-cart .cart-collaterals .row > .col-md-4:first-child {
    display: none !important;
}

/* Make cart totals full width in its container */
body.woocommerce-cart .cart-collaterals .row {
    display: block !important;
}

body.woocommerce-cart .cart-collaterals .col-md-8,
body.woocommerce-cart .cart-collaterals .col-colla {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding: 0 !important;
}

/* ========================================
   ORDER SUMMARY BOX
======================================== */
body.woocommerce-cart .cart_totals {
    background: #3A5F79 !important;
    background-color: #3A5F79 !important;
    padding: 30px !important;
    border-radius: 0px !important;
    position: sticky !important;
    top: 20px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Order Summary Title - Hide default "Cart totals" h2 */
body.woocommerce-cart .cart_totals h2:last-of-type {
    display: none !important;
}

/* Order Summary Title - Custom styling */
body.woocommerce-cart .cart_totals h2,
body.woocommerce-cart .cart_totals > h2 {
    color: #FFFFFF !important;
    font-size: 31px !important;
    font-weight: 600 !important;
    margin: 0 0 24px 0 !important;
    padding: 0 !important;
    text-align: center !important;
    font-family: 'Poppins', sans-serif !important;
    background: none !important;
    border: none !important;
    display: block !important;
}

/* Summary Table */
body.woocommerce-cart .cart_totals table.shop_table {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    margin-bottom: 24px !important;
    border-radius: 0 !important;
}

body.woocommerce-cart .cart_totals table.shop_table thead {
    display: none !important;
}

body.woocommerce-cart .cart_totals table.shop_table tr {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

body.woocommerce-cart .cart_totals table.shop_table tr:last-child {
    border-bottom: none !important;
}

body.woocommerce-cart .cart_totals table.shop_table th,
body.woocommerce-cart .cart_totals table.shop_table td {
    padding: 12px 0 !important;
    border: none !important;
    color: #FFFFFF !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    background: transparent !important;
}

body.woocommerce-cart .cart_totals table.shop_table th {
    text-align: left !important;
    color: #FFFFFF !important;
}

body.woocommerce-cart .cart_totals table.shop_table td {
    text-align: right !important;
}

body.woocommerce-cart .cart_totals table.shop_table td * {
    color: #FFFFFF !important;
}

body.woocommerce-cart .cart_totals table.shop_table .amount,
body.woocommerce-cart .cart_totals .amount {
    color: #FFFFFF !important;
}

/* Shipping FREE text - make it yellow/gold */
body.woocommerce-cart .cart_totals .shipping td,
body.woocommerce-cart .cart_totals tr.shipping td {
    color: #FFD700 !important;
}

/* Order Total Row */
body.woocommerce-cart .cart_totals tr.order-total {
    border-top: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-bottom: none !important;
}

body.woocommerce-cart .cart_totals tr.order-total th,
body.woocommerce-cart .cart_totals tr.order-total td {
    font-size: 18px !important;
    font-weight: 700 !important;
    padding-top: 16px !important;
}

body.woocommerce-cart .cart_totals tr.order-total td strong {
    color: #FFFFFF !important;
}

/* ========================================
   CHECKOUT BUTTON (GLASSMORPHIC)
======================================== */
body.woocommerce-cart .wc-proceed-to-checkout {
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
}

body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
body.woocommerce-cart a.checkout-button.button.alt {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 14px 30px !important;
    border-radius: 50px !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    font-family: 'Poppins', sans-serif !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;

    backdrop-filter: blur(42px) !important;
    background-color: #FFFFFF4D;
    box-shadow:
        -3.54px -3.54px 1.77px -3.54px rgba(255, 255, 255, 0.9) inset,
        3.54px 3.54px 1.77px -1.54px rgba(255, 255, 255, 0.5) inset,
        0px 10px 20px 0px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
    text-transform: none !important;
}

body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
body.woocommerce-cart a.checkout-button.button.alt:hover {
    opacity: 0.9 !important;
    transform: translateY(-2px) !important;
}

/* ========================================
   TRUST BADGES
======================================== */
body.woocommerce-cart .trust-badges {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-top: 20px !important;
    padding: 0 !important;
}

body.woocommerce-cart .trust-badge {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: #FFFFFF !important;
    font-size: 14px !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 400 !important;
}

body.woocommerce-cart .trust-badge::before {
    content: '✓' !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    background: #3A5F79 !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 50% !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    color: #FFFFFF !important;
}

/* ========================================
   RESPONSIVE - TABLET
======================================== */
@media (max-width: 992px) {
    body.woocommerce-cart .woocommerce {
        flex-direction: column !important;
    }

    body.woocommerce-cart form.woocommerce-cart-form,
    body.woocommerce-cart .cart-collaterals {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }

    body.woocommerce-cart .cart_totals {
        position: static !important;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
======================================== */
@media (max-width: 767px) {
    /* Override theme position absolute on thumbnail link */
    .woocommerce-cart .woocommerce table.cart td.product-thumbnail > a {
        position: static !important;
    }
}

@media (max-width: 768px) {
    body.woocommerce-cart .woocommerce {
        padding: 20px 15px !important;
        gap: 24px !important;
    }

    body.woocommerce-cart table.shop_table.cart thead th {
        font-size: 12px !important;
        padding: 12px 8px !important;
    }

    body.woocommerce-cart table.shop_table.cart td {
        padding: 12px 8px !important;
        font-size: 13px !important;
    }

    body.woocommerce-cart td.product-thumbnail img {
        max-width: 60px !important;
    }

    body.woocommerce-cart td.product-name {
        max-width: 120px !important;
        word-wrap: break-word !important;
    }

    body.woocommerce-cart td.product-name a {
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    body.woocommerce-cart .quantity {
        width: 90px !important;
        height: 36px !important;
    }

    body.woocommerce-cart .quantity .decrease,
    body.woocommerce-cart .quantity .increase {
        width: 28px !important;
        min-width: 28px !important;
        height: 100% !important;
        font-size: 16px !important;
    }

    body.woocommerce-cart .quantity input.qty {
        width: 32px !important;
        min-width: 32px !important;
        height: 100% !important;
        font-size: 13px !important;
    }

    /* Hide duplicate remove button inside quantity cell */
    body.woocommerce-cart td.product-quantity .product-remove {
        display: none !important;
    }

    body.woocommerce-cart .cart_totals {
        padding: 24px !important;
    }

    body.woocommerce-cart .cart_totals h2 {
        font-size: 20px !important;
        text-align: center !important;
        color: #FFFFFF !important;
    }

    body.woocommerce-cart a.checkout-button.button.alt {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
}

/* ========================================
   RESPONSIVE - SMALL MOBILE
======================================== */
@media (max-width: 480px) {
    /* Hide table header on mobile */
    body.woocommerce-cart table.shop_table.cart thead {
        display: none !important;
    }

    /* Card-style layout for each cart item */
    body.woocommerce-cart table.shop_table.cart tbody tr.cart_item {
        display: flex !important;
        flex-wrap: wrap !important;
        padding: 16px !important;
        padding-right: 40px !important;
        margin-bottom: 12px !important;
        border: 1px solid #E5E7EB !important;
        border-radius: 8px !important;
        position: relative !important;
        gap: 8px !important;
    }

    /* All table cells - reset to block */
    body.woocommerce-cart table.shop_table.cart td {
        display: block !important;
        text-align: left !important;
        padding: 4px 0 !important;
        border: none !important;
    }

    /* Product thumbnail - inline with name */
    body.woocommerce-cart td.product-thumbnail {
        width: auto !important;
        flex: 0 0 60px !important;
        margin-bottom: 0 !important;
    }

    body.woocommerce-cart td.product-thumbnail img {
        max-width: 60px !important;
        height: auto !important;
    }

    /* Product name - next to thumbnail */
    body.woocommerce-cart td.product-name {
        flex: 1 1 calc(100% - 80px) !important;
        width: auto !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    body.woocommerce-cart td.product-name a {
        display: block !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Price - full width with label */
    body.woocommerce-cart td.product-price {
        width: 100% !important;
        text-align: left !important;
    }

    body.woocommerce-cart td.product-price::before {
        content: 'Price: ' !important;
        font-weight: 500 !important;
        color: #374151 !important;
    }

    /* Quantity - full width */
    body.woocommerce-cart td.product-quantity {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 10px !important;
    }

    body.woocommerce-cart td.product-quantity .quantity {
        margin: 0 !important;
    }

    /* Hide the remove button INSIDE product-quantity (duplicate) */
    body.woocommerce-cart td.product-quantity .product-remove {
        display: none !important;
    }

    /* Subtotal - full width with label */
    body.woocommerce-cart td.product-subtotal {
        width: 100% !important;
        text-align: left !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        color: #374151 !important;
    }

    body.woocommerce-cart td.product-subtotal::before {
        content: 'Total: ' !important;
        font-weight: 500 !important;
        color: #374151 !important;
    }

    body.woocommerce-cart td.product-subtotal .amount {
        color: #374151 !important;
    }

    /* Remove button - position at top right */
    body.woocommerce-cart td.product-remove {
        position: absolute !important;
        top: 16px !important;
        right: 8px !important;
        width: auto !important;
        padding: 0 !important;
        display: block !important;
        z-index: 10 !important;
    }

    /* Order Summary box */
    body.woocommerce-cart .cart_totals {
        padding: 20px !important;
    }

    body.woocommerce-cart .cart_totals h2 {
        font-size: 18px !important;
        text-align: center !important;
        color: #FFFFFF !important;
    }

    body.woocommerce-cart .trust-badge {
        font-size: 12px !important;
    }
}
.woocommerce-cart .woocommerce table.shop_table td .quantity .increase {
    right: 0px !important;
}
.woocommerce-cart .woocommerce table.shop_table td .quantity .decrease {
    left: 0 !important;
}
.elementor-5875 .elementor-element.elementor-element-ec703d9 {
    background-color: white !important;
}
.elementor-5875 .elementor-element.elementor-element-ec703d9 {
    background-color: white !important;
}
