* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #ffffff;
    font-family: 'Inter', sans-serif;
    color: #1a1e1b;
    line-height: 1.4;
    padding-top: 88px;
}

a {
    text-decoration: none;
}

.mini-img-in-div {
    width: 50px;
}

.main-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 32px 0 32px;
}

.main-layout {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 20px;
    padding: 0 0 16px 0;
    position: sticky;
    top: 108px;
}

.sidebar-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f2f4f0;
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: #9bae95;
    margin-bottom: 14px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #fafaf8;
    border: 1px solid #efefe9;
    border-radius: 40px;
    padding: 6px 14px;
    transition: all 0.2s;
}
/* Скролл для блоков с кнопками (линии и типы) */
.sidebar-section .category-chips {
    max-height: 150px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Кастомный скролл */
.sidebar-section .category-chips::-webkit-scrollbar {
    width: 4px;
}

.sidebar-section .category-chips::-webkit-scrollbar-track {
    background: #e8e8e8;
    border-radius: 10px;
}

.sidebar-section .category-chips::-webkit-scrollbar-thumb {
    background: #4faf54;
    border-radius: 10px;
}

/* Для Firefox */
.sidebar-section .category-chips {
    scrollbar-width: thin;
    scrollbar-color: #4faf54 #e8e8e8;
}
.search-box:focus-within {
    border-color: #4faf54;
    background: #ffffff;
}

.search-box i {
    color: #b9c6b4;
    font-size: 0.8rem;
    margin-right: 8px;
}

.search-box input {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    padding: 5px 0;
}

.search-box input::placeholder {
    color: #d0dbca;
    font-size: 0.75rem;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    background: transparent;
    border: 1px solid #e6eae3;
    padding: 5px 14px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #4a5a46;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.chip.active {
    background-color: #4faf54;
    border-color: #4faf54;
    color: white;
}

.chip:hover:not(.active) {
    border-color: #4faf54;
    color: #4faf54;
}

.reset-btn-sm {
    background: transparent;
    border: 1px solid #e6eae3;
    border-radius: 40px;
    padding: 6px 0;
    width: 100%;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 500;
    color: #7b8b76;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.reset-btn-sm:hover {
    border-color: #4faf54;
    color: #4faf54;
    background: #fefef8;
}

.content-area {
    flex: 1;
    min-width: 0;
}

.hero {
    margin-bottom: 32px;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.hero-text {
    flex: 1;
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: #1e2a21;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

.hero p {
    font-size: 0.9rem;
    color: #6f7e6a;
    max-width: 480px;
}

.catalog-download-btn {
    background-color: #4faf54;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(79, 175, 84, 0.2);
    white-space: nowrap;
    text-decoration: none;
}

.catalog-download-btn:hover {
    background-color: #3d8e42;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(79, 175, 84, 0.3);
}

.catalog-download-btn:active {
    transform: translateY(0);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.results-count {
    font-size: 0.75rem;
    color: #8aa185;
    letter-spacing: 0.2px;
}

.clear-search {
    background: none;
    border: none;
    color: #9bae95;
    font-size: 0.7rem;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s;
}

.clear-search:hover {
    color: #4faf54;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 36px 24px;
    margin-bottom: 60px;
}

.product-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.02);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 24px -12px rgba(0, 0, 0, 0.08);
}

.product-card-inner {
    display: block;
}

.product-image {
    aspect-ratio: 4 / 5;
    background-color: #fafaf8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.02);
}

.product-info {
    padding: 16px 14px 18px;
}

.product-category {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9bae95;
    margin-bottom: 6px;
    font-weight: 500;
}

.product-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: #1a2a1a;
    line-height: 1.3;
}

.product-description {
    font-size: 0.75rem;
    color: #7b8b76;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.toast-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: #2c2e2c;
    color: white;
    padding: 8px 22px;
    border-radius: 60px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
    background-color: rgba(30, 42, 33, 0.94);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    white-space: nowrap;
}

.toast-message.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

footer {
    border-top: 1px solid #f0f0ef;
    padding: 28px 0 36px;
    margin-top: 20px;
    text-align: center;
    font-size: 0.7rem;
    color: #8a9b86;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.footer-social {
    margin-top: 24px;
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.4rem;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    color: #a7baa0;
    font-size: 0.85rem;
    display: none;
}

.no-results.show {
    display: block;
}

#loadingTrigger {
    height: 20px;
}

#loader {
    text-align: center;
    padding: 20px;
    display: none;
}

/* Анимация загрузки */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* ========== МОБИЛЬНАЯ ВЕРСИЯ ========== */
@media (max-width: 900px) {
    body {
        padding-top: 80px;
    }
    
    .main-wrapper {
        padding: 0 20px 0 20px;
    }
    
    .main-layout {
        flex-direction: column;
        gap: 24px;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
        background: #ffffff;
        padding: 16px 0 8px 0;
        margin-top: 0;
        border-bottom: 1px solid #f0f0f0;
        border-radius: 0;
    }
    
    .sidebar-section {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
    
    .sidebar-section:first-child {
        margin-top: 0;
    }
    
    .category-chips {
        gap: 10px;
    }
    
    .chip {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .reset-btn-sm {
        margin-top: 8px;
        padding: 8px 0;
    }
    
    .hero {
        margin-top: 0;
        padding-top: 8px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 0.85rem;
    }
    
    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .catalog-download-btn {
        padding: 8px 20px;
        margin-top: 20px;
        font-size: 0.8rem;
        width: 100%;
        justify-content: center;
    }
    
    .products-grid {
        gap: 24px 16px;
        margin-top: 8px;
    }
}

@media (max-width: 768px) {
    .social-icons {
        gap: 20px;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 550px) {
    body {
        padding-top: 70px;
    }
    
    .main-wrapper {
        padding: 0 16px 0 16px;
    }
    
    .sidebar {
        padding: 12px 0 8px 0;
    }
    
    .sidebar-section {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    
    .sidebar-title {
        font-size: 0.65rem;
        margin-bottom: 10px;
    }
    
    .chip {
        padding: 6px 14px;
        font-size: 0.75rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.8rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .results-header {
        margin-bottom: 20px;
    }
    
    .results-count {
        font-size: 0.7rem;
    }
    
    .clear-search {
        font-size: 0.65rem;
    }
    
    .toast-message {
        white-space: normal;
        text-align: center;
        max-width: 80%;
        padding: 8px 16px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .social-icons {
        gap: 16px;
    }
    
    .social-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
}

@media (max-width: 380px) {
    .hero h1 {
        font-size: 1.3rem;
    }
    
    .product-title {
        font-size: 0.9rem;
    }
    
    .product-description {
        font-size: 0.7rem;
    }
}