:root {
            --primary: #333;
            --bg-page: #ffffff;
            --bg-card: #ffffff;
            --border-soft: #e5e5e5;
            --text-main: #111111;
//            --text-muted: #888888;
            --text-muted: #333333;
//            --text-soft: #b3b3b3;
            --text-soft: #2e2e2e;
        }

        /* ===== Базовый фон ===== */
        body {
            background: var(--bg-page);
            margin: 0;
            padding: 0;
           font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        font-family:Inter;
        }

        /* ===== GRID ===== */
        .products-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
            gap: 20px;
            padding: 20px 0 40px;
        }

        /* ===== Карточка ===== */
        .product-wrapper {
            position: relative;
            background: var(--bg-card);
            border-radius: 5px;
            border: 1px solid var(--border-soft);
            box-shadow: 0 12px 32px rgba(0,0,0,0.04);
            padding: 18px 18px 16px;
            transition: box-shadow .25s ease, transform .25s ease, border-color .2s ease;
            overflow: visible;
            z-index: 1;
        }

        .product-wrapper:hover {
            box-shadow: 0 18px 45px rgba(0,0,0,0.09);
            transform: translateY(-3px);
            border-color: #d5d5d5;
        }

        .product-wrapper.panel-active {
            z-index: 200;
        }

        /* Фото */
        .product-photo {
            width: 100%;
            height: 160px;
           // background-color: #fafafa;
            background-size: contain;
            background-position: center;
            background-repeat: no-repeat;
            border-radius: 14px;
            margin-bottom: 14px;
        }

        /* Тех. строки */
        .product-header-row {
            display: flex;
            justify-content: space-between;
			align-items: center;
			font-size: 10px;
			letter-spacing: .06em;
			color: var(--text-soft);
			margin-bottom: 4px;
        }
//.product-header-row {
//    display: flex;
//    justify-content: space-between;
//    align-items: center; /* уже есть центрирование по вертикали */
//    height: 100%; /* занять всю высоту родителя */
//    font-size: 10px;
//    letter-spacing: .06em;
//    color: var(--text-soft);
//    margin-bottom: 4px;
//}
        .product-brand-row {
            display: flex;
            justify-content: space-between;
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 4px;
        }

        .product-type-row {
            display: flex;
            justify-content: space-between;
            font-size: 13px;
            font-style: italic;
            color: var(--text-muted);
            margin-bottom: 4px;
        }

        .product-meta-row {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 12px;
        }

        /* Цена */
        .product-price-row {
            display: flex;
            flex-direction: column;
            gap: 4px;
            margin-bottom: 14px;
			justify-content: space-between;			
        }

        .product-price-main {
            font-size: 13px;
            font-weight: 700;
            color: var(--text-main);
            display: flex;
            align-items: center;
        }

        .price-type-label {
            //display: inline-flex;
            //align-items: center;
            //justify-content: center;
            display: flex;
            justify-content: space-between;
			font-size: 8px;
            text-transform: uppercase;
            letter-spacing: .06em;
            color: #3d3d3d;
            margin-left: 8px;
            margin-bottom: 8px;
        }

        .product-price-extra {
            font-size: 12px;
            color: var(--text-muted);
        }

        .product-old-price {
            font-size: 12px;
            color: var(--text-muted);
            text-decoration: line-through;
            display: flex;
            align-items: center; 
        }

        /* Остаток */
        .product-stock {
            display: flex;
            justify-content: space-between;
            font-size: 12px;
            color: var(--text-muted);
            margin-bottom: 14px;
        }

        /* Низ карточки */
        .product-footer {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        /* Кнопка в карточке */
        .product-main-btn {
            width: 100%;
            padding: 11px 14px;
            font-size: 14px;
            font-weight: 600;
            background: #fbfbfb;
            color: #111111;
            border-radius: 5px;
            border: 1px solid #d0d0d0;
            cursor: pointer;
            transition: background .2s ease, transform .15s ease, box-shadow .15s ease, border-color .15s ease;
        }

        .product-main-btn:hover:not(:disabled) {
            background: #e3e3e3;
            border-color: #c0c0c0;
            box-shadow: 0 4px 14px rgba(0,0,0,0.08);
            transform: translateY(-1px);
        }

        .product-main-btn:disabled {
            background: #eaeaea;
            color: #b5b5b5;
            border-color: #e0e0e0;
            cursor: not-allowed;
        }

        /* Быстрые действия */
        .product-actions-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 11px;
            color: var(--text-muted);
            margin-top: 6px;
        }

        .product-actions-right {
            display: flex;
            gap: 6px;
        }

        .action-icon-btn {
            width: 28px;
            height: 28px;
            border-radius: 999px;
            border: 1px solid #dedede;
            background: #ffffff;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 14px;
            transition: background .15s ease, border-color .15s ease;
        }
        .action-icon-btn:hover {
            background: #f5f5f5;
            border-color: #cccccc;
        }

        /* Бейджи */
        .product-badges {
            position: absolute;
            top: 36px;
            right:	 18px;
            display: flex;
            flex-direction: column;
			align-items: flex-end;
//			border: 5px solid #fff;
			gap: 4px;
            z-index: 5;
        }
        .badge {
            padding: 3px 8px;
            border-radius: 999px;
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: .06em;
            font-weight: 600;
            color: #ffffff;
			border: 2px solid #fff;
            }
        .badge.sale {font-size:7px; background: #b3261e; }
        .badge.new  {font-size:7px;  background: #1c7c54; }
        .badge.hit  {font-size:7px;  background: #c58c1d; }

        /* "Подробнее" */
        .details-slide {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid #f1f1f1;
            font-size: 12px;
            color: var(--text-muted);
            text-align: right;
            cursor: pointer;
            transition: color .15s ease;
        }
        .details-slide:hover {
            color: var(--primary);
        }

        /* ===== Безразмерный товар: - + ===== */
        .direct-qty-row {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .direct-qty-controls {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .direct-qty-input {
            width: 44px;
            height: 32px;
            border-radius: 8px;
            border: 1px solid #d0d0d0;
            text-align: center;
            font-size: 13px;
        }

        .qty-step-btn {
            width: 28px;
            height: 28px;
            border-radius: 7px;
            border: 1px solid #d0d0d0;
            background: #ffffff;
            cursor: pointer;
            font-size: 14px;
            color: var(--text-main);
        }
        .qty-step-btn:disabled {
            opacity: .4;
            cursor: default;
        }

        /* ===== Popup размеров (sizes-panel) ===== */
        .sizes-panel {
            position: absolute;
            top: 18px;
            left: 100%;
            height: 70%;
            margin-left: 16px;
            width: 300px;
            border-radius: 12px;
            border: 1px solid #ededed;
            background: #fafafa;
            padding: 10px 10px 8px;
            box-shadow: 0 16px 40px rgba(0,0,0,0.16);
            z-index: 999;
            opacity: 0;
            pointer-events: none;
            transform: translateX(8px);
            transition: opacity .2s ease, transform .2s ease;
			display: flex;
			flex-direction: column;
			justify-content: space-between;           
		}

        .sizes-panel.right {
            left: 100%;
            margin-left: 16px;
            right: auto;
            margin-right: 0;
            transform: translateX(8px);
        }
        .sizes-panel.left {
            left: auto;
            right: 100%;
            margin-right: 16px;
            margin-left: 0;
            transform: translateX(-8px);
        }

        .sizes-panel.open.right {
            opacity: 1;
            pointer-events: auto;
            transform: translateX(0);
        }
        .sizes-panel.open.left {
            opacity: 1;
            pointer-events: auto;
            transform: translateX(0);
        }

        .sizes-panel-rows {
            max-height: 100%;
        //    max-height: 220px;
            overflow-y: auto;
            margin-bottom: 6px;
        }

        .sizes-panel-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 0;
            border-bottom: 1px solid #ececec;
            font-size: 12px;
        }
        .sizes-panel-row:last-child {
            border-bottom: none;
        }

        .sizes-panel-left {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .sizes-panel-size {
            font-weight: 500;
            color: var(--text-main);
        }
        .sizes-panel-stock {
            font-size: 11px;
            color: var(--text-muted);
        }

        .sizes-panel-controls {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .sizes-panel-input {
            width: 40px;
            height: 26px;
            border-radius: 7px;
            border: 1px solid #d0d0d0;
            text-align: center;
            font-size: 13px;
        }

        .sizes-panel-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 12px;
            gap: 8px;
        }

        .sizes-panel-total {
            color: var(--text-muted);
        }

        .sizes-panel-add-btn {
            padding: 7px 10px;
            border-radius: 8px;
            border: none;
            background: var(--primary);
            color: #ffffff;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
        }
        .sizes-panel-add-btn:disabled {
            background: #c9c9c9;
            cursor: not-allowed;
        }

        /* ===== СТИЛЬНЫЕ ФИЛЬТРЫ ===== */
        .filters-container {
            background: #ffffff;
            border-radius: 10px;
            padding: 10px;
        //    margin: 10px 0;
            box-shadow: 0 4px 24px rgba(0,0,0,0.06);
            border: 1px solid rgba(0,0,0,0.04);
        }

        .filters-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        //    margin-bottom: 20px;
            padding-bottom: 16px;
            border-bottom: 1px solid rgba(0,0,0,0.08);
        }

        .filters-title {
            font-size: 18px;
            font-weight: 600;
            color: #111;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .filters-title::before {
           // content: "⚙️";
           // font-size: 16px;
        }

        .filters-actions {
            display: flex;
            gap: 12px;
        }

        /* Сетка фильтров */
        .filters-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
            gap: 20px;
            margin-bottom: 20px;
        }

        /* Стилизованные селекты */
        .filter-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }



//.filters-container2 {
//    background: #ffffff;
//    border-radius: px;
//    padding: 24px;
//    margin: 20px 0;
//    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
//    border: 1px solid rgba(0,0,0,0.04);
//    /* Добавляем чтобы не вылазило за границы */
//    overflow: hidden;
//}



.filters-grid {
    display: grid;
    /* Используем auto-fill вместо auto-fit и увеличиваем минимальную ширину */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
//    margin-bottom: 20px;
    /* Убираем возможные проблемы с переносами */
    grid-auto-flow: dense;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* Гарантируем, что элементы внутри не будут вылазить */
    min-width: 0;
}

/* Особые стили для диапазонов (цена, вес) */
.filter-range-group {
    display: flex;
    gap: 8px; /* Уменьшаем gap для мобильных */
    align-items: center;
    flex-wrap: nowrap;
}






.range-input {
    flex: 1;
    min-width: 100; /* Важно для правильного сжатия */

//  flex: 1 1 100px;   /* базовая ширина 220, дальше может растягиваться */
//  min-width: 100px;
  width: auto;

    padding: 10px 12px;
    border: 1.5px solid #e1e5e9;
    border-radius: 5px;
    background: #ffffff;
    font-size: 12px;
    color: #333;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
 color: #000000;
 transition: all 0.2s ease;
}
// style="min-width:100px;"

.range-separator {
    color: #999;
    font-weight: 500;
    flex-shrink: 0; /* Чтобы не сжимался */
    white-space: nowrap;
}



        .filter-label {
            font-size: 12px;
            font-weight: 600;
            color: #555;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 4px;
        }

        .filter-select {
            padding: 10px 12px;
            border: 1.5px solid #e1e5e9;
            border-radius: 5px;
            background: #ffffff;
            font-size: 14px;
            color: #333;
            transition: all 0.2s ease;
            cursor: pointer;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
            background-size: 16px;
        }

        .filter-select:hover {
            border-color: #c8ccd0;
        }

        .filter-select:focus {
            outline: none;
            border-color: #111;
            box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.1);
        }

        /* Диапазоны цен и веса */
        .filter-range-group {
            display: flex;
            gap: 12px;
            align-items: center;
        }



        .range-input:focus {
            outline: none;
            border-color: #111;
            box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.1);
        }

        .range-separator {
            color: #999;
            font-weight: 500;
        }







        /* Чипы фильтров */
        .filters-chips-container {
            margin: 20px 0;
        }

        .filters-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .filter-chip {
            padding: 8px 12px;
            border-radius: 5px;
            border: 1.5px solid #e1e5e9;
            background: #ffffff;
            font-size: 12px;
            font-weight: 500;
            color: #666;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .filter-chip:hover {
            border-color: #c8ccd0;
            transform: translateY(-1px);
        }

        .filter-chip.active {
            background: #111;
            border-color: #111;
            color: #ffffff;
        }

        .filter-chip.active::before {
            content: "✓";
            font-size: 12px;
        }



        /* Переключатели вида просмотра */
        .view-switch button {
            padding: 6px 12px;
            border-radius: 5px;
            border: 1px solid #dedede;
            background: #ffffff;
            font-size: 12px;
            cursor: pointer;
        }
        .view-switch button.active {
            background: var(--primary);
            color: #ffffff;
        }



        /* Кнопки */
        .btn-primary {
            padding: 10px 20px;
            border-radius: 5px;
            border: none;
            background: #111;
            color: #ffffff;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .btn-primary:hover {
            background: #333;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .btn-secondary {
            padding: 10px 20px;
            border-radius: 5px;
            border: 1.5px solid #e1e5e9;
            background: #ffffff;
            color: #666;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-secondary:hover {
            border-color: #c8ccd0;
            color: #333;
        }

        /* Заглушка для фильтра по размерам */
        .sizes-filter-placeholder {
            grid-column: 1 / -1;
            padding: 20px;
            background: #f8f9fa;
            border-radius: 5px;
            border: 1.5px dashed #e1e5e9;
            text-align: center;
        }

        .sizes-placeholder-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            color: #666;
        }

        .sizes-placeholder-icon {
            font-size: 24px;
            margin-bottom: 4px;
        }

        .sizes-placeholder-text {
            font-size: 14px;
            margin-bottom: 4px;
        }

        .sizes-placeholder-hint {
            font-size: 12px;
            color: #999;
        }

        /* ===== ПРЕМИАЛЬНЫЙ SIDEBAR ===== */
        .details-sidebar {
            position: fixed;
            top: 0;
            right: -880px;
            width: 880px;
            max-width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
            box-shadow: -20px 0 60px rgba(0,0,0,0.25);
            z-index: 1000;
            display: flex;
            flex-direction: column;
            transition: right .3s cubic-bezier(0.4, 0, 0.2, 1);
            border-left: 1px solid rgba(0,0,0,0.05);
        }

        .details-sidebar.active {
            right: 0;
        }

        .sidebar-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 12px 16px;
            border-bottom: 1px solid rgba(0,0,0,0.08);
            background: #ffffff;
            backdrop-filter: blur(10px);
            min-height: 52px;
        }

        #sidebarProductName {
            flex: 1;
            min-width: 0;
            font-size: 15px;
            font-weight: 600;
            color: #1a1a1a;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            line-height: 1.3;
        }

        .sidebar-header button {
            border: 1px solid #e8e4dc;
            background: none;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: .08em;
            cursor: pointer;
            color: #888;
            transition: color .15s, border-color .15s;
            padding: 5px 10px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            margin-left: 0;
            height: auto;
            width: auto;
        }

        .sidebar-header button:hover {
            border-color: #1a1a1a;
            color: #1a1a1a;
            background: none;
        }

        .sidebar-title {
            font-size: 14px;
            font-weight: 600;
            color: #111;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            flex: 1;
        }

        .esc-hint span {
            border-radius: 6px;
            border: 1px solid #e0e0e0;
            padding: 4px 8px;
            font-size: 11px;
            color: #888;
            background: #f8f8f8;
        }





        /* Фото контейнер */
        .sidebar-photo-container {
            padding: 20px 24px;
            position: relative;
            background: linear-gradient(to bottom, #f8f8f8, #ffffff);
        }

        .photo-main {
            width: 100%;
            height: 350px;
            background-size: contain;
            background-position: center;
            background-repeat: no-repeat;
            border-radius: 16px;
            background-color: #f8f8f8;
            cursor: pointer;
            box-shadow: 0 8px 32px rgba(0,0,0,0.08);
            border: 1px solid rgba(0,0,0,0.04);
            transition: transform .3s ease, box-shadow .3s ease;
        }

        .photo-main:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 40px rgba(0,0,0,0.12);
        }
		
		
		
		
		
		

        .zoom-icon {
            position: absolute;
            bottom: 36px;
            right: 32px;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(0,0,0,0.8);
            color: #ffffff;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all .3s ease;
            backdrop-filter: blur(10px);
        }

        .zoom-icon:hover {
            background: rgba(0,0,0,0.9);
            transform: scale(1.1);
        }

        /* Миниатюры */

        .thumb-container {
            width: 80px;
            height: 80px;
            border-radius: 12px;
            background-size: cover;
            background-position: center;
            border: 2px solid transparent;
            cursor: pointer;
            transition: all .3s ease;
            flex-shrink: 0;
            box-shadow: 0 4px 16px rgba(0,0,0,0.08);
        }


.thumbs {
    display: flex;            /* Выстраивает дочерние элементы в ряд */
    flex-direction: row;      /* Явно указываем направление (горизонтально) */
    flex-wrap: nowrap;        /* Запрещаем перенос на вторую строку */
    gap: 12px;
    padding: 10px 24px 20px;
    
    //overflow-x: auto;         /* Включаем горизонтальную прокрутку */
    -webkit-overflow-scrolling: touch; /* Плавный скролл для iOS */
    
    /* Скрываем стандартный некрасивый скроллбар (опционально) */
    scrollbar-width: none;    /* Для Firefox */
}


        .thumb-container.active {
            border-color: #111;
            transform: scale(1.05);
        }

        .thumb-container:hover {
            transform: scale(1.05);
        }

        /* Контент сайдбара */
        .sidebar-body {
            flex-grow: 1;
            padding: 0 24px 20px;
            overflow-y: auto;
            font-size: 14px;
        }

        /* Секции */
        .sidebar-section {
            background: #ffffff;
            border-radius: 16px;
            padding: 20px;
            margin-bottom: 16px;
            box-shadow: 0 4px 24px rgba(0,0,0,0.06);
            border: 1px solid rgba(0,0,0,0.04);
        }

        .sidebar-section-title {
            font-size: 16px;
            font-weight: 700;
            color: #111;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .sidebar-section-title::before {
            content: "";
            width: 4px;
            height: 16px;
            background: linear-gradient(135deg, #111, #444);
            border-radius: 2px;
        }

        /* Корзина в сайдбаре */
        .sidebar-cart-summary {
            background: linear-gradient(135deg, #111 0%, #333 100%);
            color: #ffffff;
            border-radius: 16px;
            padding: 20px;
            margin-bottom: 16px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.2);
        }

        .sidebar-cart-summary .sidebar-section-title {
            color: #ffffff;
            margin-bottom: 12px;
        }

        .sidebar-cart-summary .sidebar-section-title::before {
            background: linear-gradient(135deg, #ffd700, #ffed4e);
        }

        .cart-summary-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
            text-align: center;
        }

        .cart-summary-item {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .cart-summary-value {
            font-size: 18px;
            font-weight: 700;
            color: #ffd700;
        }

        .cart-summary-label {
            font-size: 12px;
            color: rgba(255,255,255,0.8);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* Блок размеров в сайдбаре */
        .sidebar-sizes-block {
            margin-top: 12px;
            padding: 16px;
            border-radius: 12px;
            border: 1px solid #ececec;
            background: #fafafa;
        }

        .sidebar-sizes-header {
            font-weight: 600;
            margin-bottom: 8px;
            font-size: 15px;
        }

        .sidebar-sizes-total {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 12px;
        }

        .sidebar-sizes-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }

        .sidebar-sizes-table td {
            padding: 6px 4px;
            border-bottom: 1px solid #f0f0f0;
        }

        .sidebar-sizes-table tr:last-child td {
            border-bottom: none;
        }

        .sidebar-size-controls {
            display: flex;
            align-items: center;
            gap: 6px;
            justify-content: flex-end;
        }

        .sidebar-size-btn {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            border: 1px solid #d0d0d0;
            background: #ffffff;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .sidebar-size-btn:hover:not(:disabled) {
            background: #f5f5f5;
            border-color: #c0c0c0;
        }

        .sidebar-size-btn:disabled {
            opacity: .4;
            cursor: not-allowed;
        }

        .sidebar-size-input {
            width: 50px;
            height: 28px;
            border-radius: 6px;
            border: 1px solid #d0d0d0;
            text-align: center;
            font-size: 13px;
        }

        /* Простой счетчик в сайдбаре */
        .sidebar-simple-qty {
            margin-top: 12px;
            padding: 16px;
            border-radius: 12px;
            border: 1px solid #ececec;
            background: #fafafa;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .sidebar-simple-qty-label {
            font-size: 14px;
            font-weight: 500;
        }

        .sidebar-simple-qty-controls {
            display: flex;
            align-items: center;
        }

        /* Таблетка: кнопки и инпут в одном контейнере */
        .sidebar-simple-qty-controls {
            display: inline-flex;
            align-items: center;
            border: 1.5px solid #e0ddd8;
            border-radius: 100px;
            background: #fff;
            overflow: hidden;
            height: 38px;
            gap: 0;
        }

        .sidebar-simple-input {
            width: 48px;
            height: 38px;
            border: none;
            border-left: 1.5px solid #e0ddd8;
            border-right: 1.5px solid #e0ddd8;
            border-radius: 0;
            text-align: center;
            font-size: 15px;
            font-weight: 500;
            color: #1a1a1a;
            background: #fff;
            outline: none;
            padding: 0;
            -moz-appearance: textfield;
        }
        .sidebar-simple-input::-webkit-outer-spin-button,
        .sidebar-simple-input::-webkit-inner-spin-button { -webkit-appearance: none; }

        .sidebar-simple-btn {
            width: 38px;
            height: 38px;
            border-radius: 0;
            border: none;
            background: transparent;
            cursor: pointer;
            font-size: 18px;
            color: #555;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background .15s, color .15s;
            line-height: 1;
            padding: 0;
            flex-shrink: 0;
        }

        .sidebar-simple-btn:hover:not(:disabled) {
            background: #f4f4f2;
            color: #1a1a1a;
        }

        .sidebar-simple-btn:disabled {
            opacity: .4;
            cursor: not-allowed;
        }

        /* Комплекты */
        .complect-items {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 12px;
        }

        .complect-item {
            text-align: center;
            cursor: pointer;
            transition: all .3s ease;
        }

        .complect-item:hover {
            transform: translateY(-2px);
        }

        .complect-image {
            width: 80px;
            height: 80px;
            background-size: contain;
            background-position: center;
            background-repeat: no-repeat;
            border-radius: 12px;
            margin: 0 auto 8px;
            box-shadow: 0 4px 16px rgba(0,0,0,0.1);
            border: 1px solid rgba(0,0,0,0.05);
        }

        .complect-name {
            font-size: 12px;
            color: #666;
            margin-bottom: 4px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .complect-price {
            font-size: 13px;
            font-weight: 600;
            color: #111;
        }

        /* Похожие товары */
        .similar-items {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 16px;
        }

        .similar-item {
            background: #f8f8f8;
            border-radius: 12px;
            padding: 12px;
            cursor: pointer;
            transition: all .3s ease;
            border: 1px solid rgba(0,0,0,0.05);
        }

        .similar-item:hover {
            background: #ffffff;
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        }

        .similar-image {
            width: 100%;
            height: 100px;
            background-size: contain;
            background-position: center;
            background-repeat: no-repeat;
            border-radius: 8px;
            margin-bottom: 8px;
            background-color: #ffffff;
        }

        .similar-name {
            font-size: 12px;
            color: #111;
            margin-bottom: 6px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            font-weight: 500;
        }

        .similar-price {
            font-size: 14px;
            font-weight: 700;
            color: #111;
        }

        /* Кнопки действий */
        .sidebar-actions {
            padding: 20px 24px;
            border-top: 1px solid rgba(0,0,0,0.08);
            background: #ffffff;
            display: flex;
            gap: 12px;
        }

        .btn-cart, .btn-fav {
            flex: 1;
            border-radius: 12px;
            padding: 14px 16px;
            font-size: 14px;
            font-weight: 600;
            border: none;
            cursor: pointer;
            transition: all .3s ease;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .btn-cart {
            background: linear-gradient(135deg, #111 0%, #333 100%);
            color: #ffffff;
            box-shadow: 0 4px 16px rgba(0,0,0,0.2);
        }

        .btn-cart:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0,0,0,0.3);
        }

        .btn-cart:disabled {
            background: #cccccc;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        .btn-fav {
            background: #ffffff;
            color: #111;
            border: 2px solid #e0e0e0;
        }

        .btn-fav:hover {
            border-color: #111;
            transform: translateY(-2px);
        }

        /* Остальные элементы */
        .details-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.45);
            opacity: 0;
            visibility: hidden;
            transition: all .2s ease;
            z-index: 900;
        }
        .details-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .photo-modal {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.82);
            opacity: 0;
            visibility: hidden;
            transition: all .2s ease;
            z-index: 1200;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .photo-modal.active {
            opacity: 1;
            visibility: visible;
        }
        .photo-modal-content {
            max-width: 80vw;
            max-height: 80vh;
        }
        .photo-modal-img {
            max-width: 100%;
            max-height: 100%;
        }
        .photo-modal-close {
            position: absolute;
            top: 18px;
            right: 24px;
            border: none;
            background: none;
            color: #ffffff;
            font-size: 24px;
            cursor: pointer;
        }
        .photo-modal-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            border: none;
            background: rgba(0,0,0,0.35);
            color: #ffffff;
            font-size: 28px;
            width: 40px;
            height: 68px;
            cursor: pointer;
        }
        .photo-modal-prev { left: 24px; }
        .photo-modal-next { right: 24px; }
        .photo-modal-counter {
            position: absolute;
            bottom: 18px;
            right: 24px;
            color: #ffffff;
            font-size: 13px;
        }

        .quick-cart {
            position: fixed;
            bottom: 82px; /* 60px футер + 22px отступ */
            right: 22px;
            background: #464646;
            color: #ffffff;
            padding: 30px;
            border-radius: 10px;
            font-size: 17px;
            opacity: 0;
            transform: translateY(8px);
            pointer-events: none;
            transition: all .2s ease;
            z-index: 1400;
        }
        .quick-cart.show {
            opacity: 1;
            transform: translateY(0);
        }

        .scroll-to-top {
            position: fixed;
            bottom: 70px;
            right: 40px;
            width: 55px;
            height: 55px;
            border-radius: 999px;
            border: 1px solid #ffffff;
            background: #bebebe;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            opacity: 0;

            color: #ffffff;
            
            visibility: hidden;
            transition: all .2s ease;
            z-index: 800;
        }
        .scroll-to-top:hover {
            background: #606060;
        }
        .scroll-to-top.show {
            opacity: 1;
            visibility: visible;
        }

        .cart-counter {
            display: none;
            min-width: 18px;
            height: 18px;
            border-radius: 999px;
            background: #b3261e;
            color: #ffffff;
            font-size: 11px;
            align-items: center;
            justify-content: center;
        }

        .products-table {
            width: 100%;
            border-collapse: collapse;
            display: none;
            margin-top: 14px;
            background: #ffffff;
            border-radius: 12px;
            overflow: hidden;
        }
        .products-table th,
        .products-table td {
            border: 1px solid #f0f0f0;
            padding: 6px 8px;
            font-size: 12px;
        }
        .table-image {
            width: 56px;
            height: 56px;
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
        }

        .bulk-actions {
            display: none;
            align-items: center;
            gap: 10px;
            padding: 10px 0;
            font-size: 12px;
        }
        .bulk-actions.show {
            display: flex;
        }
        .bulk-info {
            color: var(--text-muted);
        }

        #loader {
            text-align: center;
            padding: 16px 0 40px;
            font-size: 13px;
            color: var(--text-muted);
        }

        .catalog-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0px 0 4px;
        }


.product-card {
    cursor: pointer; /* Добавляет "руку" при наведении */
    /* ваши остальные стили... */
}

/* Также хорошим тоном будет добавить эффект легкого приподнятия */
.product-card:hover {
}

        /* Мобильная версия */
        @media (max-width: 768px) {
            .details-sidebar {
                width: 100%;
                height: 90vh;
                top: auto;
                bottom: -100vh;
                border-radius: 24px 24px 0 0;
                right: 0;
                left: 0;
            }
            .product-card{ height: auto; min-height: unset; }
            .details-sidebar.active {
                bottom: 0; /* прижат к самому низу */
            }

            .sidebar-header {
                padding: 16px 20px;
            }

            .sidebar-photo-container {
                padding: 16px 20px;
            }

            .photo-main {
                height: 200px;
            }

            .zoom-icon {
                bottom: 26px;
                right: 26px;
                width: 36px;
                height: 36px;
            }


            .sidebar-body {
                padding: 0 20px 16px;
            }

            .sidebar-section {
                padding: 16px;
                margin-bottom: 12px;
            }

            .cart-summary-grid {
                grid-template-columns: 1fr;
                gap: 12px;
            }

            .complect-items,
            .similar-items {
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
            }

            .sidebar-actions {
                padding: 16px 20px;
            }

            .filters-container3 {
            //    padding: 16px;
            //    margin: 16px 0;
            //    border-radius: 10px;
            }

            .filters-header {
            //    flex-direction: column;
            //    gap: 12px;
            //    align-items: stretch;
            }

            .filters-grid {
            //    grid-template-columns: 1fr;
            //    gap: 16px;
            }

            .filter-range-group {
            //    flex-direction: column;
            //    gap: 8px;
            }


            
            .range-separator {
                display: none;
            }

            .filters-actions {
                justify-content: stretch;
            }

            .filters-actions button {
                flex: 1;
                justify-content: center;
            }

            .filters-chips {
                flex-wrap: nowrap;          /* одна строка */
                overflow-x: auto;           /* горизонтальный скролл */
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;      /* скрыть полосу прокрутки */
                padding-bottom: 4px;
                gap: 6px;
            }
            .filters-chips::-webkit-scrollbar {
                display: none;
            }
            .filter-chip {
                flex-shrink: 0;             /* чипсы не сжимаются */
                white-space: nowrap;
                padding: 8px 14px;
                font-size: 13px;
            }

            .products-grid {
                grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
                gap: 16px;
                padding-inline: 10px;
            }

            .sizes-panel {
                position: fixed;
                left: 0;
                right: 0;
                bottom: 60px; /* под нижним меню */
                top: auto;
                margin: 0;
                width: 100%;
                max-width: 100%;
                border-radius: 16px 16px 0 0;
                max-height: 60vh;
                box-shadow: 0 -16px 40px rgba(0,0,0,0.2);
                transform: translateY(100%);
            }
            .sizes-panel.open {
                transform: translateY(0);
                opacity: 1;
                pointer-events: auto;
            }
            .sizes-panel.left,
            .sizes-panel.right {
                left: 0;
                right: 0;
                margin: 0;
            }
        }

        @media (max-width: 480px) {

            /* Грид: 2 колонки, симметричные отступы */
            .products-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
                padding-inline: 8px;
                align-items: start; /* карточки не растягиваются по высоте строки */
            }

            /* Карточка: flex-column только на мобилке */
            .product-wrapper {
                padding: 8px 8px 10px;
                display: flex;
                flex-direction: column;
            }

            /* Footer прижат к низу */
            .product-footer {
                margin-top: auto;
            }

            /* Фото: ниже, чтобы больше места тексту */
            .product-photo {
                height: 130px;
                margin-bottom: 8px;
                border-radius: 8px;
            }

            /* Строка Арт/Код: скрываем в 2 колонках — не помещается */
            .product-header-row {
                display: none;
            }

            /* Бренд + Тип: мельче, обрезаем */
            .product-brand-row,
            .product-type-row {
                font-size: 11px;
                margin-bottom: 2px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                display: block;
            }

            /* Вес/металл: мельче */
            .product-meta-row {
                font-size: 11px;
                margin-bottom: 6px;
            }

            /* Цена: мельче */
            .product-price-main {
                font-size: 12px;
            }
            .product-price-extra,
            .product-old-price {
                font-size: 10px;
            }
            .product-price-row {
                margin-bottom: 8px;
            }

            /* Кнопка: ниже и мельче */
            .product-main-btn {
                padding: 9px 8px;
                font-size: 11px;
            }

            /* Бэдж ВЕСОВОЙ: меньше */
            .card-badge {
                font-size: 9px;
                padding: 2px 6px;
            }
        }
		







/* Стили иконки (для визуального эффекта при наведении) */
.price-info-icon {
    cursor: pointer;
    color: #6c757d; /* Цвет иконки (серый) */
    transition: color 0.2s ease;
}

.price-info-icon:hover {
    color: #ffb75e; /* Цвет при наведении (синий) */
}



/* Стили для строк с ценами внутри плашки */
.price-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.9em;
}

.price-type-name {
    font-weight: 600;
    color: #333;
    margin-right: 15px;
}

.price-value {
    color: #000;
}



.product-price-container {
    position: relative; /* Важно для позиционирования тултипа */
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Стили самой всплывающей плашки */
.all-prices-tooltip {
    /* Скрыта по умолчанию */
    visibility: hidden; 
    opacity: 1; 
    
    /* Позиционирование */
    position: absolute;
    top: 100%; /* Появляется прямо под иконкой */
    left: -220px;
    z-index: 1000;
    gap:4px;
    /* Оформление */
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 10px;
    min-width: 220px;
    border-radius: 4px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.all-prices-tooltip .is-active-price {
    background-color: #fff6eb; /* золото фон */
    border-left: 3px solid #ffb75e;
    padding-left: 7px;
}

















/* ===== ОСНОВНОЙ МАКЕТ ===== */
.sidebar-photo-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
}

/* ===== ОСНОВНОЕ ФОТО ===== */
.sidebar-main-photo-container {
    flex: 1;
    position: relative;
    min-height: 400px;
    background: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eaeaea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.photo-main {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.zoom-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ===== ШИРОКИЙ КОНТЕЙНЕР ДЛЯ МИНИАТЮР ===== */
.sidebar-thumbs-wrapper {
    width: 130px;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #eaeaea;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Контейнер для центрирования миниатюр */
.thumbs-vertical-container {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 15px 10px;
    min-height: 280px;
}

/* ===== ВЕРТИКАЛЬНЫЕ МИНИАТЮРЫ ===== */
.thumbs-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    max-height: 300px;
    padding: 0 5px;
    width: 100%;
    align-items: center;
}

/* Каждая миниатюра */
.thumbs-vertical .thumb-container {
    width: 90px;
    height: 90px;
    min-height: 90px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    background-color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

/* Эффекты при наведении - БЕЗ СДВИГА */
.thumbs-vertical .thumb-container:hover {
    border-color: #bbb;
    /* transform: translateY(-3px); УБРАНО */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* АКТИВНАЯ МИНИАТЮРА - ЗОЛОТАЯ РАМКА */
.thumbs-vertical .thumb-container.active {
    border: 3px solid #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

/* Эффект при наведении на активную миниатюру */
.thumbs-vertical .thumb-container.active:hover {
    border-color: #f59e0b;
    /* transform: none; УБРАНО - оставляем только цвет рамки */
}

/* ===== СЧЕТЧИК ФОТО ===== */
.thumbs-counter {
    text-align: center;
    font-size: 12px;
    color: #666;
    padding: 8px;
    background: linear-gradient(to bottom, #f0f0f0, #e8e8e8);
    border-top: 1px solid #e0e0e0;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ===== КАСТОМНЫЙ СКРОЛЛБАР ===== */
.thumbs-vertical::-webkit-scrollbar {
    width: 6px;
}

.thumbs-vertical::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
    margin: 10px 0;
}

.thumbs-vertical::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
    border: 1px solid #f5f5f5;
}

.thumbs-vertical::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}













.sidebar-loading {
    padding: 40px;
    text-align: center;
    color: #999;
    font-size: 14px;
    font-weight: bold;
}
/* Если хочешь, чтобы он еще и крутился */
.spinner {
    margin: 0 auto 10px;
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

@keyframes spin { 
    from { transform: rotate(0deg); } 
    to { transform: rotate(360deg); } 
}



/* ===== УБИРАЕТ БРАУЗЕРНЫЕ СТРЕЛОЧКИ ВВОДА ===== */
.sidebar-size-input::-webkit-outer-spin-button,
.sidebar-size-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


/* ===== УБИРАЕТ БРАУЗЕРНЫЕ СТРЕЛОЧКИ ВВОДА ===== */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}















.sidebar-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
}
.sidebar-item-row:hover { background-color: #f9fafb; }
.sidebar-item-img { width: 50px; height: 50px; object-fit: contain; border-radius: 4px; background: #fff; }
.sidebar-item-info { flex: 1; font-size: 13px; }

/* --- PRO SIDEBAR LAYOUT --- */
.sidebar-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0; /* Отступы убрали, чтобы фото было красивым */
}

/* Верхний блок: Фото (300px) + Инфо */
.sidebar-top-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    padding: 0 20px; /* Внутренние отступы */
}

/* Контейнер главного фото */
.pro-main-photo-container {
    width: 300px;
    height: 300px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pro-main-photo {
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    cursor: zoom-in;
}

/* Правая часть верхнего блока (Заголовок, Цена, Кнопки) */
.pro-main-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.pro-article { font-size: 13px; color: #888; margin-bottom: 5px; }
.pro-title { font-size: 20px; font-weight: 700; line-height: 1.2; margin-bottom: 15px; color: #111; }

.pro-price-block { margin-bottom: 20px; }
.pro-price-main { font-size: 26px; font-weight: 800; color: #b45309; }
.pro-price-sub { font-size: 13px; color: #666; margin-top: 2px; }

/* Нижний блок: Две колонки */
.sidebar-bottom-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    padding: 0 20px 40px 20px;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
    margin-top: 10px;
}

.pro-col-left { display: flex; flex-direction: column; gap: 25px; }
.pro-col-right { display: flex; flex-direction: column; gap: 20px; }

/* Галерея миниатюр (переносим её вниз) */
.thumbs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
}
.thumb-item {
    aspect-ratio: 1;
    background-size: cover;
    border-radius: 4px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: border-color 0.2s;
}
.thumb-item:hover, .thumb-item.active { border-color: #b45309; }

/* Заголовки секций */
.pro-section-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    font-weight: 700;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

/* Характеристики в правой колонке */
.pro-specs-list {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Две колонки для характеристик */
    gap: 10px 20px;
    font-size: 13px;
    margin-bottom: 20px;
}
.spec-row { display: flex; flex-direction: column; }
.spec-label { color: #888; font-size: 11px; }
.spec-val { color: #333; font-weight: 500; }

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .sidebar-top-grid, .sidebar-bottom-grid {
        grid-template-columns: 1fr; /* Одна колонка */
        gap: 15px;
    }
    .pro-main-photo-container {
        width: 100%; /* Фото на всю ширину */
        height: auto;
        aspect-ratio: 1;
        margin: 0 auto;
    }
    .pro-specs-list { grid-template-columns: 1fr; } /* Характеристики в столбик */
}



/* Блокировка прокрутки основного сайта */
body.sidebar-open {
    overflow: hidden !important;
    padding-right: 0px; /* Если есть дерганье скролла, можно добавить ширину скроллбара */
}

/* Затемнение фона (Оверлей) */
.details-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto; /* Блокируем клики сквозь оверлей */
    backdrop-filter: blur(2px); /* Размытие фона */
}








/* 1. Главное исправление: ограничиваем ширину всех крупных блоков */
.filters-container,
#productsContainer,
.products-grid,
.products-table-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* 2. Предотвращаем горизонтальный вылет для всей страницы */
/* Если ваше SPA вставляет контент в какой-то общий div, 
   нужно убедиться, что он сам не скроллится */
#content, .spa-page-container {
    overflow-x: hidden !important;
    width: auto !important;
}

/* 3. Исправляем потенциальный вылет карточек */
.product-wrapper {
    max-width: calc(100vw - 20px); /* Страховка для мобильных и узких экранов */
}

/* 4. Если лоадер фиксированный, он не должен влиять на ширину, 
   но иногда 'left: 50%' в SPA без 'position: relative' на родителе глючит. 
   Добавим контейнеру относительное позиционирование */
#productsContainer {
    position: relative;
}