/* ==========================================================================
   TriStyle Shop Belarus — Стили WooCommerce
   Каталог, карточки товаров, корзина, чекаут
   ========================================================================== */

/* ==========================================================================
   Каталог (Shop Page)
   ========================================================================== */
.shop-page {
    padding-top: calc(var(--header-height) + 32px);
}

.shop-breadcrumbs {
    padding: var(--spacing-sm) 0;
    background-color: var(--color-bg-light);
}

.shop-header {
    padding: var(--spacing-xl) 0 var(--spacing-lg);
}

.shop-header__title {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    color: var(--color-text-dark);
}

.shop-header__desc {
    font-size: var(--font-size-base);
    color: #6b7280;
    margin-top: var(--spacing-xs);
    max-width: 600px;
}

/* Панель управления */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border-light);
}

.shop-toolbar__right {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.shop-toolbar__label {
    font-size: var(--font-size-sm);
    color: #6b7280;
}

.shop-toolbar .woocommerce-ordering select {
    padding: 8px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    color: var(--color-text-dark);
    background-color: var(--color-white);
    cursor: pointer;
    outline: none;
}

/* Макет каталога */
.shop-layout {
    padding-bottom: var(--spacing-3xl);
}

.shop-content {
    display: flex;
    gap: var(--spacing-xl);
}

.shop-products {
    flex: 1;
    min-width: 0;
}

/* Боковая панель фильтров */
.shop-sidebar {
    display: block; /* всегда видна на десктопе */
    width: 240px;
    flex-shrink: 0;
}

/* На мобильных — bottom drawer (main.css ≤899px управляет transform) */
@media (max-width: 899px) {
    .shop-sidebar {
        display: block; /* transform скрывает, не display */
    }
}

/* Кнопка "Показать фильтры" — только на мобильных */
.btn--filter {
    display: none;
}
@media (max-width: 899px) {
    .btn--filter {
        display: inline-flex;
    }
}

.sidebar__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border-light);
}

.sidebar__title {
    font-size: var(--font-size-lg);
    font-weight: 700;
}

.sidebar__close {
    color: #6b7280;
    padding: 4px;
}

/* Секции сайдбара */
.sidebar__section {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #f0f0f0;
}
.sidebar__section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.sidebar__section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin-bottom: 12px;
}
.sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar__item {
    margin-bottom: 2px;
}
.sidebar__link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.sidebar__link:hover {
    background: #f5f5f5;
    color: #1a1a1a;
}
.sidebar__item--active > .sidebar__link {
    font-weight: 600;
    color: #1a1a1a;
    background: #f0f0f0;
}
.sidebar__count {
    font-size: 11px;
    color: #aaa;
    margin-left: 4px;
}
.sidebar__cat-row {
    display: flex;
    align-items: center;
    gap: 4px;
}
.sidebar__cat-row .sidebar__link {
    flex: 1;
}
.shop-sidebar .sidebar__section--cats,
.sidebar__section.sidebar__section--cats {
    padding: 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}
/* Отступ между блоком категорий и следующей секцией (Пол / Размер) */
.shop-sidebar .sidebar__section--cats + .sidebar__section:not(.sidebar__section--cats),
.shop-sidebar .sidebar__section--cats:last-of-type {
    margin-bottom: 28px !important;
}
.shop-sidebar .sidebar__section--cats + .sidebar__section:not(.sidebar__section--cats) {
    margin-top: 28px !important;
}
.shop-sidebar .sidebar__section--cats .sidebar__cat-row {
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    line-height: 1 !important;
}
.shop-sidebar .sidebar__section--cats .sidebar__section-title {
    margin: 0 !important;
    padding: 12px 4px !important;
    display: block !important;
    color: #1a1a1a !important;
    text-decoration: none !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    flex: 1 !important;
    line-height: 1.1 !important;
    background: transparent !important;
}
.shop-sidebar .sidebar__section--cats .sidebar__section-title:hover {
    background: transparent !important;
    color: #000 !important;
}
.shop-sidebar .sidebar__section--cats .sidebar__toggle {
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
}
.shop-sidebar .sidebar__section--cats .sidebar__toggle svg {
    width: 12px !important;
    height: 12px !important;
}
.shop-sidebar .sidebar__section--cats .sidebar__sublist {
    margin: 0 !important;
    padding: 0 !important;
}
.shop-sidebar .sidebar__section--cats .sidebar__sublist--open {
    margin: 0 0 8px 0 !important;
    padding: 0 0 4px 0 !important;
}
.shop-sidebar .sidebar__section--cats .sidebar__subitem {
    margin: 0 !important;
}
.shop-sidebar .sidebar__section--cats .sidebar__subitem .sidebar__link {
    padding: 5px 8px !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
}
.sidebar__group--open .sidebar__section-title {
    color: #000;
}
.sidebar__sublist {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
    margin: 0;
    padding: 0;
    list-style: none;
}
.sidebar__sublist--open {
    display: block;
    max-height: 2000px;
    margin: 4px 0 0 0;
}
.sidebar__toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none !important;
    background: none !important;
    color: #999;
    cursor: pointer;
    border-radius: 4px;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.2s;
    padding: 0 !important;
}
.sidebar__toggle:hover {
    color: #333;
}
.sidebar__toggle--open svg {
    transform: rotate(180deg);
}
.sidebar__sublist {
    display: none;
    list-style: none;
    margin: 2px 0 4px 12px;
    padding: 0;
}
.sidebar__sublist--open {
    display: block;
}
.sidebar__subitem .sidebar__link {
    font-size: 13px;
    padding: 4px 8px;
    color: #555;
}
.sidebar__subitem--active .sidebar__link {
    font-weight: 600;
    color: #1a1a1a;
}

/* Чекбоксы (пол) */
.sidebar__check-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
}
.sidebar__check-link:hover {
    color: #1a1a1a;
}
.sidebar__checkbox {
    display: inline-flex;
    width: 16px;
    height: 16px;
    border: 1.5px solid #ccc;
    border-radius: 3px;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
}
.sidebar__checkbox--checked {
    background: #1a1a1a;
    border-color: #1a1a1a;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* Кнопки размеров */
.sidebar__sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sidebar__size {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 36px;
    padding: 0 10px;
    border: 1.5px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.sidebar__size:hover {
    border-color: #555;
    color: #1a1a1a;
}
.sidebar__size--active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

/* Сброс фильтров */
.sidebar__reset-link {
    font-size: 13px;
    color: #888;
    text-decoration: none;
    transition: color 0.15s;
}
.sidebar__reset-link:hover {
    color: #1a1a1a;
}

/* Виджеты фильтров */
.widget {
    margin-bottom: var(--spacing-xl);
}

.widget-title {
    font-size: var(--font-size-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-dark);
}

.widget ul li {
    margin-bottom: 6px;
}

.widget ul li a {
    font-size: var(--font-size-sm);
    color: #6b7280;
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    transition: color var(--transition-fast);
}

.widget ul li a:hover {
    color: var(--color-primary);
}

.widget ul li .count {
    font-size: var(--font-size-xs);
    color: #9ca3af;
}

/* ==========================================================================
   Сетка товаров
   ========================================================================== */
.products-grid,
ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: stretch;   /* карточки растягиваются на всю высоту ряда */
}
/* Прямые дети grid тянутся на всю высоту ячейки — карточка + её content */
.products-grid > *,
ul.products > * {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.products-grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ==========================================================================
   Карточка товара
   ========================================================================== */
.product-card,
ul.products li.product {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--color-bg-card);
    transition: transform var(--transition), box-shadow var(--transition);
    /* Одинаковая высота всех карточек в ряду + кнопка «Посмотреть» на одном уровне */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover,
ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Изображение */
.product-card__image {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    background-color: #ffffff; /* белый фон для contain */
}

.product-card__image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.product-card__img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* показываем полное фото без обрезки */
    max-width: 100%;
    display: block;
    transition: opacity var(--transition);
}

.product-card__img--hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.product-card:hover .product-card__img--primary {
    opacity: 0;
}

.product-card:hover .product-card__img--hover {
    opacity: 1;
}

.product-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5, #e5e5e5);
    color: #ccc;
}

/* Бейджи */
.product-card__badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 3;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
}

.badge--sale {
    background-color: var(--color-sale);
    color: var(--color-white);
}

.badge--new {
    background-color: var(--color-gold);
    color: var(--color-primary);
}

.badge--out {
    background-color: #6b7280;
    color: var(--color-white);
}

.badge--backorder {
    background-color: #d97706;
    color: var(--color-white);
}

/* Быстрые действия */
.product-card__actions {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition);
    z-index: 3;
}

.product-card:hover .product-card__actions {
    opacity: 1;
    transform: translateY(0);
}

.product-card__cart-btn,
.product-card__actions .button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.product-card__cart-btn:hover,
.product-card__actions .button:hover {
    background-color: var(--color-gold);
    color: var(--color-primary);
}

/* Кнопка «Под заказ» — янтарная */
.product-card__cart-btn.ccn-btn-backorder,
.product-card__actions .button.ccn-btn-backorder {
    background-color: #d97706;
    color: #fff;
}
.product-card__cart-btn.ccn-btn-backorder:hover,
.product-card__actions .button.ccn-btn-backorder:hover {
    background-color: #b45309;
    color: #fff;
}

/* Кнопка «Под заказ» на странице товара */
.single_add_to_cart_button.ccn-btn-backorder {
    background-color: #d97706 !important;
    border-color: #d97706 !important;
    color: #fff !important;
}
.single_add_to_cart_button.ccn-btn-backorder:hover {
    background-color: #b45309 !important;
    border-color: #b45309 !important;
}

/* Информация */
.product-card__info {
    padding: var(--spacing-md);
    /* растягиваем блок, чтобы кнопка «Посмотреть» ушла в самый низ */
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
/* Все дочерние элементы info идут сверху вниз, а кнопка «Посмотреть»
   всегда прижата к нижнему краю благодаря margin-top:auto */
.product-card__info > .product-card__view-btn { margin-top: auto; }

.product-card__brand {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 4px;
}

.product-card__title,
ul.products li.product .woocommerce-loop-product__title {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-text-dark);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.3;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__price,
ul.products li.product .price {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--color-text-dark);
}

.product-card__price del,
ul.products li.product .price del {
    font-weight: 400;
    color: #9ca3af;
    font-size: var(--font-size-sm);
}

.product-card__price ins,
ul.products li.product .price ins {
    text-decoration: none;
    color: var(--color-sale);
}

/* Цвета */
.product-card__colors {
    display: flex;
    gap: 6px;
    margin-top: var(--spacing-xs);
}

.color-swatch {
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(0, 0, 0, .12);
    overflow: hidden;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
    background: #f1f5f9; /* fallback если цвет не распознан */
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
/* Белый swatch — нужна заметная рамка, чтобы было видно */
.color-swatch.color-swatch--has-white {
    border-color: rgba(0,0,0,.25);
}
.color-swatch:hover {
    transform: scale(1.15);
    border-color: var(--color-primary);
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.color-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   Страница товара (Single Product)
   ========================================================================== */
.single-product-page {
    padding-top: calc(var(--header-height) + 32px);
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    padding: var(--spacing-xl) 0 var(--spacing-3xl);
}

/* Галерея */
.product-gallery {
    position: sticky;
    top: calc(var(--header-height) + var(--spacing-lg));
    align-self: start;
}

.product-gallery__main {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: #ffffff; /* белый фон для contain */
    margin-bottom: var(--spacing-sm);
    max-width: 100%; /* защита от переполнения */
}

.product-gallery__image {
    display: none;
    aspect-ratio: 4/5;
    width: 100%; /* обязательно для aspect-ratio */
}

.product-gallery__image--active {
    display: block;
}

.product-gallery__img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* полное фото без обрезки */
    max-width: 100%;
    display: block;
}

.product-gallery__thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.product-gallery__thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color var(--transition-fast);
}

.product-gallery__thumb--active {
    border-color: var(--color-primary);
}

.product-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Информация */
.product-info__brand {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: var(--spacing-xs);
}

.product-info__title {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--color-text-dark);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: var(--spacing-md);
}

.product-info__price .price {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-text-dark);
}

.product-info__price .price del {
    font-size: var(--font-size-lg);
    color: #9ca3af;
    font-weight: 400;
}

.product-info__price .price ins {
    text-decoration: none;
    color: var(--color-sale);
}

/* Наличие */
.product-info__stock {
    margin: var(--spacing-sm) 0;
}

.stock-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.stock-status--in {
    color: var(--color-success);
}

.stock-status--out {
    color: var(--color-error);
}

.stock-status--backorder {
    color: #d97706;
}

.stock-status--neutral {
    color: #6b7280;
}

/* Форма добавления в корзину */
.product-info__cart .cart {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.product-info__cart .variations {
    width: 100%;
    border-collapse: collapse;
}

.product-info__cart .variations td {
    padding: 8px 0;
}

.product-info__cart .variations .label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-right: var(--spacing-md);
    vertical-align: top;
    padding-top: 14px;
}

.product-info__cart .variations select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    color: var(--color-text-dark);
    background-color: var(--color-white);
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition-fast);
}

.product-info__cart .variations select:focus {
    border-color: var(--color-primary);
}

/* Атрибут с одним значением — статичный текст вместо дропдауна */
.single-variation-value {
    display: inline-block;
    padding: 12px 0;
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--color-text-dark);
}

/* ===== Квадратные свотчи вариаций ===== */
.product-info__cart .ccn-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.product-info__cart .ccn-swatch,
.product-info__cart button.ccn-swatch,
.product-info__cart span.ccn-swatch {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1.5px solid #d0d0d0;
    border-radius: 4px;
    background: #fff;
    background-color: #fff;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
    white-space: nowrap;
    line-height: 1;
    user-select: none;
    box-sizing: border-box;
}

.product-info__cart button.ccn-swatch:hover {
    border-color: #555;
}

.product-info__cart .ccn-swatch--selected,
.product-info__cart button.ccn-swatch--selected,
.product-info__cart span.ccn-swatch--selected {
    border: 2px solid #1a1a1a;
    background: #1a1a1a;
    background-color: #1a1a1a;
    color: #fff;
    font-weight: 700;
}

/* Подпись выбранного значения рядом с лейблом */
.ccn-swatch-selected-label {
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 400;
}

/* Галочка внутри выбранного свотча */
.ccn-swatch-check {
    position: absolute;
    bottom: 2px;
    right: 3px;
    font-size: 9px;
    line-height: 1;
    color: #1a1a1a;
    pointer-events: none;
}

.product-info__cart button.ccn-swatch {
    position: relative;
}

/* Одно значение — выбрано автоматически, без hover */
.product-info__cart .ccn-swatch--single {
    cursor: default;
    pointer-events: none;
}

/* Недоступный размер */
.product-info__cart .ccn-swatch--unavailable {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Количество — обёртка */
.ccn-quantity {
    display: block !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    width: auto !important;
    margin-bottom: 16px;
}

.ccn-qty-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Строка с +/− и инпутом */
.ccn-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #d0d0d0;
    border-radius: 4px;
    overflow: hidden;
    width: fit-content;
}

.ccn-qty-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    border: none !important;
    background: #f5f5f5 !important;
    color: #1a1a1a !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    user-select: none;
    line-height: 1 !important;
    transition: background 0.15s;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.ccn-qty-btn:hover {
    background: #e8e8e8 !important;
}

.ccn-qty-btn:active {
    background: #ddd !important;
}

.ccn-qty-control input[type="number"] {
    width: 52px;
    text-align: center;
    border: none !important;
    border-left: 1.5px solid #d0d0d0 !important;
    border-right: 1.5px solid #d0d0d0 !important;
    padding: 0 4px;
    height: 44px;
    font-size: 15px;
    font-weight: 600;
    -moz-appearance: textfield;
    outline: none;
    background: #fff;
    border-radius: 0 !important;
}

.ccn-qty-control input[type="number"]::-webkit-outer-spin-button,
.ccn-qty-control input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

/* Кнопка "В корзину" */
.product-info__cart .single_add_to_cart_button,
.product-info__cart button[type="submit"] {
    width: 100%;
    padding: 16px 32px;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
}

.product-info__cart .single_add_to_cart_button:hover:not(.disabled):not([disabled]) {
    background-color: var(--color-gold);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 165, 90, 0.4);
}

/* Кнопка пока не выбрана вариация */
.product-info__cart .single_add_to_cart_button.disabled,
.product-info__cart .single_add_to_cart_button[disabled] {
    background-color: #d1d5db !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
    position: relative;
}
.product-info__cart .single_add_to_cart_button.disabled::after,
.product-info__cart .single_add_to_cart_button[disabled]::after {
    content: 'Выберите параметры';
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}
.product-info__cart .single_add_to_cart_button.disabled:hover::after,
.product-info__cart .single_add_to_cart_button[disabled]:hover::after {
    opacity: 1;
}

/* Shake-анимация при клике на disabled */
@keyframes ccnShake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}
.single_add_to_cart_button.ccn-shake {
    animation: ccnShake 0.4s ease;
}

/* Подсветка незаполненного свотча */
@keyframes ccnPulse {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    60%  { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.ccn-swatches--required .ccn-swatch:not(.ccn-swatch--selected) {
    border-color: #ef4444 !important;
    animation: ccnPulse 0.6s ease 3;
}
.ccn-swatches--required {
    outline: 2px solid #ef4444;
    outline-offset: 3px;
    border-radius: 4px;
}

/* Бейдж "Под заказ" на странице товара */
.ccn-backorder-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 16px;
}
.ccn-backorder-tag {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
}

/* Цена по запросу — для кастомных товаров без цены */
.ccn-price-on-request {
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-gold, #c5a55a);
    letter-spacing: 0.03em;
}

/* Inline-подсказка под свотчами */
.ccn-variation-hint {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #ef4444;
    margin: 0 0 12px;
    padding: 8px 12px;
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    border-radius: 0 4px 4px 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}
.ccn-variation-hint--visible {
    max-height: 60px;
    opacity: 1;
    margin-bottom: 12px;
}

/* Мета */
.product-info__meta {
    margin-top: var(--spacing-md);
    font-size: var(--font-size-sm);
    color: #6b7280;
}

.product-info__meta .sku_wrapper,
.product-info__meta .posted_in,
.product-info__meta .tagged_as {
    margin-bottom: 4px;
}

.product-info__meta a {
    color: var(--color-primary);
    transition: color var(--transition-fast);
}

.product-info__meta a:hover {
    color: var(--color-gold);
}

/* Похожие товары */
.related.products {
    padding: var(--spacing-3xl) 0;
}

.related.products > h2 {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: var(--spacing-xl);
}

/* ==========================================================================
   Корзина
   ========================================================================== */
.cart-page {
    padding: calc(var(--header-height) + var(--spacing-3xl)) 0 var(--spacing-3xl);
}

.cart-page .container {
    max-width: var(--container-width);
}

.cart-page__header {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
}

.cart-page__title {
    font-size: var(--font-size-4xl);
    font-weight: 800;
}

.cart-page__count {
    font-size: var(--font-size-base);
    color: #6b7280;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--spacing-3xl);
    align-items: start;
}

/* Товар в корзине */
.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto auto;
    gap: var(--spacing-md);
    align-items: center;
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.cart-item__image {
    width: 100px;
    height: 120px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: #f5f5f5;
}

.cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item__brand {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 2px;
}

.cart-item__name {
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.cart-item__name a {
    color: var(--color-text-dark);
}

.cart-item__name a:hover {
    color: var(--color-gold);
}

.cart-item__price {
    font-size: var(--font-size-sm);
    color: #6b7280;
}

.cart-item__subtotal {
    font-size: var(--font-size-base);
    font-weight: 700;
}

.remove-btn {
    font-size: var(--font-size-xl);
    color: #9ca3af;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.remove-btn:hover {
    color: var(--color-error);
    background-color: #fef2f2;
}

/* Действия корзины */
.cart-actions {
    display: flex;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-lg);
}

/* Итого */
.cart-summary {
    background-color: var(--color-bg-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    position: sticky;
    top: calc(var(--header-height) + var(--spacing-lg));
}

.cart-summary__title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border-light);
}

.cart-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: var(--font-size-sm);
    color: #6b7280;
}

.cart-summary__row--total {
    border-top: 2px solid var(--color-text-dark);
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-text-dark);
}

/* Блок выбора метода доставки в корзине */
.cart-shipping-methods {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background-color: #fff;
    border: 1px solid var(--color-border-light, #e5e7eb);
    border-radius: var(--radius-md);
}

.cart-shipping-methods__title {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cart-shipping-methods ul.woocommerce-shipping-methods {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs, 8px);
}

.cart-shipping-methods ul.woocommerce-shipping-methods li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--color-border-light, #e5e7eb);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.2s;
}

.cart-shipping-methods ul.woocommerce-shipping-methods li:has(input:checked) {
    border-color: var(--color-gold);
    background-color: rgba(197, 165, 90, 0.06);
}

.cart-shipping-methods ul.woocommerce-shipping-methods li label {
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: var(--color-text-dark);
    line-height: 1.4;
}

.cart-shipping-methods ul.woocommerce-shipping-methods li label em {
    display: block;
    font-style: normal;
    color: #6b7280;
    font-size: 12px;
    margin-top: 2px;
}

.cart-shipping-methods .woocommerce-shipping-destination {
    font-size: 12px;
    color: #6b7280;
    margin-top: var(--spacing-sm);
}

.cart-summary .checkout-button,
.wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
    padding: 16px;
    margin-top: var(--spacing-lg);
    background-color: var(--color-gold);
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
}

.cart-summary .checkout-button:hover,
.wc-proceed-to-checkout .checkout-button:hover {
    background-color: var(--color-gold-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 165, 90, 0.4);
}

/* ==========================================================================
   Оформление заказа (Checkout)
   ========================================================================== */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: var(--spacing-3xl);
    padding-top: var(--spacing-xl);
    align-items: start;
}

.checkout-section__title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-xl);
}

/* Поля формы */
.woocommerce-checkout .form-row {
    margin-bottom: var(--spacing-md);
}

.woocommerce-checkout .form-row label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-text-dark);
}

.woocommerce-checkout .form-row input,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    color: var(--color-text-dark);
    background-color: var(--color-white);
    outline: none;
    transition: border-color var(--transition-fast);
}

.woocommerce-checkout .form-row input:focus,
.woocommerce-checkout .form-row select:focus,
.woocommerce-checkout .form-row textarea:focus {
    border-color: var(--color-primary);
}

/* Сводка заказа */
.checkout-order {
    background-color: var(--color-bg-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    position: sticky;
    top: calc(var(--header-height) + var(--spacing-lg));
}

/* Кнопка оформления */
#place_order {
    display: block;
    width: 100%;
    padding: 16px;
    margin-top: var(--spacing-lg);
    background-color: var(--color-gold);
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
}

#place_order:hover {
    background-color: var(--color-gold-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 165, 90, 0.4);
}

/* Пагинация */
.shop-pagination {
    margin-top: var(--spacing-3xl);
    text-align: center;
}

.shop-pagination .woocommerce-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.shop-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-dark);
    border: 1px solid var(--color-border-light);
    transition: all var(--transition-fast);
}

.shop-pagination .page-numbers:hover,
.shop-pagination .page-numbers.current {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* Сообщения WooCommerce */
.woocommerce-message,
.woocommerce-info {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    border-left: 4px solid var(--color-gold);
    background-color: #fefce8;
    color: var(--color-text-dark);
}

.woocommerce-error {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    border-left: 4px solid var(--color-error);
    background-color: #fef2f2;
    color: var(--color-error);
}

/* Пустая корзина */
.shop-empty,
.cart-empty {
    text-align: center;
    padding: var(--spacing-4xl) var(--spacing-xl);
}

.shop-empty h2,
.cart-empty .cart-empty {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.shop-empty p {
    color: #6b7280;
    margin-bottom: var(--spacing-xl);
}

/* ═══════════════════════════════════════════════
   БЕЙДЖИ НА КАРТОЧКАХ ТОВАРОВ
═══════════════════════════════════════════════ */
.ccn-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}
.ccn-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.4;
}
.ccn-badge--sale {
    background: #e11d48;
    color: #fff;
}
.ccn-badge--hit {
    background: #0a1628;
    color: #c5a55a;
    border: 1px solid #c5a55a;
}
.ccn-badge--new {
    background: #c5a55a;
    color: #0a1628;
}

/* ═══════════════════════════════════════════════
   ПЕРЕКЛЮЧАТЕЛЬ КОЛИЧЕСТВА ТОВАРОВ
═══════════════════════════════════════════════ */
.ccn-per-page {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}
.ccn-per-page__label {
    font-size: 13px;
    color: #6b7280;
    margin-right: 4px;
}
.ccn-per-page__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #0a1628;
    text-decoration: none;
    transition: all .2s;
}
.ccn-per-page__btn:hover {
    border-color: #c5a55a;
    color: #c5a55a;
}
.ccn-per-page__btn--active {
    background: #0a1628;
    border-color: #0a1628;
    color: #c5a55a;
}

/* Скрываем кнопку "Очистить" на странице товара */
.reset_variations {
    display: none !important;
}

/* Кнопка "Посмотреть" в карточке товара — адаптивная */
.product-card__view-btn {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 12px;
    padding: clamp(6px, 1.5vw, 9px) clamp(6px, 2vw, 12px);
    background: transparent;
    border: 1.5px solid #0a1628;
    border-radius: 8px;
    color: #0a1628;
    font-size: clamp(0.68rem, 1.6vw, 0.82rem);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
    letter-spacing: 0.02em;
    white-space: nowrap;        /* текст «Посмотреть» одной строкой */
    overflow: hidden;
    text-overflow: ellipsis;    /* если совсем узко — покажет «Посмо…» вместо вылезания */
    min-width: 0;
}
/* Родительский контейнер карточки — жёстко ограничить ширину */
.product-card,
ul.products li.product {
    min-width: 0;
    max-width: 100%;
}
.product-card__info { min-width: 0; }
.product-card__view-btn:hover {
    background: #0a1628;
    color: #fff;
    border-color: #0a1628;
}

/* ============================================================================
   ccn-size-chart — виджет размерной сетки CCN Sport на странице товара
   ============================================================================ */
.ccn-size-chart {
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fafafa;
    overflow: hidden;
}
.ccn-size-chart__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 12px;
    cursor: pointer;
    transition: background .2s;
}
.ccn-size-chart__header:hover { background: #f1f5f9; }
.ccn-size-chart__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #0a1628;
    letter-spacing: .02em;
}
.ccn-size-chart__toggle {
    background: transparent;
    border: 1.5px solid #0a1628;
    color: #0a1628;
    font-weight: 600;
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0;
}
.ccn-size-chart__toggle:hover { background: #0a1628; color: #fff; }
.ccn-size-chart__toggle[aria-expanded="true"] { background: #0a1628; color: #fff; }
.ccn-size-chart__body {
    padding: 4px 16px 16px;
    animation: ccnScFadeIn .3s ease;
}
@keyframes ccnScFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ccn-size-chart__table-wrap {
    overflow-x: auto;
    margin: 12px 0;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.ccn-size-chart__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 480px;
}
.ccn-size-chart__table caption {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #0a1628;
    background: #f8fafc;
    caption-side: top;
    border-bottom: 1px solid #e2e8f0;
}
.ccn-size-chart__table th {
    background: #0a1628;
    color: #c5a55a;
    padding: 8px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .5px;
}
.ccn-size-chart__table th:first-child { text-align: left; }
.ccn-size-chart__table td {
    padding: 8px 10px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    color: #1e293b;
}
.ccn-size-chart__table td:first-child { text-align: left; font-weight: 600; }
.ccn-size-chart__note {
    margin: 8px 0 4px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}
.ccn-size-chart__link {
    margin: 6px 0 0;
    font-size: 13px;
}
.ccn-size-chart__link a {
    color: #14b8a6;
    font-weight: 600;
    text-decoration: none;
}
.ccn-size-chart__link a:hover { text-decoration: underline; }

/* ============================================================================
   ccn-size-chart — усиленные стили таблицы (перебивают resets темы/WC)
   ============================================================================ */
.ccn-size-chart--inline { margin: 0; padding: 0; }
.ccn-size-chart__table-wrap { display: block !important; overflow-x: auto; margin: 4px 0 16px; background: #fff; border-radius: 8px; border: 1px solid #e2e8f0; }
.ccn-size-chart__table { display: table !important; width: 100% !important; border-collapse: collapse !important; font-size: 13px; min-width: 460px; margin: 0 !important; table-layout: auto; }
.ccn-size-chart__table caption { display: table-caption !important; padding: 10px 14px !important; text-align: left !important; font-weight: 600 !important; font-size: 13px !important; color: #0a1628 !important; background: #f8fafc !important; caption-side: top !important; border-bottom: 1px solid #e2e8f0 !important; }
.ccn-size-chart__table thead { display: table-header-group !important; }
.ccn-size-chart__table tbody { display: table-row-group !important; }
.ccn-size-chart__table tr { display: table-row !important; }
.ccn-size-chart__table th, .ccn-size-chart__table td { display: table-cell !important; padding: 9px 12px !important; text-align: center !important; border-bottom: 1px solid #f0f0f0 !important; white-space: nowrap; vertical-align: middle; }
.ccn-size-chart__table th { background: #0a1628 !important; color: #c5a55a !important; font-weight: 600 !important; font-size: 12px !important; letter-spacing: 0.5px; border-bottom: 0 !important; }
.ccn-size-chart__table th:first-child, .ccn-size-chart__table td:first-child { text-align: left !important; font-weight: 600 !important; color: #1e293b; background: #fafafa; }
.ccn-size-chart__note { margin: 8px 0 4px !important; font-size: 12px !important; color: #64748b !important; line-height: 1.5 !important; }
.ccn-size-chart__link { margin: 6px 0 0 !important; font-size: 13px !important; }
.ccn-size-chart__link a { color: #14b8a6 !important; font-weight: 600 !important; text-decoration: none !important; }
.ccn-size-chart__link a:hover { text-decoration: underline !important; }

/* ==========================================================================
   Карточка: строка цветов фиксированной высоты над кнопкой «Посмотреть» —
   цвета не наезжают на кнопку, кнопки во всём ряду на одной линии
   ========================================================================== */
.product-card__info > .product-card__colors {
    margin-top: auto;          /* прижимаем блок «цвета + кнопка» к низу карточки */
    min-height: 22px;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 6px;
    padding-top: 10px;
    margin-bottom: 12px;
}
.product-card__info > .product-card__colors ~ .product-card__view-btn {
    margin-top: 0;
}

/* Размер/цвет не в наличии — перечёркнут крестиком (а не просто серый) */
.ccn-swatch.ccn-swatch--unavailable,
.product-info__cart .ccn-swatch--unavailable {
    position: relative;
    opacity: .55;
    text-decoration: none;
    color: #94a3b8;
    overflow: hidden;
}
.ccn-swatch.ccn-swatch--unavailable::before,
.ccn-swatch.ccn-swatch--unavailable::after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 140%; height: 1.5px;
    background: #ef4444;
    pointer-events: none;
}
.ccn-swatch.ccn-swatch--unavailable::before { transform: translate(-50%, -50%) rotate(35deg); }
.ccn-swatch.ccn-swatch--unavailable::after  { transform: translate(-50%, -50%) rotate(-35deg); }

/* Карточка: если фото одно — при наведении оно остаётся (нет белого пятна) */
.product-card:not(.product-card--has-hover):hover .product-card__img--primary { opacity: 1; }

/* Артикул под названием товара */
.product-info__sku { margin: -4px 0 12px; font-size: 13px; color: #64748b; letter-spacing: .02em; }
.product-info__sku .sku { color: #0a1628; font-weight: 600; }

/* SEO-текст внизу категории */
.ccn-seo-text { margin: 48px 0 8px; padding-top: 28px; border-top: 1px solid #e2e8f0; color: #475569; font-size: 14px; line-height: 1.7; max-width: 900px; }
.ccn-seo-text h2 { font-size: 18px; color: #0a1628; margin: 0 0 12px; }
.ccn-seo-text p { margin: 0 0 10px; }

/* Блок «Новинки магазина» (пустая корзина и др. блоки WooCommerce) — ровные карточки (02.10.2026) */
.wc-block-grid.wc-block-grid .wc-block-grid__products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.wc-block-grid.wc-block-grid .wc-block-grid__product { display: flex; flex-direction: column; max-width: none !important; width: auto !important; flex: none !important; margin: 0; padding: 0 0 16px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; overflow: hidden; text-align: left; transition: box-shadow .2s, transform .2s; }
.wc-block-grid.wc-block-grid .wc-block-grid__product:hover { box-shadow: 0 12px 30px rgba(10,22,40,.10); transform: translateY(-2px); }
.wc-block-grid.wc-block-grid .wc-block-grid__product-link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
.wc-block-grid.wc-block-grid .wc-block-grid__product-image { margin: 0 0 14px; aspect-ratio: 1 / 1; background: #f5f7fa; display: flex; align-items: center; justify-content: center; }
.wc-block-grid.wc-block-grid .wc-block-grid__product-image img { width: 100%; height: 100%; object-fit: contain; margin: 0; }
.wc-block-grid.wc-block-grid .wc-block-grid__product-title { padding: 0 16px; margin: 0 0 8px; font-size: 14px; font-weight: 600; line-height: 1.35; color: #0a1628; min-height: calc(1.35em * 2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wc-block-grid.wc-block-grid .wc-block-grid__product-price { padding: 0 16px; margin: auto 0 12px; font-size: 16px; font-weight: 700; color: #0a1628; }
.wc-block-grid.wc-block-grid .wc-block-grid__product-add-to-cart { padding: 0 16px; margin: 0; }
.wc-block-grid.wc-block-grid .wc-block-grid__product-add-to-cart .wp-block-button__link { display: block; width: 100%; padding: 11px 16px; border-radius: 8px; background: #0a1628; color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; text-align: center; border: 0; }
.wc-block-grid.wc-block-grid .wc-block-grid__product-add-to-cart .wp-block-button__link:hover { background: #c5a55a; color: #0a1628; }
.wp-block-woocommerce-empty-cart-block .wp-block-heading, .wc-block-cart__empty-cart__title { text-align: center; }
@media (max-width: 960px) { .wc-block-grid.wc-block-grid .wc-block-grid__products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

/* Сетка каталога рядом с фильтрами: колонки по ширине, карточки не ужимаются (02.10.2026) */
@media (min-width: 961px) and (max-width: 1199px) { .shop-products .products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (min-width: 1200px) and (max-width: 1439px) { .shop-products .products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }

/* ===== Карточка товара «вариант 5 — фирменный TriStyle» (02.10.2026) ===== */
.pc5 { display: flex; flex-direction: column; background: #fff; border: 1px solid #e8ecf2; border-radius: 12px; overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .2s; }
.pc5:hover { box-shadow: 0 14px 34px rgba(10,22,40,.10); border-color: #d6dde8; transform: translateY(-2px); }
.pc5 .product-card__image { position: relative; aspect-ratio: 1 / 1; background: #f5f7fa; overflow: hidden; }
.pc5 .product-card__image-link, .pc5 .product-card__img { width: 100%; height: 100%; display: block; }
.pc5 .product-card__img { object-fit: contain; }
.pc5 .product-card__badges { position: absolute; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 3; }
.pc5 .pc-badge { position: static; margin: 0; padding: 4px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: none; line-height: 1.2; }
.pc5 .pc-badge--sale { background: #dc2626; color: #fff; }
.pc5 .pc-badge--new { background: #c5a55a; color: #0a1628; }
.pc5 .pc-badge--hit { background: #0a1628; color: #fff; }
.pc5 .pc-badge--out { background: #64748b; color: #fff; }
.pc5 .pc-fav { position: absolute; top: 10px; right: 10px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #0a1628; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s; }
.pc5 .pc-fav:hover, .pc5 .pc-fav.active, .pc5 .pc-fav.is-active { background: #0a1628; color: #c5a55a; }
.pc5 .pc-sizes { display: flex; flex-wrap: wrap; gap: 4px; }
.pc5 .pc-size { min-width: 28px; padding: 3px 6px; border: 1px solid #cbd5e1; border-radius: 5px; font-size: 11px; font-weight: 600; color: #0a1628; text-align: center; background: #fff; line-height: 1.3; }
.pc5 .pc-size--off { color: #b6bfcc; border-color: #e5e9ef; text-decoration: line-through; background: #f8fafc; }
.pc5 .pc-size--more { border-style: dashed; color: #64748b; }
.pc5 .pc-sizes-overlay { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 3; padding: 7px 8px; background: rgba(255,255,255,.95); border-radius: 8px; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none; }
.pc5:hover .pc-sizes-overlay { opacity: 1; transform: translateY(0); }
.pc5 .pc-sizes-inline { display: none; margin: 2px 0 6px; }
@media (hover: none), (max-width: 768px) { .pc5 .pc-sizes-overlay { display: none; } .pc5 .pc-sizes-inline { display: block; } }
.pc5 .product-card__info { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1 1 auto; gap: 0; }
.pc5 .pc-meta { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; margin: 0 0 5px; }
.pc5 .product-card__title { font-size: 14px; font-weight: 600; line-height: 1.35; text-transform: none; letter-spacing: 0; color: #0a1628; margin: 0 0 4px; min-height: calc(1.35em * 2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc5 .pc-sub { font-size: 12px; color: #64748b; margin: 0 0 8px; line-height: 1.4; min-height: 1.4em; }
.pc5 .product-card__colors { margin: 0 0 8px; min-height: 18px; }
.pc5 .pc-price { margin: auto 0 4px; font-size: 17px; font-weight: 800; color: #0a1628; }
.pc5 .pc-price del { font-size: 13px; font-weight: 500; color: #94a3b8; margin-right: 6px; }
.pc5 .pc-price ins { text-decoration: none; color: #dc2626; }
.pc5 .pc-avail { font-size: 12px; font-weight: 600; color: #15803d; margin: 0 0 12px; display: flex; align-items: center; gap: 6px; }
.pc5 .pc-avail::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pc5 .pc-avail--out { color: #94a3b8; }
.pc5 .pc-btn { display: block; width: 100%; padding: 11px 12px; border-radius: 8px; background: #0a1628; color: #fff; border: 1.5px solid #0a1628; font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-align: center; text-decoration: none; transition: background .15s, color .15s, border-color .15s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc5 .pc-btn:hover { background: #c5a55a; border-color: #c5a55a; color: #0a1628; }
.pc5 .pc-btn--ghost { background: transparent; color: #0a1628; }
.pc5 .pc-btn.added { background: #15803d; border-color: #15803d; }
.pc5 .added_to_cart { display: block; margin-top: 6px; font-size: 12px; text-align: center; color: #0a1628; text-decoration: underline; }
@media (max-width: 600px) {
  .pc5 .product-card__info { padding: 10px 10px 12px; }
  .pc5 .product-card__title { font-size: 13px; }
  .pc5 .pc-price { font-size: 15px; }
  .pc5 .pc-btn { padding: 9px 6px; font-size: 11px; letter-spacing: .02em; }
  .pc5 .pc-fav { width: 32px; height: 32px; }
  .pc5 .pc-sub { font-size: 11px; }
}
/* Размеры всегда видны над ценой, на всех экранах (решение владельца) */
.pc5 .pc-sizes-inline { display: block !important; margin: 0 0 8px; }
.pc5 .pc-sizes-overlay { display: none !important; }
/* Нет размера в наличии — красный крестик поверх (как на странице товара) */
.pc5 .pc-size--off { position: relative; text-decoration: none; color: #94a3b8; overflow: hidden; }
.pc5 .pc-size--off::before, .pc5 .pc-size--off::after { content: ''; position: absolute; left: 50%; top: 50%; width: 120%; height: 1.5px; background: #dc2626; border-radius: 1px; }
.pc5 .pc-size--off::before { transform: translate(-50%, -50%) rotate(28deg); }
.pc5 .pc-size--off::after { transform: translate(-50%, -50%) rotate(-28deg); }
