/*
Theme Name: GeneratePress Child
Template: generatepress
*/

/* =================================================
   Main Page
   ================================================= */
.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull {
    margin-left: 0px;
}


ul.wc-block-product-template__responsive.columns-5.wc-block-product-template.wp-custom-css-eae128a6.wp-block-woocommerce-product-template.is-layout-flow.wp-block-woocommerce-product-template-is-layout-flow.has-custom-css {
    margin-left: 0px;
}

/* Отступ сверху над контейнером кнопки */
div.wp-block-button.my-fixed-btn {
    margin-top: 25px !important;
    padding-top: 0 !important; /* На всякий случай обнуляем padding, если тема его навязывает */
}

/* Стили самой ссылки внутри этого контейнера */
div.wp-block-button.my-fixed-btn a.wp-block-button__link {
    font-size: 16px;
    font-weight: 700;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 50px;
    padding-right: 50px;
    display: inline-block;
}

/* Цвет текста при наведении мыши */
div[class*="my-fixed-btn"] a.wp-block-button__link:hover {
    color: #ffffff;
}

@media screen and (max-width: 768px) {
    /* Переводим контейнер галереи в вертикальный режим */
    figure.wp-block-gallery.wp-block-gallery-is-layout-flex {
        flex-direction: column !important;
        display: flex !important;
    }
    
    /* Растягиваем блоки с картинками на 100% ширины и убираем лишние отступы */
    figure.wp-block-gallery.wp-block-gallery-1 .wp-block-image {
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        margin-bottom: 15px; /* Отступ между картинками по вертикали */
    }

    /* Убираем нижний отступ у последней картинки */
    figure.wp-block-gallery.wp-block-gallery-1 .wp-block-image:last-child {
        margin-bottom: 0 !important;
    }
}

ul.wc-block-product-template__responsive.columns-5.wc-block-product-template.wp-custom-css-543988d7.wp-block-woocommerce-product-template.is-layout-flow.wp-block-woocommerce-product-template-is-layout-flow.has-custom-css {
    margin: 0px;
}


/* =================================================
   1. ОБЩИЕ КОНТЕЙНЕРЫ И СТРУКТУРА (SINGLE PRODUCT)
   ================================================= */
.single-product .grid-container.container {
    max-width: 1250px;
}

.product-page-wrap {
    max-width: 1250px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.product-layout-custom {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    align-items: start;
}

.product-left,
.product-right {
    display: grid;
    gap: 16px;
    background: transparent;
    padding: 0;
}

.product-left-cell,
.product-right-cell {
    background: #ffffff;
    padding: 30px;
}

.product-breadcrumbs {
    margin: 15px 0;
    font-size: 16px;
    color: #777;
}

.product-right {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.product-right-cell {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* =================================================
   2. ГАЛЕРЕЯ ТОВАРА (DESKTOP)
   ================================================= */

.product-left-cell.cell-title {
    padding-left: 0;
    padding-right: 0;
}

.single-product .product_title.entry-title {
    padding-left: 40px;
}

.gallery-wrapper-fixed {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.product-gallery-thumbs-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.woocommerce-product-gallery {
    margin: 0 auto;
    float: none;
}

.woocommerce-product-gallery__wrapper {
    margin: 0 auto;
}

.product-gallery-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    margin: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.product-gallery-thumb {
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
}

.product-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

/* Стрелки галереи */
.gallery-arrow,
.thumb-arrow {
    background: transparent;
    border: none;
    box-shadow: none;
    color: #888;
    font-size: 26px;
    cursor: pointer;
    padding: 0;
    outline: none;
}

.gallery-arrow:hover,
.thumb-arrow:hover,
.gallery-arrow:active,
.gallery-arrow:focus,
.gallery-arrow:focus-visible,
.thumb-arrow:active,
.thumb-arrow:focus,
.thumb-arrow:focus-visible {
    background: transparent;
    color: #888;
    box-shadow: none;
    outline: none;
}

.product-gallery-main-wrapper {
    position: relative;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.thumb-arrow {
    flex-shrink: 0;
}

.gallery-arrow--left,
.thumb-arrow--left {
    left: -60px;
}

.gallery-arrow--right,
.thumb-arrow--right {
    right: -60px;
}

@media (min-width: 769px) {
    .product-gallery-main-item { display: none; }
    .product-gallery-main-item:first-child { display: block; }
}


/* Характеристики товара*/
@media screen and (max-width: 768px) {
    .product-left-cell.cell-attributes table.shop_attributes {
        display: table !important;
        width: 100% !important;
    }
    .product-left-cell.cell-attributes table.shop_attributes tbody {
        display: table-row-group !important;
    }
    .product-left-cell.cell-attributes table.shop_attributes tr {
        display: table-row !important;
    }
    .product-left-cell.cell-attributes table.shop_attributes th,
    .product-left-cell.cell-attributes table.shop_attributes td {
        display: table-cell !important;
        width: 50% !important; /* Делит экран ровно пополам */
        box-sizing: border-box;
        padding: 8px 10px !important;
        word-break: break-word; /* Чтобы длинные ссылки не распирали таблицу */
    }
    .product-left-cell.cell-attributes table.shop_attributes td p {
        margin: 0 !important;
    }
}

/* описание товара */
h2.wp-block-heading {
    font-size: 20px;
    font-weight: 700;
}
/* =================================================
   3. ПРАВАЯ КОЛОНКА (ЦЕНА, КНОПКИ, ДОСТАВКА)
   ================================================= */

.product-right {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding-right: 6px;
}

.pr-divider {
    border-bottom: 1px solid #e5e5e5;
    margin: 12px 0;
}

/* Цена и валюта */
.product-right .price {
    margin: 15px;
}

.product-right .price .woocommerce-Price-amount {
    font-size: 32px;
    font-weight: 700;
    color: #107b1e;
    line-height: 1.1;
}

.product-right .price .woocommerce-Price-currencySymbol {
    font-size: 18px;
    margin-left: 2px;
    color: #107b1e;
}

.woocommerce-price-suffix {
  	color: #656565;
}

.exploro-vat-info {
  	margin-left: 15px;
    margin-top: -25px;
    font-size: 13px;
    color: #656565;
    line-height: 1.4;
}

/* ULTRA */
img.ultra-badge {
    max-width: 80px;
}

.price-with-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

/* Контейнер-якорь */
.ultra-info-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

/* Показываем подсказку при наведении на обертку */
.ultra-info-wrapper:hover .info-tooltip {
    display: block;
    /* Позиционируем НИЖЕ картинки */
    top: 100%;
    bottom: auto;
    right: 0;
    margin-top: 10px; /* Отступ сверху от картинки */
}

/* Стили самого бейджа */
.ultra-badge {
    height: 28px;
    width: auto;
    display: block;
}

/* Оптовая цена */
.product-wholesale-price {
    margin-top: 8px;
    font-size: 15px;
    display: flex;
    gap: 6px;
    align-items: baseline;
}

.wholesale-label {
    color: #666;
}

.wholesale-amount {
    font-weight: 600;
    color: gray;
}

/* Иконки вызова */
.wholesale-info,
.delivery-info-container,
.ultra-info-wrapper {
    display: inline-block;
    margin-left: 6px;
    cursor: pointer;
    position: relative; /* Оставляем как базовый ориентир для высоты */
}

.info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50%;
    background: #fff;
    color: #888;
    border: 1px solid #bbb;
    text-align: center;
    line-height: 15px;
    vertical-align: baseline;
}

/* Стили поповера */
.info-tooltip {
    display: none;
    position: absolute;
    top: 100%;
    
    /* Скрипт будет сам рассчитывать это свойство динамически, */
    /* сдвигая блок влево ровно настолько, чтобы он прижался к правому краю .product-right */
    left: auto; 
    
    width: 260px;
    white-space: normal;
    z-index: 1000;
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    margin-top: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    font-weight: 400;
    color: #333;
    line-height: 1.4;
    border-radius: 6px;
}

/* Отображение при ховере */
.wholesale-info:hover .info-tooltip,
.delivery-info-container:hover .info-tooltip,
.ultra-info-wrapper:hover .info-tooltip {
    display: block;
}

/* Скидка под ценой */
.wholesale-discounts {
    margin-top: 12px;
}

.wholesale-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #656565;
}

.wholesale-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.discount-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 20px;
    padding: 0 10px;

    background: #1bb826;
    color: #fff;

    font-size: 13px;
    font-weight: 700;

    border-radius: 999px;

    line-height: 1;
}

.discount-text {
    font-size: 13px;
    color: #656565;
}

/* Статус товара и доп. текст */
.pr-guarantee-text {
    margin-top: 15px;
    color: #107b1e;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    display: inline-block;
}

.pr-bought{
    margin-top: 15px;
    color: #656565;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    display: inline-block;
}

p.stock.in-stock {
    margin-bottom: 0px;
    margin-top: 15px;
    color: #656565;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    display: inline-block;
}

/* Форма корзины и количество */
.single-product .product-right form.cart {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.single-product .product-right form.cart .quantity {
    float: none;
    width: 90px;
    flex: 0 0 90px;
}

.single-product .product-right form.cart .quantity input.qty {
    border-bottom: 1px solid #e5e5e5;
    background-color: white;
    width: 100%;
    height: 40px;
    padding: 3px 10px 3px 5px;
    text-align: center;
    font-size: 16px;
}

input.qty:focus {
    border-color: #ddd;
    outline: none;
    box-shadow: none;
}

input.qty {
    position: relative;
    padding-right: 34px;
    font-size: 16px;
    border: 1px solid #ddd;
}

.single-product .product-right form.cart button.single_add_to_cart_button {
    background-color: #ff5a00;
    border-color: #ff5a00;
    color: #fff;
    flex: 1;
    height: 40px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Блок доставки */
.delivery-box {
    width: 100%;
    display: block;
}

.delivery-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #e6e6e6;
    font-size: 14px;
    line-height: 1.4;
}

.delivery-item:last-child {
    border-bottom: none;
}

.delivery-icon {
    flex: 0 0 24px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    color: #656565;
}

.delivery-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

.delivery-link:hover .delivery-icon,
.delivery-link:hover .delivery-icon svg {
    color: #111827;
    fill: #111827;
}

.delivery-text {
    flex: 1;
}

.delivery-title {
    font-weight: 600;
    color: #656565;
    line-height: 1.3;
}

.delivery-sub {
    margin-top: 2px;
    font-size: 13px;
    color: #656565;
}

.delivery-strong {
    font-weight: 700;
    color: #656565;
}

.delivery-info {
    margin-left: 4px;
    font-size: 13px;
    color: #656565;
    cursor: help;
}

.delivery-arrow {
    margin-left: 12px;
    font-size: 18px;
    color: #656565;
    line-height: 1;
}

.delivery-link {
    cursor: pointer;
}

.delivery-link:hover .delivery-title {
    text-decoration: underline;
}


/* Контейнер для значка инфо, чтобы подсказка позиционировалась относительно него */
    .delivery-info-container {
        position: relative;
        cursor: pointer;
        display: inline-block;
        margin-left: 4px;
    }

    /* Логика появления при наведении */
    .delivery-info-container:hover .info-tooltip {
        display: block;
        opacity: 1;
    }
/* =================================================
   4. ХАРАКТЕРИСТИКИ И ОТЗЫВЫ
   ================================================= */

/* Атрибуты (зебра) */
.product-left-cell.cell-attributes .woocommerce-product-attributes {
    border-collapse: collapse;
    font-size: 14px;
}

.product-left-cell.cell-attributes .woocommerce-product-attributes tr:nth-child(odd) {
    background-color: #ffffff;
}

.product-left-cell.cell-attributes .woocommerce-product-attributes tr:nth-child(even) {
    background-color: #f6f7f8;
}

.product-left-cell.cell-attributes .woocommerce-product-attributes th,
.product-left-cell.cell-attributes .woocommerce-product-attributes td {
    padding: 5px 12px;
    vertical-align: middle;
    border: none;
    line-height: 1.2;
}

.product-left-cell.cell-attributes .woocommerce-product-attributes th {
    font-weight: 400;
    text-align: left;
}

.product-left-cell.cell-attributes .woocommerce-product-attributes tr {
    height: 37px;
}

/* Звезды и рейтинги */
.star-rating {
    color: #e5e5e5;
    font-size: 16px;
    line-height: 1;
}

.star-rating span {
    color: #ffc107;
}

.rating-stars {
    display: flex;
    gap: 6px;
}

.rating-stars .star {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.rating-stars svg {
    fill: #ddd;
    transition: fill 0.2s ease;
}

.rating-stars .star.active svg,
.rating-stars .star.hover svg {
    fill: #ffb400;
}

.woocommerce-review-link {
    font-size: 14px;
    line-height: 1.2;
    color: #777;
    text-decoration: none;
}

.woocommerce-review-link:hover {
    color: #333;
    text-decoration: underline;
}

/* Секция отзывов */
h2.woocommerce-Reviews-title {
    padding: 15px 0px 15px 0px;
    font-size: 22px;
    font-weight: 600;
}

.woocommerce #review_form #respond .form-submit input {
    background-color: #ff5a00;
    border: 1px solid #ff5a00;
    color: #fff;
    padding: 12px 22px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all .2s ease;
}

.woocommerce #reviews #comments ol.commentlist li .comment-text {
    border: none;
    margin: 0 0 0 50px;
    border-bottom: 1px solid #e1dde7;
    border-radius: 4px;
    padding: 0px;
}

.woocommerce #reviews #comments ol.commentlist li img.avatar {
    background: none;
    border: none;
}

/* =================================================
   5. ВИТРИНА (КАТАЛОГ) И ПОХОЖИЕ ТОВАРЫ
   ================================================= */

.related.products > h2 {
    display: none;
}

.woocommerce ul.products li.product .woocommerce-loop-category__title, 
.woocommerce ul.products li.product .woocommerce-loop-product__title, 
.woocommerce ul.products li.product h3 {
    font-size: 0.875em;
}

.woocommerce:where(body:not(.woocommerce-uses-block-theme)) ul.products li.product .price {
    font-size: 18px;
    font-weight: 700;
    color: #107b1e;
    line-height: 1.1;
}

.woocommerce ul.products li.product .button {
    display: inline-block;
    background-color: #ff5a00;
    border-color: #ff5a00;
    color: #fff;
    margin: 5px;
    font-size: 16px;
    font-weight: 600;
}

.woocommerce ul.products li.product {
    text-align: center;
    display: flex;
    flex-direction: column;
}

.woocommerce ul.products li.product .star-rating {
    display: none;
}

.woocommerce .woocommerce-result-count {
    display: none;
}

.woocommerce-loop-product__title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 70px;
    max-height: 70px;
}

ul.products li.product .woocommerce-LoopProduct-link {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

ul.products li.product .button {
    margin-top: auto;
}

h1.woocommerce-products-header__title.page-title {
    display: none;
    margin-bottom: 0px;
}

.woocommerce-products-header {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
}

.woocommerce-products-header__title {
    margin: 0;
    margin-right: auto !important;
}

select.orderby {
    font-size: 11px;
}

.woocommerce-message {
    display: none;
}

/* Фильтр и сортировка UI */
.custom-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.action-btn-trigger {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7a7a7a;
    transition: color 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.action-btn-trigger svg {
    width: 20px;
    height: 20px;
}

.action-btn-trigger:hover,
.action-btn-trigger:focus {
    background: none !important;
    color: #ff5a00;
    outline: none;
}

.filter-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ff5a00;
    color: #fff;
    font-size: 9px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.custom-popover-box {   
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    min-width: 200px;
    margin-top: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    font-size: 14px;
}

.custom-popover-box.is-active {
    display: block !important;
}

.popover-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.brand-label-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    color: #333;
    font-size: 14px;
}

.brand-cnt {
    font-size: 0.85em;
    color: #999;
}

#btn-apply-filter {
    border-radius: 5px;
    width: 100%;
    margin-top: 10px;
    background: #ff5a00;
    color: #fff;
    border: none;
    padding: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

#btn-apply-filter:hover {
    background: #e65100;
}

.sort-list-links {
    display: flex;
    flex-direction: column;
}

.sort-link-item {
    padding: 8px 0;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #f9f9f9;
    transition: color 0.2s;
}

.sort-link-item:last-child {
    border-bottom: none;
}

.sort-link-item:hover,
.sort-link-item.is-active {
    color: #ff5a00;
}

/* =================================================
   6. КОРЗИНА И ОФОРМЛЕНИЕ ЗАКАЗА (CHECKOUT)
   ================================================= */
        /* 1. Задаем блоку страны 100% ширины и сбрасываем обтекания */
    p#billing_country_field {
        width: 100% !important;
        float: none !important;
        clear: both !important;
    }

    /* Переносим margin на внешний контейнер и вычисляем точную ширину */
    #billing_country_field .select2-container {
        width: 100% !important;
        margin: 3px !important;
    }

    /* Убираем margin у внутреннего элемента, чтобы он не ломал ширину */
    #billing_country_field .select2-selection {
        margin: 0 !important;
        width: 100% !important;
    }

/* Kupon*/
/* Скрываем кнопку обновления корзины */
button[name="update_cart"] {
    display: none !important;
}

/* Выравниваем поле и кнопку по высоте с помощью Flexbox */
.woocommerce-cart table.cart td.actions .coupon {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

/* Задаем ширину 180px для поля ввода */
.woocommerce-cart table.cart td.actions .coupon input.input-text {
    width: 180px !important;
    margin: 0;
    box-sizing: border-box;
}

/* Настраиваем цвет и центрируем текст внутри кнопки */
.woocommerce-cart table.cart td.actions .coupon button.button {
    background-color: #ff5a00 !important;
    color: #ffffff !important;
    border: none;
    margin: 0;
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Делаем форму гибким контейнером */
.woocommerce-checkout form.checkout_coupon {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

/* Убираем стандартные отступы и обтекания (float) */
.woocommerce-checkout form.checkout_coupon .form-row {
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    display: flex;
}

/* Задаем ширину для контейнера с полем ввода (можно изменить max-width под ваш дизайн) */
.woocommerce-checkout form.checkout_coupon .form-row-first {
    flex: 1;
    max-width: 200px;
}

.woocommerce-checkout form.checkout_coupon input.input-text {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

/* Настраиваем кнопку: цвет, текст и центрирование */
.woocommerce-checkout form.checkout_coupon button.button {
    background-color: #ff5a00 !important;
    color: #ffffff !important;
    border: none;
    margin: 0;
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

/*Podsumowanie koszyka*/
.wc-block-components-sidebar-layout.wc-block-cart {
    padding: 0 40px;
}

button.wc-block-components-button.wp-element-button.wc-block-components-totals-coupon__button.contained,
body:not(.woocommerce-block-theme-has-button-styles) .wc-block-components-button:not(.is-link) {
    border-radius: 5px;
    display: inline-block;
    background-color: #ff5a00;
    border-color: #ff5a00;
    color: #fff;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

ul.wc-block-grid__products,
.wc-block-components-product-metadata {
    display: none;
}

.wp-block-woocommerce-empty-cart-block {
    color: #008673;
}

.wc-block-components-button:not(.is-link):disabled .wc-block-components-button__text {
    opacity: 1;
}

.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull {
    padding: 0px;
}

.wc-block-cart__submit-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center;
    height: 48px;
    padding: 0 20px;
}

.wc-block-cart__submit-button .wc-block-components-button__text {
    display: block;
    line-height: 1;
    margin: 0;
}

.woocommerce nav.woocommerce-pagination ul,
.woocommerce nav.woocommerce-pagination ul li {
	border: none;
    border-right: none;
}

.woocommerce nav.woocommerce-pagination ul li a:focus, 
.woocommerce nav.woocommerce-pagination ul li a:hover, 
.woocommerce nav.woocommerce-pagination ul li span.current {
    background: none;   
}

.wc-block-components-country-input {
    display: none;
}


/* убираем стандартные колонки WooCommerce */
.woocommerce-checkout .col2-set{
    display:block;
}

/* делаем свой layout */
.woocommerce-checkout form.checkout{
  	align-items:start;
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:0px 40px;
    max-width:1200px;
    margin:auto;
}

/* левая колонка */
.woocommerce-checkout .col2-set{
    grid-column:1;
    grid-row:1 / span 2;
}

/* правая колонка как один блок */
.woocommerce-checkout #order_review_heading{
    grid-column:2;
    grid-row:1;
}

.woocommerce-checkout #order_review{
    grid-column:2;
}

/* делаем правую колонку визуально единым блоком */
#order_review_heading{
    margin-top:0;
}

#order_review{
    background:#fafafa;
    padding:30px;
    border-radius:8px;
}

/* стиль order summary */
#order_review{
    background:#f8f9fa;
    padding:30px;
    border-radius:8px;
}

/* делаем billing и shipping одной колонкой */
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2{
    width:100%;
    float:none;
}

/* Фикс вспышки отправки на другой адрес */

/* Скрывать блок доставки только когда чекбокс НЕ отмечен */
.woocommerce-checkout .woocommerce-shipping-fields:has(#ship-to-different-address-checkbox:not(:checked)) .shipping_address {
	display: none;
}

/* Показывать блок, когда чекбокс отмечен */
.woocommerce-checkout .woocommerce-shipping-fields:has(#ship-to-different-address-checkbox:checked) .shipping_address {
	display: block;
}

/* фиксируем правую колонку у верха */
.woocommerce-checkout #order_review_heading{
    grid-column:2;
    grid-row:1;
}

.woocommerce-checkout #order_review{
  	font-size:14px;
    grid-column:2;
    grid-row:2;
}

p#billing_country_field {
    display: none;
}

p#shipping_country_field {
    display: none;
}

.woocommerce form .form-row label.checkbox, .woocommerce-page form .form-row label.checkbox {
    font-size: 20px;
    font-weight: 600;
}

.woocommerce form .form-row {
    padding: 0px;
}

.woocommerce form .form-row .input-checkbox {
    margin: 0px;
}

.woocommerce form .form-row .input-text, .woocommerce form .form-row select {
    font-size: 14px;
    margin: 3px;
}

.woocommerce form .form-row label {
    font-size: 20px;
    font-weight: 600;
}



/* Правый блок */

/* 1. Общий контейнер (самый правый блок) */
.woocommerce-checkout-review-order {
    border: 1px solid #eee !important;
    border-radius: 8px;
    padding: 25px;
}

/* 2. Таблица товаров (БЛОК 1) */
.shop_table.custom-review-table {
    width: 100% !important;
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent) !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 5px !important;
    overflow: hidden !important;
    margin-bottom: 20px !important;
    background: #fff !important;
}

.custom-review-table th, 
.custom-review-table td {
    padding: 12px 15px !important;
    border-bottom: 1px solid color-mix(in srgb, currentColor 20%, transparent) !important; /* Внутренние линии */
    border-right: 1px solid color-mix(in srgb, currentColor 20%, transparent) !important;
}

tr.cart-subtotal {
    min-width: auto;
    white-space: nowrap;
}

/* Контейнер */
.checkout-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 8px;
}

/* Кнопки +/- */
.checkout-qty button.qty-minus,
.checkout-qty button.qty-plus {
    background: none;
    border: none;
    color: #888;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    transition: 0.2s;
}

.checkout-qty button.qty-minus:hover,
.checkout-qty button.qty-plus:hover {
    color: #000;
}

/* Кнопка удалить */
.checkout-qty button.remove-item {
    background: none;
    border: none;
    color: #e00;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    transition: 0.2s;
}

.checkout-qty button.remove-item:hover {
    color: #a00;
}

/* Инпут */
.checkout-qty .qty-input {
    width: 40px;
    height: 32px;
    text-align: center;
    border: none;
    outline: none;
    font-size: 14px;
}


.checkout-qty .qty-input {
    -moz-appearance: textfield;
}

/* Убираем лишние внутренние линии, чтобы не портить внешнюю рамку */
.custom-review-table th:last-child, 
.custom-review-table td:last-child { border-right: none !important; }
.custom-review-table tr:last-child td, 
.custom-review-table tfoot tr:last-child td,
.custom-review-table tfoot tr:last-child th { border-bottom: none !important; }

.woocommerce-checkout-review-order-table .product-name a {
    text-decoration: none;
}


/* 3. Блок доставки (РАЗДЕЛИТЕЛЬ) */
/* Делаем блок доставки визуально независимым */
.custom-shipping-wrapper {
    margin: 20px 0;
    padding: 15px 0;
}

/* Сбрасываем табличный вид для строк доставки */
.shipping-table-only tr.shipping {
    background: #fff;
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
    border-radius: 5px;
  	padding: 15px;
    display: block !important;
}

.shipping-table-only th {
    display: none; /* Прячем заголовок "Shipping", так как у нас есть H3 */
}

.shipping-table-only td {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    border: none !important;
}

/* Стили для радиокнопок InPost/Kurier */
.shipping-table-only ul#shipping_method {
    list-style: none;
    margin: 0;
    padding: 0;
}

.shipping-table-only ul#shipping_method li {
    margin-bottom: 10px;
}

.easypack-shipping-method-logo img {
  	display: none !important;
}

div#easypack_js_type_geowidget {
    background-color: #ff5a00 !important;
    font-size: 16px !important;
    font-weight: 700;
    box-shadow: none !important;
    padding: 10px 10px 10px 10px;
}

/* 4. Блок Итого (БЛОК 2) */
/* 1. Превращаем tfoot в flex-контейнер на всю ширину */
table.total-table-only tfoot {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

/* 2. Сохраняем структуру верхней строки (купон) с двумя колонками */
table.total-table-only tr.cart-discount {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 10px 0 !important;
}

table.total-table-only tr.cart-discount th,
table.total-table-only tr.cart-discount td {
    display: block !important;
    border: none !important;
    padding: 0 !important;
}

/* 3. Блок Итого - делаем независимым блоком на 100% ширины */
table.total-table-only tr.order-total {
    display: block !important;
    width: 100% !important;
}

table.total-table-only tr.order-total td {
    display: block !important;
    width: 100% !important;
    margin-top: 25px !important;
    margin-bottom: 35px !important;
    background: #fff !important;
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent) !important;
    border-radius: 5px !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    text-align: right !important;
}

/* 5. Блок оплаты (БЛОК 3) */
#payment.woocommerce-checkout-payment {
    background: #fff !important;
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
    border-radius: 5px !important;
    padding: 20px !important;
    margin-top: 20px !important;
}

/* Внутренний блок с текстом об оплате (серый фон) */
.woocommerce-checkout #payment div.payment_box {
    background-color: #f9f9f9 !important;
    padding: 15px !important;
    border-radius: 4px !important;
    margin-top: 10px !important;
}

/* Треугольник сверху блока оплаты (делаем под цвет фона) */
.woocommerce-checkout #payment div.payment_box::before {
    border-bottom-color: #f9f9f9 !important;
}

/* Сброс лишних отступов у таблиц внутри блоков */
.shipping-table-only, .total-table-only {
    border: none !important;
    margin: 0 !important;
}

span.woocommerce-terms-and-conditions-checkbox-text {
    font-size: 14px;
  	font-weight: 400;
}


/* кнопка */

#place_order {
    width:100%;
    height:52px;
    background:#ff5a00;
    color:#fff;
    font-weight:700;
    border-radius:6px;
    border:none;
    font-size:18px;
    margin-top:20px;
}
  

/* КОРЗИНА */
	/* кнопка */
a.checkout-button.button.alt.wc-forward {
    width:100%;
    height:52px;
    background:#ff5a00;
    color:#fff;
    font-weight:700;
    border-radius:6px;
    border:none;
    font-size:18px;
    margin-top:20px;
}

.woocommerce a.remove:hover {
    display: block;
    font-size: 1.5em;
    height: 1em;
    width: 1em;
    text-align: center;
    line-height: 1;
    border-radius: 100%;
    color: #ff0000  !important;
    text-decoration: none;
    font-weight: 700;
    border: 0;
  	background: none;
}

.woocommerce-cart table.cart input {
  	padding: 5px;
}

.woocommerce .quantity .qty {
    width: 5em;
}

#add_payment_method .cart-collaterals .cart_totals table td, #add_payment_method .cart-collaterals .cart_totals table th, .woocommerce-cart .cart-collaterals .cart_totals table td, .woocommerce-cart .cart-collaterals .cart_totals table th, .woocommerce-checkout .cart-collaterals .cart_totals table td, .woocommerce-checkout .cart-collaterals .cart_totals table th {
    vertical-align: top;
    border-left: 0;
    border-right: 1px solid #eee !important;
    line-height: 1.5em;
}

p.woocommerce-shipping-destination {
    display: none;
}

table.shop_table.shop_table_responsive {
    font-size: 14px;
  	white-space: nowrap;
}

.woocommerce-cart .product-name a {
    text-decoration: none;
}

/*Thank you page */

.woocommerce-order-received section.woocommerce-order-details {
    display: none;
}

section.woocommerce-customer-details {
    display: none;
}

table.woocommerce-table.woocommerce-table--custom-fields.shop_table.custom-fields {
    display: none;
}

/* Моб - десктоп */

/* по умолчанию desktop */
.cart-mobile,
.cart-sticky {
    display: none;
}

/* мобильная версия */
@media (max-width: 768px) {

    .cart-desktop {
        display: none;
    }

    .cart-mobile {
        display: block;
        padding-bottom: 80px;
    }

    .cart-item {
        display: flex;
        gap: 12px;
        padding: 12px;
        border-bottom: 1px solid #eee;
    }

    .cart-item__image img {
        width: 70px;
    }

    .cart-item__content {
        flex: 1;
    }

    .cart-item__title {
        font-size: 14px;
        margin-bottom: 5px;
    }

    .cart-item__price {
        font-weight: 600;
        margin-bottom: 8px;
    }

    .cart-item__controls {
        display: flex;
        align-items: center;
    }

    .cart-item__controls input {
        width: 40px;
        text-align: center;
    }
  
  	.cart-item__title a {
      	text-decoration: none;
  	}

    /* sticky */
    .cart-sticky {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;

        background: #fff;
        padding: 10px 30px 10px 30px;

        box-shadow: 0 -5px 20px rgba(0,0,0,0.15);
        z-index: 9999;
    }

    .cart-sticky .checkout-btn {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 100%;
        height: 52px;

        background: #ff5a00;
        color: #fff;

        font-weight: 700;
        font-size: 18px;

        border-radius: 6px;
        border: none;

        text-decoration: none;
        cursor: pointer;

        transition: all 0.2s ease;
    }

    .cart-sticky .checkout-btn:hover {
        background: #e65100;
    }

    .cart-sticky .checkout-btn:active {
        transform: scale(0.98);
    }
}

	/* Cart - mob */

.cart-item__controls {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 30px;

    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;

    width: fit-content;
}

/* все элементы внутри */
.cart-item__controls button,
.cart-item__controls input {
    height: 100%;
    border: none;
    outline: none;
    background: none;
    margin: 0;
    padding: 0;
}

/* кнопки + и - */
.cart-item__controls .qty-minus,
.cart-item__controls .qty-plus {
    width: 30px;
    color: #777;
    font-size: 16px;
    cursor: pointer;
}

/* кнопка удалить */
.cart-item__controls .remove {
    width: 30px;
    color: #e00000;
    font-size: 16px;
    cursor: pointer;
}

/* input */
.cart-item__controls input {
    width: 80px;
    text-align: center;
    font-size: 14px;
}

/* разделители (опционально, выглядит аккуратнее) */
.cart-item__controls .qty-minus,
.cart-item__controls input,
.cart-item__controls .qty-plus {
    border-right: 1px solid #eee;
}

.cart-item__controls input {
    width: 80px;
    text-align: center;
    font-size: 16px;

    border: none;
    outline: none;
    box-shadow: none;

    border-right: 1px solid #eee;
}

/* фиксируем поведение при фокусе */
.cart-item__controls input:focus {
    border: none;
    outline: none;
    box-shadow: none;

    border-right: 1px solid #eee; /* ключевая строка */
}

/* убрать бордер у последнего */
.cart-item__controls .remove {
    border-right: none;
}


/* Mobile Checkout*/

/* Адаптация для мобильных устройств (обычно до 768px или 992px) */
@media (max-width: 992px) {
    /* Делаем форму гибким контейнером с вертикальным направлением */
    .woocommerce-checkout form.checkout {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Растягиваем левый блок (детали оплаты) на всю ширину */
    .woocommerce-checkout #customer_details,
    .woocommerce-checkout .col-1,
    .woocommerce-checkout .col-2 {
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
    }

    /* Растягиваем правый блок (твой обзор заказа) на всю ширину */
    .woocommerce-checkout #order_review,
    .woocommerce-checkout #order_review_heading {
        width: 100% !important;
        float: none !important;
        margin-top: 20px; /* Добавляем отступ между блоками */
      	padding: 20px 10px;
    }
  	.separate-containers .inside-article, .separate-containers
  	.comments-area, .separate-containers .page-header, 
  	.separate-containers .paging-navigation, .one-container 
  	.site-content, .inside-page-header {
        padding: 10px;
    }
  	.woocommerce-checkout input,
	.woocommerce-checkout select,
	.woocommerce-checkout textarea {
		font-size: 16px !important;
	}
}

