/* === SUBCATEGORY NAVIGATION STRIP — compact rikasale.ru pills === */
.subcat-nav-section{background:var(--color-bg);padding:16px 0;border-bottom:1px solid var(--color-border-light)}
.subcat-nav-title{font-size:var(--text-lg);font-weight:700;margin-bottom:12px;color:var(--color-text)}
.subcat-nav-strip{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;-webkit-overflow-scrolling:touch;scrollbar-width:thin;flex-wrap:wrap}
.subcat-nav-strip::-webkit-scrollbar{height:3px}
.subcat-nav-strip::-webkit-scrollbar-thumb{background:var(--color-border);border-radius:4px}
.subcat-nav-item{display:inline-flex;align-items:center;gap:8px;padding:8px 16px;background:#fff;border:1px solid var(--color-border-light);border-radius:24px;text-decoration:none;transition:all 0.2s;white-space:nowrap;flex-shrink:0}
.subcat-nav-item:hover{border-color:var(--color-primary);background:rgba(61,90,53,0.04)}
.subcat-nav-item.active{border-color:var(--color-primary);background:var(--color-primary);color:#fff}
.subcat-nav-icon{width:22px;height:22px;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--color-primary)}
.subcat-nav-item.active .subcat-nav-icon{color:#fff}
.subcat-nav-icon svg{width:18px;height:18px}
.subcat-nav-icon img{width:22px;height:22px;object-fit:contain;border-radius:4px}
.subcat-nav-name{font-size:13px;font-weight:600;color:var(--color-text);line-height:1}
.subcat-nav-item.active .subcat-nav-name{color:#fff}
.subcat-nav-count{font-size:11px;color:var(--color-text-muted);background:var(--color-bg-alt);padding:1px 6px;border-radius:10px;line-height:1.3}
.subcat-nav-item.active .subcat-nav-count{background:rgba(255,255,255,0.25);color:#fff}

@media(max-width:768px){
    .subcat-nav-strip{flex-wrap:nowrap}
    .subcat-nav-item{padding:6px 12px;font-size:12px}
    .subcat-nav-icon{width:18px;height:18px}
    .subcat-nav-icon svg{width:14px;height:14px}
}

/* === CATEGORIES BENTO GRID (rikasale.ru style) === */
.categories-section { background: #121212; padding: 80px 0; overflow: hidden; }
.categories-section .section-title { color: #fff; text-align: center; margin-bottom: 50px; font-size: 28px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; }
.categories-section .section-title::after { content: ''; display: block; width: 60px; height: 3px; background: var(--color-primary); margin: 20px auto 0; border-radius: 2px; }
.cat-bento-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    grid-template-rows: repeat(3, 220px); 
    gap: 0; 
    background-color: #121212;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
}
.cat-bento-card {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    text-decoration: none;
    background: transparent;
    border: none;
    transition: all 0.4s ease;
}
/* Background gradient for text readability */
.cat-bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.05) 55%);
    z-index: 2;
    pointer-events: none;
}
/* Overlay: default clear, hover adds B&W darkening (rikasale.ru style) */
.cat-bento-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.25);
    z-index: 1;
    backdrop-filter: grayscale(0.7) brightness(0.8);
    -webkit-backdrop-filter: grayscale(0.7) brightness(0.8);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.cat-bento-card:hover::after {
    opacity: 1;
}
.cat-bento-card img {
    position: absolute;
    top: 50%;
    right: 0;
    left: auto;
    bottom: auto;
    transform: translateY(-50%) scale(1);
    transform-origin: center right;
    object-fit: contain;
    z-index: 0;
    transition: transform 0.4s ease-in-out;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.4));
}
.cat-bento-card:hover img {
    transform: translateY(-50%) scale(1.1);
}
.cat-bento-card-title {
    position: relative;
    z-index: 3;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* Per-position image sizing (matching rikasale.ru proportions) */
.cat-bento-card:nth-child(1) img { max-width: 45%; max-height: 85%; }  /* Wide top left */
.cat-bento-card:nth-child(2) img { max-width: 65%; max-height: 80%; }  /* Small mid left */
.cat-bento-card:nth-child(3) img { max-width: 65%; max-height: 80%; }  /* Small mid center */
.cat-bento-card:nth-child(4) img { max-width: 60%; max-height: 85%; }  /* Tall center */
.cat-bento-card:nth-child(5) img { max-width: 60%; max-height: 85%; }  /* Tall right */
.cat-bento-card:nth-child(6) img { max-width: 45%; max-height: 85%; }  /* Wide bottom left */
.cat-bento-card:nth-child(7) img { max-width: 55%; max-height: 85%; }  /* Wide bottom right */

/* Grid areas for 7 items */
.cat-bento-card:nth-child(1) { grid-area: 1 / 1 / 2 / 3; } /* Wide top left */
.cat-bento-card:nth-child(2) { grid-area: 2 / 1 / 3 / 2; } /* Small mid left */
.cat-bento-card:nth-child(3) { grid-area: 2 / 2 / 3 / 3; } /* Small mid center */
.cat-bento-card:nth-child(4) { grid-area: 1 / 3 / 3 / 4; } /* Tall center */
.cat-bento-card:nth-child(5) { grid-area: 1 / 4 / 3 / 5; } /* Tall right */
.cat-bento-card:nth-child(6) { grid-area: 3 / 1 / 4 / 3; } /* Wide bottom left */
.cat-bento-card:nth-child(7) { grid-area: 3 / 3 / 4 / 5; } /* Wide bottom right */

/* ===  BENTO MOBILE === */
@media (max-width: 1024px) {
    .categories-bento {
        display: block !important;
        overflow: visible !important;
        margin: 0 !important;
    }
    .cat-bento-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: none !important;
        grid-auto-rows: 180px !important;
        gap: 8px !important;
        background-image: none !important;
        margin: 0 !important;
    }
    .cat-bento-card,
    .cat-bento-card:nth-child(1),
    .cat-bento-card:nth-child(2),
    .cat-bento-card:nth-child(3),
    .cat-bento-card:nth-child(4),
    .cat-bento-card:nth-child(5),
    .cat-bento-card:nth-child(6),
    .cat-bento-card:nth-child(7) {
        grid-area: auto !important;
        grid-column: span 1 !important;
        grid-row: span 1 !important;
        min-height: 180px !important;
        border: none !important;
        border-radius: 12px !important;
        background: linear-gradient(135deg, #1a2a14, #2E4528, #3D5A35) !important;
    }
    .cat-bento-card img {
        max-width: 50% !important;
        max-height: 70% !important;
        top: 50% !important;
        right: 0 !important;
        transform: translateY(-50%) !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }
    .cat-bento-card-title {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        min-height: 52px !important; /* Fixed height — fits 2 lines, 1-line text vertically centered */
        display: flex !important;
        align-items: center !important;
        padding: 8px 14px !important;
        background: rgba(0,0,0,0.6) !important;
        font-size: 14px !important;
        line-height: 1.3 !important;
        text-shadow: none !important;
        max-width: 100% !important;
        border-radius: 0 0 12px 12px !important;
        z-index: 10 !important;
    }
    .cat-bento-fallback-icon {
        display: flex !important;
        opacity: 0.3 !important;
        width: 45% !important;
        height: 45% !important;
        top: 30% !important;
    }
}
@media (max-width: 480px) {
    .cat-bento-grid {
        grid-auto-rows: 160px !important;
        gap: 6px !important;
    }
    .cat-bento-card,
    .cat-bento-card:nth-child(n) {
        min-height: 160px !important;
        border-radius: 10px !important;
    }
    .cat-bento-card-title {
        font-size: 13px !important;
        padding: 6px 12px !important;
        border-radius: 0 0 10px 10px !important;
        min-height: 46px !important;
    }
    .cat-bento-card img {
        max-width: 45% !important;
        max-height: 65% !important;
        top: 50% !important;
        right: 0 !important;
        transform: translateY(-50%) !important;
    }
}

/* === PRODUCT CARD (rikasale.ru style) === */
.product-card-wrapper{height:100%}
.product-card{background:#fff;border-radius:var(--radius-md);transition:box-shadow var(--transition-base),border-color var(--transition-base);border:1px solid var(--color-border-light);position:relative;display:flex;flex-direction:column;z-index:1;height:100%;transform:translate3d(0,0,0);-webkit-backface-visibility:hidden;backface-visibility:hidden;will-change:box-shadow}
.product-card:hover{box-shadow:0 8px 30px rgba(0,0,0,0.1);border-color:var(--color-border);z-index:10;border-bottom-left-radius:0;border-bottom-right-radius:0}
.product-card-badges{position:absolute;top:var(--space-sm);left:var(--space-sm);z-index:10;display:flex;gap:4px;flex-wrap:wrap}
.product-card-wishlist{position:absolute;top:var(--space-sm);right:var(--space-sm);z-index:10;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,0.9);border-radius:var(--radius-full);cursor:pointer;transition:all 0.2s;color:var(--color-text-muted)}
.product-card-wishlist:hover{color:var(--color-red);background:#fff;box-shadow:0 2px 8px rgba(0,0,0,0.1)}
.product-card-wishlist.active{color:var(--color-red)}
.product-card-wishlist.active svg{fill:var(--color-red)}
.product-card-wishlist svg{width:18px;height:18px}
.product-card-image{position:relative;padding-top:100%;background:#fff;overflow:hidden;border-radius:var(--radius-md) var(--radius-md) 0 0}
.product-card-image img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;padding:var(--space-md);transition:opacity 0.25s ease,transform var(--transition-base)}
.product-card:hover .product-card-image img.active-hover{transform:scale(1.05)}

/* Hover Gallery */
.product-card-image img.gallery-img{opacity:0;z-index:1;transition:opacity 0.2s ease}
.product-card-image img.gallery-img:first-child{opacity:1;z-index:1}
.product-card-image img.gallery-img.active-hover{opacity:1;z-index:3;background:#fff}
.product-card-image .hover-zones{position:absolute;inset:0;z-index:5;display:flex}
.product-card-image .hover-zone{flex:1;cursor:pointer;position:relative}
.product-card-image .hover-zone::after{content:'';position:absolute;bottom:0;left:1px;right:1px;height:3px;background:var(--color-border);border-radius:2px;opacity:1;transition:opacity 0.2s ease}
.product-card-image .hover-zone.active::after{background:var(--color-primary)}
.product-card-image .hover-zone:first-child::after{left:4px}
.product-card-image .hover-zone:last-child::after{right:4px}
/* Legacy dots hidden */
.product-card-dots{display:none}

/* Brand logo in card */
.product-card-brand{position:absolute;bottom:8px;right:8px;z-index:4;max-width:120px;max-height:60px;opacity:0.7;transition:opacity 0.2s}
.product-card:hover .product-card-brand{opacity:1}
.product-card-brand img{max-width:100%;max-height:100%;object-fit:contain;position:static;padding:0;inset:auto;width:auto;height:auto}

/* Hover button */
.product-card-hover-btn{position:absolute;bottom:0;left:0;right:0;padding:var(--space-sm) var(--space-md);background:linear-gradient(transparent,rgba(0,0,0,0.5));z-index:7;opacity:0;transform:translateY(8px);transition:all var(--transition-base);display:flex;justify-content:center}
.product-card:hover .product-card-hover-btn{opacity:1;transform:translateY(0)}
.product-card-hover-btn .btn{font-size:var(--text-xs);padding:6px 16px;background:rgba(255,255,255,0.95);color:var(--color-text);border-radius:var(--radius-sm)}
.product-card-hover-btn .btn:hover{background:#fff;color:var(--color-primary)}

/* Card info */
.product-card-info{padding:var(--space-sm) var(--space-md);display:flex;flex-direction:column;gap:2px;flex:1;border-top:1px solid var(--color-border-light)}
.product-card-meta{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:var(--color-text-muted)}
.product-card-sku{font-size:11px;color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:60%}
.product-card-stock{font-size:11px;display:flex;align-items:center;gap:3px}
.product-card-stock .dot{width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-green)}
.product-card-stock span{color:var(--color-green);font-weight:500}
.product-card-stock.out-of-stock .dot{background:var(--color-red)}
.product-card-stock.out-of-stock span{color:var(--color-red)}
.product-card-name{font-size:var(--text-sm);font-weight:600;color:var(--color-text);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.8em;transition:color var(--transition-fast);margin-top:4px}
.product-card-name:hover{color:var(--color-primary)}

/* Price section */
.product-card-price{padding:var(--space-sm) var(--space-md) var(--space-md);flex-shrink:0}
.product-card-discount{display:inline-block;font-size:12px;font-weight:600;color:var(--color-accent);margin-bottom:4px}
.product-card-price .current{font-size:var(--text-lg);font-weight:700;color:var(--color-black)}
.product-card-price .old{font-size:var(--text-sm);color:var(--color-text-muted);text-decoration:line-through;margin-left:var(--space-sm)}

/* Actions on hover */
.product-card-actions{position:absolute;top:calc(100% - 1px);left:-1px;right:-1px;background:#fff;padding:0 var(--space-md) var(--space-md);display:flex;flex-direction:column;gap:var(--space-xs);border:1px solid var(--color-border);border-top:none;border-radius:0 0 var(--radius-md) var(--radius-md);box-shadow:0 16px 30px rgba(0,0,0,0.15);z-index:20;opacity:0;visibility:hidden;pointer-events:none;transition:opacity 0.15s ease, visibility 0.15s ease}
.product-card:hover .product-card-actions{opacity:1;visibility:visible;pointer-events:auto}
.product-card-actions .btn-cart{width:100%;padding:10px;font-size:var(--text-sm);background:var(--color-primary);color:#fff;border-radius:var(--radius-sm);font-weight:600;display:flex;align-items:center;justify-content:center;gap:var(--space-sm);transition:background 0.2s}
.product-card-actions .btn-cart:hover{background:var(--color-primary-hover)}
.product-card-actions .btn-cart svg{width:18px;height:18px}
.product-card-actions .btn-consult{width:100%;padding:8px;font-size:var(--text-xs);background:transparent;color:var(--color-text-light);border:1px solid var(--color-border);border-radius:var(--radius-sm);text-align:center;transition:all 0.2s}
.product-card-actions .btn-consult:hover{border-color:var(--color-primary);color:var(--color-primary)}

/* Mobile fixes for product cards */
@media (max-width: 1024px) {
    .product-card-actions {
        position: static;
        display: flex;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        padding: 0 var(--space-md) var(--space-md) var(--space-md);
        margin: 0;
        z-index: 1;
    }
    .product-card {
        height: auto;
    }
    .product-card:hover {
        box-shadow: none;
        border-color: var(--color-border-light);
        z-index: 1;
        border-radius: var(--radius-md);
    }
}

/* === PRODUCT SLIDER === */
.products-slider-section{padding:var(--space-3xl) 0}
.products-slider-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--space-xl)}
.products-slider-header h2{font-size:var(--text-3xl);margin-bottom:0}
.products-slider-header h2::after{display:none}
.products-slider-nav{display:flex;gap:var(--space-sm)}
.products-slider-nav button{width:40px;height:40px;border-radius:var(--radius-full);border:2px solid var(--color-border);color:var(--color-text);display:flex;align-items:center;justify-content:center;transition:all var(--transition-fast);background:#fff}
.products-slider-nav button:hover{border-color:var(--color-primary);color:var(--color-primary)}
.products-slider-nav button svg{width:18px;height:18px}
.products-slider .swiper-slide{height:auto}

/* === CATALOG PAGE === */
.catalog-page{padding:var(--space-xl) 0 var(--space-3xl)}
.catalog-layout{display:grid;grid-template-columns:var(--sidebar-width) 1fr;gap:var(--space-xl)}
.catalog-sidebar{position:sticky;top:90px;align-self:start;max-height:calc(100vh - 100px);overflow-y:auto;scrollbar-width:thin}
.catalog-products{min-width:0}

/* Catalog Header */
.catalog-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--space-lg);flex-wrap:wrap;gap:var(--space-md)}
.catalog-header h1{font-size:var(--text-2xl);margin:0}
.catalog-sort{display:flex;align-items:center;gap:var(--space-sm)}
.catalog-sort select{padding:8px 32px 8px 12px;border:1px solid var(--color-border);border-radius:var(--radius-sm);font-size:var(--text-sm);color:var(--color-text);appearance:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23666'/%3E%3C/svg%3E") right 10px center no-repeat;cursor:pointer}
.catalog-count{font-size:var(--text-sm);color:var(--color-text-muted)}

/* Products Grid */
.products-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:var(--space-lg)}

/* Pagination */
.pagination{display:flex;justify-content:center;gap:var(--space-xs);margin-top:var(--space-2xl)}
.pagination a,.pagination span{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:var(--radius-sm);font-size:var(--text-sm);font-weight:500;color:var(--color-text);transition:all var(--transition-fast);border:1px solid var(--color-border)}
.pagination a:hover{border-color:var(--color-primary);color:var(--color-primary)}
.pagination .current{background:var(--color-primary);color:#fff;border-color:var(--color-primary)}

/* --- Sliders --- */
.products-slider{position:relative}
.products-slider .swiper-slide{height:auto}
.products-slider .swiper-wrapper{align-items:stretch}

@media (min-width: 1025px) {
    .products-slider{padding-bottom:140px;margin-bottom:-140px;pointer-events:none;z-index:10}
    .products-slider .swiper-wrapper,
    .products-slider .swiper-button-prev,
    .products-slider .swiper-button-next,
    .products-slider .swiper-pagination {pointer-events:auto}
}

.swiper-button-prev,.swiper-button-next{width:40px;height:40px;background:#fff;border-radius:var(--radius-full);color:var(--color-text);box-shadow:var(--shadow-md);transition:all var(--transition-base)}
.swiper-button-prev:hover,.swiper-button-next:hover{background:var(--color-primary);color:#fff}
.swiper-button-prev::after,.swiper-button-next::after{font-size:18px}
.swiper-pagination-bullet{background:var(--color-border);opacity:1}
.swiper-pagination-bullet-active{background:var(--color-primary)}

/* === SIDEBAR FILTERS === */
.filter-widget{background:#fff;border-radius:var(--radius-lg);padding:var(--space-lg);margin-bottom:var(--space-lg);box-shadow:var(--shadow-card)}
.filter-widget-title{font-size:var(--text-md);font-weight:700;margin-bottom:var(--space-md);padding-bottom:var(--space-sm);border-bottom:2px solid var(--color-primary);color:var(--color-black)}
.filter-widget-title button{float:right;font-size:var(--text-xs);color:var(--color-text-muted);text-decoration:underline;cursor:pointer}
.filter-widget-title button:hover{color:var(--color-primary)}

/* Category Tree Accordion (rikasale.ru style) */
.filter-cat-tree{display:flex;flex-direction:column}
.filter-cat-back{display:flex;align-items:center;padding:10px 0;font-size:var(--text-sm);color:var(--color-primary);text-decoration:none;font-weight:600;border-bottom:1px solid var(--color-border-light);margin-bottom:2px;transition:opacity 0.2s}
.filter-cat-back:hover{opacity:0.7}
.filter-cat-parent{border-bottom:1px solid var(--color-border-light)}
.filter-cat-parent:last-child{border-bottom:none}
.filter-cat-parent-row{display:flex;align-items:center;justify-content:space-between;padding:10px 0}
.filter-cat-link{font-size:var(--text-sm);color:var(--color-text);text-decoration:none;font-weight:500;flex:1;transition:color 0.2s}
.filter-cat-link:hover{color:var(--color-primary)}
.filter-cat-link.current{color:var(--color-primary);font-weight:700}
.filter-cat-parent.active .filter-cat-link{font-weight:700}
.filter-cat-toggle{width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;color:var(--color-text-muted);border-radius:var(--radius-sm);transition:all 0.2s;flex-shrink:0}
.filter-cat-toggle:hover{background:var(--color-bg-alt);color:var(--color-primary)}
.filter-cat-toggle svg{width:16px;height:16px;transition:transform 0.3s ease}
.filter-cat-toggle.open svg{transform:rotate(90deg)}
.filter-cat-children{max-height:0;overflow:hidden;transition:max-height 0.3s ease,padding 0.3s ease;padding-left:16px}
.filter-cat-children.visible{max-height:500px;padding-bottom:8px}
.filter-cat-child{display:flex;align-items:center;gap:8px;padding:6px 0;font-size:13px;color:var(--color-text-light);text-decoration:none;transition:color 0.2s}
.filter-cat-child:hover{color:var(--color-primary)}
.filter-cat-child.current{color:var(--color-primary);font-weight:600}
.filter-cat-child.current .filter-cat-dot{background:var(--color-primary)}
.filter-cat-dot{width:6px;height:6px;border-radius:50%;background:var(--color-border);flex-shrink:0;transition:background 0.2s}
.filter-cat-child:hover .filter-cat-dot{background:var(--color-primary)}
.filter-cat-count{margin-left:auto;font-size:12px;color:var(--color-text-muted);font-weight:400}
.filter-cat-link .filter-cat-count{margin-left:6px}
/* Price Range Slider */
.price-filter .noUi-target{margin:var(--space-xl) var(--space-sm) var(--space-md);height:4px}
.price-filter .noUi-connect{background:var(--color-primary)}
.price-filter .noUi-handle{width:20px;height:20px;border-radius:var(--radius-full);background:#fff;border:3px solid var(--color-primary);box-shadow:var(--shadow-sm);cursor:pointer;top:-8px;right:-10px}
.price-filter .noUi-handle::before,.price-filter .noUi-handle::after{display:none}
.price-inputs{display:flex;align-items:center;gap:var(--space-sm)}
.price-inputs input{width:100%;padding:8px 10px;border:1px solid var(--color-border);border-radius:var(--radius-sm);text-align:center;font-size:var(--text-sm)}
.price-inputs span{color:var(--color-text-muted);flex-shrink:0}

/* Brand Checkboxes */
.filter-checkboxes{max-height:250px;overflow-y:auto}
.filter-checkbox{display:flex;align-items:center;gap:var(--space-sm);padding:6px 0;cursor:pointer;font-size:var(--text-sm);color:var(--color-text)}
.filter-checkbox input[type="checkbox"]{width:18px;height:18px;accent-color:var(--color-primary);cursor:pointer;flex-shrink:0}
.filter-checkbox span{flex:1}
.filter-checkbox .count{color:var(--color-text-muted);font-size:var(--text-xs)}
.filter-actions{margin-top:var(--space-md);display:flex;gap:var(--space-sm)}
.filter-actions .btn{flex:1}

/* === BRANDS CAROUSEL (rikasale.ru style) === */
.brands-section{background:var(--color-bg-alt);padding:var(--space-3xl) 0}
.brands-carousel-layout{display:grid;grid-template-columns:250px 1fr;gap:0;border-radius:var(--radius-lg);overflow:hidden;border:1px solid var(--color-border-light)}
.brands-hero-cell{background:linear-gradient(135deg,#1a2a14 0%,#3D5A35 50%,#2E4528 100%);display:flex;align-items:center;justify-content:center;min-height:200px;position:relative}
.brands-hero-cell::before{content:'';position:absolute;inset:0;background:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="45" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>') center/contain no-repeat;opacity:0.5}
.brands-hero-title{color:#fff;font-size:var(--text-3xl);font-weight:800;text-transform:uppercase;letter-spacing:2px;position:relative;z-index:1}
.brands-carousel-wrapper{position:relative;background:#fff;overflow:hidden}
.brands-slider{width:100%;overflow:hidden}
.brands-slider .swiper-wrapper{display:flex;align-items:stretch}
.brands-slider .swiper-slide{height:auto;flex-shrink:0}
.brand-slide-card{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--space-xl) var(--space-lg);min-height:200px;text-decoration:none;border-left:1px solid var(--color-border-light);transition:all 0.3s ease;box-sizing:border-box}
.brand-slide-card:hover{background:var(--color-bg-alt)}
.brand-slide-logo{display:flex;align-items:center;justify-content:center;height:80px;margin-bottom:var(--space-md)}
.brand-slide-logo img{max-height:60px;max-width:160px;object-fit:contain;transition:transform 0.3s ease}
.brand-slide-card:hover .brand-slide-logo img{transform:scale(1.1)}
.brand-slide-name{font-size:var(--text-2xl);font-weight:800;color:var(--color-black);text-transform:uppercase;letter-spacing:1px}
.brand-slide-desc{font-size:var(--text-xs);color:var(--color-text-light);line-height:1.5;text-align:center;max-width:200px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.brands-slider-nav{position:absolute;top:50%;right:var(--space-md);transform:translateY(-50%);display:flex;flex-direction:column;gap:var(--space-xs);z-index:10}
.brands-slider-nav button{width:36px;height:36px;border-radius:var(--radius-full);border:1px solid var(--color-border);background:#fff;color:var(--color-text);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.2s}
.brands-slider-nav button:hover{border-color:var(--color-primary);color:var(--color-primary)}
.brands-slider-nav button svg{width:16px;height:16px}

@media(max-width:1200px){.categories-bento{grid-template-columns:repeat(3,1fr)}.cat-bento-large{grid-column:span 2}.products-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:1024px){
    .catalog-layout{grid-template-columns:1fr}
    /* Mobile: sidebar becomes slide-out panel */
    .catalog-sidebar{position:fixed;top:0;left:-100%;width:85%;max-width:360px;height:100vh;background:#fff;z-index:9990;overflow-y:auto;padding:20px;box-shadow:2px 0 20px rgba(0,0,0,0.15);transition:left 0.3s ease}
    .catalog-sidebar.mobile-open{left:0}
    .mobile-filter-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.4);z-index:9989;display:none}
    .mobile-filter-overlay.active{display:block}
    .categories-bento{grid-template-columns:repeat(2,1fr)}.cat-bento-large{grid-column:span 2}.cat-bento-medium{grid-row:span 1}.brands-carousel-layout{grid-template-columns:1fr}.brands-hero-cell{min-height:80px}
}
@media(max-width:768px){
    .categories-bento{grid-template-columns:1fr;grid-auto-rows:140px}
    .cat-bento-large,.cat-bento-medium{grid-column:span 1;grid-row:span 1}
    /* Force 2 columns - prevent any overflow */
    .products-grid{grid-template-columns:repeat(2,1fr) !important;gap:var(--space-sm) !important}
    .catalog-page,.catalog-products,.products-grid{max-width:100%;box-sizing:border-box}
    .catalog-page{overflow-x:hidden}
    .product-card-wrapper{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
    .product-card{max-width:100%;min-width:0;box-sizing:border-box}
    .product-card-image{padding-top:85%;max-width:100%}
    .product-card-image img{padding:var(--space-sm)}
    .product-card-name{font-size:12px;min-height:2.4em;word-break:break-word;overflow-wrap:break-word}
    .product-card-info{padding:var(--space-xs) var(--space-sm);min-width:0}
    .product-card-price{padding:var(--space-xs) var(--space-sm) var(--space-sm)}
    .product-card-price .current{font-size:14px}
    .product-card-actions{padding:0 var(--space-sm) var(--space-sm) var(--space-sm) !important;gap:4px !important}
    .product-card-actions .btn-cart{padding:8px;font-size:12px}
    .product-card-actions .btn-consult{padding:6px;font-size:11px}
    .product-card-meta{font-size:10px}
    .product-card-sku{max-width:50%}
    .product-card-brand{max-width:50px;max-height:25px}
    .catalog-header h1{font-size:var(--text-lg)}
    .catalog-header{flex-direction:column;align-items:flex-start;gap:var(--space-sm)}
    .container{padding:0 12px}
}
@media(max-width:480px){
    .products-grid{gap:6px !important}
    .product-card-image{padding-top:80%}
    .container{padding:0 8px}
}
/* Grid view toggle: 1-column mode */
.products-grid.grid-single{grid-template-columns:1fr !important;gap:var(--space-md) !important}
.products-grid.grid-single .product-card-image{padding-top:70%}
.products-grid.grid-single .product-card-name{font-size:14px;min-height:auto;-webkit-line-clamp:3}
.products-grid.grid-single .product-card-price .current{font-size:var(--text-lg)}
.products-grid.grid-single .product-card-actions .btn-cart{padding:12px;font-size:14px}
.products-grid.grid-single .product-card-actions .btn-consult{padding:8px;font-size:13px}
/* Grid toggle buttons */
.grid-toggle{display:none;gap:4px;margin-left:auto}
@media(max-width:768px){.grid-toggle{display:flex}}
.grid-toggle button{width:32px;height:32px;border:1px solid var(--color-border);border-radius:var(--radius-sm);background:#fff;color:var(--color-text-muted);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.2s}
.grid-toggle button.active{border-color:var(--color-primary);color:var(--color-primary);background:rgba(61,90,53,0.06)}

/* Mobile filter toggle button — hidden on desktop */
.mobile-filter-toggle{display:none;align-items:center;gap:8px;padding:10px 20px;background:#fff;border:1px solid var(--color-border);border-radius:var(--radius-md);font-size:14px;font-weight:600;cursor:pointer;color:var(--color-text);transition:all 0.2s;font-family:inherit;margin-bottom:var(--space-md)}
.mobile-filter-toggle:hover{border-color:var(--color-primary);color:var(--color-primary)}
@media(max-width:1024px){.mobile-filter-toggle{display:inline-flex}}

/* Filter reset button */
.filter-reset-btn{display:inline-flex;align-items:center;gap:6px;width:100%;justify-content:center;color:var(--color-red,#dc3545);border-color:var(--color-red,#dc3545)}
.filter-reset-btn:hover{background:var(--color-red,#dc3545);color:#fff}

/* Mobile: show gallery bars, hide hover-btn only */
@media(hover:none){
  .product-card-hover-btn{display:none!important}
  .product-card-dots{display:none!important}
  .product-card-image img.gallery-img{display:none}
  .product-card-image img.gallery-img.active-hover{display:block;opacity:1}
  /* Bars container — sits at bottom of image, intercepts taps */
  .product-card-image .hover-zones{
    display:flex!important;
    position:absolute;
    bottom:0;left:0;right:0;
    top:auto!important;
    height:auto!important;
    z-index:6;
    padding:0 6px 6px;
    gap:3px;
    align-items:flex-end;
    background:linear-gradient(transparent 0%, rgba(0,0,0,0.3) 100%);
    pointer-events:auto;
  }
  /* Each bar: visual 4px tall, but TAP TARGET is 36px (via padding-top) */
  .product-card-image .hover-zone{
    flex:1;
    height:4px;
    padding-top:32px; /* large invisible tap area above the bar */
    position:relative;
    border-radius:3px;
    background:rgba(255,255,255,0.4);
    transition:background 0.2s, transform 0.2s;
    cursor:pointer;
    pointer-events:auto;
    -webkit-tap-highlight-color:transparent;
    background-clip:content-box; /* gradient only on the bar, not the padding */
    box-sizing:content-box;
  }
  /* Override: bar visual via pseudo-element for clean look */
  .product-card-image .hover-zone{
    background:transparent;
    padding-top:32px;
  }
  .product-card-image .hover-zone::before{
    content:'';
    position:absolute;
    bottom:0;left:0;right:0;
    height:4px;
    border-radius:3px;
    background:rgba(255,255,255,0.4);
    transition:background 0.2s, height 0.2s;
  }
  .product-card-image .hover-zone::after{display:none!important}
  .product-card-image .hover-zone.active::before{
    background:#fff;
    height:5px;
  }
}

/* === WooCommerce Subcategory Cards (archive pages) === */
.woocommerce ul.products li.product-category a img,
.woocommerce ul.products li.product-category img {
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto 12px;
    display: block;
}
.woocommerce ul.products li.product-category a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    transition: all 0.3s;
    background: #fff;
}
.woocommerce ul.products li.product-category a:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.woocommerce ul.products li.product-category h2,
.woocommerce ul.products li.product-category .woocommerce-loop-category__title {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin: 0;
}
/* Constrain placeholder/fallback SVGs */
.woocommerce ul.products li.product-category svg,
.woocommerce ul.products li.product-category .wp-post-image[src*="placeholder"],
.woocommerce ul.products li.product-category .woocommerce-placeholder {
    max-width: 80px !important;
    max-height: 80px !important;
    width: 80px !important;
    height: 80px !important;
    opacity: 0.3;
}

/* === Cart Page Mobile Overflow Fix === */
@media(max-width:768px) {
    .woocommerce-cart .woocommerce table.cart td,
    .woocommerce-cart .woocommerce table.cart th {
        padding: 8px 6px;
    }
    .woocommerce-cart .product-name {
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: break-word;
    }
    .woocommerce-cart .product-name a {
        font-size: 13px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .woocommerce table.cart {
        table-layout: fixed;
        width: 100%;
    }
    .woocommerce table.cart td.product-thumbnail {
        width: 60px;
    }
    .woocommerce table.cart td.product-thumbnail img {
        width: 50px;
        height: 50px;
        object-fit: contain;
    }
}

/* ============ BUTIK FISH — always-visible add-to-cart on cards ============ */
.product-card-actions{
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    box-shadow: none !important;
    border: none !important;
    border-top: 1px solid var(--color-border-light) !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 12px 14px 14px !important;
    margin-top: auto !important;
    z-index: 1 !important;
}
.product-card-actions .btn-cart{ background: var(--color-accent) !important; }
.product-card-actions .btn-cart:hover{ background: var(--color-accent-hover) !important; }
/* keep the hover gallery button hidden, it's separate */

/* ===== BUTIK FISH v4.8 — tidy product cards (no empty gaps) ===== */
.product-card-info{ flex:0 0 auto !important; gap:4px !important; padding-bottom:0 !important; }
.product-card-name{ min-height:2.6em !important; margin-top:6px !important; }
.product-card-price{ padding-top:8px !important; padding-bottom:10px !important; }
.product-card-price .current{ font-size:20px; font-weight:800; color:var(--color-black); }
.product-card-price .old{ color:var(--color-text-muted); text-decoration:line-through; margin-left:8px; font-size:14px; }
.product-card-discount{ display:inline-block; font-size:12px; font-weight:700; color:var(--color-accent); margin-bottom:2px; }
/* push action button to the bottom so price sits right under the name */
.product-card-actions{ margin-top:auto !important; padding-top:12px !important; }

/* ===== BUTIK FISH v4.9 — fix mobile-filter close on desktop ===== */
.mobile-filter-close{ display:none !important; }
@media(max-width:1024px){
  .mobile-filter-close{ display:inline-flex !important; align-items:center; gap:6px; width:100%; justify-content:center;
    margin-bottom:16px; padding:10px; border:1px solid var(--color-border); border-radius:8px; background:#fff;
    font-weight:600; cursor:pointer; color:var(--color-text); }
}

/* ===== v4.9 — premium product card (price no-wrap, graphite accents) ===== */
.product-card{ transition:box-shadow .25s, border-color .25s, transform .25s !important; }
.product-card:hover{ transform:translateY(-3px); border-color:var(--color-accent) !important; box-shadow:0 14px 32px rgba(22,143,209,.14) !important; }
.product-card-name{ font-weight:600; color:var(--color-black); }
.product-card-name:hover{ color:var(--color-accent); }
/* Price block: discount on its own line, numbers never break */
.product-card-price{ display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 10px; }
.product-card-discount{ display:block; flex:0 0 100%; font-size:12px; font-weight:700; color:var(--color-accent); margin-bottom:0; }
.product-card-price .current{ font-size:21px; font-weight:800; color:var(--color-primary); white-space:nowrap; }
.product-card-price .old{ font-size:14px; color:var(--color-text-muted); text-decoration:line-through; white-space:nowrap; }
/* In-stock dot */
.product-card-stock .dot{ background:var(--color-green); }
/* Make "Получить консультацию" a light secondary, "В корзину" the hero accent */
.product-card-actions .btn-cart{ background:var(--color-accent) !important; box-shadow:0 4px 12px rgba(22,143,209,.25); }
.product-card-actions .btn-cart:hover{ background:var(--color-accent-hover) !important; }
.product-card-actions .btn-consult{ border:none !important; color:var(--color-text-light) !important; background:transparent !important; font-size:12px !important; padding:6px !important; text-decoration:underline; text-underline-offset:2px; }
.product-card-actions .btn-consult:hover{ color:var(--color-accent) !important; }
/* Badges: compact, tidy */
.product-card-badges{ gap:4px; max-width:75%; }
.product-card-badges .badge{ font-size:10px; padding:4px 8px; letter-spacing:.3px; }

/* ============================================================
   BUTIK FISH v5.0 — PREMIUM GRAPHITE PRODUCT CARD (catalog)
   Light photo on top, graphite body with white text below.
   ============================================================ */
.product-card{
  background:#222a2c !important;            /* graphite body fills all gaps */
  border:1px solid #d9dee0 !important;
  border-radius:16px !important;
  overflow:hidden !important;
  transition:transform .28s ease, box-shadow .28s ease, border-color .28s ease !important;
}
.product-card:hover{
  transform:translateY(-5px);
  border-color:var(--color-accent) !important;
  box-shadow:0 20px 46px rgba(0,0,0,.26) !important;
}
/* Image frame — light, photo fills it */
.product-card-image{ background:#eef1f2 !important; }
.product-card-image img,
.product-card-image img.gallery-img{ object-fit:cover !important; padding:0 !important; background:transparent !important; }
.product-card:hover .product-card-image img.active-hover{ transform:scale(1.06); }

/* Graphite body — transparent blocks over the graphite card bg */
.product-card-info{ background:transparent !important; border-top:1px solid rgba(255,255,255,.07) !important; color:#fff !important; padding:14px 16px 4px !important; }
.product-card-meta, .product-card-sku{ color:rgba(255,255,255,.45) !important; }
.product-card-stock{ color:rgba(255,255,255,.6) !important; }
.product-card-stock .dot{ background:#3ad07a !important; box-shadow:0 0 6px rgba(58,208,122,.6); }
.product-card-stock.out-of-stock{ color:rgba(255,255,255,.4) !important; }
.product-card-name{ color:#fff !important; font-weight:600 !important; }
.product-card-name:hover{ color:var(--color-accent-light) !important; }

.product-card-price{ background:transparent !important; padding:2px 16px 12px !important; }
.product-card-price .current{ color:#fff !important; font-size:22px !important; font-weight:800 !important; white-space:nowrap; }
.product-card-price .old{ color:rgba(255,255,255,.4) !important; white-space:nowrap; }
.product-card-discount{ color:var(--color-accent-light) !important; display:block; flex:0 0 100%; }

.product-card-actions{ background:transparent !important; border:none !important; box-shadow:none !important; padding:0 16px 16px !important; margin-top:auto !important; }
.product-card-actions .btn-cart{ background:var(--color-accent) !important; color:#fff !important; box-shadow:0 6px 16px rgba(22,143,209,.35) !important; font-weight:700 !important; }
.product-card-actions .btn-cart:hover{ background:var(--color-accent-hover) !important; }
.product-card-actions .btn-consult{ background:transparent !important; border:none !important; color:rgba(255,255,255,.5) !important; font-size:12px !important; text-decoration:underline; text-underline-offset:2px; padding:6px !important; }
.product-card-actions .btn-consult:hover{ color:var(--color-accent-light) !important; }

/* Wishlist heart sits on the light photo */
.product-card-wishlist{ background:rgba(255,255,255,.92) !important; border-radius:50%; }
