/*
Theme Name: MG Wear
Theme URI:  https://example.com/MGWear
Author:      artCly
Author URI:  https://example.com
Description: Тема MG Wear
Version:     1.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: MGWear
*/
html,
body {
    overflow-x: clip !important;
    background: var(--whiteText);
}

#paralaxbg>div:nth-child(1) {
    position: initial !important;
}

.my-product-card {
    padding: 7px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
}

.my-product-card .product-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.my-product-card .product-info {
    flex: 1;
}

.products-grid {
    display: grid;
    grid-template: 1fr / 1fr 1fr;
    gap: 25px;
}

.product-thumb {
    position: relative;
}

.textB a,
.small a,
.navText a {
    font-family: "AA Stetica";
    font-weight: 400;
    line-height: 100%;
    color: var(--blackText);
    font-size: clamp(18px, calc(18px + (100vw - 360px) * ((20 - 18) / (1200 - 360))), 20px);
    text-decoration: none;
}

.navText a:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.modal-body {
    border-radius: 10px;
}


.woocommerce.columns-4 {
    display: none;
}
#wpfBlock_1 .wpfFilterVerScroll {
    max-height: 100%;
}
button.wpfClearButton.wpfButton:hover {
    text-decoration: underline;
}
#wpfBlock_1 .wpfFilterVerScroll {
    max-height: 100% !important;
}
.signInDesktop.desktopOnly.show .woocommerce a {
    font-size: 14px;
}
.woocommerce a.added_to_cart {
    display: none;
}

.optSelect {
    border: 0.25px solid var(--blackText) !important;
    background: none !important;
    outline: none !important;
    padding: 11px 19px !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    color: black;
}
.brachContainer {
    z-index: 999 !important;
}
.containerHeader {
    margin: 0 auto 0px auto !important;
    padding: 10px 0 !important;

}

.mg-checkout-section.address-section, .mg-checkout-section.contact-section {
    margin-left: 1.1px;
}
/* ============================================
   CUSTOM CHECKOUT PAGE STYLES
   ============================================ */

.mg-checkout-form {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Century Gothic', sans-serif;
}

.mg-checkout-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    /* Wider gap for desktop */
}

.mg-checkout-left {
    flex: 1;
    min-width: 0;
    /* Prevents flex overflow */
}

.mg-checkout-right {
    width: 400px;
    flex-shrink: 0;
}

.mg-sticky-sidebar {
    position: sticky;
    top: 40px;
    padding: 0;
}

/* Titles */
.mg-checkout-title {
    font-family: "AA Stetica", sans-serif;
    font-size: 48px;
    margin-bottom: 50px;
    font-weight: 400;
    line-height: 1.1;
}

.mg-section-title {
    font-family: "AA Stetica", sans-serif;
    font-size: 20px;
    margin: 25px 0 10px 0;
    font-weight: 400;
    display: block;
    width: fit-content;
    padding-bottom: 5px;
}

/* ============================================
   VIEW ORDER PAGE CUSTOM STYLES
   ============================================ */

/* 1. Page Title & Subtitle */
.woocommerce-view-order p:first-child {
    font-family: "AA Stetica", sans-serif;
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 400;
}

.order-info-subtitle {
    font-family: "AA Stetica", sans-serif;
    font-size: 24px;
    margin-bottom: 30px;
    font-weight: 400;
}

/* 2. Order Summary Block */
.woocommerce-order-details-custom .order-summary-block {
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.woocommerce-order-details-custom .summary-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 600px; /* Limit width like design */
    font-family: 'Century Gothic', sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

.woocommerce-order-details-custom .order-info-label {
    min-width: 200px; /* Fixed width for labels */
    color: #000;
}

.woocommerce-order-details-custom .order-info-value {
    flex: 1;
    color: #000;
}

/* 3. Products Section (Full Width Layout) */
.order-products-full-width-section {
    width: 148%;
    margin: 40px 0 0 -47%;
}

.order-products-full-width-section .woocommerce-order-details__title {
    font-family: "AA Stetica", sans-serif;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 400;
}

.products-block-container {
    border-top: 1px solid #C59A6D;
    padding-top: 30px;
}

/* 4. Product Item Card */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.order-item-card {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    width: 100%;
    padding-bottom: 30px;
}

.order-item-image {
    width: 120px;
    flex-shrink: 0;
}

.order-item-image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.order-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-item-name a {
    font-family: 'Century Gothic', sans-serif;
    font-size: 16px;
    color: #000;
    text-decoration: none;
    font-weight: 400;
}

.order-item-sku {
    font-family: 'Century Gothic', sans-serif;
    font-size: 14px;
    color: #999;
}

.order-item-size-qty {
    font-family: 'Century Gothic', sans-serif;
    font-size: 14px;
    color: #000;
    margin-top: 15px;
}

.order-item-price-column {
    font-family: 'Century Gothic', sans-serif;
    font-size: 16px;
    color: #000;
    white-space: nowrap;
    margin-left: auto; /* Push to right */
}

/* 5. Footer Total */
.order-footer-total {
    border-top: 1px solid #C59A6D;
    padding-top: 30px;
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: "AA Stetica", sans-serif;
    font-size: 24px;
}

/* ============================================
   MOBILE ADAPTIVE CORRECTIONS (Based on Screenshot)
   ============================================ */

@media (max-width: 768px) {
    /* 1. Order Summary Re-styling */
    .woocommerce-order-details-custom .order-summary-block {
        gap: 0; /* Remove gap, use padding/borders instead */
        margin-bottom: 10px;
    }
    .order-summary-block .summary-row {
        font-size: 14px !important;
    }
    .order-products-full-width-section {
    width: 100%;
    margin: 0px 0 0 0%;
    
}
.woocommerce div.product div.summary {
    width: 100% !important;
}
.brachContainer {
    margin-bottom: 0 !important;
}

    .woocommerce-order-details-custom .summary-row {
        flex-direction: row; /* Keep side-by-side */
        justify-content: space-between;
        align-items: center; /* Vertically center */
        border-bottom: 1px solid #C59A6D; /* Brownish separator */
 padding: 10px 0;
        margin-bottom: 0;
    }

    

    .woocommerce-order-details-custom .order-info-label {
        font-weight: 400; /* Normal weight per screenshot */
        min-width: auto;
        flex: 1; /* Allow to take space */
    }

    .woocommerce-order-details-custom .order-info-value {
 text-align: left;
        flex: 1;
        font-weight: 400;
    }

    /* 2. Product Card Minimized Layout */
    .products-block-container {
        border: none;
        padding-top: 0;
    }

    .products-list {
        gap: 0; /* Borders will handle spacing */
    }

    .order-item-card {

   
      align-items: center;
        flex-wrap: nowrap;
        display: grid;
        grid-template-columns: 46.4% auto auto;
        gap: 20px;
    }

    /* Hide Desktop Elements */
    .order-item-image,
    .order-item-sku,
    .order-item-price-column {
        display: none;
    }

    /* Product Details Container */
    .order-item-details {
        display: contents; /* Allow children to participate in parent grid */
    }
    .containerHeader {
        max-width: 90% !important;
    }

    /* Name */
    .order-item-name {
        margin: 0;
        font-size: 14px;
        line-height: 1.2;
    }
    
    .order-item-name a {
        font-size: 14px;
    }

    /* Size Info Container (Invisible wrapper in PHP, now split in CSS) */
    .order-item-size-qty {
        display: contents; /* Flatten if possible, but PHP output is a div */
    }

    /* Label: "Размер (количество):" */
    .size-label {
        font-size: 14px;
        line-height: 1.2;
        text-align: left;
        color: #000;
        white-space: normal; /* Allow multiline "Размер \n (количество):" */
    }

    /* Value: "44 (1)" */
    .size-value {
        font-size: 14px;
        text-align: right;
        color: #000;
        white-space: nowrap;
    }

    /* 3. Footer Total */
    .order-footer-total {
        border-top: none;
        padding-top: 15px;
        margin-top: 0;
        display: flex;
        justify-content: space-between;
        font-size: 20px;
    }
}



/* Inputs & Labels */
.mg-checkout-form .form-row {
    margin-bottom: 20px;
    width: 100%;
}

.mg-checkout-form label {
    font-size: 16px;
    margin-bottom: 8px;
    display: block;
    color: #000;
}

.mg-checkout-form input[type="text"],
.mg-checkout-form input[type="email"],
.mg-checkout-form input[type="tel"],
.mg-checkout-form input[type="password"],
.mg-checkout-form select,
.mg-checkout-form textarea {
    background: #F8F5F2 !important;
    /* Light beige input bg */
    border: none !important;
    border-radius: 0 !important;
    padding: 15px 20px !important;
    width: 100% !important;
    font-size: 16px !important;
    height: 56px !important;
    color: #000 !important;
    box-shadow: none !important;
}

/* Grids */
.mg-fields-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.mg-fields-grid .row-full {
    width: 100%;
}

.mg-fields-grid .row-half {
    width: calc(50% - 10px);
    display: flex;
    gap: 20px;
}

/* For nested fields inside row-half to split 50/50 again if needed, or just standard */
.mg-fields-grid .row-half .form-row {
    flex: 1;
    margin-bottom: 0;
}

/* Location Grid Specific */
.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.location-grid .form-row {
    margin-bottom: 0;
}

.tinv-wishlist .tinv-header h2 {
font-family: "AA Stetica";
    font-size: 20px !important;
    font-weight: 400 !important;
}

/* Shipping Methods Cards */
.mg-shipping-methods-wrapper ul#shipping_method {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.mg-shipping-methods-wrapper ul#shipping_method li {
    margin: 0 !important;
    text-indent: 0 !important;
    position: relative;
    list-style: none !important;
}

.mg-shipping-methods-wrapper ul#shipping_method li input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.mg-shipping-methods-wrapper ul#shipping_method li label {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    border: 1px solid #C59A6D;
    padding: 20px;
    cursor: pointer;
    height: 100%;
    min-height: 100px;
    transition: all 0.2s;
    background: transparent;
    font-size: 18px;
    line-height: 1.3;
}

.mg-shipping-methods-wrapper ul#shipping_method li input:checked+label {
    background: #F8F5F2;
    border-width: 2px;
    font-weight: bold;
}

/* Price inside label */
.mg-shipping-methods-wrapper ul#shipping_method li label .amount {
    font-weight: bold;
    margin-top: 5px;
    display: block;
}

/* Payment Methods */
.payment-section .wc_payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.payment-section .wc_payment_methods li.wc_payment_method {
    border: 1px solid #C59A6D;
    padding: 25px;
    margin-bottom: 20px;
    background: #F8F5F2;
}

.payment-section .wc_payment_methods li.wc_payment_method label {
    font-size: 20px;
    margin-bottom: 10px;
    cursor: pointer;
    font-family: "AA Stetica", sans-serif;
}

.payment-section .wc_payment_methods li.wc_payment_method .payment_box {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

/* Sidebar / Order Review */
.mg-sidebar-title {
    font-family: "AA Stetica", sans-serif;
    font-size: 40px;
    margin-bottom: 30px;
    font-weight: 400;
}

.mg-order-image-card {
    margin-bottom: 30px;
    position: relative;
}

.mg-order-image-card img {
    width: 100%;
    height: auto;
    display: block;
}

.mg-qty-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-size: 14px;
    font-weight: bold;
    display: none;
    /* Hidden per Design 4, strictly huge image */
}

/* Totals */
.mg-cart-totals {
    margin-top: 40px;
}

.mg-cart-totals .mg-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 18px;
}

.mg-cart-totals .mg-total-row .label {
    /* Standard text */
}

.mg-cart-totals .mg-total-row .value {
    font-weight: bold;
}

.mg-cart-totals .order-total {
    margin-top: 30px;
    font-size: 24px;
    /* No border in screenshot 4? actually it is aligned with others */
}

.mg-cart-totals .order-total .value {
    font-size: 28px;
    font-family: "AA Stetica", sans-serif;
}

.order-summary-block .summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-family: "AA Stetica";

}
span.order-info-value {
    width: 70%;
}

.order-info-subtitle {
    font-size: 20px !important;
}



/* Actions */
.mg-checkout-actions {
    margin-top: 40px;
}
.added_to_cart.wc-forward{
    display:none;
}

#place_order_custom {
    width: 100%;
    height: 60px;
    background: transparent;
    border: 1px solid #000;
    color: #000;
    font-size: 16px;
    font-weight: 400;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#place_order_custom:hover {
    background: rgba(0, 0, 0, 0.05);
}

.button-login {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 60px;
    background: transparent;
    border: 1px solid #000;
    color: #000;
    font-size: 18px;
    text-transform: uppercase;
    text-decoration: none;
    margin-top: 20px;
    transition: all 0.3s;
}

.button-login:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 1024px) {
    .mg-checkout-layout {
        flex-direction: column;
    }

    .mg-checkout-right {
        width: 100%;
        order: -1;
        /* Show order summary first on mobile? Or last? Standard is last or collapsible. User didn't specify. Design 7 shows sections stacked. */
        order: 1;
    }

    .location-grid {
        grid-template-columns: 1fr;
    }

    .mg-fields-grid .row-half {
        width: 100%;
        flex-direction: column;
        gap: 0;
    }

    .mg-shipping-methods-wrapper ul#shipping_method {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   CHECKOUT FIXES & REFINEMENTS
   ============================================ */

/* 1. Global Checkout Fonts & Reset */
.woocommerce-checkout .mg-checkout-form {
    font-family: 'Century Gothic', sans-serif !important;
}

.woocommerce-checkout h1,
.woocommerce-checkout h2,
.woocommerce-checkout h3 {
    font-family: "AA Stetica", sans-serif !important;
    text-transform: none;
    letter-spacing: normal;
}

/* 2. Inputs & Labels Styling */
.woocommerce-checkout .form-row label {
    font-family: 'Century Gothic', sans-serif !important;
    font-size: 14px !important;
    line-height: 1.2;
    margin-bottom: 8px !important;
    color: #333;
    font-weight: normal !important;
}

.woocommerce-checkout .form-row .input-text,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
    background-color: #F8F5F2 !important;
    /* Light beige */
    border: none !important;
    border-radius: 0 !important;
    padding: 0 20px !important;
    height: 56px !important;
    line-height: 56px !important;
    /* Vertically center text */
    font-size: 16px !important;
    color: #000 !important;
    box-shadow: none !important;
    outline: none !important;
    width: 99.7% !important;
}

/* Select2 Overrides for Country Dropdown */
.select2-container--default .select2-selection--single {
    background-color: transparent !important;
    border: 1px solid black !important;
    border-radius: 0 !important;
    height: 57px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #333 !important;
    line-height: 50px !important;
    padding-left: 15px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 48px !important;
    top: 1px !important;
    right: 10px !important;
}

/* Dropdown list styling */
.select2-dropdown {
    background-color: #F8F5F2 !important;
    border: 1px solid #CCC !important;
    border-radius: 0 !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #e0dedb !important;
    /* Darker beige on hover */
    color: #000 !important;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #d1cfcc !important;
    /* Selected item */
}

/* 3. Address Grid Corrections */
/* Reset default floats/widths from theme or WC */
.woocommerce-checkout .mg-fields-grid .form-row {
float: none !important;
    width: 99.4% !important;
    margin: 0 0 0 1.1px !important;
    padding: 0 !important;
}

/* Location Grid (Country/City) */
.location-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
}

/* Address Grid */
.address-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Street row */
.address-grid .row-full {
    width: 100%;
}

/* Zip/House row & Building/Apt row */
.address-grid .row-half {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    width: 100% !important;
}

/* Contact Grid */
.contact-grid .row-half {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    width: 100% !important;
}

/* 4. Shipping Methods - Card Style */
.mg-shipping-methods-wrapper ul#shipping_method {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
}

.mg-shipping-methods-wrapper ul#shipping_method li {
    background: #F8F5F2;
    /* Default bg */
    border: 1px solid transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    min-height: 100px;
    display: flex;
    position: relative;
    transition: all 0.3s;
}

/* Hide the actual radio button but keep it accessible-ish */
.mg-shipping-methods-wrapper ul#shipping_method li input[type="radio"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: pointer;
    margin: 0 !important;
}

/* Label styling */
.mg-shipping-methods-wrapper ul#shipping_method li label {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    padding: 20px !important;
    margin: 0 !important;
    font-size: 16px !important;
    cursor: pointer;
    border: 1px solid black;
    /* Border on the label/box */
    background: #f6f2eb;
}

/* Active State (Checked) */
.mg-shipping-methods-wrapper ul#shipping_method li input:checked+label {
    background: #F8F5F2 !important;
    border: 1px solid #000 !important;
    /* Highlight active */
}

/* Price styling inside card */
.mg-shipping-methods-wrapper ul#shipping_method li label .amount {
    font-weight: bold;
    font-size: 18px;
    margin-top: 10px;
    display: block;
    align-self: flex-end;
}

/* 5. Payment Methods */
.payment-section .wc_payment_methods li.wc_payment_method {
    background: #F8F5F2 !important;
    border: 1px solid #000 !important;
    /* Solid border */
    margin-bottom: 15px !important;
    padding: 20px !important;
    list-style: none !important;
}

.payment-section .wc_payment_methods li.wc_payment_method label {
    font-size: 18px !important;
    font-weight: 500 !important;
    margin: 0 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Hide standard radio? Or style it? Design shows custom circle. 
   For now let's keep standard radio but make sure it aligns. */
.payment-section .wc_payment_methods li.wc_payment_method input[type="radio"] {
    margin-right: 10px !important;
    accent-color: #000;
}
button.wpfClearButton.wpfButton {
    text-align: start;
    text-decoration: none;
    padding: 0;
}

/* remove scroll out of fiters */
ul.wpfFilterVerScroll::-webkit-scrollbar {
  width: 0;
}

ul.wpfFilterVerScroll {
    max-height: 100%;
}

.woocommerce-radio-variations .radio-options-row {
    
    grid-template-columns: repeat(3, minmax(0, 16%)) !important;
    
}

.woocommerce div.product div.summary {
    
    width: 40.7%;
}
.woocommerce div.product div.images.woocommerce-product-gallery {
   
    width: 59%;
}
.woocommerce-product-gallery__image.flex-active-slide {
   min-width: 494px !important;
    max-width: 494px !important;
}
.flex-control-nav.flex-control-thumbs.moved-to-custom-container {
    width: 168px !important;
}
.woocommerce-product-gallery .flex-viewport {
    margin: 0 auto;

}

/* 6. Sidebar (Order Summary) */
.mg-sticky-sidebar {
    background: transparent;
}

.mg-sidebar-title {
    font-size: 36px !important;
    margin-bottom: 40px !important;
}

/* Image */
.mg-order-image-card {
    margin-bottom: 30px;
    position: relative;
}

.mg-order-image-card img {
    width: 100%;
    max-width: 187px;
    height: auto;
    display: block;
}

/* Totals List */
.mg-cart-totals .mg-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 16px;
    color: #000;
}

.mg-cart-totals .mg-total-row .value {
    font-weight: 400;
}

.mg-cart-totals .order-total {
    margin-top: 0;
    padding-top: 0;
    border-top: none !important;
    font-size: 20px;
    align-items: center;
}

.mg-cart-totals .order-total .label {
    text-transform: uppercase;
    font-weight: normal;
}

.mg-cart-totals .order-total .value {
    font-size: 18px;
    font-family: "Century Gothic" !important;
    font-weight: 300;
}

/* Login Button */
.button-login {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    border: 1px solid #000;
    margin-top: 15px;
    text-transform: uppercase;
    color: #000;
    text-decoration: none;
    transition: all 0.2s;
}

.button-login:hover {
    background: #000;
    color: #fff;
}

.woocommerce table.shop_table tbody span {

    width: 69px;
}
.mg-cart-table-wrapper table.shop_table thead th:first-child {
padding: 15px 0 0 163px !important;
    width: 32%;
}
.mg-cart-table-wrapper table.shop_table thead th:nth-child(2), .mg-cart-table-wrapper table.shop_table thead th:nth-child(4)  {
    width: 8%;
}
.mg-cart-table-wrapper table.shop_table thead th:nth-child(3), .mg-cart-table-wrapper table.shop_table thead th:nth-child(5)  {
    width: 20%;
}
a.remove.mg-remove-btn{
        margin: 0 0 0 100px !important;
    width: 30px;
    height: 30px;
}
.woocommerce .products ul::after, .woocommerce .products ul::before, .woocommerce ul.products::after, .woocommerce ul.products::before {
    display: none;
}



/* Mobile Responsive */
@media (max-width: 768px) {
    .mg-checkout-layout {
        flex-direction: column;
        gap: 0;
    }
    .containerSection a {
        display: block;
        margin: 0 auto;
    }
    
    .telegram, .insta ,.whatsapp, .viber {
        width: 28px !important;
    height: 28px !important;
    }

    .mg-checkout-right {
        width: 100%;
        margin-top: 40px;
    }

    .location-grid,
    .address-grid .row-half,
    .contact-grid .row-half,
    .mg-shipping-methods-wrapper ul#shipping_method {
        grid-template-columns: 1fr !important;
    }
}




/* ============================================
   CHECKOUT FIXES V4 - SHIPPING CARD STRUCTURE
   ============================================ */

/* Top Row: Title + Price aligned horizontally */
.method-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 5px;
}

.mg-shipping-methods-wrapper ul#shipping_method li label .method-title {
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #000;
    line-height: 1.2;
}

.mg-shipping-methods-wrapper ul#shipping_method li label .amount {
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #000;
    margin-top: 0 !important;
    /* Reset previous margin */
}

/* Description Text */
.mg-shipping-methods-wrapper ul#shipping_method li label .method-description {
    font-size: 13px !important;
    color: #999;
    line-height: 1.3;
    display: block;
    width: 100%;
    text-align: left;
}

/* Card Styling - Matching Target (Thin Border) */
.mg-shipping-methods-wrapper ul#shipping_method li {
    background: #F8F5F2;
    /* Keep light beige bg? Or white? Target looks beige. */
    border: 1px solid #CCC !important;
    /* Thin gray border instead of Orange */
    padding: 0 !important;
    min-height: auto !important;
    /* Let content dictate height */
}

/* Active State */
.mg-shipping-methods-wrapper ul#shipping_method li:has(input:checked) {
    border: 1px solid #000 !important;
    /* Dark border for selected */
}

/* Fallback for browsers not supporting :has */
.mg-shipping-methods-wrapper ul#shipping_method li.active {
    border: 1px solid #000 !important;
}

/* Label Padding */
.mg-shipping-methods-wrapper ul#shipping_method li label {
    padding: 20px !important;
    height: 100%;
}

/* Hide any potential table headers again */
.mg-shipping-methods-wrapper th {
    display: none !important;
}

/* Remove default focus outlines */
.mg-shipping-methods-wrapper ul#shipping_method li:focus-within {
    outline: none !important;
}

/* =========================================
   CUSTOM PAYMENT METHODS (CARD STYLE)
   Matches design: Large rectangular boxes
   ========================================= */

.woocommerce-checkout #payment ul.payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 30px 0 !important;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-bottom: none !important;
}

/* Reset List Item */
.woocommerce-checkout #payment ul.payment_methods li.mg-payment-card {
    width: 65%;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

/* Hide Radio Button */
.woocommerce-checkout #payment ul.payment_methods li.mg-payment-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    z-index: -1;
}

/* Label as the Card */
.woocommerce-checkout #payment ul.payment_methods li.mg-payment-card label.mg-payment-label-wrapper {
    display: block;
    background-color: #F6F2EA;
    /* Beige Theme Color */
    border: 1px solid #D5CBB9;
    /* Light Grey Border */
    padding: 25px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    /* Disable default Woo Label styles if any */
    color: inherit;
}

/* Hover Effect */
.woocommerce-checkout #payment ul.payment_methods li.mg-payment-card label.mg-payment-label-wrapper:hover {
    border-color: #A8A2A2;
}

/* Selected State - Dark Border */
.woocommerce-checkout #payment ul.payment_methods li.mg-payment-card input[type="radio"]:checked+label.mg-payment-label-wrapper {
    border-color: #000000;
}

/* Title Styling */
.mg-payment-title {
    display: block;
    font-family: 'AA Stetica', sans-serif;
    font-size: 20px;
    color: #000000;
    margin-bottom: 8px;
    font-weight: 400;
    line-height: 1.2;
}

/* Description Box Override */
.woocommerce-checkout #payment div.payment_box.mg-payment-box {
    display: block !important;
    /* Force visible */
    visibility: visible !important;
    opacity: 1 !important;
    background-color: transparent !important;
    color: #A8A2A2 !important;
    /* Muted Grey */
    font-family: 'Century Gothic', sans-serif;
    font-size: 16px;
    line-height: 1.4;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    position: static !important;
    width: auto !important;
    max-width: 100%;
}

/* Remove standard Woo "Bubble Arrow" */
.woocommerce-checkout #payment div.payment_box.mg-payment-box::before {
    display: none !important;
}

/* Ensure Paragraphs inside description are clean */
.woocommerce-checkout #payment div.payment_box.mg-payment-box p {
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    font-size: inherit !important;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .woocommerce-checkout #payment ul.payment_methods li.mg-payment-card label.mg-payment-label-wrapper {
        padding: 20px;
    }

    .mg-payment-title {
        font-size: 18px;
    }

    .woocommerce-checkout #payment div.payment_box.mg-payment-box {
        font-size: 14px;
    }

    .mg-checkout-form {
        padding: 0;
    }

    h1.mg-checkout-title {
        font-size: 20px;
        margin: 40px 0 30px 0;
    }

    .mg-checkout-section.location-section .mg-section-title {
        display: none;
    }

    .woocommerce-checkout #payment ul.payment_methods li.mg-payment-card {
        width: 100%
    }


}

/* =========================================
   MOBILE MENU FIX
   Prevents the menu from being visible on the right side when closed
   ========================================= */

.menuMobileContainer {
    visibility: hidden !important;
    transition: transform 0.3s ease, visibility 0s linear 0.3s !important;
    will-change: transform, visibility;
    /* Ensure it is off-screen properly */
    right: 0 !important;
    left: auto !important;
    /* Force it to anchor right if we want slide from right */
    transform: translateX(100%) !important;
    inset: 0 0 0 auto !important;
    /* Reset inset to top-right-bottom-auto */
}

.menuMobileContainer.show {
    visibility: visible !important;
    transform: translateX(0) !important;
    transition: transform 0.3s ease, visibility 0s linear 0s !important;
}

/* =========================================
   LAYOUT FIXES
   1. Fix Mobile Menu Overflow (Width & Visibility)
   2. Fix Checkout Form Sizing (Prevent Horizontal Scroll/Zoom)
   ========================================= */

/* Mobile Menu - Prevent ghost width */
.menuMobileContainer {
    visibility: hidden !important;
    transition: transform 0.3s ease, visibility 0s linear 0.3s !important;
    will-change: transform, visibility;
    width: 100% !important;
    /* Use % instead of vw to avoid scrollbar width issues */
    max-width: 100vw !important;
    right: 0 !important;
    left: auto !important;
    transform: translateX(100%) !important;
    inset: 0 0 0 auto !important;
}

.menuMobileContainer.show {
    visibility: visible !important;
    transform: translateX(0) !important;
    transition: transform 0.3s ease, visibility 0s linear 0s !important;
}

/* Checkout Form - Fix Box Model to prevent overflow */
.mg-checkout-form,
.mg-checkout-form *,
.mg-checkout-form *::before,
.mg-checkout-form *::after {
    box-sizing: border-box !important;
}

/* Ensure Checkout Layout containers don't overflow */
.mg-checkout-layout {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    /* Clip any internal spill */
}

/* Specific fix for inputs if global selector misses somehow */
.mg-checkout-form input,
.mg-checkout-form select,
.mg-checkout-form textarea {
    box-sizing: border-box !important;
    max-width: 100% !important;
}

/* =========================================
   GLOBAL OVERFLOW FIX
   Forces the browser to clip any horizontal overflow 
   caused by negative margins or 100vw elements.
   ========================================= */

html,
body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure the main wrapper also respects this */
#page,
.site,
.site-content {
    overflow-x: hidden !important;
    max-width: 100% !important;
}


/* =========================================
   CUSTOM CART PAGE STYLES
   ========================================= */

/* Hide default wrappers if necessary */
.woocommerce-cart .entry-header {
    display: none;
}


.mg-cart-header h1 {
    text-align: center;
    margin: 40px 0 60px;
    font-size: 42px;
    font-weight: 400;
    color: #000;
}

/* Table Structure */
.mg-cart-table-wrapper {
    margin-bottom: 0px;
}

.mg-cart-table-wrapper table.shop_table {
    width: 100%;
    border-collapse: collapse;
    border: none;
}

.mg-cart-table-wrapper table.shop_table thead th {
    border-bottom: 1px solid #C4A993;
    /* Gold/Beige line */
    padding-bottom: 15px;
    font-weight: 400;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    color: #999;
}

/* Alignments */
.mg-cart-table-wrapper th.product-name,
.mg-cart-table-wrapper td.product-name {
    text-align: left;
}

.mg-cart-table-wrapper th.product-size,
.mg-cart-table-wrapper td.product-size {
    text-align: center;
}

.mg-cart-table-wrapper th.product-quantity,
.mg-cart-table-wrapper td.product-quantity {
    text-align: center;
}

.mg-cart-table-wrapper th.product-price,
.mg-cart-table-wrapper td.product-price {
    text-align: center;
}

.mg-cart-table-wrapper th.product-subtotal,
.mg-cart-table-wrapper td.product-subtotal {
    text-align: center;
}

.mg-cart-table-wrapper th.product-remove,
.mg-cart-table-wrapper td.product-remove {
    text-align: right;
}

/* Table Rows */
.mg-cart-table-wrapper table.shop_table tbody tr {
    border-bottom: none;
    /* No lines between rows? Mockup shows white space */
}

.mg-cart-table-wrapper table.shop_table td {
    padding: 30px 0;
    vertical-align: middle;
}

/* Product Name Column */
.mg-product-name-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}

.mg-product-thumbnail {
    width: 100px;
    flex-shrink: 0;
}

.mg-product-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.mg-product-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mg-product-title {
    font-size: 16px;
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.mg-product-title:hover {
    border-bottom-color: #000;
}

.mg-product-sku {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
}

/* Size Box */
.mg-size-box {
    width: 44px;
    height: 44px;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 14px;
    color: #000;
    background: #fff;
    /* Ensure bg is white if page is beige */
    cursor: default;
    /* Change to pointer if clickable later */
}

/* Quantity Box */
.mg-quantity-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    height: 44px;
    background: #fff;
}

.mg-quantity-wrapper button {
    background: none;
    border: none;
    width: 36px;
    height: 100%;
    cursor: pointer;
    font-size: 18px;
    color: #555;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mg-quantity-wrapper button:hover {
    color: #000;
}

.mg-quantity-wrapper input.qty {
    width: 40px;
    height: 100%;
    border: none;
    /* Remove default border */
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    text-align: center;
    font-size: 16px;
    padding: 0;
    margin: 0;
    -moz-appearance: textfield;
}

/* Price & Subtotal */
.mg-cart-table-wrapper td.product-price,
.mg-cart-table-wrapper td.product-subtotal {
    font-size: 16px;
    color: #000;
}

/* Remove Icon */
.mg-remove-btn svg {
    display: block;
    width: 20px;
    height: 20px;
    color: #000;
    transition: color 0.2s;
}

.mg-remove-btn:hover svg {
    color: #d00;
}

/* Cart Collaterals / Totals */
.cart-collaterals {
    border-top: 1px solid #C4A993;
    padding-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.cart_totals {
    width: 100%;
    max-width: 400px;
}

.mg-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.mg-totals-label {
    font-size: 16px;
    color: #999;
}

.mg-totals-value {
    font-size: 24px;
    color: #000;
    font-weight: 400;
}

.cart-quantity .mg-totals-value {
    font-size: 20px;
    /* Smaller for quantity count? */
}

/* Checkout Button */
.wc-proceed-to-checkout {
    margin-top: 40px;
}

.wc-proceed-to-checkout a.checkout-button {
    display: block;
    width: 100%;
    background: #F4F1ED;
    /* Light beige button */
    color: #000;
    border: 1px solid #000;
    padding: 18px 0;
    text-align: center;
    text-transform: uppercase;
    /* Maybe? Mockup looks normal case "Оформить заказ" */
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s;
}

.wc-proceed-to-checkout a.checkout-button:hover {
    background: #000;
    color: #fff;
}
.woocommerce table.shop_table {
    margin: 20px 0px 0px 0;
}

/* Responsive */
@media (max-width: 768px) {
   
    .mg-cart-header h1 {
        font-size: 32px;
        margin-bottom: 30px;
    }
    footer img:first-child {
         max-width: 35% !important;
}
.woocommerce table.shop_table_responsive tr:nth-child(2n) td, .woocommerce-page table.shop_table_responsive tr:nth-child(2n) td{
    background: none;
}

    .mg-cart-table-wrapper table.shop_table thead {
        display: none;
        /* Hide headers on mobile */
    }

    .mg-cart-table-wrapper table.shop_table tr {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid #eee;
        padding-bottom: 20px;
        margin-bottom: 20px;
        position: relative;
    }

    .mg-cart-table-wrapper table.shop_table td {
        display: block;
        padding: 5px 0;
        text-align: left !important;
        width: 100%;
    }

    /* Reorder for mobile if needed, or keep stacked */
    .mg-product-name-wrapper {
        margin-bottom: 10px;
    }
}

/* =========================================
   GEMINI FIXES - CART PAGE COMPREHENSIVE
   ========================================= */

/* --- 1. General Layout & Reset --- */
body.woocommerce-cart {
    background-color: #F6F2EA !important;
    /* Beige background */
    font-family: 'Century Gothic', sans-serif !important;
}

.mg-cart-header {
   display: none;
}

.mg-cart-header h1 {
    font-size: 56px;
    font-weight: 400;
    margin: 0;
    color: #000;
}

/* Reset Table */
.mg-cart-table-wrapper table.shop_table {
    border-collapse: collapse !important;
    width: 100%;
border-bottom: 1px solid #c49a6d !important;

}

/* --- 2. Header Row Styling --- */
.mg-cart-table-wrapper table.shop_table thead th {
    border-bottom: 2px solid #C59A6D !important;
    /* Golden line Bottom */
padding: 15px 0 0 0 !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #A8A2A2 !important;
    /* Gray text */
    text-transform: none !important;
    /* Case sensitive as is */
    letter-spacing: normal !important;
}

/* Specific Header Alignments */
.mg-cart-table-wrapper thead th.product-name {
    text-align: left !important;
    padding-left: 0 !important;
}

.mg-cart-table-wrapper thead th.product-size {
    text-align: center !important;
}

.mg-cart-table-wrapper thead th.product-quantity {
    text-align: center !important;
}

.mg-cart-table-wrapper thead th.product-price {
    text-align: center !important;
}

.mg-cart-table-wrapper thead th.product-subtotal {
    text-align: center !important;
}

.mg-cart-table-wrapper thead th.product-remove {
    text-align: right !important;
}

/* --- 3. Body Row Styling --- */
.mg-cart-table-wrapper table.shop_table tbody tr {
    border: none !important;
}

.mg-cart-table-wrapper table.shop_table tbody td {
    padding: 50px 0px 0 0;
    vertical-align: middle !important;
    border: none !important;
    /* Remove all default borders */
}

/* Product Column (Image + Details) */
.mg-product-name-wrapper {
    display: flex;
    align-items: center;
    /* Center vertically */
    gap: 30px;
}

.mg-product-thumbnail {
    width: 140px;
    
    flex-shrink: 0;
}
.woocommerce-cart table.cart img {
    width: 183px;
    height: auto;
}

.mg-product-thumbnail img {
    width: 100%;
    height: auto;
    /* Allow natural aspect ratio */
    display: block;
    aspect-ratio: 3 / 4;
    /* Portrait aspect */
    object-fit: cover;
}

.mg-product-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mg-product-title {
    font-size: 18px !important;
    color: #000 !important;
    text-decoration: none !important;
    font-weight: 400;
}

.mg-product-sku {
    font-size: 14px !important;
    color: #A8A2A2 !important;
}

/* Size Box */
.mg-size-box {
    width: 44px;
    height: 44px;
    border: 1px solid #C59A6D !important;
    /* Match border color */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 16px;
    color: #000;
}

/* Quantity Wrapper (Floating Buttons) */
.mg-quantity-wrapper {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 15px;
    /* Space between - [ 1 ] + */
    border: none !important;
    /* No wrapper border */
    background: transparent !important;
    width: auto !important;
}

/* The Quantity Input Box */
.mg-quantity-wrapper .quantity {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    width: auto !important;
}

.mg-quantity-wrapper input.qty {
    width: 44px !important;
    height: 44px !important;
    border: 1px solid #C59A6D !important;
    /* Box border */
    background: transparent !important;
    text-align: center !important;
    font-size: 16px !important;
    color: #000 !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    -moz-appearance: textfield;
}

/* Remove arrows from number input */
.mg-quantity-wrapper input.qty::-webkit-outer-spin-button,
.mg-quantity-wrapper input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
    
}

/* The Plus/Minus Buttons */
.mg-quantity-wrapper button {
    background: transparent !important;
    border: none !important;
    color: #000 !important;
    font-size: 20px !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    cursor: pointer !important;
    display: flex;
    align-items: center;
}

/* Price & Subtotal */
.product-price,
.product-subtotal {
    font-size: 16px !important;
    color: #000 !important;
    white-space: nowrap;
}

/* Remove Icon (Outline Trash Can) */
.product-remove {
    text-align: right !important;
    padding-right: 20px !important;
    /* Some padding from edge */
}

.mg-remove-btn svg {
    width: 24px !important;
    height: 24px !important;
    fill: none !important;
    stroke: #000 !important;
    stroke-width: 1.5px;
}

.mg-remove-btn:hover svg {
    opacity: 0.7;
}

header {
     position:fixed;
     top: 0;
     z-index: 1000;
     background: var(--whiteText);
     width: 100%;
     height: auto;
 }
 body {
     padding-top: var(--header-h, 120px) !important;
 }
 .select2-search--dropdown {
     display: none;
 }
 
 .hf-fields-wrap input:last-child {
    margin: 0;
    padding: 9px 50px;
    border-radius: 0;
}
 
 .telegram {
     content: url("assets/img/telegram.svg") !important;
 }
 .insta {
     content: url("assets/img/instagram.svg") !important;
 }

/* Totals Section Alignment */
.cart-collaterals {
    border-top: 1px solid #C59A6D !important;
    margin-top: 0 !important;
    padding-top: 40px !important;
}

/* --- 4. Layout Stabilization (Prevent Jumping) --- */
.woocommerce-cart-form {
    position: relative;
min-height: 243px;
    transition: opacity 0.3s ease;
}

.woocommerce-cart-form.mg-processing {
    opacity: 0.5;
    pointer-events: none;
}

.cart-collaterals.mg-processing {
    opacity: 0.5;
    pointer-events: none;
}

/* Ensure BlockUI overlay doesn't shift content */
.blockUI.blockOverlay {
    background-color: #F6F2EA !important; /* Match page background */
    opacity: 0.6 !important;
    border: none !important;
}


/* Fix for possible double update jump */
.mg-totals-value {
    transition: all 0.2s ease;
}
/* =========================================
   MOBILE CART REDESIGN (GEMINI FIX)
   Matches Layout: Image Left | Details Right
   ========================================= */

@media (max-width: 768px) {

    /* 1. Reset Table Structure for Grid Layout */
    .mg-cart-table-wrapper table.shop_table {
        display: block !important;
        border: none !important;
        margin-top: 0 !important;
    }

    .mg-cart-table-wrapper table.shop_table thead {
        display: none !important;
    }

    .mg-cart-table-wrapper table.shop_table tbody {
        display: block !important;
    }

    /* 2. The Grid Container (The Row) */
    .mg-cart-table-wrapper table.shop_table tbody tr {
        display: grid !important;
        /* Columns: [Image Area] [Content Area] */
        grid-template-columns: 110px 1fr !important;
        /* Rows: [Title+Price] [Size] [Qty+Remove] */
        grid-template-rows: auto auto auto !important;
        gap: 5px 15px !important;
        
        padding: 20px 0 !important;
        border-bottom: none !important;
        margin-bottom: 0 !important;
        position: relative !important;
        background: transparent !important;
        flex-direction: unset !important; /* Override flex if present */
    }
    .mg-cart-header {
        display: none;
    }

    /* 3. Flatten the Cell Structure */
    /* Use display: contents to unwrap the nested divs so they participate in the Grid */
    
    /* Unwrap the Name Cell to expose Thumbnail and Details */
    .mg-cart-table-wrapper td.product-name,
    .mg-cart-table-wrapper .mg-product-name-wrapper {
        display: contents !important;
    }

    /* 4. Position Elements in the Grid */

    /* IMAGE: Column 1, Spans all rows */
    .mg-cart-table-wrapper .mg-product-thumbnail {
        grid-column: 1 !important;
        grid-row: 1 / span 3 !important; /* Span down */
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
    }
    
    .mg-cart-table-wrapper .mg-product-thumbnail img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 3/4 !important;
        object-fit: cover !important;
        border-radius: 0 !important;
    }

    /* DETAILS (Title + SKU): Col 2, Row 1 */
    .mg-cart-table-wrapper .mg-product-details {
        grid-column: 2 !important;
        grid-row: 1 !important;
 display: flex !important;                                                                                 
    flex-direction: column !important;                                                                     
    justify-content: flex-start !important;                                                                
    align-items: flex-start !important;                                                                    
    padding: 0 !important;                                                                                 
                                                                                 
    gap: 0 !important;                                                                                     
    margin-bottom: 5px !important;                                                                         
    pointer-events: none; /* Let clicks pass to price if overlapped? No, price is on top visually */       
                                  
    z-index: 1;                                                                                            
}
   .mg-product-title {                                                                                          
  text-align: start;
        font-size: 16px !important;
        line-height: 1.2 !important;
        margin-bottom: 0 !important;
        margin-bottom: 3px !important;
        padding-right: 68px !important;
        pointer-events: auto;                                                                              
}                                                                                                       
          a.remove.mg-remove-btn img {
    width: 23px !important;
    height: 23px !important;
}                                                                                              
.mg-product-sku {                                                                                       
    margin-top: 2px !important;                                                                         
    display: block !important;                                                                          
    margin: 0 !important;                                                                               
    padding: 0 !important;                                                                              
    font-size: 13px !important;                                                                         
    color: #999 !important;                                                                             
    line-height: 1.2 !important;                                                                        
    pointer-events: auto;                                                                               
} 

    /* PRICE: Col 2, Row 1 (Top Right) */
    .mg-cart-table-wrapper td.product-price {
        display: block !important;
        grid-column: 2 !important;
        grid-row: 1 !important;
        text-align: right !important;
        padding: 0 !important;
        width: auto !important;
        
        /* Absolute positioning within the cell area or using grid alignment */
        justify-self: end !important;
        align-self: start !important;
        z-index: 2;
        
        font-size: 16px !important;
        font-weight: 500 !important;
    }
    
    /* Clear any labels */
    .mg-cart-table-wrapper td.product-price::before {
        content: none !important;
    }

    /* SIZE: Col 2, Row 2 */
    .mg-cart-table-wrapper td.product-size {
        display: flex !important;
        align-items: center !important;
        grid-column: 2 !important;
        grid-row: 2 !important;
        padding: 0 !important;
        text-align: left !important;
        width: 100% !important;
        margin-bottom: 10px !important;
    }
    
    /* Add "Размер:" label matching mockup */
    .mg-cart-table-wrapper td.product-size::before {
        content: 'Размер: ' !important;
        font-size: 14px !important;
        color: #000 !important;
        margin-right: 5px !important;
        font-weight: 400 !important;
        display: block !important; /* Ensure visibility */
        width: auto !important;
        float: none !important;
    }
    
    /* Style the Size Select/Box */
    .mg-cart-size-select,
    .mg-size-box {
        margin: 0 !important;
        font-size: 14px !important;
        padding: 0 5px !important;
        height: auto !important;
        border: none !important;
        background: transparent !important;
        color: #000 !important;
    }
    
    /* QUANTITY: Col 2, Row 3 (Bottom Left) */
    .mg-cart-table-wrapper td.product-quantity {
        display: flex !important;
        align-items: center !important;
        grid-column: 2 !important;
        grid-row: 3 !important;
        padding: 0 !important;
        text-align: left !important;
        width: auto !important;
        justify-self: start !important;
        align-self: end !important;
    }
    
    .mg-cart-table-wrapper td.product-quantity::before {
        content: none !important;
    }

    /* Refine Quantity Input to match Mockup (Simple, compact) */
    .mg-quantity-wrapper {
        gap: 0 !important; /* Connected look */
        border: 1px solid #ddd !important;
        height: 36px !important;
        padding: 0 5px !important;
    }
    
    .mg-quantity-wrapper button {
        width: 24px !important;
        font-size: 18px !important;
    }
    
    .mg-quantity-wrapper input.qty {
        width: 30px !important;
        height: 100% !important;
        border: none !important;
        font-size: 14px !important;
    }

    /* REMOVE: Col 2, Row 3 (Bottom Right) */
    .mg-cart-table-wrapper td.product-remove {
        display: block !important;
        grid-column: 2 !important;
        grid-row: 3 !important;
        padding: 0 !important;
        text-align: right !important;
        width: auto !important;
        justify-self: end !important;
        align-self: end !important;
    }
    
    .mg-cart-table-wrapper td.product-remove::before {
        content: none !important;
    }

    .mg-remove-btn img {
        width: 20px !important;
        height: 20px !important;
    }

    /* Hide Subtotal */
    .mg-cart-table-wrapper td.product-subtotal {
        display: none !important;
    }

    /* Clean up "Data Title" pseudo elements from all cells */
    .mg-cart-table-wrapper td::before {
        display: none !important;
    }
    table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents tbody tr:last-child {
    display: none !important;
}

        .woocommerce-cart-form{
   
            min-height: 233px;
    
        }
}

/* ============================================
   HIDE WOOCOMMERCE NOTICES ON CHECKOUT
   ============================================ */
.woocommerce-checkout .woocommerce-NoticeGroup,
.woocommerce-checkout .woocommerce-NoticeGroup-checkout,
.woocommerce-checkout .woocommerce-error, 
.woocommerce-checkout .woocommerce-message {
    display: none !important;
}

/* Header Scroll Animation */
header {
    transition: transform 0.3s ease-in-out;
}
header.header-hidden {
    transform: translateY(-100%);
}

/* =========================================
   FIX: AWS Search Visibility & Style in Mobile Menu
   ========================================= */

/* Container Layout */
.menuMobileContainer .aws-container {
    flex: 1;
    display: block !important;
    margin-right: 20px; /* Space between search and X */
    background: transparent !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1001 !important;
}

.menuMobileContainer .aws-search-form {
    display: flex !important;
    align-items: center !important;
    gap: 0; /* Space between icon and input */
    background: transparent !important;
    width: 90% !important;
    position: relative !important;
    pointer-events: auto !important;
}

/* Hide the label if it exists (prevents overlay issues) */
.menuMobileContainer .aws-search-label {
    display: none !important;
}

/* 1. Magnifying Glass Icon (Button) - Custom Image */
.menuMobileContainer .aws-search-btn {
    display: block !important;
    order: -1 !important; /* Move to left */
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 28px !important;
    height: 28px !important;
    cursor: pointer;
    pointer-events: auto !important;
    
    /* Custom Icon Image */
    background-image: url('assets/img/loop.svg') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
}

/* Hide default SVG inside button if present */
.menuMobileContainer .aws-search-btn svg {
    display: none !important;
}

/* Fallback: if no button exists in HTML, use pseudo-element on form */
.menuMobileContainer .aws-search-form:not(:has(.aws-search-btn))::before {
    content: '';
    display: block;
    width: 28px;
    height: 28px;
    background-image: url('assets/img/loop.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    margin-right: 15px;
    order: -2;
}

/* 2. Input Field Wrapper - Force Visibility & Height */
.menuMobileContainer .aws-wrapper {
    box-shadow: 0px 6px 10px -2px rgb(0 0 0 / 23%) !important;
    flex: 1 !important;
    width: auto !important;
    position: relative !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 1002 !important;
    
    /* FIX: Ensure height is calculated */
    min-height: 40px !important;
    height: auto !important;
    box-sizing: border-box !important;
}

/* Ensure no pseudo-elements on wrapper are creating icons */
.menuMobileContainer .aws-wrapper::before,
.menuMobileContainer .aws-wrapper::after {
    display: none !important;
    content: none !important;
}

/* 3. Input Field */
.menuMobileContainer .aws-search-field {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    position: relative !important; /* Ensure it takes flow space */
    
    /* Visual Style */
    /* FIX: Use shorthand background to wipe existing images */
    background: transparent !important; 
    background-image: none !important;
    border: none !important; 
    color: #000 !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    
    /* Reset Appearance */
    -webkit-appearance: none !important;
    appearance: none !important;
    
    padding: 0 10px !important; 
    text-indent: 0 !important;
    
    height: 40px !important;
    border-radius: 2px !important;
    box-sizing: border-box !important;
    
    /* Shadow defining the box */
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1) !important; 
    
    pointer-events: auto !important;
    cursor: text !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    z-index: 1003 !important;
}

.menuMobileContainer .aws-search-field:focus {
    background-color: #fff !important;
    outline: none !important;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15) !important;
}

.menuMobileContainer .aws-search-field::placeholder {
    color: #000 !important;
    opacity: 1;
}

/* Clear button position */
.menuMobileContainer .aws-search-clear {
    display: none !important; 
}


/* --- Custom WooCommerce Info/Message Styling --- */
.woocommerce-info, 
.woocommerce-message, 
.woocommerce-error,
.cart-empty {
    background: transparent !important;
    background-color: transparent !important;
    font-family: "AA Stetica", sans-serif !important;
    font-size: 16px !important;
    border: none !important;
    box-shadow: none !important;
    padding-left: 0 !important;
    color: var(--blackText, #000) !important;
}

/* Remove default WooCommerce icons */
.woocommerce-info::before, 
.woocommerce-message::before,
.woocommerce-error::before {
    display: none !important;
}

/* Buttons inside messages */
.woocommerce-info .button,
.woocommerce-message .button,
.woocommerce-error .button,
.cart-empty .button,
.woocommerce-info .button.wc-backward {
    background: transparent !important;
    background-color: transparent !important;
    font-size: 14px !important;
    text-decoration: underline !important;
    border: none !important;
    padding: 0 !important;
    margin-left: 15px !important;
    width: auto !important;
    min-width: unset !important;
    height: auto !important;
    line-height: inherit !important;
    color: inherit !important;
    box-shadow: none !important;
    display: inline-block !important;
}

/* Ensure no hover changes */
.woocommerce-info .button:hover,
.woocommerce-message .button:hover,
.woocommerce-error .button:hover,
.cart-empty .button:hover,
.woocommerce-info .button.wc-backward:hover {
    background: transparent !important;
    text-decoration: underline !important;
    color: inherit !important;
    box-shadow: none !important;
    transform: none !important;
}


/* --- Specific Fix for wc-backward Button --- */
a.button.wc-backward,
button.button.wc-backward,
.woocommerce a.button.wc-backward,
.woocommerce button.button.wc-backward {
    background: transparent !important;
    background-color: transparent !important;
    color: var(--blackText, #000) !important;
    font-family: "AA Stetica", sans-serif !important;
    font-size: 14px !important;
    text-decoration: underline !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-top: 10px !important;
    display: inline-block !important;
    font-weight: normal !important;
}

@media (max-width: 768px) {
    .tinvwl_add_to_wishlist_button img {
    width: 30px !important;
max-width: 30px !important;
height: auto !important;
}
    
}

                                                                                                                                                     
 .recommended-img, .new-collection-img {                                                                                                                                  
     height: clamp( 168px, calc(168px + (100vw - 360px) * ((380 - 168) / (1200 - 360))), 380px);                                                     
 }                                                                                                                                                   
                                                                                                                                                     
 @media (max-width: 768px) {                                                                                                                         
     .recommended-img, .new-collection-img{                                                                                                                              
         height: 240px !important;                                                                                                                   
     }     
     .brachContainer {
         margin-bottom: 20px !important;
     }
     
.single-product .tinv-wraper.tinv-wishlist {                                               
right: 30px !important;                                                                  

}                                                                                       

.single-product .tinvwl_add_to_wishlist_button img {                                          
width: 40px !important;                                                                   
max-width: 40px !important;                                                               
height: auto !important;                                                                  
}

.mobile-section-1 {
    padding: 20px 72px !important;
}
.mg-sidebar-title {
    font-size: 24px !important;
}
.my-product-card {
    padding: 0 !important;
}
.products-grid {
   
    gap: 10px;
}
 } 
 
 .glassBtn {
     color: black;
 }
 .mg-size-option.selected  {
     background: #d7bb9c !important;
     border-color: #d7bb9c !important;
 }
 .mg-popup-add-to-cart-btn,  .mg-popup-add-to-cart-btn:focus {
     background: #d7bb9c !important;
 }
.inline-edit-address-form .mg-inline-country .woocommerce-input-wrapper input[type="radio"] {
    -webkit-appearance: none !important;
   -moz-appearance: none !important;
   appearance: none !important;
   border-radius: 0;
}

 
   
a.button.wc-backward:hover,
button.button.wc-backward:hover,
.woocommerce a.button.wc-backward:hover,
.woocommerce button.button.wc-backward:hover {
    background: transparent !important;
    background-color: transparent !important;
    color: var(--blackText, #000) !important;
    text-decoration: underline !important;
    opacity: 1 !important;
    box-shadow: none !important;
}
 /* Custom Product Filter Icons */                                                                                                              
.fa-minus:before {                                                                                                                 
     content: "\2013" !important;                                                                           
     font-family: 'Century Gothic', sans-serif !important;                                                                                      
     font-weight: 300 !important;                                                                                                               
     font-size: 18px;                                                                                                                           
 }                                                                                                                                              
                                                                                                                                                
.fa-plus:before {                                                                                                                  
     content: "+" !important;                                                                                                                   
     font-family: 'Century Gothic', sans-serif !important;                                                                                      
     font-weight: 300 !important;                                                                                                               
     font-size: 20px;                                                                                                                           
     line-height: 1;                                                                                                                            
 } 
 .mg-size-option {
     color: black;
 }
 /* Hide duplicate TI Wishlist button after add-to-cart (we have one at the top) */                                                                                
.single-product .summary form.cart + .tinv-wraper,                                                                                                                 
.single-product .summary form.cart .tinv-wraper,                                                                                                                   
.single-product .summary .tinvwl-after-add-to-cart {                                                                                                               
    display: none !important;                                                                                                                                      
}