/*
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
*/

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

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

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

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

.product-card-title-link {
    color: inherit;
    text-decoration: none;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.product-thumb {
    position: relative;
    overflow: hidden;
}

/* Wishlist — позиционирование иконки (каталог, вишлист, рекомендуемые) */
/* Симметрично корзине: корзина bottom:12px right:12px → сердечко top:12px right:12px */
.product-thumb .tinv-wraper,
.wishlist-product-card-wrapper .tinv-wraper {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 10 !important;
    transition: none !important;
    margin: 0 !important;
}

/* На главной .mg-wishlist-wrap — контейнер для иконки поверх картинки */
/* .mg-wishlist-wrap начинается в 7px от края карточки, поэтому top/right:5px → итого 12px от края */
.mg-wishlist-wrap {
    position: absolute !important;
    top: 7px !important;
    right: 7px !important;
    bottom: 7px !important;
    left: 7px !important;
    pointer-events: none !important;
    z-index: 10 !important;
}
.mg-wishlist-wrap .tinv-wraper {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 10 !important;
    margin: 0 !important;
    pointer-events: all !important;
}

/* SVG сердечко — стиль зеркальный add-to-cart-bag-btn */
.product-thumb .tinvwl_add_to_wishlist_button.no-txt,
.mg-wishlist-wrap .tinvwl_add_to_wishlist_button.no-txt,
.wishlist-product-card-wrapper .tinvwl_add_to_wishlist_button.no-txt {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 24px 24px !important;
    background-color: transparent !important;
    transition: transform 0.3s ease !important;
    margin: 0 !important;
    vertical-align: top !important;
    display: block !important;
}
.product-thumb .tinvwl_add_to_wishlist_button.no-txt:hover,
.mg-wishlist-wrap .tinvwl_add_to_wishlist_button.no-txt:hover,
.wishlist-product-card-wrapper .tinvwl_add_to_wishlist_button.no-txt:hover {
    transform: scale(1.1) !important;
}
.product-thumb .tinvwl_add_to_wishlist_button.no-txt:before,
.mg-wishlist-wrap .tinvwl_add_to_wishlist_button.no-txt:before,
.wishlist-product-card-wrapper .tinvwl_add_to_wishlist_button.no-txt:before {
    content: none !important;
}
/* Красное залитое сердце когда товар в вишлисте */
.product-thumb .tinvwl_add_to_wishlist_button.tinvwl-product-in-list.no-txt,
.mg-wishlist-wrap .tinvwl_add_to_wishlist_button.tinvwl-product-in-list.no-txt,
.wishlist-product-card-wrapper .tinvwl_add_to_wishlist_button.tinvwl-product-in-list.no-txt {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c0392b' stroke='%23c0392b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E") !important;
}

/* Мобильные размеры — зеркально add-to-cart-bag-btn */
@media (max-width: 768px) {
    .product-thumb .tinvwl_add_to_wishlist_button.no-txt,
    .mg-wishlist-wrap .tinvwl_add_to_wishlist_button.no-txt,
    .wishlist-product-card-wrapper .tinvwl_add_to_wishlist_button.no-txt {
        width: 42px !important;
        height: 42px !important;
        background-size: 20px 20px !important;
    }
    .product-thumb .tinv-wraper,
    .wishlist-product-card-wrapper .tinv-wraper {
        top: 10px !important;
        right: 10px !important;
        bottom: auto !important;
        left: auto !important;
    }
    .mg-wishlist-wrap .tinv-wraper {
        top: 3px !important;
        right: 3px !important;
        bottom: auto !important;
        left: auto !important;
    }
}
@media (max-width: 480px) {
    .product-thumb .tinvwl_add_to_wishlist_button.no-txt,
    .mg-wishlist-wrap .tinvwl_add_to_wishlist_button.no-txt,
    .wishlist-product-card-wrapper .tinvwl_add_to_wishlist_button.no-txt {
        width: 38px !important;
        height: 38px !important;
        background-size: 18px 18px !important;
    }
    .product-thumb .tinv-wraper,
    .wishlist-product-card-wrapper .tinv-wraper {
        top: 8px !important;
        right: 8px !important;
        bottom: auto !important;
        left: auto !important;
    }
    .mg-wishlist-wrap .tinv-wraper {
        top: 1px !important;
        right: 1px !important;
        bottom: auto !important;
        left: auto !important;
    }
}

/* Адаптивные стили для карточек товаров */
@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .my-product-card {
        padding: 7px;
        gap: 10px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
    .my-product-card {
        padding: 6px;
        gap: 9px;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .my-product-card {
        padding: 8px;
        gap: 12px;
    }
}

@media (max-width: 575px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .my-product-card {
        padding: 10px;
        gap: 12px;
    }
    
    .my-product-card .textB.small {
        font-size: 14px;
        line-height: 1.2;
    }
    
    .my-product-card .product-thumb {
        margin-bottom: 8px;
    }
}

@media (max-width: 360px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .my-product-card {
        padding: 12px;
        gap: 15px;
    }
}

.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;
}
.branchContainer {
    z-index: 999 !important;
}
.containerHeader {
    margin: 0 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;
}

.mg-checkout-left {
    flex: 1;
    min-width: 0;
}

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

.mg-sticky-sidebar {
    position: sticky;
    top: 100px;
    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;
    font-family: 'Century Gothic', sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

.woocommerce-order-details-custom .order-info-label {
    min-width: 200px;
    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;
}

/* 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;
        margin-bottom: 10px;
    }
    .order-summary-block .summary-row {
        font-size: 14px;
    }
    .order-products-full-width-section {
    width: 100%;
    margin: 0px 0 0 0%;
    
}
.woocommerce div.product div.summary {
    width: 100% !important;
}
.branchContainer {
    margin-bottom: 0;
}

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


    .woocommerce-order-details-custom .order-info-label {
        font-weight: 400;
        min-width: auto;
        flex: 1;
    }

    .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;
    }

    .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%;
    }

    /* 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;
    }

    /* 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;
    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;
}

/* Fields inside row-half split 50/50 */
.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;
}


/* Страна — только чтение */
.location-grid #billing_country_field select,
.location-grid #billing_country_field .select2-container,
.location-grid #billing_country_field .select2-selection {
    pointer-events: none !important;
    appearance: none;
    -webkit-appearance: none;
}
.location-grid #billing_country_field .select2-selection__arrow {
    display: none !important;
}

.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;
}

/* 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 {
}

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

.mg-cart-totals .order-total {
    margin-top: 30px;
    font-size: 24px;
}

.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;
}

/* 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);
}


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

    .mg-checkout-right {
        width: 100%;
        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 — поля формы, кнопки, сайдбар
   ============================================ */

/* 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: transparent !important;
    border: 1px solid #1e1e1e !important;
    border-radius: 0 !important;
    padding: 0 20px !important;
    height: 56px !important;
    line-height: 56px !important;
    font-size: 16px !important;
    color: #000 !important;
    box-shadow: none !important;
    outline: none !important;
    width: 99.7% !important;
}

/* =========================================================================
   ACCOUNT EDIT FORM (страница «Профиль»)
   ========================================================================= */
.mg-account-title {
    margin: 0 0 24px 0;
}

.mg-account-form {
    max-width: 720px;
}

.mg-account-row {
    display: grid;
    gap: 16px;
    margin: 0 0 16px 0;
}

.mg-account-row--two {
    grid-template-columns: 1fr 1fr;
}

.mg-account-row--one {
    grid-template-columns: 1fr;
}

.mg-account-form .mg-account-field {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.mg-account-form .mg-account-field label {
    display: block;
    margin: 0 0 6px 2px;
    font-size: 14px;
    color: #1e1e1e;
    font-weight: 400;
}

.mg-account-form .mg-account-optional {
    color: #888;
    font-size: 13px;
}

.mg-account-form .mg-account-field input {
    background-color: transparent !important;
    border: 1px solid #1e1e1e !important;
    border-radius: 0 !important;
    padding: 0 20px !important;
    height: 56px !important;
    line-height: 56px !important;
    font-size: 16px !important;
    color: #000 !important;
    box-shadow: none !important;
    outline: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.mg-account-form .password-error-message {
    color: #D32F2F;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    min-height: 0;
}
.mg-account-form .password-error-message:empty {
    display: none;
}

.mg-account-form .mg-account-actions {
    margin: 24px 0 0 0;
    display: flex;
    justify-content: center;
}

.mg-account-form .mg-account-submit {
    display: inline-block;
    width: 240px;
    height: 56px;
    background: transparent;
    color: #000;
    border: 1px solid #1e1e1e;
    border-radius: 0;
    padding: 0;
    font-size: 16px;
    font-family: inherit;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.mg-account-form .mg-account-submit:hover {
    background: #000;
    color: #fff;
}

@media (max-width: 768px) {
    .mg-account-row--two {
        grid-template-columns: 1fr;
    }
    .mg-account-form .mg-account-submit {
        width: 100%;
    }
}

/* 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;
    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;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 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;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

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

/* 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;
    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;
}

/* 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;
    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;
}

.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;
    margin-bottom: 40px;
}

/* 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";
    font-weight: 300;
}

/* Login Button */
.button-login {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    background: transparent;
    border: 1px solid #000;
    margin-top: 15px;
    text-transform: uppercase;
    font-size: 18px;
    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;
    height: 28px;
    }

    .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 — карточка доставки
   ============================================ */

/* 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;
    border: 1px solid #CCC !important;
    padding: 0 !important;
    min-height: auto !important;
}

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

/* Fallback */
.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;
}

.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;
    border: 1px solid #D5CBB9;
    padding: 25px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    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;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: transparent !important;
    color: #A8A2A2 !important;
    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%
    }


}

/* =========================================
   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;
    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%;
    max-width: 100%;
    overflow-x: clip;
    /* clip instead of hidden — hidden breaks position:sticky on children */
}

/* 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: clip !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--whiteText);
}

/* Ensure the main wrapper also respects this */
#page,
.site,
.site-content {
    overflow-x: clip !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;
    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;
}

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


.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;
}

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

/* Remove default WC grey backdrop on #payment */
.woocommerce-checkout #payment,
#payment {
    background: transparent !important;
    border-radius: 0 !important;
}

.woocommerce-checkout #payment ul.payment_methods {
    border-bottom: none !important;
}

/* Hide visible WC place-order junk; keep hidden inputs for form submit */
.woocommerce-checkout #payment .form-row.place-order {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}
.woocommerce-checkout #payment .form-row.place-order > noscript,
.woocommerce-checkout #payment .form-row.place-order > .woocommerce-terms-and-conditions-wrapper {
    display: none !important;
}
.woocommerce-checkout wc-order-attribution-inputs {
    display: none !important;
}

.wc-proceed-to-checkout a.checkout-button,
.wc-proceed-to-checkout a.button.checkout-button,
.wc-proceed-to-checkout a.wc-forward.checkout-button {
    display: block !important;
    width: 100% !important;
    background: #F4F1ED !important;
    background-color: #F4F1ED !important;
    color: #000 !important;
    border: 1px solid #000 !important;
    border-radius: 0 !important;
    padding: 18px 0 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    transition: all 0.3s !important;
}

.wc-proceed-to-checkout a.checkout-button:hover,
.wc-proceed-to-checkout a.button.checkout-button:hover,
.wc-proceed-to-checkout a.wc-forward.checkout-button:hover {
    background: #000 !important;
    background-color: #000 !important;
    color: #fff !important;
}

.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;
    }
}

/* =========================================
   КОРЗИНА — таблица товаров, количество, итоги
   ========================================= */

/* --- 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;
    padding: 15px 0 0 0 !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #A8A2A2 !important;
    text-transform: none !important;
    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;
}

/* 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;
    display: block;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

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

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

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

/* Size Box */
.mg-size-box {
    width: 44px;
    height: 44px;
    border: 1px solid #C59A6D;
    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;
    align-items: center;
    justify-content: center;
    gap: 15px;
    border: none;
    background: transparent;
    width: auto;
}

/* 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;
    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;
    border: none;
    color: #000;
    font-size: 20px;
    width: auto;
    height: auto;
    padding: 0;
    cursor: pointer;
    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;
}

.mg-remove-btn svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #000;
    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;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* --- 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;
    opacity: 0.6 !important;
    border: none !important;
}


/* Fix for possible double update jump */
.mg-totals-value {
    transition: all 0.2s ease;
}
/* =========================================
   КОРЗИНА — мобильная адаптация
   ========================================= */

@media (max-width: 768px) {

    .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;
        grid-template-columns: 110px 1fr !important;
        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;
    }
    .mg-cart-header {
        display: none;
    }

    /* 3. Flatten cell structure via display: contents */
    .mg-cart-table-wrapper td.product-name,
    .mg-cart-table-wrapper .mg-product-name-wrapper {
        display: contents !important;
    }

    /* IMAGE: Column 1, Spans all rows */
    .mg-cart-table-wrapper .mg-product-thumbnail {
        grid-column: 1;
        grid-row: 1 / span 3;
        width: 100%;
        height: auto;
        margin: 0;
    }

    .mg-cart-table-wrapper .mg-product-thumbnail img {
        width: 100%;
        height: auto;
        aspect-ratio: 3/4;
        object-fit: cover;
        border-radius: 0;
    }

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

    /* PRICE: Col 2, Row 1 */
    .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;
        
            justify-self: end !important;
        align-self: start !important;
        z-index: 2;
        
        font-size: 16px !important;
        font-weight: 500 !important;
    }
    
    .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;
    }
    
    .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;
        width: auto !important;
        float: none !important;
    }
    
    /* Style the Size Select/Box */
    .mg-cart-size-select,
    .mg-size-box {
        margin: 0;
        font-size: 14px;
        padding: 0 5px;
        height: auto;
        border: none;
        background: transparent;
        color: #000;
    }
    
    /* QUANTITY: Col 2, Row 3 */
    .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;
        border: 1px solid #ddd;
        height: 36px;
        padding: 0 5px;
    }

    .mg-quantity-wrapper button {
        width: 24px;
        font-size: 18px;
    }
    
    .mg-quantity-wrapper input.qty {
        width: 30px !important;
        height: 100% !important;
        border: none !important;
        font-size: 14px !important;
    }

    /* REMOVE: Col 2, Row 3 */
    .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;
        height: 20px;
    }

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

    .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;
    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;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 28px !important;
    height: 28px !important;
    cursor: pointer;
    pointer-events: auto !important;
    
    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;
    
    min-height: 40px !important;
    height: auto !important;
    box-sizing: border-box !important;
}

/* Remove pseudo-elements from aws-wrapper */
.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;
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    color: #000 !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    -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;
    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: 440px;
    background-position: center top;
}

/* Рекомендуемые карточки на странице товара — перебивает right:30px от плагина */
.single-product .tinv-wraper.tinv-wishlist {
    right: 12px !important;
}
.single-product .product-thumb .tinv-wraper {
    top: 12px !important;
    right: 12px !important;
    bottom: auto !important;
    left: auto !important;
}

@media (max-width: 768px) {
    .recommended-img, .new-collection-img {
        height: 240px;
    }
    .branchContainer {
        margin-bottom: 20px;
    }
    .mobile-section-1 {
        padding: 20px 72px;
    }
    .mg-sidebar-title {
        font-size: 24px;
    }
    .my-product-card {
        padding: 0;
    }
    .products-grid {
        gap: 10px;
    }
}
 
 .glassBtn {
     color: black;
 }
 .mg-size-option.selected  {
     background: #d7bb9c;
     border-color: #d7bb9c;
 }
 .mg-popup-add-to-cart-btn,  .mg-popup-add-to-cart-btn:focus {
     background: #d7bb9c;
 }
.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;
}

/* Кнопка вишлиста в заголовке товара — SVG, без текста, как в каталоге */
.single-product .summary .tinv-wraper .tinvwl_add_to_wishlist_button span {
    display: none !important;
}
.single-product .summary .tinv-wraper .tinvwl_add_to_wishlist_button {
    width: 48px !important;
    height: 48px !important;
    position: relative !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 30px 30px !important;
    background-color: transparent !important;
}
.single-product .summary .tinv-wraper .tinvwl_add_to_wishlist_button:before {
    content: none !important;
}
.single-product .summary .tinv-wraper .tinvwl_add_to_wishlist_button.tinvwl-product-in-list {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c0392b' stroke='%23c0392b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E") !important;
}


/* ============================================
   Фикс сломанного грида каталога при залогиненой аккаунте 
   ============================================ */
.page-id-8 .wp-block-columns,
.page-template-default.page-id-8 .wp-block-columns,
.woocommerce-page .wp-block-columns {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 20px !important;
}

.page-id-8 .wp-block-columns > .wp-block-column:first-child,
.page-template-default.page-id-8 .wp-block-columns > .wp-block-column:first-child,
.woocommerce-page .wp-block-columns > .wp-block-column:first-child {
    flex: 0 0 20% !important;
    max-width: 20% !important;
    min-width: 220px !important;
}

.page-id-8 .wp-block-columns > .wp-block-column:last-child,
.page-template-default.page-id-8 .wp-block-columns > .wp-block-column:last-child,
.woocommerce-page .wp-block-columns > .wp-block-column:last-child {
    flex: 1 1 auto !important;
    max-width: none !important;
    min-width: 0 !important;
}

.page-id-8 .products-grid,
.page-template-default.page-id-8 .products-grid,
.woocommerce-page .products-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.page-id-8 .products-grid > *,
.page-template-default.page-id-8 .products-grid > *,
.woocommerce-page .products-grid > * {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

@media (max-width: 767px) {
    .page-id-8 .wp-block-columns,
    .page-template-default.page-id-8 .wp-block-columns,
    .woocommerce-page .wp-block-columns {
        flex-wrap: wrap !important;
    }

    .page-id-8 .wp-block-columns > .wp-block-column:first-child,
    .page-id-8 .wp-block-columns > .wp-block-column:last-child,
    .page-template-default.page-id-8 .wp-block-columns > .wp-block-column:first-child,
    .page-template-default.page-id-8 .wp-block-columns > .wp-block-column:last-child,
    .woocommerce-page .wp-block-columns > .wp-block-column:first-child,
    .woocommerce-page .wp-block-columns > .wp-block-column:last-child {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .page-id-8 .products-grid,
    .page-template-default.page-id-8 .products-grid,
    .woocommerce-page .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 360px) {
    .page-id-8 .products-grid,
    .page-template-default.page-id-8 .products-grid,
    .woocommerce-page .products-grid {
        grid-template-columns: 1fr !important;
    }
}


/* Advanced Woo Search: цена под названием товара */
.aws-search-result .aws_result_head {
    flex-direction: column;
    justify-content: flex-start;
}

.aws-search-result .aws_result_price {
    text-align: left;
    padding: 2px 0 0 0 !important;
}


/* Wishlist counter badge */
.wishlist_products_counter_number {
    display: none;
}
.wishlist_products_counter_number:not(:empty) {
    display: inline-flex !important;
}

/* =========================================================================
   SIGN-IN POPUP (.signInDesktop): ширина и выравнивание контента
   ========================================================================= */
.signInDesktop {
    width: 400px;
    padding: 32px 32px 60px;
    gap: 24px;
    overflow-y: auto;
}

.signInDesktop #customer_login,
.signInDesktop .col2-set {
    width: 100% !important;
    float: none !important;
}

.signInDesktop .col2-set .col-1,
.signInDesktop .col2-set .col-2,
.signInDesktop .u-column1,
.signInDesktop .u-column2 {
    width: 100% !important;
    float: none !important;
    padding-right: 0 !important;
}

.signInDesktop .woocommerce-Input--text,
.signInDesktop .input-text {
    background-color: transparent !important;
    border: 1px solid #1e1e1e !important;
    border-radius: 0 !important;
    padding: 0 20px !important;
    height: 56px !important;
    line-height: 56px !important;
    font-size: 16px !important;
    color: #000 !important;
    box-shadow: none !important;
    outline: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.signInDesktop .woocommerce-form-row,
.signInDesktop .form-row {
    padding: 0 !important;
    margin: 0 0 15px 0 !important;
}

/* Логин без аккаунта — стили перенесены в account.css (загружается только на is_account_page) */

/* =========================================================================
   MODAL «ЗАБЫЛИ ПАРОЛЬ?» (#modal-1): выравнивание формы
   ========================================================================= */
#modal-1 .modal-dialog {
    max-width: 440px;
}

#modal-1 .woocommerce-ResetPassword > p:first-child {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
    line-height: 1.5;
}

#modal-1 .woocommerce-ResetPassword .woocommerce-form-row {
    float: none !important;
    width: 100% !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
}

#modal-1 .woocommerce-ResetPassword .clear {
    display: none;
}

#modal-1 .woocommerce-ResetPassword label {
    display: none !important;
}

#modal-1 .woocommerce-ResetPassword .woocommerce-Input--text,
#modal-1 .woocommerce-ResetPassword .input-text {
    background-color: transparent !important;
    border: 1px solid #1e1e1e !important;
    border-radius: 0 !important;
    padding: 0 20px !important;
    height: 56px !important;
    line-height: 56px !important;
    font-size: 16px !important;
    color: #000 !important;
    box-shadow: none !important;
    outline: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#modal-1 .woocommerce-ResetPassword .glassBtn {
    width: 100% !important;
    background: transparent !important;
    padding: 0 !important;
}

/* Swiper pagination dots: скрыты для всех слайдеров главной */
.swiper-pagination {
    display: none !important;
}
