/*
Theme Name: BMPCode Astra Child
Theme URI: https://bmpcode.com/
Description: Child theme for BMPCode, based on Astra.
Author: BMPCode
Author URI: https://bmpcode.com/
Template: astra
Version: 1.0.9
Text Domain: bmpcode-astra-child
*/

/* BMPCode global customizations */

/* ==========================================
   BMPCode Sticky Header v1
   Desktop + Mobile
   ========================================== */

#masthead {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #FFFFFF;
    box-shadow: 0 2px 12px rgba(23, 36, 59, 0.07);
}

/* WordPress admin bar compatibility */

body.admin-bar #masthead {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar #masthead {
        top: 46px;
    }
}


/* ==========================================
   BMPCode WooCommerce Product Layout v1
   Desktop only
   ========================================== */

@media (min-width: 922px) {

    body.single-product .woocommerce div.product div.images {
        width: 40%;
    }

    body.single-product .woocommerce div.product div.summary {
        width: 56%;
    }

}


/* ==========================================
   BMPCode Cart Design v1
   Classic WooCommerce Cart
   ========================================== */

/* Main cart container */

body.woocommerce-cart .entry-content {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

body.woocommerce-cart .woocommerce {
    color: #17243B;
}

/* Product table */

body.woocommerce-cart .woocommerce-cart-form {
    overflow: hidden;
    border: 1px solid #E3EAFE;
    border-radius: 16px;
    background: #FFFFFF;
}

body.woocommerce-cart table.shop_table {
    margin: 0;
    border: 0;
    border-collapse: collapse;
    background: #FFFFFF;
}

body.woocommerce-cart table.shop_table th {
    padding: 18px 16px;
    background: #F4F7FF;
    color: #17243B;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid #E3EAFE;
}

body.woocommerce-cart table.shop_table td {
    padding: 17px 16px;
    border-bottom: 1px solid #EDF1F8;
    vertical-align: middle;
    color: #45536A;
}

/* Product images */

body.woocommerce-cart td.product-thumbnail img {
    width: 72px;
    height: 72px;
    max-width: 72px;
    object-fit: contain;
    border-radius: 9px;
}

/* Product name */

body.woocommerce-cart td.product-name a {
    color: #17243B;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

body.woocommerce-cart td.product-name a:hover {
    color: #3658F5;
}

/* Prices */

body.woocommerce-cart td.product-price,
body.woocommerce-cart td.product-subtotal {
    color: #17243B;
    font-weight: 700;
}

/* Remove product */

body.woocommerce-cart a.remove {
    color: #596579 !important;
    transition: color .2s ease, background .2s ease;
}

body.woocommerce-cart a.remove:hover {
    background: #FFF0F0;
    color: #D13B3B !important;
}

/* Cart actions */

body.woocommerce-cart .woocommerce-cart-form .actions {
    padding: 16px;
    background: #FFFFFF;
}

/* Hide redundant Update Cart button */

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

/* Cart totals */

body.woocommerce-cart .cart-collaterals {
    margin-top: 30px;
}

body.woocommerce-cart .cart_totals {
    padding: 27px;
    border: 1px solid #E3EAFE;
    border-radius: 16px;
    background: #F8FAFF;
}

body.woocommerce-cart .cart_totals h2 {
    margin: 0 0 22px;
    color: #17243B;
    font-size: 23px;
    font-weight: 750;
}

body.woocommerce-cart .cart_totals table.shop_table {
    background: transparent;
}

body.woocommerce-cart .cart_totals table.shop_table th,
body.woocommerce-cart .cart_totals table.shop_table td {
    padding: 14px 10px;
    background: transparent;
    border-bottom: 1px solid #E3EAFE;
}

body.woocommerce-cart .cart_totals .order-total {
    font-size: 18px;
    color: #17243B;
}

/* Checkout button */

body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:visited {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 22px;
    border-radius: 10px;
    background: #3658F5;
    color: #FFFFFF !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background .2s ease, box-shadow .2s ease;
}

body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
    background: #2748DD;
    color: #FFFFFF !important;
    box-shadow: 0 6px 18px rgba(54,88,245,.18);
}

/* Notices */

body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info {
    border-top-color: #3658F5;
    background: #F4F7FF;
    color: #17243B;
    border-radius: 10px;
}

/* Mobile */

@media (max-width: 767px) {

    body.woocommerce-cart .woocommerce-cart-form {
        border-radius: 12px;
    }

    body.woocommerce-cart table.shop_table td {
        padding: 13px 12px;
    }

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

    body.woocommerce-cart .cart_totals {
        padding: 20px;
        border-radius: 12px;
    }

    body.woocommerce-cart .cart_totals h2 {
        font-size: 21px;
    }

    body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
        width: 100%;
    }
}


/* ==========================================
   BMPCode Cart Compact v1
   ========================================== */

/* Hide unused quantity column */

body.woocommerce-cart table.shop_table th.product-quantity,
body.woocommerce-cart table.shop_table td.product-quantity {
    display: none !important;
}

/* Reduce product row height */

body.woocommerce-cart .woocommerce-cart-form
table.shop_table td {
    padding-top: 12px;
    padding-bottom: 12px;
}

/* Remove empty actions row */

body.woocommerce-cart .woocommerce-cart-form
table.shop_table tr:has(> td.actions) {
    display: none;
}

/* Reduce space before totals */

body.woocommerce-cart .cart-collaterals {
    margin-top: 20px;
}

/* Keep totals compact */

body.woocommerce-cart .cart_totals {
    padding: 22px;
}


/* ==========================================
   BMPCode Checkout Fields Design v2
   Clear, compact, accessible fields
   ========================================== */

/* Compact field spacing */

body.woocommerce-checkout form.checkout
.woocommerce-billing-fields .form-row {
    margin-bottom: 12px;
}

/* Field labels */

body.woocommerce-checkout form.checkout
.woocommerce-billing-fields .form-row label {
    margin-bottom: 5px;
    color: #17243B;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.4;
}

/* Text inputs and selects */

body.woocommerce-checkout form.checkout
.woocommerce-billing-fields input.input-text,
body.woocommerce-checkout form.checkout
.woocommerce-billing-fields select {
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid #C5D5F5;
    border-radius: 8px;
    background: #FFFFFF;
    color: #17243B;
    font-size: 14px;
    box-shadow: none;
    transition: border-color .2s ease,
                box-shadow .2s ease;
}

/* Focus state */

body.woocommerce-checkout form.checkout
.woocommerce-billing-fields input.input-text:focus,
body.woocommerce-checkout form.checkout
.woocommerce-billing-fields select:focus {
    border-color: #3658F5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(54,88,245,.12);
}

/* Select2 country/state fields */

body.woocommerce-checkout
.woocommerce-billing-fields
.select2-container--default
.select2-selection--single {
    height: 44px;
    min-height: 44px;
    border: 1px solid #C5D5F5;
    border-radius: 8px;
    background: #FFFFFF;
}

body.woocommerce-checkout
.woocommerce-billing-fields
.select2-container--default
.select2-selection--single
.select2-selection__rendered {
    line-height: 42px;
    padding-left: 13px;
    color: #17243B;
}

body.woocommerce-checkout
.woocommerce-billing-fields
.select2-container--default
.select2-selection--single
.select2-selection__arrow {
    height: 42px;
}

body.woocommerce-checkout
.woocommerce-billing-fields
.select2-container--focus
.select2-selection--single,
body.woocommerce-checkout
.woocommerce-billing-fields
.select2-container--open
.select2-selection--single {
    border-color: #3658F5;
    box-shadow: 0 0 0 3px rgba(54,88,245,.12);
}

/* Placeholder text */

body.woocommerce-checkout
.woocommerce-billing-fields input::placeholder {
    color: #8190A8;
    opacity: 1;
}

/* Mobile */

@media (max-width: 600px) {
    body.woocommerce-checkout form.checkout
    .woocommerce-billing-fields .form-row {
        margin-bottom: 11px;
    }

    body.woocommerce-checkout form.checkout
    .woocommerce-billing-fields input.input-text {
        font-size: 16px;
    }
}


/* ==========================================
   BMPCode Purchase Protection Card v1
   ========================================== */

body.woocommerce-cart .bmpcode-purchase-protection {
    margin: 22px 0 26px;
    padding: 20px 24px;
    background: #F4F7FF;
    border: 1px solid #C8D7FF;
    border-radius: 14px;
    color: #263B60;
    box-sizing: border-box;
    clear: both;
}

body.woocommerce-cart .bmpcode-purchase-protection-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #142B50;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
}

body.woocommerce-cart .bmpcode-purchase-protection-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 50%;
    background: #3658F5;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 700;
}

body.woocommerce-cart .bmpcode-purchase-protection p {
    margin: 0 0 9px;
    color: #435778;
    font-size: 14px;
    line-height: 1.6;
}

body.woocommerce-cart .bmpcode-purchase-protection-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 13px;
}

body.woocommerce-cart .bmpcode-purchase-protection-links a {
    color: #3658F5;
    font-weight: 600;
    text-decoration: none;
}

body.woocommerce-cart .bmpcode-purchase-protection-links a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    body.woocommerce-cart .bmpcode-purchase-protection {
        margin: 18px 0 22px;
        padding: 17px 16px;
        border-radius: 12px;
    }

    body.woocommerce-cart .bmpcode-purchase-protection-title {
        font-size: 16px;
    }

    body.woocommerce-cart .bmpcode-purchase-protection p {
        font-size: 13px;
    }
}

/* ==========================================
   BMPCode Digital Consent Checkout v1
   ========================================== */

body.woocommerce-checkout .bmpcode-digital-consent {
    margin: 10px 0 16px;
    padding: 13px 15px;
    background: #F4F7FF;
    border: 1px solid #D5E0FF;
    border-radius: 10px;
}

body.woocommerce-checkout .bmpcode-digital-consent .form-row {
    margin: 0 !important;
    padding: 0 !important;
}

body.woocommerce-checkout .bmpcode-digital-consent label.checkbox {
    display: block !important;
    margin: 0 !important;
    color: #344765 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.55 !important;
    cursor: pointer;
}

body.woocommerce-checkout .bmpcode-digital-consent input[type="checkbox"] {
    margin-right: 9px !important;
    vertical-align: middle;
}

body.woocommerce-checkout .bmpcode-digital-consent .required {
    color: #D32F2F;
}

