/* ============================================ */
/* СЕТКА ТОВАРОВ                                */
/* ============================================ */
.rokan-custom-grid {
    display: grid !important;
    grid-template-columns: repeat(1, 1fr) !important;
    gap: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.rokan-custom-grid li.product {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    clear: none !important;
    border: 1px solid #e5e7eb !important;
}

/* Планшет: 2 колонки */
@media (min-width: 768px) {
    .rokan-custom-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ПК: 3 колонки */
@media (min-width: 1024px) {
    .rokan-custom-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ============================================ */
/* КАРТОЧКА ТОВАРА                              */
/* ============================================ */
.product-card {
    padding: 30px 30px;
    width: 100%;
    box-sizing: border-box;
    border-radius: 0.375rem;
    overflow: hidden;
}
}

.product-card:hover {
}

/* Изображение */
.product-card__image {
    display: block;
    overflow: hidden;
}

.product-card__image img {
    transition: transform 0.3s ease;
}

.product-card__image:hover img {
    transform: scale(1.05);
}

/* Название товара */
.product-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__title a {
    display: block;
}

/* Строка с ценой и наличием */
.product-card__price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 1.2rem 0 1em 0;
}

.product-card__price {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.product-card__stock {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Характеристики */
.product-card__features {
    flex: 1;
    font-size: 0.75rem;
    color: #374151;
    line-height: 1;
    margin: 0 0 1.5rem 0;
}

/* Иконка-треугольник перед характеристикой */
.rokan-feature-item {
    position: relative;
    padding-left: 12px;
    display: block;
}

.rokan-feature-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 6px;
    height: 7px;
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAHCAYAAAArkDztAAAAPUlEQVR4AWP4z83dD8UCDEgAJNEAxP+B+D4QO6BLGoAkoAr60SUFgPg8VNIBm44CmGABSACq2gDNckxXAQAPTCq1KcRiCAAAAABJRU5ErkJggg==");
    background-repeat: no-repeat;
}

/* Кнопки */
.product-card__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.product-card__btn-detail,
.product-card__btn-cart {
    flex: 1;
    text-align: center;
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.65rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Кнопка "Подробно" */
.product-card__btn-detail {
    background-color: #e7e7e7;
    color: #374151;
}
.product-card__btn-detail:hover {
    background-color: #2c3e50;
    color: #ffffff;
}

/* Кнопка "В корзину" */
.product-card__btn-cart {
    background-color: #e7e7e7;
    color: #374151;
}
.product-card__btn-cart:hover {
    background-color: #e67e22;
    color: #ffffff;
}

/* Адаптивность карточки */
@media (max-width: 640px) {
    .product-card {
        padding: 30px 30px;
    }
    
    .product-card__actions {
        flex-direction: flex;
    }
    
    .product-card__btn-detail,
    .product-card__btn-cart {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    

}

/* ============================================ */
/* СТАРЫЕ КЛАССЫ (если остались в разметке)     */
/* ============================================ */
/* Фиксированная высота названия */
.rokan-product-title {
    min-height: 2.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rokan-product-title a {
    display: block;
}

/* Кнопка "Подробно" (старый класс) */
.rokan-btn-detail {
    background-color: #e7e7e7;
    color: #374151;
    font-size: 14px !important;
}
.rokan-btn-detail:hover {
    background-color: #2c3e50;
    color: #ffffff;
}

/* Кнопка "Заказать" (старый класс) */
.rokan-btn-order {
    background-color: #e7e7e7;
    color: #374151;
    font-size: 14px !important;
}
.rokan-btn-order:hover {
    background-color: #e67e22;
    color: #ffffff;
}

/* ============================================ */
/* СВОЙ ЛАЙТБОКС                                */
/* ============================================ */
.rokan-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}
.rokan-lightbox-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}
.rokan-lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@media (min-width: 768px) {
    .rokan-lightbox-content {
        max-width: 80vw;
        max-height: 80vh;
    }
    .rokan-lightbox-img {
        max-width: 80vw;
        max-height: 80vh;
        width: auto;
        height: auto;
        object-fit: contain;
        border-radius: 0.375rem;
    }
}

@media (max-width: 767px) {
    .rokan-lightbox-content {
        width: 90vw;
        height: 85vh;
        max-width: 90vw;
        max-height: 85vh;
    }
    .rokan-lightbox-img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 0.375rem;
    }
}

.rokan-lightbox-img {
    display: block;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.rokan-lightbox-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
}
.rokan-lightbox-prev,
.rokan-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    font-family: serif;
}
.rokan-lightbox-prev {
    left: 8px;
}
.rokan-lightbox-next {
    right: 8px;
}
.rokan-lightbox-close:hover,
.rokan-lightbox-prev:hover,
.rokan-lightbox-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

@media (max-width: 767px) {
    .rokan-lightbox-close {
        width: 30px;
        height: 30px;
        font-size: 16px;
        top: 6px;
        right: 6px;
    }
    .rokan-lightbox-prev,
    .rokan-lightbox-next {
        width: 34px;
        height: 34px;
        font-size: 22px;
    }
    .rokan-lightbox-prev {
        left: 6px;
    }
    .rokan-lightbox-next {
        right: 6px;
    }
}

/* ============================================ */
/* ФИЛЬТРЫ                                      */
/* ============================================ */
#in-stock-filter,
#in-stock-filter-mob {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #e67e22;
    border-radius: 0.375rem;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
}

#in-stock-filter:checked,
#in-stock-filter-mob:checked {
    background-color: #e67e22;
    border-color: #e67e22;
}

#in-stock-filter:checked::after,
#in-stock-filter-mob:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-active {
    color: #e67e22 !important;
    font-weight: 700 !important;
}

.filter-active,
.filter-active:visited,
.filter-active:active {
    color: #e67e22 !important;
    font-weight: 700 !important;
    -webkit-text-fill-color: #e67e22 !important;
}

a[class*="hover:text-"]:hover {
    color: #e67e22 !important;
}

.reset-filters-btn {
    display: inline-block;
    width: auto;
    padding: 5px 10px;
    font-weight: 500;
    border-radius: 0.375rem;
    background-color: #f9fafb;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
    cursor: pointer;
    font-size: 100%;
}
.reset-filters-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
}

#mobile-filters,
#mobile-filters a,
#mobile-filters span {
    font-size: 17px;
}

/* ============================================ */
/* ПАГИНАЦИЯ                                    */
/* ============================================ */
.woocommerce-pagination:not(.yith-infs-nav) {
    display: none !important;
}

/* ============================================ */
/* ЦВЕТОВЫЕ УТИЛИТЫ                             */
/* ============================================ */
.text-orange-500 {
    color: #eaa600 !important;
}

.price, .woocommerce-Price-amount {
}

/* ============================================ */
/* БАЗОВЫЕ ШРИФТЫ                               */
/* ============================================ */
html body {
    font-size: 17px;
    line-height: 1.5;
}

h1, .text-2xl { font-size: 2rem; }
h2, .text-xl { font-size: 1.75rem; }
h3 { font-size: 1.4rem; }

p, li, a { 
    font-size: 1rem;
    line-height: 1.2;
}

.text-sm { font-size: 0.95rem; }
.text-xs { font-size: 0.85rem; }

@media (max-width: 767px) {
    html body { 
        font-size: 16px; 
        line-height: 1.4; 
    }
    h1, .text-2xl { font-size: 1.5rem; }
    h2, .text-xl { font-size: 1.35rem; }
    h3 { font-size: 1.2rem; }
    p, li, a { 
        font-size: 1rem;
        line-height: 1.2;
    }
    .text-sm { font-size: 1rem; }
}

@media (min-width: 1024px) {
    html body { font-size: 18px; }
    h1, .text-2xl { font-size: 2.25rem; }
    h2, .text-xl { font-size: 1.85rem; }
    p, li, a { 
        font-size: 0.95rem !important;
        line-height: 1.2 !important;
    }
    
    .product-card__title {
    margin: 0 0 1rem 0;
    }
}
@media (max-width: 640px) {
    .product-card {
        padding: 30px 30px;
    }
    
    .product-card__price-row {
        margin: 1rem 0 0.8em 0;
    }
    
    .product-card__title {
        margin: 0 0 1rem 0;
    }
    
    .product-card__actions {
        flex-direction: flex;
    }
    
    .product-card__btn-detail,
    .product-card__btn-cart {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .product-card__price {
        font-size: 1.2rem;
    }
    /* Галерея */
.gallery-thumb {
    cursor: pointer;
    flex-shrink: 0;
}

.gallery-thumb.active {
    border-color: #e67e22 !important;
}

/* Скроллбар для миниатюр */
.gallery-thumb-container::-webkit-scrollbar {
    width: 4px;
}
.gallery-thumb-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0.375rem;
}
.gallery-thumb-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 0.375rem;
}

/* Точки на мобильных */
.gallery-dot {
    cursor: pointer;
}
.gallery-dot.active {
    background-color: #e67e22 !important;
    width: 16px !important;
}
@media (max-width: 767px) {
    .product-main-image-wrapper {
        max-height: none !important;
        width: 100% !important;
    }
    .product-main-image-wrapper img {
        max-height: none !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }
}
#main-image-track {
    display: flex;
    touch-action: pan-y;
    align-items: flex-start;
}
#main-image-track img {
    width: 100%;
    flex-shrink: 0;
    object-fit: contain;
    max-height: 70vh;
    user-select: none;
    -webkit-user-drag: none;
}
@media (max-width: 767px) {
    #product-gallery-container {
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
    }
}
/*
|--------------------------------------------------------------------------
| PRODUCT GRID
|--------------------------------------------------------------------------
*/

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1440px) {
    .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
/* ========== ШАПКА ========== */
#masthead {
    background: #fff !important;
    border-bottom: 2px solid #e5e7eb !important;
}

#main-header {
    max-width: 1290px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header-inner-wrap {
    display: flex;
    flex-direction: column;
}

.site-header-upper-wrap {
    border-bottom: 1px solid #f3f4f6;
}

.site-main-header-inner-wrap {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 !important;
    gap: 20px;
}

/* Логотип */
.site-header-main-section-left {
    flex-shrink: 0;
}

.site-branding img {
    display: block;
    width: 150px;
    height: auto;
}

/* Основное меню */
.site-header-main-section-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

#primary-menu {
    display: flex !important;
    gap: 4px;
}

#primary-menu li {
    list-style: none;
}

#primary-menu li a {
    display: block;
    padding: 8px 16px !important;
    font-size: 15px;
    font-weight: 600 !important;
    color: #1f2937 !important;
    text-decoration: none;
    border-radius: 6px;
}

#primary-menu li a:hover {
    color: #2563eb;
    background: #eff6ff;
}

/* Правая часть */
.site-header-main-section-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Корзина */
.header-cart-button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px;
    color: #1f2937;
}

.header-cart-button svg {
    width: 22px;
    height: 22px;
}

.header-cart-total {
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
}

/* Поиск */
.search-toggle-open {
    display: flex;
    align-items: center;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #1f2937;
}

.search-toggle-open svg {
    width: 20px;
    height: 20px;
}

/* ========== НИЖНЕЕ МЕНЮ ========== */
.site-bottom-header-wrap {
    background: #f9fafb;
}

#secondary-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

#secondary-menu li {
    list-style: none;
}

#secondary-menu li a {
    display: block;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

#secondary-menu li a:hover {
    color: #2563eb;
    background: #eff6ff;
}
