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

/* =================================================
   Yes Cookie
   ================================================= */

.cky-btn-revisit-wrapper.cky-revisit-bottom-left {
    background-color: #4d8b55 !important;
}

/* 1. Общие стили для всех трех кнопок (размер шрифта 16px) */
.cky-prefrence-btn-wrapper .cky-btn {
    font-size: 16px !important;
}

/* 2. Кнопка Accept All (зеленый фон, белый текст) */
.cky-prefrence-btn-wrapper .cky-btn.cky-btn-accept {
    background-color: #4d8b55 !important;
    border-color: #4d8b55 !important;
    color: #ffffff !important;
}

/* 3. Кнопки Reject All и Save My Preferences (серый фон, черный текст) */
.cky-prefrence-btn-wrapper .cky-btn.cky-btn-reject,
.cky-prefrence-btn-wrapper .cky-btn.cky-btn-preferences {
    background-color: #e0e0e0 !important; /* Светло-серый цвет, можете изменить */
    border-color: #e0e0e0 !important;
    color: #000000 !important;
}

/* 1. Размер шрифта 16px для всех кнопок главного баннера */
.cky-notice-btn-wrapper .cky-btn {
    font-size: 16px !important;
}

/* 2. Кнопка Accept All (зеленый фон, белый текст) */
.cky-notice-btn-wrapper .cky-btn.cky-btn-accept {
    background-color: #4d8b55 !important;
    border-color: #4d8b55 !important;
    color: #ffffff !important;
}

/* 3. Кнопки Customise и Reject All (серый фон, черный текст) */
.cky-notice-btn-wrapper .cky-btn.cky-btn-customize,
.cky-notice-btn-wrapper .cky-btn.cky-btn-reject {
    background-color: #e0e0e0 !important;
    border-color: #e0e0e0 !important;
    color: #000000 !important;
}

.cky-btn-revisit-wrapper {
    position: fixed; /* или absolute, в зависимости от задачи */
    bottom: 45px !important; /* !important нужен, если оригинальный плагин перебивает стили */
}


/* =================================================
   Maine page
   ================================================= */
.wp-block-woocommerce-product-collection.is-layout-flow.wp-block-woocommerce-product-collection-is-layout-flow {
    padding-bottom: 35px;
}
a.wp-block-button__link.has-background.wp-element-button {
    font-size: 16px;
    font-weight: 700;
}
header.entry-header {
    display: none;
}

a.wp-block-button__link.has-background.wp-element-button {
    color: white;
}

ul.wc-block-product-template__responsive.columns-6.wc-block-product-template.wp-block-woocommerce-product-template.is-layout-flow.wp-block-woocommerce-product-template-is-layout-flow {
    margin-left: 20px;
    margin-right: 20px;
}
a.wp-block-button__link.has-background.wp-element-button {
    min-width: 120px;
    border-radius: 3px;
}
button.wp-block-button__link.wp-element-button.wc-block-components-product-button__button.add_to_cart_button.ajax_add_to_cart.product_type_simple.has-background.has-font-size.has-small-font-size.has-text-align-center.has-text-color.has-base-3-color.wc-interactive {
    border-radius: 3px;
}

/* =================================================
   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: #4D8B55;
    border-color: #4D8B55;
    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: #4D8B55;
    border: 1px solid #4D8B55;
    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: #4D8B55;
    border-color: #4D8B55;
    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 {
    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: #4D8B55;
    outline: none;
}

.filter-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #4D8B55;
    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: #4D8B55;
    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: #4D8B55;
}

/* =================================================
   6. КОРЗИНА И ОФОРМЛЕНИЕ ЗАКАЗА (CHECKOUT)
   ================================================= */

/*Podsumowanie koszyka*/
a.woocommerce-remove-coupon {
    display: none;
}

.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: #4D8B55;
    border-color: #4D8B55;
    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: 0 40px;
}

.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 .woocommerce-info {
    display: none !important;
}

/* левая колонка */
.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: #4D8B55 !important;
    font-size: 16px !important;
    font-weight: 700;
    box-shadow: none !important;
    padding: 15px 15px 15px 15px;
}

/* 4. Блок Итого (БЛОК 2) */
.woocommerce-checkout-review-order-table .order-total td {
    display: block !important;
    width: 100% !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;
  	margin-bottom: 35px;
  	text-align: right;
}


/* 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:#4D8B55;
    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:#4D8B55;
    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;
}

td.actions {
    display: none;
}

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

/*Thank you page */

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

section.woocommerce-customer-details {
    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: #4D8B55;
        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);
    }

    /* чтобы контент не прятался под кнопкой */
    body {
        padding-bottom: 80px;
    }
}

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



/* =================================================
   7. ШАПКА, ПОИСК И МЕНЮ
   ================================================= */

.inside-navigation {
    display: flex;
    align-items: center;
}

.header-search-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-search-center form {
    max-width: 550px;
    width: 100%;
}

.header-search-form {
    display: flex;
    width: 100%;
    max-width: 700px;
}

.header-search-form .search-field {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 15px;
}

.header-search-form .search-submit {
    padding: 8px 18px;
    border-radius: 0 4px 4px 0;
    background-color: #4D8B55;
    border: 1px solid #4D8B55;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.header-search-form .search-submit:hover {
    background-color: #4D8B55;
    border-color: #4D8B55;
}

.main-navigation .menu > li > a {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-icon svg {
    width: 24px;
    height: 24px;
    color: #7a7a7a;
    transition: 0.2s ease;
    display: block;
}


.menu-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.main-navigation .menu > li > a:hover svg {
    color: #4D8B55;
    transform: scale(1.05);
}

span.cart-count {
    padding: 2px;
    position: absolute;
    right: -5px;
    background: #4D8B55;
    color: #fff;
    font-size: 12px;
    min-width: 18px;
    height: 18px;
    border-radius: 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* =================================================
   8. АВТОРИЗАЦИЯ И ЛИЧНЫЙ КАБИНЕТ
   ================================================= */

.woocommerce .woocommerce-form-login .woocommerce-form-login__submit,
button.woocommerce-Button.button {
    border-radius: 5px;
    display: inline-block;
    background-color: #4D8B55;
    border-color: #4D8B55;
    color: #fff;
    margin: 0px 15px 0px 0px;
    font-size: 16px;
    font-weight: 600;
}
  
p.woocommerce-LostPassword.lost_password a {
    text-decoration: none;
}

.woocommerce-account .woocommerce-form-login {
    max-width: 550px;
    margin: 0 auto;
}

.woocommerce form.checkout_coupon, 
.woocommerce form.login, 
.woocommerce form.register {
    margin: 2em auto;
}

.woocommerce-MyAccount-navigation a {
  	text-decoration: none;
}

.u-column2.col-2.woocommerce-Address {
    display: none;
}

.woocommerce-Address-title h2 {
  	font-size: 20px;
}

a.button.wc-backward {
    background:#4D8B55;
    color:#fff;
    font-weight:700;
    border-radius:6px;
    border:none;
    font-size:18px;
    margin-top:20px;
  	
}

.woocommerce-info {
    border-top-color: #107b1e;
}

a.button.wc-forward {
  	background:#4D8B55;
    color:#fff;
    font-weight:700;
    border-radius:6px;
    border:none;
    font-size:18px;
    margin-top:20px;
}

.woocommerce table.my_account_orders .button {
    margin: 2px;
}

/* =================================================
   9. МОБИЛЬНАЯ АДАПТАЦИЯ (@media max-width: 768px)
   ================================================= */

@media (max-width: 768px) {
    /* Общая структура */
    html, body { overflow-x: hidden; width: 100%; }
    
    .single-product { padding-bottom: 80px !important; }

    .product-page-wrap { padding: 0 10px 16px; }
    .product-layout-custom { display: flex; flex-direction: column; gap: 16px; }
    .product-left, .product-right { display: contents; }
    
    .product-left-cell, .product-right-cell { 
        width: 100%; padding: 20px 15px !important; box-sizing: border-box; 
    }

    /* Порядок блоков */
    .cell-title { order: 1; }
    .cell-price { order: 2; }
    .cell-delivery { order: 3; }
    .cell-related { order: 4; }
    .cell-attributes { order: 5; }
    .cell-description { order: 6; }
    .cell-reviews { order: 7; }

    /* Галерея на мобилках */
    .product-gallery-main {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .product-gallery-main::-webkit-scrollbar { display: none; }

    .product-gallery-main-item {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        scroll-snap-align: start !important;
    }

    .product-gallery-thumbs-wrapper, .gallery-arrow { display: none !important; }

    /* Липкая панель заказа (Sticky) */
    .single-product .product-right form.cart {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: #fff !important;
        border-top: 1px solid #eee !important;
        padding: 10px 40px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        z-index: 9999 !important;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
        margin: 0 !important;
    }

    .mobile-sticky-price {
        flex: 1 !important;
        font-size: 18px !important;
        font-weight: 700 !important;
        color: #107b1e !important;
        white-space: nowrap;
    }

    .single-product .product-right form.cart .quantity {
        flex: 0 0 60px !important;
        margin: 0 !important;
    }
    .single-product .product-right form.cart .quantity input.qty {
        width: 100% !important;
        height: 44px !important;
        border: 1px solid #ddd !important;
        border-radius: 4px;
        text-align: center;
    }

    .single-product .product-right form.cart button.single_add_to_cart_button {
        flex: 0 0 50px !important;
        width: 50px !important;
        height: 44px !important;
        text-indent: -9999px !important;
        position: relative !important;
        background-color: #4D8B55 !important;
        border-radius: 6px !important;
        border: none !important;
    }

    .single-product .product-right form.cart button.single_add_to_cart_button::before {
        content: "" !important;
        position: absolute !important;
        top: 0; left: 0; right: 0; bottom: 0;
        text-indent: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'%3E%3C/line%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 24px;
    }

    .mobile-sticky-cart-link {
        flex: 0 0 40px !important;
        position: relative !important;
        display: block !important;
        text-decoration: none;
    }

    .cart-badge {
        position: absolute !important;
        top: -8px !important;
        right: -8px !important;
        background: #4D8B55 !important;
        color: #fff !important;
        font-size: 10px !important;
        min-width: 18px !important;
        height: 18px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-weight: bold;
    }

 /* Мобильный Header */
    .mobile-menu-control-wrapper,
    .menu-toggle {
        display: none !important;
    }

    .inside-header {
        display: flex;
        flex-direction: column;
    }

    .site-branding {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    #site-navigation {
        display: flex !important;
        position: absolute;
        right: 15px;
        top: 0;
        height: 60px;
        align-items: center;
    }

    #site-navigation .menu {
        display: flex !important;
        flex-direction: row;
        gap: 5px;
    }

    .header-search-center {
        margin-top: 10px;
        width: 100%;
        padding-bottom: 15px;
    }
  
    .main-navigation .main-nav ul li a {
      padding-left: 10px;
      padding-right: 10px;
  	}
  
    .menu-item-has-children .dropdown-menu-toggle {
      padding-right: 0px;
  	}
  /* ---------*/



 /* Поповеры и прочее */
    .brand-popover { display: none; }
    .brand-popover.is-open { display: block !important; }
}

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