/* 1. UNIVERSAL: Hide the original inputs (radio and checkbox) */
.woocommerce-SavedPaymentMethods-saveNew {
    margin-top: 1rem;
}
.wc_payment_method input[type="radio"],
.woocommerce-SavedPaymentMethods-saveNew input[type="checkbox"],
.woocommerce-form__label-for-checkbox .input-checkbox,
.woocommerce-form__label-for-checkbox .woocommerce-form__input-checkbox {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: absolute;
    opacity: 0;
    width: 1.5em;
    height: 1.5em;
    z-index: 10;
    cursor: pointer;
    margin: 0;
    padding: 0;
    left: 0;
    top: 0;
}

.woocommerce-SavedPaymentMethods-saveNew input[type="checkbox"] + label {
    display: inline;
    padding-left: 30px;
}

/* 2. UNIVERSAL: Base Label Styles (Radio and Nested Checkbox) */
.wc_payment_method label,
.woocommerce-form__label-for-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

/* Specific adjustment for nested checkbox container */
.woocommerce-form__label-for-checkbox {
    padding-left: 2em;
    align-items: flex-start;
}

/* Specific vertical adjustment for adjacent radio buttons */
.wc_payment_method label {
    align-items: center;
}

/* 3. UNIVERSAL: Custom Element Base (The box/circle container) */
.wc_payment_method label::before,
.woocommerce-form__label-for-checkbox::before {
    display: block;
    content: '';
    width: 1.25em;
    height: 1.25em;
    border: 1px solid #fff;
    background-color: transparent;
    transition: all 0.2s ease-in-out;
    flex-shrink: 0;
}

/* 3a. RADIO BUTTON (Adjacent +) */
.wc_payment_method > label::before {
    border-radius: 50%;
    margin-right: 0.5em;
    display: inline-block;
}

/* 3b. NESTED CHECKBOX (Absolute positioned ::before) */
.woocommerce-form__label-for-checkbox::before,
.woocommerce-SavedPaymentMethods-saveNew label::before {
    border-radius: 4px;
    position: absolute;
    top: 0.1em;
    left: 0;
}

/* 4. UNIVERSAL: Custom Element Checked Base */
.wc_payment_method input[type="radio"]:checked + label::before,
.woocommerce-SavedPaymentMethods-saveNew input[type="radio"]:checked + label::before,
.woocommerce-form__label-for-checkbox .input-checkbox:checked + .woocommerce-terms-and-conditions-checkbox-text::before,
.woocommerce-form__label-for-checkbox .woocommerce-form__input-checkbox:checked + span::before {
    border-color: #fff;
    background-color: transparent;
}

/* 4a. RADIO BUTTON: Inner Dot (::after on label) */
.wc_payment_method input[type="radio"]:checked + label::after {
    content: '';
    position: absolute;
    display: block;
    top: 0.38em;
    left: 0.32em;
    width: 0.59em;
    height: 0.59em;
    border-radius: 50%;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
}

/* 4b. NESTED CHECKBOX: Inner Checkmark (::after on sibling SPAN) */
.woocommerce-form__label-for-checkbox .input-checkbox:checked + .woocommerce-terms-and-conditions-checkbox-text::after,
.woocommerce-SavedPaymentMethods-saveNew input[type="checkbox"]:checked + label::after,
.woocommerce-form__label-for-checkbox .input-checkbox:checked + span::after,
.woocommerce-form__label-for-checkbox .woocommerce-form__input-checkbox:checked + span::after {
    content: '';
    position: absolute;
    top: 0.3em;
    left: 0.38em;
    width: 0.4em;
    height: 0.8em;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.woocommerce-checkout {
    h3 {
        font-size: 18px;
        font-weight: 800;
        font-family: Inter var, system-ui, sans-serif;
        text-transform: uppercase;
        line-height: 24px;
        letter-spacing: 0.54px;
        --tw-text-opacity: 1;
        color: rgb(255 255 255 / var(--tw-text-opacity, 1));
        margin-bottom: 0;
    }
    .cart_item >td .cart-item-row:last-child {
        margin-bottom: 32px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .cart_item td {
        padding: 0;
    }
    .shop_table {
        margin-top: 0;
    }
    .shop_table th,
    .shop_table td {
        font-family: 'Inter', sans-serif;
        line-height: 1.2;
        letter-spacing: 0.03em;
        color: #FFFFFF;
        text-transform: capitalize;
    }
    .shop_table th, .order-total td  {
        font-weight: 600;
        font-size: 20px;
    }
    .shop_table td {
        font-weight: 400;
        font-size: 18px;
    }
    .order-total th {
        text-transform: uppercase;
    }
    .order-total th, .order-total td {
        padding-top: 32px;
        padding-bottom: 0;
    }
    .order-total {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .shop_table td {
        text-align: right;
    }
    .bhstore-shipping-message {
        text-align: left;
        margin-bottom: 32px;
    }
    .stripe-cards-icon {
        display: block;
        margin-left: 10px;
    }
    tfoot {
        border: 0;
    }

    label {
        font-family: Inter var, system-ui, sans-serif;
        color: #fff;
        font-size: 18px;
        font-style: normal;
        font-weight: 400;
        line-height: 24px;
        letter-spacing: -0.18px;
    }
    .woocommerce-privacy-policy-text {
        margin-bottom: 20px;
        margin-top: 0;
    }
    .woocommerce-privacy-policy-link {
        color: #f00;
    }
    .woocommerce-terms-and-conditions + .form-row {
        margin-top: 14px;
    }
    .wp-block-heading, .woocommerce-terms-and-conditions {
        color: #fff;
    }
    .input-text {
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.2);
        border: unset;
    }
    .checkout-inline-error-message {
        font-size: 12px;
        color: #f00;
    }

    span.select2-selection.select2-selection--single {
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.2);
    }

    .woocommerce-billing-fields > h3 {
        font-size: 34px;
        font-weight: 700;
        letter-spacing: 1.7px;
        line-height: 1;
        margin-bottom: 40px;
    }

    .woocommerce-shipping-fields .shipping_address {
        margin-top: 30px;
    }

    .woocommerce-billing-fields__field-wrapper,
    .woocommerce-shipping-fields__field-wrapper {
        padding: 24px;
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px 20px;
        align-items: flex-end;
        position: relative;

        .form-row {
            width: 100%;
            padding-right: 0;
            margin-bottom: 0;
            padding-left: 0;
        }

        #billing_country_field,
        #shipping_country_field {
            grid-column-start: span 2;
        }
    }

    .woocommerce-billing-fields__field-wrapper::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 650px;
        height: 184px;
        filter: blur(120px);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='658' height='184' viewBox='0 0 658 184' fill='none'%3E%3Cellipse cx='329' cy='92' rx='329' ry='92' fill='%230096CF' fill-opacity='0.5'/%3E%3C/svg%3E");
        z-index: -1;
    }
    #order_comments {
        height: 97px;
        resize: none;
    }
    #wc-stripe-express-checkout-button-separator {
        margin-top: 0 !important;
    }
    .wc_payment_methods {
        display: grid;
        list-style: none;
        padding: 0;
        margin: 0;
        a, strong {
            color: #fff;
        }
    }
    .payment_box >*:first-child {
        padding-top: 10px;
    }
}
.woocommerce-checkout__wrapper {
    display: grid;
    grid-template-columns: 54% 42%;
    gap: 55px;
    width: 100%;
    position: relative;
}
.woocommerce-checkout__wrapper >div {
    position: relative;
    z-index: 10;
}
.woocommerce-checkout__wrapper:before {
    position: absolute;
    content: '';
    display: block;
    width: 1140px;
    height: 220px;
    top: 50%;
    left: 50%;
    background-image: url("data:image/svg+xml,%3Csvg width='1446' height='219' viewBox='0 0 1446 219' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='723' cy='109.5' rx='723' ry='109.5' fill='%23E22415' fill-opacity='0.4'/%3E%3C/svg%3E%0A");
    background-repeat: no-repeat;
    background-size: contain;
    transform: translate(-50%);
    filter: blur(150px);
}
.woocommerce-checkout__billing {
    display: flex;
    gap: 20px;
    flex-direction: column;
}

/** Cart Item Checkout **/
/* === Cart Item Row === */
.cart_item_checkout {
    .cart-item-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
        padding: 32px 0;
        color: #fff;
        font-family: "Inter", sans-serif;
    }

    /* === Left Section (Image + Details) === */
    .cart-item-left {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    /* === Product Image === */
    .cart-image {
        width: 80px;
        height: 80px;
        border-radius: 10px;
        overflow: hidden;
        flex-shrink: 0;
    }

    .cart-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* === Product Info === */
    .cart-item-details {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    /* === Product Title === */
    .product-title {
        font-weight: 600;
        text-transform: uppercase;
        font-size: 14px;
        line-height: 1.4;
        text-align: left;
    }

    .product-meta dl.variation {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 8px;
        row-gap: 3px;
        margin: 0;
        padding: 0;
        font-size: 14px;
        color: #fff;
    }

    .product-meta dt,
    .product-meta dd {
        margin: 0;
        padding: 0;
        text-align: left;
    }

    .product-meta dt {
        font-weight: 700;
        font-size: 14px;
        letter-spacing: -0.01em;
        margin: 0;
        color: #fff;
    }
    .form-row {
        margin-top: 10px;
    }
    .product-meta dd p {
        display: inline;
        margin: 0;
        color: #ccc;
    }

    .cart-item-right {
        text-align: right;
        min-width: 80px;
    }

    .product-price {
        font-weight: 600;
        font-size: 15px;
        color: #fff;
    }
}

@media screen and (max-width: 1024px) {
    .woocommerce-checkout__wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
@media screen and (max-width: 767px){
    .woocommerce-checkout {
        .cart_item > td .cart-item-row:last-child {
            margin-bottom: 20px;
        }
        .woocommerce-billing-fields > h3 {
            font-size: 28px;
            margin-bottom: 20px;
        }
        .shop_table th, .order-total td, .order-total th, .order-total td, .shop_table td {
            font-size: 16px;
        }
        .bhstore-shipping-message {
            margin-bottom: 22px;
        }
        .woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper {
            display: flex;
            flex-direction: column;
        }
        .order-total th, .order-total td {
            padding-top: 22px;
            padding-bottom: 0;
        }
    }
    .woocommerce-checkout__wrapper:before {
        width: 520px;
        height: 220px;
        left: 100%;
        filter: blur(50px);
    }
    .cart_item_checkout {
        .cart-item-row {
            gap: 12px;
            padding: 22px 0;
        }
        .cart-image {
            width: 45px;
            height: 45px;
        }
        .cart-item-right {
            display: none;
        }
    }

}

.bh-checkout-right {
    display: flex;
    padding: 44px;
    align-items: flex-start;
    gap: 10px;
    align-self: stretch;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

@media screen and (max-width: 1280px) {
    .bh-checkout-right {
        padding: 24px;
    }
}

@media screen and (max-width: 1024px) {
    .woocommerce-checkout__wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media screen and (max-width: 767px) {
    .woocommerce-checkout {
        .cart_item > td .cart-item-row:last-child {
            margin-bottom: 20px;
        }

        .woocommerce-billing-fields > h3 {
            font-size: 28px;
            margin-bottom: 20px;
        }

        .shop_table th,
        .order-total td,
        .order-total th,
        .order-total td,
        .shop_table td {
            font-size: 16px;
        }

        .bhstore-shipping-message {
            margin-bottom: 22px;
        }

        .woocommerce-billing-fields__field-wrapper,
        .woocommerce-shipping-fields__field-wrapper {
            display: flex;
            flex-direction: column;
        }

        .order-total th,
        .order-total td {
            padding-top: 22px;
            padding-bottom: 0;
        }
    }

    .woocommerce-checkout__wrapper:before {
        width: 520px;
        height: 220px;
        left: 100%;
        filter: blur(50px);
    }

    .cart_item_checkout {
        .cart-item-row {
            gap: 12px;
            padding: 22px 0;
        }

        .cart-image {
            width: 45px;
            height: 45px;
        }

        .cart-item-right {
            display: none;
        }
    }
}

/** Thank you Page **/
.woocommerce-checkout article {
    overflow: hidden;
}
.custom-thankyou-wrapper {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    color: #fff;
    .bhcar-button-hover-gradient {
        max-width: fit-content;
        margin: 48px auto 0;
    }
}

.custom-thankyou-wrapper::before {
    position: absolute;
    content: "";
    display: block;
    width: 1140px;
    height: 220px;
    top: 50%;
    transform: translate(-50%, -50%);
    left: 50%;
    background-image: url("data:image/svg+xml,%3Csvg width='1446' height='219' viewBox='0 0 1446 219' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='723' cy='109.5' rx='723' ry='109.5' fill='%23E22415' fill-opacity='0.4'/%3E%3C/svg%3E%0A");
    background-repeat: no-repeat;
    background-size: contain;
    filter: blur(150px);
}
.custom-thankyou-content {
    color: #fff;
    text-align: center;
    max-width: 889px;
    margin: 0 auto;
    display: grid;
    gap: 20px;
    position: relative;
    z-index: 10;
}
.thankyou-title {
    color: #fff;
    font-family: Nexa, sans-serif;
    font-size: 70px;
    font-weight: 900;
    line-height: 122%;
    letter-spacing: 3.5px;
    text-transform: uppercase;
}

.thankyou-subtitle {
    font-family: Inter, sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.6px;
}

.thankyou-text {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.18px;
}

@media screen and (max-width: 767px) {
    .custom-thankyou-wrapper {
        paddin: 0 64px;
        min-height: unset;
        .bhcar-button-hover-gradient {
            margin: 32px auto 0;
        }
    }

    .custom-thankyou-wrapper::before {
        width: 520px;
        height: 220px;
        filter: blur(50px);
    }

    .thankyou-title {
        font-size: 24px;
    }
    .thankyou-subtitle {
        font-size: 16px;
    }
    .thankyou-text {
        font-size: 14px;
    }
}

/** Product Page **/
.product-template-default {
    .bh-single-product-part-thumbnail {
        flex-shrink: 0;
    }
}

@media screen and (min-width: 1024px) {
    .bh-single-product-part {
        width: calc(50% - 24px)!important;
    }
}

/** Search page **/
.bhcar-our-expertise {
    margin: 140px 0;
    position: relative;
    .wp-block-image {
        position: absolute;
        border-radius: 16px;
        overflow: hidden;
    }
    .wp-block-image:before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(91deg, rgba(0, 0, 0, 0.00) -5.28%, #000 89.81%);
    }
}
.bhcar-our-expertise:before {
    content: '';
    display: block;
    position: absolute;
    top: -170px;
    right: -88px;
    background-image: url("../images/logos/bhcar-decor-squars.svg");
    background-repeat: no-repeat;
    background-size: contain;
    width: 494px;
    height: 238px;
}
.bhcar-our-expertise__info {
    position: relative;
    z-index: 1;
    .wp-block-columns, .bh-p, .bh-h3 {
        position: relative;
        z-index: 1;
    }
    .wp-block-heading {
        margin-bottom: 24px;
    }
    .wp-block-columns-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .bh-p {
        margin-bottom: 32px;
        color: #FFF;
        font-family: Inter, sans-serif;
        font-size: 16px;
        font-weight: 400;
        line-height: 1.5;
        letter-spacing: -0.16px;
    }
    .bh-h3 {
        font-size: 18px;
        font-weight: 800;
        line-height: 1.3;
        letter-spacing: 0.54px;
        text-transform: uppercase;
        margin-top: 16px;
        margin-bottom: 8px;
    }
    .wp-block-column p {
        color: #FFF;
        font-family: Inter, sans-serif;
        font-size: 16px;
        font-style: normal;
        font-weight: 400;
        line-height: 1.5;
        letter-spacing: -0.16px;
    }
}
.bhcar-our-expertise__info::before {
    position: absolute;
    content: '';
    display: block;
    width: 1140px;
    height: 220px;
    top: 50%;
    left: 92%;
    background-image: url("data:image/svg+xml,%3Csvg width='1446' height='219' viewBox='0 0 1446 219' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='723' cy='109.5' rx='723' ry='109.5' fill='%23E22415' fill-opacity='0.4'/%3E%3C/svg%3E%0A");
    background-repeat: no-repeat;
    background-size: contain;
    transform: translate(-50%, 0);
    filter: blur(150px);
}

@media screen and (max-width: 1330px) {
    .bhcar-our-expertise {
        margin: 64px 0;
    }
    .bhcar-our-expertise .container {
        flex-direction: column;
        gap: 0;
    }
    .bhcar-our-expertise .wp-block-image {
        position: relative;
        margin-bottom: 0;
    }
    .bhcar-our-expertise .wp-block-image:before  {
        background: linear-gradient(181deg, rgba(0, 0, 0, 0.00) 3.45%, #000 100.49%);
    }
    .bhcar-our-expertise .wp-block-heading {
        margin-bottom: 16px;
    }
    .bhcar-our-expertise__info::before {
        width: 306px;
        height: 99px;
        transform: rotate(-18.749deg);
        top: -20%;
        left: -23px;
        border-radius: 306px;
        background: rgba(0, 150, 207, 0.40);
        filter: blur(50px);
    }
    .bhcar-our-expertise__info .bh-p + .wp-block-columns {
        margin-bottom: 0;
    }
}

/**bhcar-our-expertise-slider */

@media screen and (max-width: 767px) {
    .bhcar-our-expertise,
    .wp-block-group__inner-container,
    .bhcar-our-expertise .container,
    .bhcar-our-expertise__info,
    .bhcar-our-expertise__info .bh-p + .wp-block-columns,
    .bhcar-our-expertise-slider {
        position: relative;
        display: block!important;
    }
    .bhcar-our-expertise {
        overflow: hidden;
    }
    .bhcar-our-expertise::before {
        top: 0;
        right: -62px;
        width: 187px;
        height: 83px;
    }
    .bhcar-our-expertise-slider.swiper {
        overflow: unset;
    }
    .bhcar-our-expertise-slider .wp-block-column {
        min-width: unset;
        overflow-wrap: unset;
        word-break: unset;
        display: flex;
        align-items: center;
        column-gap: 10px;
        flex-wrap: wrap;
        margin: 0 !important;
        padding: 0 10px 0 0!important;
        flex: 0 0 auto !important;
        width: 100% !important;
    }

    .bhcar-our-expertise .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
        flex-basis: unset!important;
    }
    .bhcar-our-expertise-slider .swiper-slide {
        svg {
            width: 32px;
            height: 32px;
        }
    }

    .bhcar-our-expertise .swiper-wrapper {
        display: flex;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 0 30px;
    }

    .bhcar-our-expertise .wp-block-image, .bhcar-our-expertise__info {
        padding: 0 24px;
    }
    .bhcar-our-expertise-slider .swiper-pagination {
        text-align: left;
        display: flex;
        gap: 8px;
        bottom: 0 !important;
        left: 0 !important;
        flex-grow: unset!important;
    }
    .bhcar-our-expertise-slider .swiper-pagination-bullet {
        width: 18px;
        height: 7px;
        border-radius: 500px;
        background: rgba(255, 255, 255, 0.6);
        margin: 0 4px !important;
    }
    .bhcar-our-expertise-slider .swiper-pagination-bullet-active {
        width: 80px;
        background: #fff;
    }
}