/*
Theme Name: ДОМРЯДОМ.РФ
Theme URI: https://domriadom.ru/
Description: Child-theme
Author: DOMRIADOM.RU
Author URI: https://domriadom.ru
Template: elessi-theme
Version: 1.0
*/


/*************** ADD YOUR CUSTOM CSS IN THIS AREA ***************/

/* Общие стили картинок WooCommerce */
.woocommerce img {
  object-fit: contain !important;
  width: 100% !important;
  height: auto !important;
  max-width: 260px;   /* по желанию изменить */
  max-height: 260px;
  display: block;
  margin: 0 auto;
}

/* Уточнённые селекторы для разных контекстов */
ul.products li.product img,
.popup-product img,
.widget_shopping_cart img,
.quick-view-popup img,
.minicart-item img,
.yith-wcbm-thumbnail img {
  object-fit: contain !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 260px;
  max-height: 260px;
}

/* Добавка: контейнеры фиксированной высоты (например, для поиска или quick‑view) */
.some-container-selector img {
  object-position: center center;
}

/* Универсальный контейнер изображений */
.product-thumbnail,
.woocommerce ul.products li.product a img,
.woocommerce div.product div.images img,
.quick-view-popup img,
.widget_shopping_cart img,
.minicart-item img,
.yith-wcbm-thumbnail img {
  width: 100%;
  max-width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
  margin: 0 auto;
  padding: 0;
}

/* Изображение внутри — пропорционально вписывается */
.product-thumbnail img,
.woocommerce ul.products li.product a img,
.woocommerce div.product div.images img,
.quick-view-popup img,
.widget_shopping_cart img,
.minicart-item img,
.yith-wcbm-thumbnail img {
  object-fit: contain !important;
  width: 100%;
  height: 100%;
  display: block;
}

/* Обёртка — фиксированный квадратный контейнер */
.product-img .main-img {
  width: 100%;
  max-width: 260px;
  height: 260px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}

/* Само изображение — влезает в контейнер, не обрезается */
.product-img .main-img img {
  object-fit: contain !important;
  width: 100%;
  height: 100%;
  display: block;
  object-position: center center;
}

/* Контейнер для изображения в корзине — фиксируем размер */
.nasa-image-cart-item {
  width: 100px;        /* или нужный тебе размер */
  height: 100px;
  max-width: 100px;
  max-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #fff;
  margin: 0 auto;
}

/* Изображение внутри — не обрезается, вписывается */
.nasa-image-cart-item img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center;
  display: block;
}

/* Контейнер — меньше размер, НЕ обрезает quantity */
.co-wrap-img {
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  margin: 0 auto;
  position: relative; /* важно для .product-quantity */
  border-radius: 4px;
}

/* Картинка — вписывается, без обрезки */
.co-wrap-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain !important;
  object-position: center center;
  width: auto !important;
  height: auto !important;
  display: block;
}

/* Значок количества — абсолютное позиционирование, не обрезается */
.co-wrap-img .product-quantity {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 3px;
  z-index: 2;
  line-height: 1;
  white-space: nowrap;
}

/* Таблица корзины: ячейка с изображением — фиксированный размер */
td.product-thumbnail {
  width: 90px;
  height: 90px;
  max-width: 90px;
  max-height: 90px;
  text-align: center;
  vertical-align: middle;
  background: transparent; /* убирает фон если надо */
  padding: 0;
}

/* Картинка — пропорционально влезает */
td.product-thumbnail img {
  max-width: 100%;
  max-height: 100%;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block;
  margin: 0 auto;
}

/* Стиль для виджета Elementor "ELM - Nasa Product categories" */
.elm-nasa-product-categories {
    background: #F5F5F5;
    padding: 30px 0;
}

.elm-nasa-product-categories .nasa-product-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.elm-nasa-product-categories .nasa-product-category {
    background: #FFFFFF;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.elm-nasa-product-categories .nasa-product-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.elm-nasa-product-categories .nasa-product-category .category-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin: 0 0 15px 0;
    line-height: 1.3;
    position: relative;
    z-index: 2;
}

.elm-nasa-product-categories .nasa-product-category .category-image {
    width: 100%;
    height: 200px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.elm-nasa-product-categories .nasa-product-category .category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.elm-nasa-product-categories .nasa-product-category:hover .category-image img {
    transform: scale(1.05);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .elm-nasa-product-categories .nasa-product-categories {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
        padding: 0 15px;
    }
    
    .elm-nasa-product-categories .nasa-product-category {
        padding: 15px;
    }
    
    .elm-nasa-product-categories .nasa-product-category .category-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .elm-nasa-product-categories .nasa-product-category .category-image {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .elm-nasa-product-categories .nasa-product-categories {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 10px;
    }
    
    .elm-nasa-product-categories .nasa-product-category {
        padding: 12px;
    }
    
    .elm-nasa-product-categories .nasa-product-category .category-title {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .elm-nasa-product-categories .nasa-product-category .category-image {
        height: 120px;
    }
}

/* Дополнительные стили для разных размеров сетки */
.elm-nasa-product-categories.grid-2 .nasa-product-categories {
    grid-template-columns: repeat(2, 1fr);
}

.elm-nasa-product-categories.grid-3 .nasa-product-categories {
    grid-template-columns: repeat(3, 1fr);
}

.elm-nasa-product-categories.grid-4 .nasa-product-categories {
    grid-template-columns: repeat(4, 1fr);
}

/* Стили для категорий без изображений */
.elm-nasa-product-categories .nasa-product-category.no-image {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.elm-nasa-product-categories .nasa-product-category.no-image .category-title {
    margin: 0;
    font-size: 20px;
    color: #555555;
}

.price:after {
    content: attr(data-weight);
    display: inline-block;
    color: #777;
    font-size: 0.85em;
    margin-left: 4px;
}

/* Отключаем зум на всех страницах */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    touch-action: manipulation;
}

body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    touch-action: manipulation;
}

/* Дополнительно отключаем зум для input полей на iOS */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
    font-size: 16px !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Закругление всех углов на 18px */
* {
    border-radius: 18px !important;
}

/* Исключения для элементов, которые не должны быть закруглены */
body,
html,
iframe,
img,
video,
canvas,
svg,
input[type="file"],
select,
textarea,
.wp-block-image img,
.woocommerce-product-gallery__image img,
.product-image img,
.attachment-shop_thumbnail,
.attachment-shop_single,
.attachment-shop_catalog {
    border-radius: 0 !important;
}

/* Специальные закругления для кнопок и карточек */
.button,
.btn,
input[type="submit"],
input[type="button"],
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt.disabled,
.woocommerce button.button.alt:disabled,
.woocommerce button.button.alt[disabled]:disabled,
.woocommerce input.button.alt.disabled,
.woocommerce input.button.alt:disabled,
.woocommerce input.button.alt[disabled]:disabled,
.woocommerce a.button.alt.disabled,
.woocommerce a.button.alt:disabled,
.woocommerce a.button.alt[disabled]:disabled {
    border-radius: 18px !important;
}

/* Закругления для карточек товаров */
.product,
.product-item,
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    border-radius: 18px !important;
    overflow: hidden;
}

/* Фон для карточек товаров */
.woocommerce .products .product,
.woocommerce .products .product .product-item,
.nasa-products-grid .product,
.nasa-products-grid .product .product-item {
    background: #FFFDF6;
}

/* Фон для содержимого карточки товара (под изображением) */
.woocommerce .products .product .product-item-info,
.nasa-products-grid .product .product-item-info,
.woocommerce .products .product .product-details,
.nasa-products-grid .product .product-details {
    background: #FFFDF6;
}

/* Фон для описания товара */
.woocommerce .products .product .product-desc,
.nasa-products-grid .product .product-desc {
    background: #FFFDF6;
}

/* Фон для цены и кнопок */
.woocommerce .products .product .product-price,
.nasa-products-grid .product .product-price,
.woocommerce .products .product .product-buttons,
.nasa-products-grid .product .product-buttons {
    background: #FFFDF6;
}

/* Закругления для форм */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
    border-radius: 18px !important;
}

/* Закругления для модальных окон */
.modal,
.popup,
.woocommerce-modal,
.mfp-content {
    border-radius: 18px !important;
}

/* Закругления для навигации */
.nav-menu,
.main-navigation,
.woocommerce-pagination,
.pagination {
    border-radius: 18px !important;
}

/* Закругления для сайдбаров */
.sidebar,
.widget,
.widget-area {
    border-radius: 18px !important;
}

/* Стили для отображения веса корзины */
.cart-weight-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 10px;
    font-size: 14px;
}

.cart-weight-label {
    font-weight: 600;
    color: #333;
}

.cart-weight-value {
    font-weight: 700;
    color: #666;
}

/* Стили для мини-корзины */
.woocommerce-mini-cart__total .cart-weight-info {
    padding: 5px 0;
    margin-bottom: 5px;
    font-size: 13px;
}

/* Стили для попапа после добавления товара */
.nasa-after-add-to-cart-weight {
    padding: 8px 0;
    border-top: 1px solid #e5e5e5;
    margin-top: 10px;
}

.nasa-after-add-to-cart-weight-title {
    font-weight: 600;
    color: #333;
    margin-right: 10px;
}

.nasa-after-add-to-cart-weight-value {
    font-weight: 700;
    color: #666;
}

/* Стили для страницы корзины */
.cart-page-weight {
    background: #f8f8f8;
    padding: 12px 15px;
    border-radius: 18px;
    margin-bottom: 15px;
    border: 1px solid #e5e5e5;
}

.cart-page-weight .cart-weight-label {
    font-size: 15px;
}

.cart-page-weight .cart-weight-value {
    font-size: 15px;
    color: #333;
}

/* Стили для checkout */
.cart-weight th {
    font-weight: 600;
    color: #333;
}

.cart-weight td {
    font-weight: 700;
    color: #666;
}

/* Исправления для checkout */
.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.woocommerce-checkout-review-order-table th {
    font-weight: 600;
    color: #333;
}

.woocommerce-checkout-review-order-table td {
    color: #666;
}

/* Исправления для мобильного checkout */
.your-order-mobile {
    display: none;
}

@media (max-width: 768px) {
    .your-order-mobile {
        display: block;
    }
    
    .order-review-modern {
        margin-top: 20px;
    }
}

/* Старые стили кастомной кнопки удалены - заменены на новую систему */

/* Скрываем цену на карточке товара */
.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price,
.product .price,
.product-item .price,
.woocommerce-loop-product__title + .price,
.woocommerce ul.products li.product .woocommerce-Price-amount,
.woocommerce-page ul.products li.product .woocommerce-Price-amount {
    display: none !important;
}

/* Скрываем цену в заголовке товара */
.woocommerce-loop-product__title + .price,
.product .woocommerce-loop-product__title + .price {
    display: none !important;
}

/* Скрываем цену в блоках с товарами */
.product-info-wrap .price,
.product-info .price,
.product-details .price {
    display: none !important;
}

/* Скрываем цену в сетке товаров */
.products .product .price,
.products-grid .product .price {
    display: none !important;
}

/* Скрываем цену в различных блоках товаров */
.product .woocommerce-loop-product__title + .price,
.product-item .woocommerce-loop-product__title + .price,
.product .product-title + .price,
.product-item .product-title + .price,
.product .product-name + .price,
.product-item .product-name + .price {
    display: none !important;
}

/* Скрываем цену в списках товаров */
.woocommerce ul.products li.product .woocommerce-loop-product__title + .price,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title + .price {
    display: none !important;
}

/* Скрываем цену в блоках с товарами */
.product-info .price,
.product-details .price,
.product-summary .price {
    display: none !important;
}

/* Скрываем цену в каталоге */
.woocommerce-loop-product__title + .price,
.product .woocommerce-loop-product__title + .price {
    display: none !important;
}

/* Стили для мобильного нижнего меню */
.nasa-bottom-bar-icons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
}

/* Показываем нижнюю панель на десктопе и фиксируем её снизу */
@media (min-width: 1025px) {
    .nasa-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 399;
        transform: translateY(0) !important;
        -webkit-transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

.nasa-bot-item {
    flex: 1;
    text-align: center;
}

.nasa-bot-item-search {
    order: 1;
}

.nasa-bot-item-sidebar {
    order: 2;
}

.ns-bot-cats {
    order: 3;
}

.nasa-bot-item-acc {
    order: 4;
}

.ns-bot-cart {
    order: 5;
}

/* Убираем класс hidden-tag с поиска */
.nasa-bot-item-search {
    display: block !important;
}

/* Убираем класс hidden-tag с корзины */
.ns-bot-cart {
    display: block !important;
}

/* Скрываем избранное */
.ns-bot-wl {
    display: none !important;
}

/* Скрываем главную/магазин */
.ns-bot-store {
    display: none !important;
}

/* Кастомное мобильное меню категорий */
.custom-mobile-categories-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 999999;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.custom-mobile-categories-menu.active {
    left: 0;
}

.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.categories-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.close-categories-menu {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-categories-menu:hover {
    background: #eee;
    color: #333;
}

.categories-list {
    padding: 0;
}

.category-item-wrapper {
    position: relative;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.category-item:hover {
    background: #f8f9fa;
}

.category-link {
    display: flex;
    align-items: center;
    flex: 1;
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.category-link:hover {
    color: #1F9356;
}

.category-icon {
    width: 48px;
    height: 48px;
    margin-right: 16px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.3s ease;
    overflow: hidden;
}

.category-item:hover .category-icon {
    background: #1F9356;
    color: white;
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-item:hover .category-image {
    transform: scale(1.1);
}

.category-name {
    font-size: 16px;
    font-weight: 500;
}

.expand-subcategories {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.expand-subcategories:hover {
    background: #eee;
    color: #1F9356;
}

.expand-subcategories.active {
    background: #1F9356;
    color: white;
}

.expand-subcategories.active .expand-icon {
    transform: rotate(45deg);
}

.expand-icon {
    transition: transform 0.3s ease;
}

.subcategories-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fa;
}

.subcategories-dropdown.active {
    max-height: 500px; /* Adjust as needed */
}

.subcategory-item {
    display: flex;
    align-items: center;
    padding: 12px 20px 12px 60px;
    background: #f8f9fa;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border-bottom: 1px solid #e9ecef;
}

.subcategory-item:hover {
    background: #e9ecef;
    color: #1F9356;
}

.subcategory-item .category-icon {
    width: 36px;
    height: 36px;
    margin-right: 12px;
}

.subcategory-item .category-name {
    font-size: 14px;
}

.categories-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    display: none;
}

.categories-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: block;
}

/* Принудительное скрытие оверлея */
.categories-overlay:not(.active) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: none !important;
}

/* Скрываем стандартное мобильное меню категорий */
.nasa-top-cat-filter-wrap-mobile {
    display: none !important;
}

#nasa-mobile-cat-filter {
    display: none !important;
}

/* Мини-плашка веса под заголовком товара */
.product-weight-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: #1F9356;
    background: rgba(31, 147, 86, 0.08);
    border-radius: 999px;
}

/* Анимация появления */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Плавное исчезновение */
.cart-weight-badge.fade-out {
    opacity: 0;
    transform: scale(0.8);
}

/* Позиционирование для иконки корзины */
.ns-bot-cart .nasa-bot-icons { position: relative; }

/* Адаптивность для плашки */
@media (max-width: 480px) {
    .product-weight-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* Поиск: выравниваем элементы и делаем квадратный фрейм для изображения */
.tt-dataset-search .item-search .nasa-link-item-search {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tt-dataset-search .item-search .nasa-link-item-search img {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
    object-position: center;
    display: block;
    background: #fff;
    border-radius: 6px;
}

.tt-dataset-search .item-search .nasa-item-title-search {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tt-dataset-search .item-search .nasa-item-title-search .nasa-title-item {
    margin: 0;
}

.tt-dataset-search .item-search .price {
    margin-top: 2px;
}

@media (max-width: 480px) {
    .tt-dataset-search .item-search .nasa-link-item-search img {
        width: 50px !important;
        height: 50px !important;
    }
}

/* Плашка с весом корзины в мобильной нижней панели (восстановлено) */
.cart-weight-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #1F9356;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(31, 147, 86, 0.3);
    z-index: 10;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.2s ease;
    animation: fadeInScale 0.3s ease-out;
}

@media (max-width: 480px) {
    .cart-weight-badge {
        font-size: 9px;
        padding: 1px 5px;
        min-width: 18px;
        height: 18px;
        top: -6px;
        right: -6px;
    }
}

/* Скрываем кнопку "Фильтры" в нижнем мобильном меню */
.nasa-bot-item-sidebar {
    display: none !important;
}

/* Стили для изображений способов оплаты */
.payment_methods img {
    max-height: 60px !important;
}

/* Скрываем итоговую сумму в попапе и боковой корзине */
.total-cart-wrap,
.total-cart-wrap .total-price-label2,
.total-cart-wrap .total-price-2,
.nasa-mini-cart .total-cart-wrap,
.nasa-mini-cart .total-cart-wrap .total-price-label2,
.nasa-mini-cart .total-cart-wrap .total-price-2,
.woocommerce-mini-cart .total-cart-wrap,
.woocommerce-mini-cart .total-cart-wrap .total-price-label2,
.woocommerce-mini-cart .total-cart-wrap .total-price-2,
.widget_shopping_cart .total-cart-wrap,
.widget_shopping_cart .total-cart-wrap .total-price-label2,
.widget_shopping_cart .total-cart-wrap .total-price-2 {
    display: none !important;
}


/* Wishlist: выравнивание элементов и квадратный фрейм для превью */
.wishlist_table .product-wishlist-info .wishlist-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.wishlist_table .product-wishlist-info .image-wishlist a {
    display: block;
    width: 80px;
    height: 80px;
}

.wishlist_table .product-wishlist-info .image-wishlist a img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center;
    display: block;
    background: #fff;
    border-radius: 6px;
}

.wishlist_table .product-wishlist-info .info-wishlist {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wishlist_table .product-wishlist-info .nasa-wishlist-title {
    margin: 0;
}

.wishlist_table .product-wishlist-info .wishlist-price .price {
    margin-top: 2px;
}

.wishlist_table td.product-wishlist-info {
    vertical-align: middle;
}

@media (max-width: 480px) {
    .wishlist_table .product-wishlist-info .image-wishlist a {
        width: 60px;
        height: 60px;
    }
}

/* Скрываем калькулятор доставки */
.shipping-calculator-form,
#shipping-calculator-form,
.woocommerce-shipping-calculator,
.woocommerce-shipping-calculator-form {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Скрываем заголовок "Estimate shipping rates" */
p.node-title.nasa-bold.fs-20.mobile-fs-18,
.node-title.nasa-bold.fs-20.mobile-fs-18,
p:contains("Estimate shipping rates"),
p[class*="node-title"][class*="nasa-bold"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Дополнительно скрываем ссылку-триггер и любые обертки калькулятора доставки */
.shipping-calculator-button,
.cart_totals .woocommerce-shipping-calculator,
.cart-collaterals .woocommerce-shipping-calculator,
.woocommerce-cart .woocommerce-shipping-calculator {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	height: 0 !important;
	overflow: hidden !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* ===== ОПТИМИЗАЦИЯ TOUCH СОБЫТИЙ ===== */
/* Исправляем passive event listeners для мобильных устройств */
.new-cart-button * {
    touch-action: manipulation; /* Оптимизирует touch события */
    -webkit-touch-callout: none; /* Убираем долгое нажатие на iOS */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ===== НОВАЯ КНОПКА ДОБАВЛЕНИЯ В КОРЗИНУ ===== */

/* Основной контейнер кнопки */
.new-cart-button {
    display: flex !important;
    align-items: center;
    background: #1F9356;
    border-radius: 16px; /* Уменьшаем с 18px до 16px для скрытия артефактов */
    overflow: hidden;
    /* ОПТИМИЗАЦИЯ: предотвращаем forced reflow */
    will-change: transform;
    contain: layout style;
    transform: translateZ(0); /* Включаем аппаратное ускорение */
    box-shadow: 0 2px 8px rgba(31, 147, 86, 0.2);
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    max-width: 200px;
    margin: 8px 0; /* Убрано auto - теперь по левому краю */
    visibility: visible !important;
    opacity: 1 !important;
}

/* ===== НОВЫЙ СТИЛЬ В ФОРМАТЕ SAMOKAT.RU ===== */
/* Контейнер для кнопки и количества в каталоге */
.new-cart-button.catalog-size {
    display: flex !important;
    align-items: center;
    gap: 12px; /* Отступ между кнопкой и количеством */
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    max-width: none;
    margin: 8px 0;
}

/* Сама кнопка в стиле samokat.ru */
.new-cart-button.catalog-size .cart-btn-container {
    display: flex;
    align-items: center;
    background: #1F9356;
    border-radius: 20px; /* Уменьшаем с 24px до 20px для скрытия артефактов */
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(31, 147, 86, 0.2);
    transition: all 0.3s ease;
    position: relative;
    min-width: 150px; /* Уменьшаем с 160px до 150px */
    height: 48px; /* Фиксированная высота */
}

/* Hover эффект для кнопки */
.new-cart-button.catalog-size .cart-btn-container:hover {
    box-shadow: 0 4px 16px rgba(31, 147, 86, 0.3);
    transform: translateY(-2px);
}

/* Кнопка минус в новом стиле */
.new-cart-button.catalog-size .cart-btn-minus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 20px;
    font-weight: 600;
    border-radius: 0;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.new-cart-button.catalog-size .cart-btn-minus:hover {
    background: rgba(255, 255, 255, 0.2);
}

.new-cart-button.catalog-size .cart-btn-minus:active {
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.1); /* Оставляем базовый фон */
}

/* Блок с ценой в новом стиле */
.new-cart-button.catalog-size .cart-btn-price {
    flex: 1;
    text-align: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    padding: 0 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Кнопка плюс в новом стиле */
.new-cart-button.catalog-size .cart-btn-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 20px;
    font-weight: 600;
    border-radius: 0;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.new-cart-button.catalog-size .cart-btn-plus:hover {
    background: rgba(255, 255, 255, 0.2);
}

.new-cart-button.catalog-size .cart-btn-plus:active {
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.1); /* Оставляем базовый фон */
}

/* Отображение количества рядом с кнопкой */
.new-cart-button.catalog-size .cart-btn-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 16px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    padding: 0 8px;
    white-space: nowrap;
    transition: all 0.3s ease;
    /* Позиционирование справа от кнопки */
    margin-left: 16px;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px #fff; /* Белая обводка больше чем border */
    position: relative;
    z-index: 2; /* Поднимаем над зеленой кнопкой */
}

/* Скрываем количество и минус по умолчанию в каталоге */
.new-cart-button.catalog-size:not(.has-quantity) .cart-btn-quantity,
.new-cart-button.catalog-size:not(.has-quantity) .cart-btn-minus {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

/* Уменьшаем ширину контейнера когда минус скрыт */
.new-cart-button.catalog-size:not(.has-quantity) .cart-btn-container {
    min-width: 120px !important; /* Компактная ширина без минуса */
}

/* Анимация при изменении количества - ОТКЛЮЧЕНА ДЛЯ ТЕСТА */
.new-cart-button.catalog-size .cart-btn-quantity.updated {
    /* background: #1F9356; */
    /* color: white; */
    /* border-color: #1F9356; */
    /* transform: scale(1.1); */
}

/* Состояния загрузки для нового стиля */
.new-cart-button.catalog-size.loading .cart-btn-container {
    opacity: 0.7;
    pointer-events: none;
}

.new-cart-button.catalog-size.loading .cart-btn-plus::after,
.new-cart-button.catalog-size.loading .cart-btn-minus::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

/* Позиционирование для спиннера в каталоге */
.new-cart-button.catalog-size .cart-btn-container {
    position: relative;
}

/* ПРИНУДИТЕЛЬНОЕ ОГРАНИЧЕНИЕ ШИРИНЫ КНОПОК В КАТАЛОГЕ */
.new-cart-button.catalog-size .cart-btn-plus,
.new-cart-button.catalog-size .cart-btn-minus {
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

/* Состояния успеха и ошибки для каталога */
.new-cart-button.catalog-size.success .cart-btn-container {
    background: #4CAF50;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.new-cart-button.catalog-size.error .cart-btn-container {
    background: #f44336;
    box-shadow: 0 4px 16px rgba(244, 67, 54, 0.3);
}

/* Анимация для состояний */
.new-cart-button.catalog-size.success .cart-btn-container,
.new-cart-button.catalog-size.error .cart-btn-container {
    transition: all 0.3s ease;
}

/* Анимация для кнопок в каталоге */
.new-cart-button.catalog-size .cart-btn-plus:active,
.new-cart-button.catalog-size .cart-btn-minus:active {
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.1); /* Оставляем базовый фон */
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .new-cart-button.catalog-size {
        gap: 8px;
    }
    
    .new-cart-button.catalog-size .cart-btn-container {
        min-width: 100px;
        height: 44px;
    }
    
    .new-cart-button.catalog-size .cart-btn-minus,
    .new-cart-button.catalog-size .cart-btn-plus {
        width: 16px;
        min-width: 16px;
        font-size: 16px;
    }
    
    .new-cart-button.catalog-size .cart-btn-quantity {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
        margin-left: 8px;
    }
}

/* Адаптивность для очень маленьких экранов */
@media (max-width: 480px) {
    .new-cart-button.catalog-size,
    .new-cart-button.single-size {
        gap: 6px;
    }
    
    .new-cart-button.catalog-size .cart-btn-container,
    .new-cart-button.single-size .cart-btn-container {
        min-width: 90px;
        height: 40px;
    }
    
    .new-cart-button.catalog-size .cart-btn-minus,
    .new-cart-button.catalog-size .cart-btn-plus,
    .new-cart-button.single-size .cart-btn-minus,
    .new-cart-button.single-size .cart-btn-plus {
        width: 14px;
        min-width: 14px;
        font-size: 14px;
    }
    
    .new-cart-button.catalog-size .cart-btn-quantity,
    .new-cart-button.single-size .cart-btn-quantity {
        min-width: 24px;
        height: 24px;
        font-size: 11px;
        margin-left: 6px;
    }
}

/* ===== СТИЛЬ ДЛЯ КАРТОЧКИ ТОВАРА И QUICK-VIEW ===== */
.new-cart-button.single-size {
    display: flex !important;
    align-items: center;
    gap: 12px; /* Отступ между кнопкой и количеством */
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    max-width: none;
    margin: 8px 0;
}

/* Контейнер для кнопки в карточке товара */
.new-cart-button.single-size .cart-btn-container {
    display: flex;
    align-items: center;
    background: #1F9356;
    border-radius: 20px; /* Уменьшаем с 24px до 20px для скрытия артефактов */
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(31, 147, 86, 0.2);
    transition: all 0.3s ease;
    position: relative;
    min-width: 140px; /* Немного больше для карточки */
    height: 48px;
}

/* Hover эффект для кнопки в карточке - ОТКЛЮЧЕН */
.new-cart-button.single-size .cart-btn-container:hover {
    /* box-shadow: 0 4px 16px rgba(31, 147, 86, 0.3); */
    /* transform: translateY(-2px); */
}

/* Кнопки в карточке товара */
.new-cart-button.single-size .cart-btn-minus,
.new-cart-button.single-size .cart-btn-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 8px;
    min-width: 8px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px;
    font-weight: 600;
    border-radius: 0;
}

.new-cart-button.single-size .cart-btn-minus:hover,
.new-cart-button.single-size .cart-btn-plus:hover {
    /* background: rgba(255, 255, 255, 0.2); */
}

.new-cart-button.single-size .cart-btn-minus:active,
.new-cart-button.single-size .cart-btn-plus:active {
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.1); /* Оставляем базовый фон */
}

/* Цена в карточке товара */
.new-cart-button.single-size .cart-btn-price {
    flex: 1;
    text-align: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    padding: 0 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Количество в карточке товара */
.new-cart-button.single-size .cart-btn-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 16px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    padding: 0 8px;
    white-space: nowrap;
    transition: all 0.3s ease;
    margin-left: 16px;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px #fff; /* Белая обводка больше чем border */
    position: relative;
    z-index: 2; /* Поднимаем над зеленой кнопкой */
}

/* Анимация при изменении количества в карточке - ОТКЛЮЧЕНА ДЛЯ ТЕСТА */
.new-cart-button.single-size .cart-btn-quantity.updated {
    /* background: #1F9356; */
    /* color: white; */
    /* border-color: #1F9356; */
    /* transform: scale(1.1); */
}

/* Скрываем количество и минус по умолчанию в карточке */
.new-cart-button.single-size:not(.has-quantity) .cart-btn-quantity,
.new-cart-button.single-size:not(.has-quantity) .cart-btn-minus {
    display: none;
}

/* Состояния для карточки товара */
.new-cart-button.single-size.loading .cart-btn-container {
    opacity: 0.7;
    pointer-events: none;
}

.new-cart-button.single-size.loading .cart-btn-plus::after,
.new-cart-button.single-size.loading .cart-btn-minus::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

.new-cart-button.single-size.success .cart-btn-container {
    background: #4CAF50;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.new-cart-button.single-size.error .cart-btn-container {
    background: #f44336;
    box-shadow: 0 4px 16px rgba(244, 67, 54, 0.3);
}

/* ===== ОРИГИНАЛЬНЫЙ СТИЛЬ (оставляем для других страниц) ===== */
.new-cart-button:not(.catalog-size):not(.single-size) {
    display: flex !important;
    align-items: center;
    background: #1F9356;
    border-radius: 18px;
    overflow: hidden;
    will-change: transform;
    contain: layout style;
    transform: translateZ(0);
    box-shadow: 0 2px 8px rgba(31, 147, 86, 0.2);
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    max-width: 200px;
    margin: 8px 0;
    visibility: visible !important;
    opacity: 1 !important;
}

.new-cart-button:not(.catalog-size):hover {
    /* box-shadow: 0 4px 12px rgba(31, 147, 86, 0.3); */
    /* transform: translateY(-1px); */
}

/* Кнопка минус */
.cart-btn-minus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 8px;
    min-width: 8px;
    /* ОПТИМИЗАЦИЯ: предотвращаем reflow при показе/скрытии */
    will-change: opacity, visibility;
    transform: translateZ(0);
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 11px;
    font-weight: 600;
    border-radius: 0;
}

.cart-btn-minus:hover {
    /* background: rgba(255, 255, 255, 0.2); */
}

.cart-btn-minus:active {
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.1); /* Оставляем базовый фон */
}

/* Блок с ценой (70% ширины когда нет количества) */
.cart-btn-price {
    flex: 1;
    text-align: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    padding: 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ИСПРАВЛЕНО: НЕ МЕНЯЕМ РАЗМЕР ЦЕНЫ - иначе кнопка + выталкивается */
.new-cart-button.has-quantity .cart-btn-price {
    flex: 1; /* ОСТАВЛЯЕМ flex: 1 чтобы кнопка + поместилась */
}

/* Кнопка плюс */
.cart-btn-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    /* ОПТИМИЗАЦИЯ: предотвращаем reflow */
    will-change: opacity, visibility;
    transform: translateZ(0);
    width: 8px;
    min-width: 8px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 11px;
    font-weight: 600;
    border-radius: 0;
}

.cart-btn-plus:hover {
    /* background: rgba(255, 255, 255, 0.2); */
}

.cart-btn-plus:active {
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.1); /* Оставляем базовый фон */
}

/* ИСПРАВЛЕНО: Блок с количеством - МЕНЬШИЙ РАЗМЕР */
.cart-btn-quantity {
    flex: 0 0 auto; /* НЕ фиксированная ширина, только нужное место */
    text-align: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    /* ОПТИМИЗАЦИЯ: предотвращаем reflow при изменении количества */
    will-change: opacity, visibility, width;
    transform: translateZ(0);
    background: rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0 8px; /* Увеличиваем padding для читаемости */
    min-width: 24px; /* Минимальная ширина */
    display: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15); /* Обводка для скрытия артефактов */
    position: relative;
    z-index: 2; /* Поднимаем над зеленой кнопкой */
}

.new-cart-button.has-quantity .cart-btn-quantity {
    display: flex !important;
    align-items: center;
    justify-content: center;
}





/* УДАЛЕНО: Старые дублирующиеся стили размеров */

/* УДАЛЕНО: Старые стили состояний (заменены новыми) */

/* УДАЛЕНО: Старые анимации (заменены новыми) */

/* УДАЛЕНО: Старые адаптивные стили (заменены новыми) */

/* УДАЛЕНО: Старые стили отладки (больше не нужны) */

/* УДАЛЕНО: Старые стили quick-view (заменены новыми single-size) */

/* УДАЛЕНО: Старые стили защиты от спама (заменены новыми) */

/* Индикатор успешного действия */
.new-cart-button.success .cart-btn-plus,
.new-cart-button.success .cart-btn-minus {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* Индикатор ошибки */
.new-cart-button.error .cart-btn-plus,
.new-cart-button.error .cart-btn-minus {
    background-color: #f44336;
    color: white;
    border-color: #f44336;
}

/* ===== АНИМАЦИИ ===== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}