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

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
    line-height: 1.4;
    padding-bottom: 70px;
}
.noUi-handle {
    z-index: 20;
}

.product-card {
    z-index: 1;
}
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}
.login-prompt a {
    color: #369!important;
    text-decoration: none!important;
    border-bottom: solid 1px #ccc!important;
}
.auth-link a {
    color: #369 !important;
    text-decoration: none !important;
    border-bottom: solid 1px #ccc !important;
    padding: 1px 3px 3px;
    border-radius: 0;
}
/* ========== КНОПКИ КОРЗИНЫ (единые для всех страниц) ========== */
.add-to-cart-btn {
    width: calc(100% - 24px);
    margin: 17px 12px 12px 0px;
    color: #1a1a1a;
    border: none;
    padding: 9px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.2s;
    border: solid 1px #1a1a1a;
    background: transparent;
}

.add-to-cart-btn:hover {
  
}

.add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cart-button-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 17px 12px 12px 12px;
    width: calc(100% - 24px);
}

.go-to-cart-btn,
.continue-shopping-btn {
    width: 100%;
    text-align: center;
    padding: 7px 7px 9px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
    font-family: inherit;
    border: solid 1px #000;
}

.go-to-cart-btn {
   
    color: #2e6b3e;
}

.go-to-cart-btn:hover {
    background: transparent;
}

.continue-shopping-btn {
    background: transparent;
    color: #1a1a1a;
    border: none;
}

.continue-shopping-btn:hover {
    background: #f5f5f5;
}

/* ========== ШАПКА И МЕНЮ ========== */
.header {
    padding: 16px 0;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 500;
    text-decoration: none;
    color: #000;
}

.logo span {
    font-weight: 300;
}

.nav-menu {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: #1a1a1a;
    font-size: 0.95rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
}
.hamburger span {
    width: 25px;
    height: 2px;
    background: #1a1a1a;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    z-index: 200;
    padding: 80px 32px 32px;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.mobile-menu a{
    text-decoration: none !important;
    color: #555!important;
}
.mobile-menu.open { left: 0; }
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 150;
    display: none;
}
.overlay.open { display: block; }

.search input {
    width: 260px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 40px;
    background: #f9f9f9;
}

.cart-block {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f0f0;
    padding: 6px 14px;
    border-radius: 40px;
    text-decoration: none;
    color: #1a1a1a;
}
.cart-count {
    background: #1a1a1a;
    color: white;
    border-radius: 30px;
    padding: 2px 8px;
    font-size: 0.8rem;
}

.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-top: 1px solid #eaeaea;
    display: none;
    justify-content: space-around;
    padding: 12px 16px;
    z-index: 90;
}
.bottom-bar a {
    text-decoration: none;
    color: #1a1a1a;
    font-size: 0.8rem;
}

/* Заглушка для изображения на странице товара */
.product-gallery .main-image {
    background: linear-gradient(135deg, #e8e0d8 0%, #d4c8b8 100%);
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-gallery .main-image.no-image {
    background: linear-gradient(135deg, #c7b198 0%, #a89078 100%);
}

.product-gallery .main-image.no-image.fabric-bg {
    background-image: repeating-linear-gradient(45deg, 
        #c7b198 0px, #c7b198 2px,
        #dac5ae 2px, #dac5ae 8px);
}

.product-gallery .main-image.no-image.leather-bg {
    background-image: radial-gradient(circle at 30% 40%, 
        #8c6e4e 1px, 
        #6b4e2e 1px, 
        #8c6e4e 2px);
    background-size: 10px 10px;
}

.product-gallery .main-image.no-image.accessory-bg {
    background-image: 
        linear-gradient(45deg, #c0b0a0 25%, transparent 25%),
        linear-gradient(-45deg, #c0b0a0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #c0b0a0 75%),
        linear-gradient(-45deg, transparent 75%, #c0b0a0 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

.product-gallery .main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== HERO ========== */
.hero {
    background: #f4f0ea;
    margin: 32px 0 20px;
    border-radius: 32px;
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
}
.hero-content {
    flex: 1;
    padding: 48px 40px;
}
.hero-content h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 20px;
}
.hero-content p {
    margin-bottom: 32px;
}
.hero-content a {
       border: solid 1px #000;
    cursor: pointer;
    background: transparent;
}
.btn {

   
    padding: 7px 40px 9px;
    border-radius: 40px;
    text-decoration: none;
    display: inline-block;
}
.hero-image {
    flex: 1;
    background: #d9d2c5;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600"><rect width="800" height="600" fill="%23b0a088"/><path d="M0,300 L800,200 L800,600 L0,600 Z" fill="%238c6e4e" opacity="0.5"/><circle cx="650" cy="150" r="60" fill="%23eadbbc" opacity="0.6"/></svg>');
    background-size: cover;
}

/* ========== КАТАЛОГ ========== */
.catalog-container {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    width: 100%;
}

.filters-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #f8f6f2;
    padding: 16px;
    border-radius: 20px;
    align-self: start;
    position: sticky;
    top: 90px;
    margin-left: 0;
}

.products-area {
    flex: 1;
    min-width: 0;
    padding-right: 20px;
    max-width: none;
}

.section {
    margin-bottom: 20px;
}
.section-title {
    font-size: 1.4rem;
    margin-bottom: 12px;
    font-weight: 500;
}

/* ========== СЕТКА ТОВАРОВ ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 800px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 500px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== КАРТОЧКА ТОВАРА ========== */
.product-card {
    background: #f8f6f2;
    border-radius: 16px;
    overflow: hidden;
    transition: 0.2s;
}
.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Изображение товара */
.product-image {
    aspect-ratio: 3 / 4;
    background-size: cover;
    background-position: center;
    background-color: #e2dfda;
}

/* Заглушки для отсутствующих изображений */
.product-image.no-image {
    background: linear-gradient(135deg, #c7b198 0%, #a89078 100%);
}

/* Ткани */
.product-image.no-image.fabric-bg {
    background-image: repeating-linear-gradient(45deg, 
        #c7b198 0px, #c7b198 2px,
        #dac5ae 2px, #dac5ae 8px);
}

/* Кожа и мех */
.product-image.no-image.leather-bg {
    background-image: radial-gradient(circle at 30% 40%, 
        #8c6e4e 1px, 
        #6b4e2e 1px, 
        #8c6e4e 2px);
    background-size: 10px 10px;
}

/* Фурнитура */
.product-image.no-image.accessory-bg {
    background-image: 
        linear-gradient(45deg, #c0b0a0 25%, transparent 25%),
        linear-gradient(-45deg, #c0b0a0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #c0b0a0 75%),
        linear-gradient(-45deg, transparent 75%, #c0b0a0 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 12px;
}
.product-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-details {
    font-size: 0.7rem;
    color: #5a5a5a;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-shop {
    color: #888;
}

.product-shop a {
    color: #888;
}
.price-block {
    font-weight: 700;
    font-size: 0.9rem;
    color: #2e6b3e;
    margin: 6px 0 0 0;
}

/* ========== ФИЛЬТРЫ ========== */
.filter-group {
    margin-bottom: 20px;
    border-bottom: 1px solid #e0dcd6;
    padding-bottom: 12px;
}
.filter-group h4 {
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 0.9rem;
}
.filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    cursor: pointer;
}
.filter-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}
.filter-subgroup {
    margin-bottom: 12px;
}
.filter-subgroup label {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 4px;
    display: block;
}
.slider-container {
    width: 100%;
    margin-top: 6px;
}
.slider-values {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 6px;
    text-align: center;
}
.reset-filters {
    background: none;
    border: 1px solid #1a1a1a;
    padding: 8px;
    border-radius: 40px;
    width: 100%;
    cursor: pointer;
    margin-top: 12px;
    font-size: 0.8rem;
}
.reset-filters:hover {
    background: #1a1a1a;
    color: white;
}

/* ========== ПОЛЗУНКИ (noUiSlider) ========== */
.noUi-target {
    background: #e0e0e0 !important;
    border: none !important;
    box-shadow: none !important;
    height: 4px !important;
    border-radius: 4px !important;
}
.noUi-connect {
    background: #1a1a1a !important;
}
.noUi-handle {
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    background: #1a1a1a !important;
    border: 2px solid white !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
    cursor: pointer !important;
    right: -7px !important;
    top: -5px !important;
}
.noUi-handle:before,
.noUi-handle:after {
    display: none !important;
}

/* ========== БЛОК ПРЕИМУЩЕСТВ ========== */
.features {
    display: flex;
    justify-content: center;
    gap: 48px;
    background: #f4f0ea;
    padding: 48px 32px;
    border-radius: 32px;
    margin: 48px 0;
    text-align: center;
    flex-wrap: wrap;
}
.feature {
    flex: 0 1 auto;
    max-width: 300px;
    font-size: 1rem;
    line-height: 1.4;
}

/* ========== ПОДВАЛ ========== */
footer {
    text-align: center;
    padding: 32px 0;
    border-top: 1px solid #eaeaea;
    color: #5a5a5a;
    margin-top: 40px;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 900px) {
    .catalog-container {
        flex-direction: column;
        padding: 0 15px;
    }
    .filters-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }
    .products-area {
        padding-right: 0;
    }
}

@media (max-width: 860px) {
    .nav-menu { display: none; }
    .hamburger { display: flex; }
    .bottom-bar { display: flex; }
    .hero-content h1 { font-size: 2rem; }
    .hero-content { padding: 32px 24px; }
    .search input { width: 140px; }
    .features {
        gap: 24px;
        padding: 32px 20px;
    }
    .feature {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .products-grid {
        gap: 12px;
    }
    .product-info {
        padding: 8px;
    }
    .product-title {
        font-size: 0.8rem;
        white-space: normal;
    }
    .section-title {
        font-size: 1.2rem;
    }
    .cart-button-group {
        gap: 6px;
    }
    .go-to-cart-btn,
    .continue-shopping-btn {
        padding: 6px;
        font-size: 0.7rem;
    }
}