* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	text-decoration: none;
}

body {
	font-family: 'Segoe UI', Roboto, sans-serif;
	background: #f8fafc;
	width: 100%;
}

/* Шапка */
.header {
	background: #fff;
	border-radius: 0px 0px 20px 20px;
    box-shadow: 0 4px 12px #9E9E9E;
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	position: relative;
}

.block-1 {
    width: 100%;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
	gap: 32px;
}
.block-2 {
    width: 100%;
    display: block;
    align-items: center;
    justify-content: space-between;
	border-radius: 0px 0px 20px 20px;
}

.logo img {
	height: 80px;
	width: auto;
	display: block;
}

/* ===== ПОИСКОВАЯ ФОРМА ===== */
        .search {
            position: relative;
            width: 100%;
			z-index: 100;
        }

        .search form {
            display: flex;
            border-radius: 16px;
            overflow: hidden;
			box-shadow: 0 4px 12px rgb(0 0 0 / 50%);
            background: #fff;
            transition: 0.2s;
        }

        .search-input {
            flex: 1;
            padding: 14px 20px;
            border: none;
            outline: none;
            font-size: 1rem;
            background: transparent;
            font-family: inherit;
        }

        .search-btn {
            padding: 14px 24px;
            background: #1e40af;
            color: #fff;
            border: none;
            cursor: pointer;
            font-size: 1rem;
            transition: 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .search-btn:hover {
            background: #1e3a8a;
        }

        /* ===== РЕЗУЛЬТАТЫ ПОИСКА (скролл внутри) ===== */
        .search-results {
            position: absolute;
            top: calc(100% + 8px);
            left: 0;
            right: 0;
            background: #fff;
            border-radius: 16px;
            max-height: 480px;
            display: none;
            z-index: 1000;
            padding: 8px 0;
            overflow: hidden; /* <-- скролл внутри */
            display: none;
            flex-direction: column;
			box-shadow: 0 4px 24px #9E9E9E;
        }

        .search-results.active {
            display: flex;
        }

        /* Контейнер для прокрутки */
        .search-results-scroll {
            flex: 1;
            overflow-y: auto;
            padding: 0;
        }

        /* Стилизация скроллбара (внутри блока) */
        .search-results-scroll::-webkit-scrollbar {
            width: 5px;
        }

        .search-results-scroll::-webkit-scrollbar-track {
            background: transparent;
        }

        .search-results-scroll::-webkit-scrollbar-thumb {
            background: #d1d5db;
            border-radius: 10px;
        }

        .search-results-scroll::-webkit-scrollbar-thumb:hover {
            background: #9ca3af;
        }

        /* ===== ЭЛЕМЕНТ РЕЗУЛЬТАТА ===== */
        .result-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 20px;
            cursor: pointer;
            transition: 0.15s;
            text-decoration: none;
            color: #1f2937;
        }

        .result-item:hover {
            background: #f1f5f9;
        }

        .result-item .result-icon {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 0.9rem;
            color: #fff;
        }

        .result-item .result-icon.product {
            background: #1e40af;
        }

        .result-item .result-icon.category {
            background: #7c3aed;
        }

        .result-item .result-info {
            flex: 1;
            min-width: 0;
        }

        .result-item .result-info .result-name {
            font-size: 0.95rem;
            font-weight: 500;
            color: #0a0a0a;
        }

        .result-item .result-info .result-name mark {
            background: #fef08a;
            padding: 0 2px;
            border-radius: 3px;
        }

        .result-item .result-info .result-path {
            font-size: 0.75rem;
            color: #6b7280;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .result-item .result-price {
            font-size: 0.9rem;
            font-weight: 700;
            color: #e67e22;
            flex-shrink: 0;
        }

        /* ===== СОСТОЯНИЕ ЗАГРУЗКИ ===== */
        .search-loading {
            padding: 20px;
            text-align: center;
            color: #6b7280;
            font-size: 0.95rem;
        }

        .search-loading .spinner {
            display: inline-block;
            width: 24px;
            height: 24px;
            border: 3px solid #e2e8f0;
            border-top-color: #1e40af;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* ===== ПУСТОЙ РЕЗУЛЬТАТ ===== */
        .search-empty {
            padding: 30px 20px;
            text-align: center;
            color: #6b7280;
        }

        .search-empty i {
            font-size: 2rem;
            color: #d1d5db;
            display: block;
            margin-bottom: 8px;
        }























/* Блок кнопок справа */
.actions {
	flex-shrink: 0;
	display: flex;
	gap: 16px;
}
.action-item {
	background: none;
	border: none;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	font-size: 0.85rem;
	font-weight: 500;
	color: #334155;
	transition: color 0.2s;
	padding: 4px 8px;
	border-radius: 40px;
	position: relative;
}
.action-item i {
	font-size: 1.8rem;
	color: #475569;
}
.action-item span {
	font-weight: 500;
}
.a-fff {
	color: #fff;
}

/* Обёртка для popup */
.action-item-wrapper {
	position: relative;
}

/* Всплывающее окно авторизации */
.auth-popup {
	position: absolute;
	top: calc(100% + 0px);
	left: -110px;
	width: 280px;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 4px 12px #9E9E9E;
	padding: 20px;
	z-index: 200;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s;
}

.auth-popup.show {
	opacity: 1;
	visibility: visible;
}

.popup-title {
	font-weight: 600;
	font-size: 1rem;
	margin-bottom: 18px;
	color: #1e293b;
	text-align: center;
}

.input-group {
	display: flex;
	align-items: center;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 48px;
	padding: 10px 14px;
	margin-bottom: 14px;
	transition: 0.2s;
}
.input-group i {
	color: #94a3b8;
	font-size: 1rem;
	margin-right: 10px;
}
.input-group input {
	border: none;
	background: transparent;
	width: 100%;
	font-size: 0.9rem;
	outline: none;
}
.input-group:focus-within {
	border-color: #3b82f6;
	box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}

.login-btn {
	width: 100%;
	background: #3b82f6;
	color: white;
	border: none;
	border-radius: 48px;
	padding: 10px 0;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
	margin-top: 8px;
	font-size: 0.9rem;
}
.login-btn:hover {
	background: #2563eb;
}

.menu-badge {
	position: absolute;
	top: -8px;
	right: -4px;
	background-color: #e63946;
	color: white;
	font-size: 0.8rem;
	font-weight: bold;
	min-width: 22px;
	height: 22px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 5px;
	line-height: 1;
	box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.menu-badge.hidden {
	display: none;
}
.menu-badge.pulse {
	animation: pulse 0.3s ease;
}
@keyframes pulse {
	0% { transform: translateY(-50%) scale(1); }
	50% { transform: translateY(-50%) scale(1.3); }
	100% { transform: translateY(-50%) scale(1); }
}



/* ===== Меню категорий ===== */
		.menu-container {
			width: 420px;
			margin: 0 auto;
			background: #fff;
			border-radius: 20px;
			padding: 20px;
			box-shadow: 0 4px 24px #9E9E9E;
			display: none;
			position: absolute;
			top: 70px;
			right: 100px;
			z-index: 1000;
        }
		.menu-container.active {
            display: flex;
			flex-direction: column;
        }
		
		/* ===== МЕСТО ДЛЯ ПОИСКА В МЕНЮ ===== */
        .menu-search-placeholder {
            display: none;
			margin: 10px;
            flex-shrink: 0;
        }

        .menu-search-placeholder .search {
            max-width: 100%;
            margin: 0;
        }


        /* ===== ОСНОВНЫЕ КАТЕГОРИИ (level 0) ===== */
        .categories-level0 {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            padding-bottom: 16px;
            border-bottom: 1px solid #eef1f5;
        }

        .cat-btn {
            padding: 6px 16px;
            border: 1px solid #eef1f5;
            border-radius: 40px;
            background: #f9fafc;
            color: #1f2937;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: 0.2s;
            font-family: inherit;
            white-space: nowrap;
        }

        .cat-btn:hover {
            background: #eef1f5;
            border-color: #d1d5db;
        }

        .cat-btn.active {
            background: #1e40af;
            color: #fff;
            border-color: #1e40af;
        }
		
		.cat-btn-link {
            padding: 6px 16px;
            border: 1px solid #eef1f5;
            border-radius: 40px;
            background: #f9fafc;
            color: #1e40af;
            font-size: 0.85rem;
            font-weight: 500;
            transition: 0.2s;
            font-family: inherit;
            white-space: nowrap;
            text-decoration: none;
            display: inline-block;
        }

        .cat-btn-link:hover {
            background: #eef1f5;
            border-color: #d1d5db;
            color: #1e3a8a;
        }

        /* ===== ПОДКАТЕГОРИИ (вертикальный список) ===== */
        .subcategories {
            display: flex;
            flex-direction: column;
            gap: 2px;
			max-height: 44dvh;
			overflow-y: auto;
        }

        .subcategory-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 12px;
            border-radius: 10px;
            cursor: pointer;
            transition: 0.2s;
            color: #1f2937;
            text-decoration: none;
            font-size: 0.9rem;
            font-weight: 500;
        }

        .subcategory-item:hover {
            background: #f1f5f9;
        }

        .subcategory-item .level-icon {
            width: 28px;
            height: 28px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.85rem;
            color: #fff;
            flex-shrink: 0;
        }

        .subcategory-item .level-icon.level1 {
            background: #7c3aed;
        }

        .subcategory-item .sub-name {
            flex: 1;
        }

        .subcategory-item.level2-item {
            padding-left: 44px;
            font-size: 0.85rem;
            font-weight: 400;
            color: #4b5563;
            position: relative;
        }

        .subcategory-item.level2-item::before {
            content: '';
            position: absolute;
            left: 28px;
            top: 0;
            bottom: 0;
            width: 2px;
            background: #e5e7eb;
            border-radius: 2px;
        }

        .subcategory-item.level2-item .level-icon {
            width: 24px;
            height: 24px;
            font-size: 0.7rem;
            background: #0ea5e9;
        }

        .subcategory-item.level2-item:hover {
            background: #f0f9ff;
            color: #0c4a6e;
        }

        .subcategory-group {
            display: flex;
            flex-direction: column;
            gap: 2px;
            margin-bottom: 4px;
        }

        .subcategory-group .level1-wrapper {
            display: flex;
            flex-direction: column;
        }

        .empty-state {
            padding: 20px;
            text-align: center;
            color: #9ca3af;
            font-size: 0.9rem;
        }

        .empty-state i {
            display: block;
            font-size: 2rem;
            margin-bottom: 8px;
            color: #d1d5db;
        }

        







#loginError {
    display: none;
    color: #e63946;
    font-size: 0.85rem;
    margin-top: 10px;
    text-align: center;
}


.container {
	max-width: 1280px;
	margin: 0 auto;
}

.category-header {
    margin: 20px 0;
    background: #f8fafc;
    border-radius: 20px;
    box-shadow: 0 4px 24px #9E9E9E;
    padding: 20px;
}
.category-header h1 {
	font-size: 2.2rem;
	color: #1e466e;
	margin-bottom: 8px;
}
.category-description {
	color: #475569;
	font-size: 1rem;
	max-width: 800px;
}

/* Сетка карточек (3:4) */
.products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 28px;
}

@media (min-width: 1200px) {
	.products-grid {
		grid-template-columns: repeat(5, 1fr);
	}
}
@media (max-width: 1199px) and (min-width: 992px) {
	.products-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}
@media (max-width: 991px) and (min-width: 768px) {
	.products-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}
@media (max-width: 767px) {
	.products-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}
}




/* -------------------- Хлебные крошки -------------------- */
.breadcrumbs {
	font-size: 14px;
	color: #6b7280;
	padding-bottom: 10px;
	border-bottom: 1px solid #eef1f5;
}

.breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	list-style: none;
	padding: 0;
	margin: 0;
	gap: 4px 6px;
}

.breadcrumbs li {
	display: flex;
	align-items: center;
}

/* Разделитель между крошками */
.breadcrumbs li:not(:last-child)::after {
	content: '/';
	margin-left: 6px;
	color: #9ca3af;
	font-size: 14px;
}

.breadcrumbs a {
	color: #1e40af;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s, text-decoration 0.2s;
}

.breadcrumbs a:hover {
	color: #1e3a8a;
	text-decoration: underline;
}

.breadcrumbs .current {
	color: #1f2937;
	font-weight: 600;
	cursor: default;
}




/* ===== КАРТОЧКА ===== */
        .product-card {
            position: relative;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            border-radius: 20px;
            overflow: hidden;
			cursor: pointer;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            aspect-ratio: 3 / 4;
            background-color: #2d2d2d;
        }

        /* Затемнение */
        .product-card::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(to top, rgba(0, 0, 0, 0.70) 0%, rgba(0, 0, 0, 0.20) 50%, rgba(0, 0, 0, 0.05) 100%);
            z-index: 1;
            pointer-events: none;
        }

        /* ===== БЕЙДЖИ ===== */
        .badges {
            position: absolute;
            top: 14px;
            left: 14px;
            z-index: 4;
            display: flex;
            flex-direction: column;
            gap: 6px;
            pointer-events: none;
        }

        .badge-2 {
            display: inline-block;
            background: rgba(0, 0, 0, 0.75);
            color: #fff;
            font-size: 0.6rem;
            font-weight: 700;
            letter-spacing: 0.4px;
            text-transform: uppercase;
            padding: 4px 12px;
            border-radius: 30px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            width: fit-content;
        }

        .badge-2.hit { background: #e67e22; }
        .badge-2.new { background: #22c55e; }
        .badge-2.discount { background: #ef4444; }
        .badge-2.bestseller { background: #8b5cf6; }

        /* ===== ОВЕРЛЕЙ ===== */
        .card-overlay {
            position: relative;
            z-index: 2;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding: 16px 16px 10px;
            color: #fff;
        }

        /* ===== КНОПКА КОРЗИНЫ (справа вверху) ===== */
        .cart-top {
            position: absolute;
            top: 14px;
            right: 14px;
            z-index: 4;
        }

        .cart-btn {
            background: rgba(0, 0, 0, 0.55);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: background 0.25s ease, transform 0.2s ease;
            color: #fff;
            font-size: 1.1rem;
            border: 1px solid rgba(255, 255, 255, 0.10);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
        }


        .cart-btn.in-cart {
            background: #22c55e;
            border-color: #22c55e;
        }

        .cart-btn i {
            pointer-events: none;
        }

        /* ===== НИЖНИЙ БЛОК (стили убраны) ===== */
        .card-bottom {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            margin-bottom: 10px;
            flex-wrap: wrap;
        }

        /* Левая часть (наличие + семена) */
        .card-bottom .left {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
            /*flex: 1;*/
            background: rgba(0, 0, 0, 0.55);
            padding: 6px 12px;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.06);
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
        }

        .stock {
            font-size: 0.7rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 5px;
            color: #86efac;
        }

        .stock i {
            font-size: 0.75rem;
        }

        .stock.out-of-stock {
            color: #fca5a5;
        }

        .specs {
            font-size: 0.65rem;
            color: #d1d5db;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .specs i {
            font-size: 0.7rem;
            color: #9ca3af;
        }

        /* Цена */
        .card-bottom .price-tag {
            font-weight: 700;
            font-size: 1rem;
            color: #ffd966;
            white-space: nowrap;
            flex-shrink: 0;
            background: rgba(0, 0, 0, 0.55);
            padding: 10px 14px;
            border-radius: 12px;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
        }

        /* ===== НАЗВАНИЕ ТОВАРА (в самом низу) ===== */
        .product-title {
            text-align: center;
            background: rgba(0, 0, 0, 0.45);
            padding: 8px 14px;
            border-radius: 40px;
            border: 1px solid rgba(255, 255, 255, 0.06);
        }

        .product-title a {
            color: #fff;
            text-decoration: none;
            font-weight: 600;
            font-size: 0.9rem;
            display: block;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            transition: color 0.2s ease;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.40);
        }

        .product-title a:hover {
            color: #ffd966;
            text-decoration: underline;
        }


        /* ===== АДАПТИВ ===== */
        @media (max-width: 400px) {
            
            .card-bottom .left {
                flex: none;
            }
            .card-bottom .price-tag {
                text-align: center;
            }
            .price-tag {
                font-size: 0.95rem;
            }
            .product-title a {
                font-size: 0.8rem;
            }
            .cart-btn {
                width: 34px;
                height: 34px;
                font-size: 0.95rem;
            }
        }




 /* ===== МОДАЛЬНОЕ ОКНО ===== */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.70);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            padding: 20px;
        }

        .modal-overlay.active {
            display: flex;
        }

        .modal-content {
            background: #fff;
            border-radius: 24px;
            max-width: 1024px;
            width: 100%;
            max-height: 90dvh;
            overflow: hidden;
            position: relative;
            animation: modalIn 0.3s ease;
			display: flex;
			flex-direction: column;
        }

        @keyframes modalIn {
            from {
                opacity: 0;
                transform: scale(0.95) translateY(20px);
            }
            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        .modal-close {
            position: absolute;
            top: 16px;
            right: 16px;
            z-index: 10;
			background: rgba(0, 0, 0, 0.50);
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            font-size: 1.4rem;
            cursor: pointer;
            transition: 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
        }

        .modal-close:hover {
            background: rgba(0, 0, 0, 0.15);
            transform: rotate(90deg);
        }

        .modal-body {
            display: flex;
            gap: 20px;
            padding: 30px;
        }
		.modal-gallery {
			width: 49%;
		}
		
		#modalFullText {
			flex: 1;
			padding: 20px;
			border-top: 2px solid #eef1f5;
			width: 100%;
			max-height: 90dvh;
			overflow-y: auto;
		}
		
		#modalFullText .text-content {
			font-size: 1rem;
			color: #4b5563;
			max-width: 100%;
			white-space: pre-wrap;
		}

        /* ===== ГАЛЕРЕЯ ===== */
        .gallery-main {
            position: relative;
            border-radius: 16px;
            overflow: hidden;
            background: #f1f3f6;
            aspect-ratio: 1 / 1;
            max-height: 365px;
			width: 460px;
        }

        .gallery-main img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            transition: opacity 0.3s ease;
        }

        .gallery-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0, 0, 0, 0.50);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            border: none;
            color: #fff;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            cursor: pointer;
            transition: 0.2s;
            z-index: 2;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
        }

        .gallery-nav:hover {
            background: rgba(0, 0, 0, 0.75);
        }

        .gallery-nav.prev {
            left: 10px;
        }
        .gallery-nav.next {
            right: 10px;
        }

        .gallery-thumbs {
            display: flex;
            gap: 8px;
            margin-top: 10px;
            overflow-x: auto;
            padding-bottom: 4px;
        }

        .gallery-thumbs img {
            width: 60px;
            height: 60px;
            object-fit: cover;
            border-radius: 10px;
            cursor: pointer;
            border: 2px solid transparent;
            transition: 0.2s;
            flex-shrink: 0;
            background: #f1f3f6;
        }

        .gallery-thumbs img:hover {
            border-color: #9ca3af;
        }

        .gallery-thumbs img.active {
            border-color: #1e40af;
        }

        /* ===== ИНФОРМАЦИЯ ===== */
        .modal-info {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 12px;
            min-width: 0;
        }
        .modal-title {
            font-size: 1.4rem;
            font-weight: 700;
			color: #1e466e;
        }
		
		
		.modal-block {
			display: flex;
			align-items: center;
			/*justify-content: center;*/
			gap: 12px;
			margin-bottom: 10px;
			flex-wrap: wrap;
		}
		.modal-block .left {
			display: flex;
			flex-direction: column;
			gap: 4px;
			padding: 6px 12px;
			border-radius: 12px;
			box-shadow: 0 4px 12px #9E9E9E;
		}
		.modal-price {
			font-weight: 700;
			font-size: 20px;
			color: #e67e22;
			white-space: nowrap;
			flex-shrink: 0;
			padding: 12px 14px;
			border-radius: 12px;
			box-shadow: 0 4px 12px #9E9E9E;
		}
		
		


        .modal-stock {
            font-size: 0.9rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .modal-stock.in-stock {
            color: #22c55e;
        }

        .modal-stock.out-of-stock {
            color: #ef4444;
        }

        .modal-specs {
            display: flex;
            flex-wrap: wrap;
            gap: 8px 16px;
			font-size: 0.95rem;
			color: #4b5563;
        }

        .modal-specs span {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .modal-description {
            font-size: 0.9rem;
            color: #4b5563;
            line-height: 1.6;
            margin: 4px 0;
			white-space: pre-wrap;
        }

        .modal-actions {
            display: flex;
            gap: 10px;
            margin-top: 4px;
            flex-wrap: wrap;
        }

        .btn-add-to-cart {
            background: #ff9800;
            color: #fff;
            border: none;
            padding: 12px 24px;
            border-radius: 40px;
            font-weight: 600;
            font-size: 0.95rem;
            cursor: pointer;
            transition: 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1;
            justify-content: center;
        }

        .btn-add-to-cart:hover {
            background: #e68900;
            transform: scale(1.02);
        }

        .btn-details {
            background: transparent;
            color: #1e40af;
            border: 2px solid #1e40af;
            padding: 12px 24px;
            border-radius: 40px;
            font-weight: 600;
            font-size: 0.95rem;
            cursor: pointer;
            transition: 0.2s;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 6px;
            flex: 1;
            justify-content: center;
        }

        .btn-details:hover {
            background: #1e40af;
            color: #fff;
        }















.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    padding: 10px 0px;
    align-items: center;
}
.filter-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-width: 22%;
	flex: 1 0 auto;
}
.filter-group select {
	padding: 10px 14px;
	border-radius: 14px;
	border: 1px solid #d1d5db;
	background: white;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: 0.2s;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 36px;
}
.filter-group select:hover {
	border-color: #9ca3af;
}
.filter-group select:focus {
	outline: 2px solid #2563eb;
	border-color: transparent;
}
.filter-group select:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background-color: #f3f4f6;
}

.content-placeholder {
	background: #f9fafc;
	border-radius: 18px;
	padding: 40px;
	text-align: center;
	color: #6b7280;
	border: 1px dashed #d1d5db;
	font-size: 16px;
}
.content-placeholder i {
	font-size: 32px;
	display: block;
	margin-bottom: 12px;
	color: #9ca3af;
}

@media (max-width: 700px) {
	.category-page { padding: 20px; }
	.filter-group { min-width: unset; }
}




@media (max-width: 360px) {
.search-btn {
	padding: 12px 16px;
}



}

@media (max-width: 1024px) {

body {
	min-height: 100dvh; /* динамическая высота */
	height: 100%;
	padding-bottom: 66px; /* отступ под actions */
	overflow-x: hidden;
}
	
	
.header {
    padding: 0;
	width: 100%;
    display: flex;
	flex-direction: column;
	gap: unset;
	border-radius: unset;
}
.block-1 {
    flex-direction: column;
    gap: unset;
}

.logo {
    width: 100%;
    display: flex;
    justify-content: center;
	position: sticky;
    top: -100px; /* уходит за экран при скролле вверх */
}

.search {
    display: flex;
    justify-content: center;
}
.search form {
    width: 100%;
}
.search-results {
	top: calc(100% + 8px);
}
.block-1 .search {
	display: none;
}
.menu-search-placeholder {
	display: block;
}
.action-item-wrapper {
    position: unset;
}
.auth-popup.show {
    opacity: 1;
    position: fixed;
    top: 0;
    left: 50%;
    bottom: unset;
    transform: translate(-50%, 5%);
}



/* ===== АДАПТИВ !!!!!!!!!! ===== */

.subcategory-item.level2-item { padding-left: 36px; }
.subcategory-item.level2-item::before { left: 22px; }
.subcategory-item .level-icon { width: 24px; height: 24px; font-size: 0.75rem; }
.subcategory-item.level2-item .level-icon { width: 20px; height: 20px; font-size: 0.6rem; }

.menu-container {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	width: 100%;
	padding: unset;
	border-radius: unset;
	height: calc(100dvh - 66px);
	max-height: calc(100dvh - 66px);
	z-index: 2000;
}
.categories-level0 {
    padding: 10px;
}
.subcategories {
	padding: 10px;
	flex: 1;
    max-height: 90dvh;
    overflow-y: auto;
	overscroll-behavior: contain; /* ← предотвращает прокрутку страницы */
}


.actions {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	height: 66px;
	background: #ffffff;
	border-top: 1px solid #eef1f5;
	display: flex;
	justify-content: center;
	align-items: end;
	gap: 18px;
	padding: 0;
	z-index: 9999;
	box-shadow: 0 4px 12px #000;
	/* Безопасная зона для iOS */
	padding-bottom: env(safe-area-inset-bottom, 0px);
}

.action-item {
    gap: 4px;
}
.action-item i {
    font-size: 1.6rem;
}

.container {
    margin: 10px 2%;
    width: 96%;
}
.category-header {
    padding: 20px 10px;
}
.category-header h1 {
    font-size: 26px;
}
.filters {
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
}
.filter-group {
    max-width: 44%;
}

.breadcrumbs {
    font-size: 10px;
    padding-bottom: 4px;
}


.card-overlay {
    padding: 6px;
}
.card-bottom {
    flex-direction: row;
    align-items: center;
	margin-bottom: 4px;
}
.card-bottom .left {
    flex: none;
	padding: 6px;
}
.card-bottom .price-tag {
    padding: 6px;
	font-size: 14px;
}
.stock {
    font-size: 0.5rem;
}


.modal-overlay {
	height: calc(100dvh - 66px); /* динамическая высота минус actions */
	max-height: calc(100dvh - 66px);
    padding: unset;
}
.modal-content {
    border-radius: unset;
    max-width: 100%;
    width: 100%;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
	gap: 10px;
	padding: 0 0 10px 0;
	max-height: 90vh;
    overflow-y: auto;
}
.modal-body {
    flex-direction: column;
    padding: unset;
	flex: 1;
	padding-bottom: env(safe-area-inset-bottom, 0px);
}
.modal-actions {
    flex-direction: row-reverse;
	justify-content: center;
}
.btn-details {
	display: none;
}
.btn-add-to-cart {
    flex: none;
}

/* Скрываем скроллбар, но оставляем прокрутку */
.modal-body::-webkit-scrollbar {
	width: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
	background: #d1d5db;
	border-radius: 10px;
}

.modal-body::-webkit-scrollbar-track {
	background: transparent;
}
	
.modal-info {
    max-width: 100%;
    padding: 0 10px;
}
.modal-gallery {
    width: auto;
}
.gallery-main {
    max-height: 365px;
	border-radius: unset;
	width: 100%;
}

.gallery-thumbs {
    padding: 0 10px;
}

#modalFullText {
    padding: 10px 10px 0;
	max-height: unset;
    overflow-y: unset;
}





}


/* Только для устройств с мышкой */
@media (hover: hover) {
	
.product-card:hover {transform: translateY(-6px);}
.cart-btn:hover {
    background: #ff9800;
    transform: scale(1.08);
    border-color: #ff9800;
}
.action-item:hover {
	color: #1e293b;
}
.action-item:hover i {
	color: #3b82f6;
}
	
}

