/* WooCommerce Cart Page Styles */
body.woocommerce-cart,
body.woocommerce-checkout {
    background-color: #F4F4F4;

    .woocommerce-error, .woocommerce-info, .woocommerce-message {
        font-size: 12px !important;
        line-height: 15px !important;
        color: #243540 !important;
        background-color: #fff !important;
    }

    .cart-collaterals .cart_totals,
    .woocommerce-notices-wrapper  {
        width: 100% !important;
    }

    .inner {
        .woocommerce {
            padding-bottom: 32px !important;
            @media (min-width: 1280px) {
                padding-bottom: 143px !important;
            }
        }
    }

    .woocommerce-info {
        border-top-color: #243540 !important;

        &:before {
            color: #243540 !important;
        }

        .showlogin,
        .showcoupon {
            color: #243540 !important;
            font-weight: 700 !important;
        }
    }

    *:not(i) {
        font-family: 'Montserrat', sans-serif !important;
    }

    .page-header-woocommerce {
        padding-top: 22px;
        padding-bottom: 26px;

        h1 {
            font-size: 32px;
            line-height: 35px;
            font-weight: 700;
            margin-top: 24px;
        }

        @media (min-width: 1280px) {
            padding-top: 25px;
            padding-bottom: 30px;
        }
    }

    .woocommerce-form-coupon,
    .woocommerce-form-login {
        border-radius: 0 !important;
        border-color: #243540 !important;

        label,
        .lost_password a {
            font-weight: 700 !important;
            font-size: 14px !important;
            line-height: 17px !important;
            color: #243540 !important;
        }
        
        .button {
            padding: 11px 24px 11px 18px !important
        }
    }
}

body.woocommerce-cart {

    .shop_table {
        padding-left: 30px;
        padding-right: 30px;
    }

    .shop_table.cart {
        background-color: #FFFFFF;
        border: none;
        border-radius: 0;
        padding: 26px 30px;
        td {
            border: none !important;
        }

        button:not(.qty-change) {
            font-weight: 700;
            font-family: 'Montserrat', sans-serif !important;
            font-size: 13px !important;
            line-height: 15px !important;
            background-color: #243540 !important;
            color: #FFFFFF !important;
            border-radius: 0 !important;
            padding: 12px 20px 11px 20px !important;
        }

        #coupon_code {
            min-width: 240px;
            border: none;
            background: #F4F4F4;
            padding: 11px 16px 12px 16px !important;
            font-size: 12px;
            line-height: 15px;
            font-weight: 600 !important;
            color: #243540;
            margin: 0 !important;
        }
    }

    .shop_table.cart tbody .cart_item td {
        border-bottom: 3px solid #F4F4F4 !important;
        font-size: 14px !important;
        line-height: 17px !important;
        color: #243540 !important;
        font-weight: 700 !important;
    }

    .shop_table.cart tbody .cart_item:not(:has(+ .cart_item)) td {
        border-bottom: none !important;
    }

    .product-thumbnail {
        img {
            width: 80px;
            height: 80px;
            object-fit: contain;
        }
    }

    .product-name {
        a {
            font-size: 14px;
            line-height: 17px;
            font-weight: 700;
            color: #243540;

            &:hover {
                text-decoration: underline;
            }
        }
    }

    .cart_totals {
        background-color: #243540;
        padding-top: 30px;

        .shop_table {
            padding: 0 30px;

            th {
                padding-left: 0;
            }

            td {
                padding-right: 0;
            }

            td[data-title="Total"] {
                width: 100%;
                display: block;
                strong {
                    width: 100% !important;
                    font-size: 16px;
                    line-height: 20px;
                    font-weight: 700 !important;
                    color: #FFEE4E;
                }
            }

            .includes_tax {
                display: block;
                width: 100%;
                font-size: 12px;
                line-height: 15px;
                color: #FFFFFF;
            }
        }

        .wc-proceed-to-checkout {
            padding: 30px;
            background-color: #42B2A4;

            .button {
                width: 100%;
                display: block;
                text-align: center;
                margin-bottom: 20px;
                font-size: 14px !important;
                line-height: 16px !important;
                text-decoration: none !important;
                padding: 16px 24px 16px 18px !important;
                background-color: #ffffff !important;
                border-radius: 0 !important;
                color: #243540 !important;
                font-weight: 800 !important;
                text-transform: uppercase !important;
                font-family: 'Montserrat', sans-serif !important;
                &:last-of-type {
                    margin-bottom: 0;
                }
            }

            .button.checkout-button {
                background-color: #FFEE4E !important;
                color: #243540 !important;
            }

            .continue-shopping-button {
                width: 100%;
                color: #ffffff !important;
                font-size: 12px !important;
                line-height: 15px !important;
                text-transform: uppercase !important;
                text-decoration: underline !important;
                font-family: 'Montserrat', sans-serif !important;
                font-weight: 700 !important;
                text-align: center;

                &:hover {
                    opacity: 0.8;
                    transition: opacity 0.3s ease;
                }
            }
        }

    }

    /* Turn on two-column layout at 1280px+ */
    @media (min-width: 1280px) {
        .woocommerce {
            display: flex;
            flex-wrap: wrap;
            align-items: flex-start;
            gap: 30px;
        }

        /* LEFT AREA: CART TABLE */
        .woocommerce-cart-form {
            flex: 1 1 auto;
            max-width: calc(100% - 360px);
        }

        /* When cross-sells are present, cart form expands to full width */
        .woocommerce:has(.cross-sells) .woocommerce-cart-form {
            max-width: 100%;
        }

        /* RIGHT AREA: CART TOTALS (default narrow sidebar) */
        .cart-collaterals {
            width: 330px;
            flex: 0 0 330px;
        }

        /* When cross-sells present: cart-collaterals becomes its own full-width row */
        .cart-collaterals:has(.cross-sells) {
            flex: 0 0 100%;
            width: 100%;
            display: flex;
            gap: 30px;
            align-items: flex-start;
        }

        .cart-collaterals:has(.cross-sells) .cross-sells {
            flex: 1 1 auto;
        }

        .cart-collaterals:has(.cross-sells) .cart_totals {
            width: 330px !important;
            flex: 0 0 330px;
        }
    }
}

/* -----------------------------------------
   Cross-Sells – follows .related-products-wrapper layout
------------------------------------------*/
body.woocommerce-cart .cross-sells {
    padding: 36px 0 32px 0;

    h2:not(.woocommerce-loop-product__title) {
        font-size: 20px !important;
        line-height: 26px !important;
        text-transform: none !important;
        margin-bottom: 30px !important;
        color: #243540 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    ul.products {
        margin: 0 !important;
    }

    @media (min-width: 1024px) {
        padding: 36px 0 64px 0;
    }
}

/* Breadcrumbs styles */

.woocommerce-breadcrumbs {
  font-size: 11px;
  font-weight: 300;
  color: #243540;
  text-transform: uppercase;

  a,
  .breadcrumb_last {
    color: #243540 !important;
  }
  .breadcrumb_last {
    font-weight: 700 !important;
  }
}

.mobile-breadcrumbs {
  display: none;
}

@media (max-width: 768px) {
  .mobile-breadcrumbs {
    display: flex;
    align-items: center;
  }
  .desktop-breadcrumbs {
    display: none;
  }
}

.back-button {
  font-size: 15px;
  font-weight: 600;
  color: #243540;
  text-transform: capitalize;
  text-decoration: none;

  img {
    width: 12px;
    height: auto;
    margin-right: 16px;
    vertical-align: middle;
  }
}

/* Quantity buttons styles */

/* Remove default browser quantity controls (spinner arrows) */
.product-quantity input[type="number"]::-webkit-outer-spin-button,
.product-quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-quantity input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Style the quantity input field */
.product-quantity input[type="number"] {
    width: 60px;
    height: 42px;
    text-align: center;
    border: 1px solid #F4F4F4;
    font-size: 14px !important;
    line-height: 17px !important;
    color: #243540 !important;
    font-weight: 700 !important;
margin: 0 5px;
}

/* Style the quantity buttons */
.qty-change {
    background-color: #fff;
    border: 1px solid #F4F4F4;
    color: #243540;
    cursor: pointer;

    &.plus {
        border-left: none;
    }

    &.minus {
        border-right: none;
    }

    &:hover > .plus {
        border-left: solid 1px #F4F4F4;
    }
}

.qty-change:hover {
    background-color: #f5f5f5;
}

/* -----------------------------------------
   WooCommerce Checkout – Match Cart Styling
------------------------------------------*/

body.woocommerce-checkout {

    #order_review_heading {
        display: none !important;
    }

    .custom-order-review-title:not(:nth-child(1)) {
        display: none !important;
    }

    .custom-order-review-title:nth-child(1) {
        display: block !important;
        font-size: 22px !important;
        line-height: 25px !important;
        font-weight: 700 !important;
        color: #ffffff !important;
        padding-left: 12px !important;
        margin-bottom: 20px !important;
    }

    /* Global font match */
    *:not(i) {
        font-family: 'Montserrat', sans-serif !important;
    }

    /* Page header match */
    .page-header-woocommerce {
        padding-top: 25px;
        padding-bottom: 30px;

        h1 {
            font-size: 32px;
            line-height: 35px;
            font-weight: 700;
        }
    }

    .wc_payment_method label {
        color: #ffffff !important;
    }

    /* -----------------------------------------
       Form Inputs + Labels (billing, shipping)
       Scoped to .woocommerce-section to avoid overriding footer forms
    ------------------------------------------*/
    .woocommerce-section {
        label {
            font-size: 12px;
            font-weight: 800;
            text-transform: uppercase;
            color: #243540;
            margin-bottom: 6px;
        }

        input:not([type="checkbox"]),
        textarea {
            background: #ffffff !important;
            border: none !important;
            border-radius: 0 !important;
            padding: 11px 16px 11px 16px !important;
            font-size: 13px !important;
            line-height: 16px !important;
            font-weight: 600 !important;
            color: #243540 !important;
        }

        .form-row {
            padding: 0 !important;
        }
    }

    /* Select2 dropdown match */
    .select2-container--default .select2-selection--single {
        background: #F4F4F4 !important;
        border: none !important;
        border-radius: 0 !important;
        height: 48px !important;

        .select2-selection__rendered {
            line-height: 48px !important;
            padding-left: 16px !important;
            font-size: 14px !important;
            font-weight: 600 !important;
            color: #243540 !important;
        }

        .select2-selection__arrow {
            height: 48px !important;
        }
    }

    /* -----------------------------------------
       Buttons (place order + others)
       Scoped to .woocommerce-section to avoid overriding footer forms
    ------------------------------------------*/
    .woocommerce-section {
        .button,
        #place_order {
            width: 100%;
            display: block;
            font-weight: 800 !important;
            font-size: 14px !important;
            line-height: 16px !important;
            text-transform: uppercase !important;
            padding: 16px 24px 16px 18px !important;
            border-radius: 0 !important;
            background-color: #FFEE4E !important;
            color: #243540 !important;
        }

        /* Alternative buttons */
        .button.alt {
            background-color: #243540 !important;
            color: #ffffff !important;
        }
    }

    /* -----------------------------------------
       Order Review (Right Column)
       Matches cart totals dark panel
    ------------------------------------------*/
    #order_review {
        background: #243540 !important;
        padding: 30px 18px !important;
        color: #ffffff !important;

        #order_review_heading {
            font-size: 22px;
            line-height: 25px;
            font-weight: 700;
            color: #ffffff;
            padding-bottom: 15px;
        }

        .shop_table {
            margin-bottom: 20px;

            td,
            th {
                border-bottom: 3px solid #3D515D !important;
                font-size: 12px !important;
                line-height: 15px !important;
                color: #ffffff !important;
            }

            tr:last-of-type {

                td,
                th {
                    border-bottom: none !important;
                }
            }

            th {
                font-weight: 800;
                text-transform: uppercase;
            }
        }
    }

    /* -----------------------------------------
       Desktop Two-Column Layout @ 1280px
       Matches cart layout
    ------------------------------------------*/
    @media (min-width: 1280px) {

        form.checkout {
            display: flex;
            gap: 30px;
            align-items: flex-start;
        }

        .col2-set {
            flex: 1 1 auto;
            max-width: calc(100% - 360px);
        }

        #order_review {
            width: 330px;
            flex: 0 0 330px;
        }
    }
}

body.woocommerce-cart,
body.woocommerce-checkout {

        .shop_table {
            margin-bottom: 30px;
            border: none !important;
        }

        h2 {
            font-size: 22px;
            line-height: 25px;
            font-weight: 700;
            color: #ffffff;
            padding-left: 30px;
            padding-right: 30px;
        }

        tbody {
            td, th {
                border: none !important;
            }
            tr th, tr td {
                border-bottom: solid 3px #3D515D !important;
            }

            tr:last-of-type th,
            tr:last-of-type td {
                border-bottom: none !important;
            }

            tr th, tr td {
                font-size: 12px;
                line-height: 15px;
                color: #ffffff;
            }
            tr th {
                font-weight: 800;
                text-transform: uppercase;
                padding-left: 0;
            }

            tr td {
                padding-right: 0;

                &[data-title="Subtotal"] {
                    font-weight: 700;
                }

                .woocommerce-shipping-calculator {

                    a {
                        width: 100%;
                        color: #ffffff !important;
                        font-size: 12px !important;
                        line-height: 15px !important;
                        text-transform: uppercase !important;
                        text-decoration: underline !important;
                        font-family: 'Montserrat', sans-serif !important;
                        font-weight: 700 !important;

                        &:hover {
                            opacity: 0.8;
                            transition: opacity 0.3s ease;
                        }
                    }
                    a:after {
                        display: none;
                    }
                }

                #shipping_method {
                    label {
                        font-weight: 700;
                    }
                }
            }
        }
}

.woocommerce-cart-form button[name="update_cart"] {
    display: none !important;
}