.scrollbar-hide::-webkit-scrollbar{display:none}
.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}
.gallery-track{scroll-snap-type:x mandatory;scrollbar-width:none}
.gallery-track::-webkit-scrollbar{display:none}
.gallery-track>*{scroll-snap-align:center}
.no-delivery-line{position:absolute;left:-3px;right:-3px;top:50%;margin-top:-1.5px;height:3px;background:#dc2626;border-radius:2px}
.dot.on{width:20px;background:#fff}
#sb-search:focus{outline:none}
.sb-suggest{position:absolute;z-index:50;margin-top:6px;background:#fff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 10px 25px rgba(0,0,0,.12);overflow:hidden;display:none}
.sb-suggest.open{display:block}
.sb-suggest a{display:flex;align-items:center;gap:10px;padding:10px 14px;font-size:14px;color:#111827}
.sb-suggest a:hover{background:#f3f4f6}
.sb-suggest .s-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sb-suggest .s-price{color:#6b7280;font-size:12px;font-weight:600;white-space:nowrap}
.fav-btn svg{transition:all .2s}
.fav-btn.active svg{fill:#ef4444;stroke:#ef4444;transform:scale(1.15)}
/* Sidebar sticky without scrollbar */
.sidebar-sticky-wrapper {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.sidebar-sticky-wrapper::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    background: transparent !important;
}
@media (min-width: 1024px) {
    .sidebar-sticky-wrapper {
        top: 80px;
        max-height: calc(100vh - 80px);
    }
}
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    scroll-padding-top: 80px;
}
body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
}
#mobile-sticky-controls {
    position: -webkit-sticky;
    position: sticky;
    top: 80px;
    z-index: 40;
    background-color: white;
    transform: translateZ(0);
    will-change: transform;
}
@media (max-width: 1023px) {
    #mobile-sticky-controls {
        top: 64px !important;
        padding-top: 12px !important;
        padding-bottom: 1px !important;
        margin-bottom: 8px !important;
    }
}
@media (min-width: 1024px) {
    #mobile-sticky-controls {
        position: static;
        top: auto;
        z-index: auto;
        background-color: transparent;
        transform: none;
        will-change: auto;
    }
}
#products-grid {
    will-change: contents;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.p-card {
    content-visibility: auto;
    contain-intrinsic-size: 0 450px;
    contain: layout style paint;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.p-card:hover {
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}
@media (max-width: 768px) {
    .p-card {
        box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
        transition: none !important;
        border-radius: 8px !important;
    }
    .p-card:hover {
        transform: none !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
    }
}
.gallery-track {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: scroll-position;
}
.p-card img {
    content-visibility: auto;
    contain-intrinsic-size: 300px 400px;
}
#filters-drawer {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
#filters-drawer .overflow-y-auto {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
#products-loader {
    transform: translateZ(0);
    will-change: opacity;
}
.p-card .cart-add-btn {
    visibility: hidden !important;
}
body.cart-js-ready .p-card .cart-add-btn {
    visibility: visible !important;
}
#active-filters-container {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#active-filters-container::-webkit-scrollbar {
    display: none;
}
@media (max-width: 768px) {
    .bottom-nav,
    .mobile-bottom-nav,
    nav[class*="bottom"],
    .fixed.bottom-0,
    [class*="bottom-nav"] {
        z-index: 900 !important;
        bottom: 0 !important;
    }
}
/* Mobile compact version */
@media (max-width: 768px) {
    main.max-w-\[1600px\] {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
    #products-grid {
        gap: 4px !important;
    }
    .p-card {
        padding: 0 !important;
        border-radius: 8px !important;
        overflow: hidden;
    }
    .p-card .gallery img,
    .p-card img.w-full {
        aspect-ratio: 1 / 1.2 !important;
        object-fit: cover !important;
        width: 100% !important;
        height: auto !important;
    }
    .p-card > div.flex.flex-col.gap-1 {
        gap: 4px !important;
        padding: 6px !important;
    }
    .p-card .text-sm.md\:text-\[17px\] {
        font-size: 16px !important;
        line-height: 1.2 !important;
    }
    .p-card h3 {
        font-size: 14px !important;
        line-height: 1.4 !important;
        margin: 0 !important;
    }
    .p-card .flex.items-center.gap-1\.5,
    .p-card .mt-0\.5 {
        margin-top: 3px !important;
    }
    .p-card .text-\[11px\] {
        font-size: 12px !important;
    }
    .p-card .cart-add-btn {
        padding: 9px 4px !important;
        font-size: 13px !important;
        margin-top: 5px !important;
        border-radius: 4px !important;
    }
    .p-card .inline-flex.shrink-0.ml-auto svg {
        width: 15px !important;
        height: 15px !important;
    }
    .p-card .bg-gray-100 {
        padding: 3px 7px !important;
        font-size: 11px !important;
        margin-top: 2px !important;
    }
}
/* Hide mobile controls on scroll */
@media (max-width: 768px) {
    #mobile-sticky-controls {
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
        transform: translateY(0);
        opacity: 1;
        position: sticky;
        top: 64px;
        z-index: 39;
    }
    #mobile-sticky-controls.hidden-scroll {
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
    }
}
/* Store description */
.store-desc-wrapper {
    position: relative;
}
.store-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
    cursor: pointer;
}
.store-desc.expanded {
    -webkit-line-clamp: unset;
    display: block;
}
.store-desc-hint {
    display: inline-block;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent, #f97316);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s;
}
.store-desc-hint:hover {
    color: var(--accent-dark, #ea580c);
    text-decoration: underline;
}
.store-desc-hint.hidden-hint {
    display: none;
}
/* Filter sections */
.filter-section {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
    margin-bottom: 12px;
}
.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.filter-content {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}
.filter-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}
.filter-icon {
    transition: transform 0.3s ease;
    color: var(--accent, #f97316);
}
.filter-icon.rotated {
    transform: rotate(-90deg);
}
/* Custom checkbox with plus */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    cursor: pointer;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: white;
    transition: all 0.2s ease;
}
input[type="checkbox"]:checked {
    background: var(--accent, #f97316);
    border-color: var(--accent, #f97316);
}
input[type="checkbox"]:checked::after {
    content: '+';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -55%);
    color: white;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}
input[type="checkbox"]:focus {
    outline: 2px solid var(--accent, #f97316);
    outline-offset: 2px;
}
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}
input[type="range"]:focus {
    outline: none;
}
input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
}
/* 🔥 ШТАНГА С ДЫРКОЙ ВНУТРИ (эффект бублика) */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: var(--accent, #f97316);
    border-radius: 50%;
    cursor: pointer;
    margin-top: -8px;
    border: 2px solid white;
    box-shadow:
        inset 0 0 0 5px white,
        0 2px 6px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow:
        inset 0 0 0 5px white,
        0 3px 10px rgba(0, 0, 0, 0.3);
}
input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(0.95);
}
input[type="range"]::-moz-range-track {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
}
input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: var(--accent, #f97316);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow:
        inset 0 0 0 5px white,
        0 2px 6px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow:
        inset 0 0 0 5px white,
        0 3px 10px rgba(0, 0, 0, 0.3);
}
@keyframes tagSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
#sidebar-filters > div:first-child {
    animation: tagSlideIn 0.3s ease-out;
}
.filter-section a {
    position: relative;
    overflow: hidden;
    color: #4b5563;
    transition: color 0.2s;
}
.filter-section a:hover {
    color: var(--accent, #f97316);
}
.js-filters-reset {
    position: relative;
    overflow: hidden;
}
.js-filters-reset::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent, #ef4444), var(--accent-dark, #dc2626));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}
.js-filters-reset:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}
/* Banner carousel */
.banner-carousel {
    position: relative;
}
.banner-carousel:hover .banner-prev,
.banner-carousel:hover .banner-next {
    opacity: 1 !important;
}
.banner-slides {
    display: flex;
    will-change: transform;
}
.banner-slide {
    flex-shrink: 0;
    width: 100%;
}
.banner-dot {
    transition: all 0.3s ease;
}
.banner-dot:hover {
    background: white !important;
}
@media (max-width: 768px) {
    .banner-carousel {
        height: 12rem !important;
    }
    .banner-prev,
    .banner-next {
        opacity: 0.7 !important;
    }
}
@media (max-width: 640px) {
    .banner-carousel {
        height: 10rem !important;
    }
}
/* Filter inputs */
.js-price-from,
.js-price-to,
.js-filter-city {
    background-color: #f9fafb !important;
    border-color: #e5e7eb !important;
    color: #111827 !important;
}
.js-price-from:focus,
.js-price-to:focus,
.js-filter-city:focus {
    background-color: white !important;
    border-color: var(--accent, #f97316) !important;
}
.sb-suggest {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
}
.sb-suggest.open {
    display: block;
}
.sb-suggest a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    color: #111827;
    transition: background 0.15s;
}
.sb-suggest a:last-child {
    border-bottom: none;
}
.sb-suggest a:hover {
    background: #f9fafb;
}
/* Стили для маленькой картинки товара */
.sb-suggest .s-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: #f3f4f6;
    flex-shrink: 0;
}
/* Контейнер для текста */
.sb-suggest .s-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sb-suggest .s-title {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sb-suggest .s-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent, #f97316);
}
/* Убираем скроллбар для красоты на мобильных */
.sb-suggest::-webkit-scrollbar {
    width: 4px;
}
.sb-suggest::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}
