body {
    background: #f4f4f4;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #2c3e50;
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}
.container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: row;
    gap: 20px;
}
.sidebar {
    background: #f9f9f9;
    padding: 15px;
    width: 280px;
    flex-shrink: 0;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.05);
}
.main-content {
    flex: 1;
}
footer {
    margin-top: auto;
    width: 100%;
}
.sidebar h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
}
.producers-accordion {
    flex-grow: 1;
    overflow-y: auto;
}
.accordion-item {
    border-bottom: 1px solid #d0d0d0;
}
.accordion-header {
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(145deg, #ffffff, #e0e0e0);
    border-radius: 6px;
    transition: background 0.2s, transform 0.2s;
}
.accordion-header:hover {
    background: linear-gradient(145deg, #f0f0f0, #d0d0d0);
    transform: scale(1.02);
}
.accordion-header h3 {
    font-size: 14px;
    color: #2c3e50;
    margin: 0;
    font-weight: 500;
}
.accordion-content {
    display: none;
    padding: 10px;
    background: #f5faff;
    border-radius: 6px;
}
.accordion-content.active {
    display: block;
}
.producer-block {
    display: flex;
    align-items: center;
}
.producer-block a {
    color: #3498db;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}
.producer-block a:hover {
    color: #2c3e50;
    text-decoration: underline;
}
.filter-links {
    margin-bottom: 12px;
}
.filter-links a {
    display: block;
    background: linear-gradient(145deg, #ffffff, #e0e0e0);
    border: none;
    padding: 8px 12px;
    border-radius: 50px;
    font-size: 13px;
    color: #2c3e50;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    box-shadow: 3px 3px 6px rgba(0,0,0,0.2), -3px -3px 6px rgba(255,255,255,0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}
.filter-links a:hover {
    transform: scale(1.05);
    box-shadow: 4px 4px 8px rgba(0,0,0,0.3), -4px -4px 8px rgba(255,255,255,0.6);
    background: linear-gradient(145deg, #f0f0f0, #d0d0d0);
}
.load-more-link {
    color: #3498db;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    display: block;
    cursor: pointer;
    text-align: center;
    transition: color 0.2s;
}
.load-more-link:hover {
    color: #2c3e50;
}
.load-more-link.loading::after {
    content: '\f1ce';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.search-bar {
    max-width: 600px;
    margin: 25px auto;
    position: relative;
    text-align: center;
}
.search-bar form {
    display: flex;
    align-items: center;
    background: url('/catalog/images/fon.png') no-repeat center center;
    background-size: cover;
    border-radius: 30px;
    box-shadow: 4px 4px 8px rgba(0,0,0,0.2), -4px -4px 8px rgba(255,255,255,0.5);
    transition: box-shadow 0.2s;
}
.search-bar form:hover, .search-bar form:focus-within {
    box-shadow: 6px 6px 12px rgba(0,0,0,0.3), -6px -6px 12px rgba(255,255,255,0.6);
}
.search-bar input {
    width: 100;
    padding: 12px 40px 12px 15px;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 500;
    background: transparent;
    outline: none;
    color: #2c3e50;
}
.search-bar input::placeholder {
    color: #3498db;
}
.search-bar input:focus {
    box-shadow: none;
}
.search-bar button {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #3498db;
    font-size: 18px;
}
.search-bar button:hover {
    color: #2c3e50;
}
.tagline p {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin: 10px 0;
}
.popular-categories {
    margin: 15px 0;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.popular-categories a {
    text-decoration: none;
}
.popular-categories button {
    background: linear-gradient(145deg, #3498db, #2c3e50);
    color: #fff;
    padding: 8px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 3px 3px 6px rgba(0,0,0,0.2), -3px -3px 6px rgba(255,255,255,0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}
.popular-categories button:hover {
    transform: scale(1.05);
    box-shadow: 4px 4px 8px rgba(0,0,0,0.3), -4px -4px 8px rgba(255,255,255,0.6);
}
.slogan p {
    font-size: 16px;
    color: #2c3e50;
    text-align: center;
    margin: 10px 0;
}
.slogan a {
    color: #3498db;
    text-decoration: none;
}
.slogan a:hover {
    color: #2c3e50;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin: 15px 0;
}
.category-block {
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    border: none;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 3px 3px 6px rgba(0,0,0,0.2), -3px -3px 6px rgba(255,255,255,0.5);
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
}
.category-block:hover {
    transform: scale(1.03);
    box-shadow: 4px 4px 8px rgba(0,0,0,0.3), -4px -4px 8px rgba(255,255,255,0.6);
}
.category-block:empty {
    background: #f5faff;
    visibility: hidden;
}
.category-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.photo-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}
.photo-container img {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    object-fit: contain;
    loading: lazy;
}
.category-header a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.category-header a:hover {
    color: #3498db;
}
.subcategory-button {
    background: linear-gradient(145deg, #ffffff, #e0e0e0);
    border: none;
    padding: 8px 12px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 13px;
    color: #2c3e50;
    font-weight: 500;
    box-shadow: 3px 3px 6px rgba(0,0,0,0.2), -3px -3px 6px rgba(255,255,255,0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}
.subcategory-button:hover {
    transform: scale(1.05);
    box-shadow: 4px 4px 8px rgba(0,0,0,0.3), -4px -4px 8px rgba(255,255,255,0.6);
    background: linear-gradient(145deg, #f0f0f0, #d0d0d0);
}
.subcategory-list {
    display: none;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.subcategory-open {
    display: flex;
    max-height: 180px;
    overflow-y: auto;
}
.subcategory-item a {
    color: #666;
    text-decoration: none;
    font-size: 12px;
    padding: 6px 8px;
    display: block;
    font-weight: 400;
}
.subcategory-item a:hover {
    color: #3498db;
    background: #f5faff;
    border-radius: 6px;
}
.search-message p {
    font-size: 14px;
    color: #666;
    font-weight: 400;
    text-align: center;
}
.search-message a {
    color: #3498db;
    text-decoration: none;
}
.search-message a:hover {
    color: #2c3e50;
}
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 15px;
        margin: 15px;
    }
    .sidebar {
        width: 100%;
        order: -1;
        padding: 12px;
    }
    .search-bar {
        margin: 20px auto;
    }
    .search-bar input {
        font-size: 16px;
        padding: 10px 35px 10px 12px;
    }
    .search-bar button {
        right: 10px;
        font-size: 16px;
    }
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }
    .category-block {
        padding: 10px;
        min-height: 180px;
    }
    .photo-container img {
        width: 48px;
        height: 48px;
    }
    .category-header a {
        font-size: 13px;
    }
    .subcategory-button {
        font-size: 12px;
        padding: 6px 10px;
    }
    .subcategory-item a {
        font-size: 11px;
    }
    .accordion-header h3 {
        font-size: 13px;
    }
    .producer-block a, .load-more-link {
        font-size: 12px;
    }
    .filter-links a {
        font-size: 12px;
        padding: 6px 10px;
    }
}
@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }
    .category-block {
        padding: 8px;
        min-height: 160px;
    }
    .photo-container img {
        width: 32px;
        height: 32px;
    }
    .category-header a {
        font-size: 12px;
    }
    .subcategory-button {
        font-size: 11px;
        padding: 5px 8px;
    }
    .subcategory-item a {
        font-size: 10px;
        padding: 4px 6px;
    }
    .sidebar {
        padding: 8px;
    }
    .accordion-header h3 {
        font-size: 12px;
    }
    .producer-block a, .load-more-link {
        font-size: 11px;
        padding: 5px 8px;
    }
    .filter-links a {
        font-size: 11px;
        padding: 5px 8px;
    }
    .search-bar {
        margin: 15px auto;
    }
    .search-bar input {
        font-size: 14px;
        padding: 8px 30px 8px 10px;
    }
    .search-bar button {
        right: 8px;
        font-size: 14px;
    }
}