/* ========================================================================
   1. FONTS & RESET
   ======================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
    /* Брендовые цвета */
    --bg-main: #f5f2eb;
    --header: #4a4a4a;
    --accent: #6b8e23;
    --accent-dark: #5a7a1d;
    --text: #1a1a1a;
    --text-light: #6c757d;
    --white: #ffffff;
    --dark: #4a4a4a;

    /* Радиусы */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    --border-radius-2xl: 24px;
    --border-radius-full: 40px;

    /* Шрифты */
    --font-hero-title: 100px;
    --font-size-section-title: 48px;
    --font-size-section-subtitle: 22px;
    --font-weight-section-subtitle: normal;
    --font-size-text-warning: 32px;
    --font-size-text: 20px;

    /* Тени */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(107, 142, 35, 0.25);

    /* Transition */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

ul {
    padding: 0;
    list-style-type: none;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-main);
    color: var(--text);
    margin: 0;
    padding: 0;
}

/* Полный запрет выделения всего сайта */
body {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Разрешить выделение только в полях ввода */
input, textarea, [contenteditable="true"] {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* ===== FIXED FOOTER - МИНИМАЛЬНЫЕ ИЗМЕНЕНИЯ ===== */
/* ===== FIXED FOOTER ===== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}
/* ========================================================================
   2. TYPOGRAPHY & LINKS
   ======================================================================== */
a {
    text-decoration: none;
}

h2,
.h2 {
    font-size: 3rem;
}

section {
    scroll-margin-top: 80px;
}

.section-margin {
    margin-top: 100px;
    margin-bottom: 100px;
}

.block-margin {
    margin-top: 60px;
    margin-bottom: 60px;
}

.section-title {
    position: relative;
    display: inline-block;
    font-weight: 700;
    color: var(--text);
    font-size: var(--font-size-section-title);
}

.section-subtitle {
    font-size: var(--font-size-section-subtitle);
    font-weight: var(--font-weight-section-subtitle);
    line-height: 110%;
}

.section-text {
    font-size: var(--font-size-text);
}

.catalog-title {
    font-size: var(--font-size-text-warning);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .section-title::after {
        width: 40px;
    }
}

/* ========================================================================
   3. CONTAINER
   ======================================================================== */
.container.container-wide {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 576px) { .container.container-wide { max-width: 540px; } }
@media (min-width: 768px) { .container.container-wide { max-width: 720px; } }
@media (min-width: 992px) { .container.container-wide { max-width: 960px; } }
@media (min-width: 1200px) { .container.container-wide { max-width: 1140px; } }
@media (min-width: 1400px) { .container.container-wide { max-width: 1800px; } }

/* ========================================================================
    IMAGE PROTECTED
   ======================================================================== */
img {
    user-drag: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

.clickable-image {
    pointer-events: auto;
    cursor: pointer;
}

.image-box {
    aspect-ratio: 1 / 1; /* или 3/4, 4/3, 16/9 */
    overflow: hidden;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* обрезает лишнее, сохраняя пропорции */
    object-position: center center;
}

/* Pinterest‑плитка (квадрат по умолчанию) */
.masonry-item .masonry-img-wrapper { aspect-ratio: 1 / 1; }
.masonry-item-tall .masonry-img-wrapper { aspect-ratio: 3 / 4; }
.masonry-item-wide .masonry-img-wrapper { aspect-ratio: 4 / 3; }

/* Квадрат */
.aspect-1-1 { aspect-ratio: 1 / 1; }

/* Вертикальная карточка */
.aspect-3-4 { aspect-ratio: 3 / 4; }

/* Горизонтальная карточка */
.aspect-4-3 { aspect-ratio: 4 / 3; }

/* Баннер 16:9 */
.aspect-16-9 { aspect-ratio: 16 / 9; }



/* ========================================================================
   4. BUTTONS
   ======================================================================== */
.btn,
.btn-accent,
.btn-primary,
.btn-outline-primary,
.btn-catalog,
.btn-cta {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    border-radius: var(--border-radius-full);
}

.btn-accent {
    background-color: var(--accent);
    color: var(--white);
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

.btn-accent:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: var(--white);
}

.btn-catalog {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.btn-catalog:hover {
    color: var(--accent-dark);
    transform: translateX(5px);
}

.btn-primary {
    background-color: var(--accent);
    border-color: var(--accent);
    border-radius: var(--border-radius-full);
}

.btn-primary:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
}

.btn-outline-primary {
    border: 1px solid var(--accent);
    color: var(--accent);
    background: transparent;
    border-radius: var(--border-radius-full);
}

.btn-outline-primary:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

/* ========================================================================
   5. HEADER & NAVIGATION
   ======================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    transition: all 0.3s ease;
    /*padding: 0.5rem 0;*/
    background: transparent;
}

/* При скролле — добавляем фон */
.header-scrolled,
.header-hover {
    background: rgba(74, 74, 74, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Остальные стили шапки без изменений */
.navbar-custom {
    min-height: 100px;
    padding: 0;
}

.nav-link {
    min-height: 100px;
    display: flex;
    align-items: center;
    font-size: 20px;
}

.navbar-brand img {
    display: block;
    height: 80px;
    width: auto;
}

.nav-link-accent {
    position: relative;
    color: #fff !important;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 1rem 0;
}

.nav-link-accent:hover {
    color: var(--accent) !important;
}

.nav-link-accent.active {
    color: var(--accent) !important;
}

body:has(.navbar-collapse.show) .header {
    background: #4a4a4a !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
}

.nav-link-accent.active::after,
.nav-link-accent:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
}

.social-link {
    color: #000 !important;
    transition: color 0.3s ease;
    font-size: 1.2rem;
}

.header .social-link {
    color: #fff !important;
}

.social-link:hover {
    color: var(--accent) !important;
}

.btn-language {
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    background: transparent;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.btn-language:hover,
.btn-language.active {
    color: var(--accent) !important;
    border-color: var(--accent) !important;
    background: transparent;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991.98px) {
    /* Меняем порядок элементов в navbar */
    .navbar-custom .container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }

    .navbar-brand {
        order: 1;
        margin-right: 0;
    }

    .navbar-toggler {
        order: 2;
        margin-left: auto;
        /*margin-right: 0.75rem;*/
        position: static;
        transform: none;
    }

    .navbar-collapse {
        order: 3;
        flex-basis: 100%;
        margin-top: 1rem;
    }

    .logo-white {
        max-height: 65px;
    }
}

/* ========================================================================
   6. DROPDOWN CATALOG MENU
   ======================================================================== */
#catalog {
    background: var(--header);
}

.dropdown-catalog {
    position: unset;
    display: inline-block;
}

.dropdown-menu-catalog {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 100%;
    padding: 1.5rem;
    margin-top: 0;
    background: rgba(74, 74, 74, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.dropdown-catalog:hover .dropdown-menu-catalog {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.dropdown-column {
    flex: 1;
    min-width: 160px;
}

.dropdown-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.dropdown-header a {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.dropdown-header a:hover {
    color: var(--accent);
}

.dropdown-submenu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dropdown-item {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    text-decoration: none;
    padding: 0.3rem 0;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    color: var(--accent);
    padding-left: 0.25rem;
}

.dropdown-item-level-2 {
    padding-left: 0.5rem;
}

.dropdown-item-level-3 {
    padding-left: 1rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
}

.dropdown-submenu-children {
    padding-left: 0.75rem;
    margin-left: 0.25rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================================================
   7. FEATURE CARDS
   ======================================================================== */
.feature-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.feature-icon {
    font-size: 2rem;
    line-height: 1;
}

@media (max-width: 768px) {
    .feature-card {
        text-align: center;
    }
}

/* ========================================================================
   8. CATALOG GRID (Main catalog page)
   ======================================================================== */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.category-card {
    position: relative;
    background: #fff;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-link {
    text-decoration: none;
    display: block;
}

.category-image-wrapper {
    position: relative;
    overflow: hidden;
    /*height: 500px;*/
    aspect-ratio: 4 / 3;
    /*aspect-ratio: 2 / 1;*/
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.category-card:hover .category-image {
    transform: scale(1.05);
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.6));
}

.category-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    color: white;
    text-align: center;
    z-index: 2;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.category-btn {
    width: fit-content;
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 4px;
    margin: 0 auto;
    transition: all var(--transition-base);
}

.catalog-card:hover .category-btn,
.subcategory:hover .category-btn,
.category-card:hover .category-btn {
    color: var(--accent);
    border-bottom-color: white;
}

/* ========================================================================
   9. CATALOG CARDS (Subcategories & Products)
   ======================================================================== */
.catalog-card {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.catalog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.catalog-card-image-wrapper {
    position: relative;
    overflow: hidden;
    /*height: 400px;*/
    aspect-ratio: 1 / 1;
}

.catalog-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.catalog-card:hover .catalog-card-image {
    transform: scale(1.05);
}

.catalog-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.catalog-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
    line-height: 1.4;
}

.catalog-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.catalog-card-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
    flex: 1;
}

.catalog-card-footer {
    margin-top: auto;
}

/* Subcategory card styles (legacy, can be merged) */
.subcategory-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.subcategory-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.subcategory-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.subcategory-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.subcategory-card:hover .subcategory-image {
    transform: scale(1.05);
}

.subcategory-placeholder {
    width: 100%;
    height: 100%;
    min-height: 220px;
    background-color: #f8f9fa;
}

.subcategory-body {
    padding: 1.25rem;
}

.subcategory-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

.subcategory-description {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.5;
}


/* Карточки на главной странице каталога */
.catalog-index .category-image-wrapper {
    aspect-ratio: 1 / 1;
}

/* Карточки подкатегорий (страница категории, где есть дети) */
.category-children .catalog-subcategory {
    aspect-ratio: 2 / 3; /* высота больше ширины */
}

/* Карточки товаров (в категориях без детей) */
.subcategory .catalog-subcategory-image-wrapper,
.products-grid .catalog-card-image-wrapper {
    aspect-ratio: 1 / 1; /* квадратные */
}

/* Специально для категорий: Мебель, Полы, Фальшбалки — вытянутые */
.category-mebel .catalog-card-image-wrapper,
.category-poly .catalog-card-image-wrapper,
.category-falshbalki .catalog-card-image-wrapper {
    aspect-ratio: 2 / 3;
}

.subcategory .catalog-card {
    position: relative;
}

.catalog-card .catalog-card-body,
.subcategory .catalog-card-body {
    position: absolute;
    width: 100%;
    bottom: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.2) 80%,
        transparent 100%
    );
    padding: 2rem 1rem 1rem;
    border-radius: 0 0 var(--border-radius-xl) var(--border-radius-xl);
}

/* ========================================================================
   10. HERO SECTIONS
   ======================================================================== */
.about-hero,
.partners-hero,
.contacts-hero,
.showcase-hero,
.catalog-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/static/images/banner-hero.jpg');
    background-size: cover;
    background-position: center;
    min-height: 400px;
    height: 50vh;
    max-height: 500px;
}

@media (max-width: 768px) {
    .about-hero,
    .partners-hero,
    .contacts-hero,
    .catalog-hero {
        min-height: 250px;
        height: 30vh;
    }

    .about-hero h1,
    .partners-hero h1,
    .contacts-hero h1,
    .catalog-hero h1 {
        font-size: 2rem;
    }
}

/* ========================================================================
   11. PARTNERS PAGE SPECIFIC
   ======================================================================== */
/* Вариант 3 */
.modern-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.modern-text {
    flex: 2;
    min-width: 280px;
}

.modern-card {
    flex: 1;
    min-width: 280px;
    background: #fff;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.1);
    align-self: flex-start;
    position: sticky;
    top: 100px;
}

.modern-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.modern-card-body {
    padding: 1.5rem;
}

.benefit-item {
    background: #fff;
    padding: 1rem 1.25rem;
    border-radius: 20px;
    transition: all 0.2s ease;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.benefit-item.full-width {
    max-height: none;
    overflow-y: auto;
    margin-bottom: 2rem;
}

.benefit-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(107, 142, 35, 0.1);
}

.benefit-number {
    font-size: 2rem;
    font-weight: 700;
    color: rgba(107, 142, 35, 0.2);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.benefit-item p {
    margin-bottom: 0;
}

@media (max-width: 992px) {
    .modern-card {
        position: static;
    }
}

/* ========================================================================
   12. CONTACTS PAGE
   ======================================================================== */
.contacts-form-card {
    background: var(--header);
    color: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.contacts-form-card input,
.contacts-form-card textarea {
    background: var(--bg-main);
}

.about-image {
    width: 100%;
    object-fit: cover;
}

.contacts-image {
    max-height: 500px;
    width: 100%;
    object-fit: cover;
}

/* Кастомный чекбокс в цветах бренда (без синего) */
.form-check-input-modern {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.15em;
    border: 2px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
    transition: all 0.2s ease;
}

.form-check-input-modern:checked {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
}

.form-check-input-modern:focus {
    box-shadow: 0 0 0 2px rgba(107, 142, 35, 0.25);
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .contacts-image {
        max-height: 300px;
    }
}

/* ========================================================================
   13. PRODUCT PAGE
   ======================================================================== */
.product-hero {
    background-size: cover;
    background-position: center;
    min-height: 500px;
    height: 60vh;
    position: relative;
}

.product-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.product-hero .container {
    position: relative;
    z-index: 2;
}

.product-hero-card {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
}

.product-price-hero {
    font-size: 2rem;
}

.product-main-image {
    /*max-height: 400px;*/
    width: 100%;
    object-fit: cover;
}

.specs-list {
    font-size: 14px;
}

.spec-key {
    text-align: left;
}

.spec-value {
    text-align: right;
}

.specs-list .spec-item {
    transition: background 0.2s ease;
}

.specs-list .spec-item:hover {
    background: #f8f9fa;
}

/* Swiper slider */
.product-swiper {
    padding-bottom: 50px;
}

.product-swiper .swiper-slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.swiper-button-prev,
.swiper-button-next {
    color: var(--accent);
}

.swiper-pagination-bullet-active {
    background: var(--accent);
}

@media (max-width: 768px) {
    .product-hero {
        min-height: 400px;
        height: 50vh;
    }

    .product-hero-card {
        padding: 1rem;
    }

    .product-hero-card h1 {
        font-size: 1.75rem;
    }

    .product-price-hero {
        font-size: 1.5rem;
    }

    .product-swiper .swiper-slide img {
        height: 250px;
    }
}

/* ========================================================================
   14. TEXT STYLES
   ======================================================================== */
.about-text p {
    font-size: 20px;
    line-height: 1.7;
    color: var(--text);
}

@media (max-width: 768px) {
    .about-text p,
    .what-is p {
        font-size: 1rem;
    }
}

/* ========================================================================
   15. RESPONSIVE MEDIA QUERIES
   ======================================================================== */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .catalog-grid {
        gap: 20px;
    }

    .category-image-wrapper {
        /*height: 280px;*/
    }

    .category-title {
        font-size: 1.3rem;
    }

    .category-content {
        padding: 20px;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .category-image-wrapper {
        /*height: 250px;*/
    }

    .category-title {
        font-size: 1.4rem;
    }

    .category-content {
        padding: 20px;
    }

    /*.catalog-card-image-wrapper {*/
    /*    height: 200px;*/
    /*}*/

    .catalog-card-title {
        font-size: 1.1rem;
    }

    .catalog-card-body {
        padding: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

/* Small mobile (480px and below) */
@media (max-width: 480px) {
    .category-image-wrapper {
        /*height: 200px;*/
    }

    .category-title {
        font-size: 1.2rem;
    }

    .category-content {
        padding: 15px;
    }

    .advantages-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Large screens (1400px and above) */
/*@media (min-width: 1400px) {*/
/*    .catalog-card-image-wrapper {*/
/*        height: 400px;*/
/*    }*/
/*}*/

/* Mobile navigation */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--dark);
        padding: 1rem;
        border-radius: 16px;
        margin-top: 1rem;
        max-height: 80vh;
        overflow-y: auto;
    }

    .site-menu {
        flex-direction: column !important;
        gap: 0.5rem !important;
        margin: 0 !important;
        margin-bottom: 1.5rem !important;
        width: 100%;
        align-items: flex-start !important;
    }

    .nav-link-accent {
        padding: 0.5rem 0;
    }

    .dropdown-catalog {
        width: 100%;
    }

    .dropdown-menu-catalog {
        position: static;
        width: 100%;
        transform: none;
        margin-top: 0.5rem;
        opacity: 1;
        visibility: visible;
        display: none;
        background: rgba(34, 34, 34, 0.98);
    }

    .dropdown-catalog:hover .dropdown-menu-catalog,
    .dropdown-catalog .dropdown-menu-catalog.show {
        display: block;
    }

    .dropdown-menu-container {
        flex-direction: column;
        gap: 1rem;
    }

    .dropdown-column {
        width: 100%;
    }

    .dropdown-submenu-children {
        padding-left: 1rem;
    }

    .dropdown-item-level-2,
    .dropdown-item-level-3 {
        padding-left: 0.5rem;
    }
}

/* ========================================================================
   16. FOOTER
   ======================================================================== */
.footer {
    background: #4a4a4a;
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-description {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a,
.footer-contacts a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.85rem;
}

.footer-links a:hover,
.footer-contacts a:hover {
    color: var(--accent);
}

.footer-contacts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contacts li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.footer-contacts i {
    color: var(--accent);
    font-size: 1rem;
    width: 20px;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s ease;
}

.footer-social-link:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
}

.footer-dev,
.footer-copyright  {
    color: rgba(255, 255, 255, 0.5);
}

.footer-dev a,
.footer-links a[href*="imfortes"] {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-dev a:hover,
.footer-links a[href*="imfortes"]:hover {
    color: var(--accent);
}

.footer-payment {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Адаптация футера */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-contacts li {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }
}


/*
    17. HOME SLIDER
*/
/* Слайдер категорий */
.categories-slider-section {
    background-color: var(--bg-main);
}

.categories-swiper {
    padding: 0 0 40px 0;
}

.category-card-slider {
    transition: transform 0.3s ease;
}

.category-card-slider:hover {
    transform: translateY(-5px);
}

.category-link-slider {
    text-decoration: none;
    display: block;
}

.category-image-wrapper-slider {
    aspect-ratio: 1 / 1;
    width: 100%;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    margin-bottom: 1rem;
}

.category-image-slider {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.category-card-slider:hover .category-image-slider {
    transform: scale(1.05);
}

.category-title-slider {
    font-size: 32px;
    font-weight: 500;
    text-align: start;
    color: var(--text);
    margin-top: 0.5rem;
}

/* Навигация свайпера */
.home-swiper .swiper-button-next,
.home-swiper .swiper-button-prev,
.product-swiper .swiper-button-next,
.product-swiper .swiper-button-prev,
.categories-swiper .swiper-button-prev,
.categories-swiper .swiper-button-next {
    color: var(--accent);
    background-color: rgba(255, 255, 255, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.home-swiper .swiper-button-next:after,
.home-swiper .swiper-button-prev:after,
.product-swiper .swiper-button-next:after,
.product-swiper .swiper-button-prev:after,
.categories-swiper .swiper-button-prev:after,
.categories-swiper .swiper-button-next:after {
    font-size: 1.2rem;
    font-weight: bold;
}

.home-swiper .swiper-pagination-bullet-active
.product-swiper .swiper-pagination-bullet-active,
.categories-swiper .swiper-pagination-bullet-active {
    background-color: var(--accent);
}

@media (max-width: 768px) {
    .categories-swiper {
        padding: 20px 20px;
    }

    .category-title-slider {
        font-size: 1rem;
    }
}


/* ===== ADVANTAGES / FEATURES ===== */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.partners-card,
.advantage-card {
    background: #fff;
    padding: 1.75rem 1.25rem;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-align: center;
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(107, 142, 35, 0.1);
}

.advantage-icon-circle {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem auto;
    background: rgba(107, 142, 35, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent);
    transition: all 0.3s ease;
}

.advantage-card:hover .advantage-icon-circle {
    background: var(--accent);
    color: #fff;
}

.partners-title,
.advantage-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.advantage-description {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 0;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .advantages-grid {
        gap: 1rem;
    }

    .advantage-card {
        padding: 1.25rem;
    }

    .advantage-icon-circle {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
    }

    .advantage-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .advantages-grid {
        grid-template-columns: 1fr;  /* На самых маленьких — 1 колонка */
        gap: 1rem;
    }
}


/* ===== MASONRY STYLE GALLERY ===== */
.gallery-section {
    background: var(--bg-main);
}

.masonry-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    grid-auto-flow: dense;
}

.masonry-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.masonry-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.masonry-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 100%;
    /*aspect-ratio: 1 / 1.2;*/
}

/*.masonry-item-wide .masonry-img-wrapper {*/
/*    aspect-ratio: 2 / 1;*/
/*}*/

/*.masonry-item-tall .masonry-img-wrapper {*/
/*    aspect-ratio: 1 / 1.5;*/
/*}*/

.masonry-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.masonry-item:hover .masonry-img-wrapper img {
    transform: scale(1.05);
}

.masonry-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    transform: translateY(20px);
    opacity: 0;
    transition: all var(--transition-base);
}

.masonry-item:hover .masonry-overlay {
    transform: translateY(0);
    opacity: 1;
}

.masonry-tag {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}

.masonry-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.4;
}

/* Адаптация */
@media (max-width: 992px) {
    .masonry-gallery {
        gap: 1rem;
    }

    .masonry-overlay {
        padding: 1rem;
    }

    .masonry-title {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .masonry-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .masonry-item-wide,
    .masonry-item-tall {
        grid-column: span 1;
    }

    .masonry-img-wrapper,
    .masonry-item-wide .masonry-img-wrapper,
    .masonry-item-tall .masonry-img-wrapper {
        aspect-ratio: 1 / 1;
    }

    .gallery-section .masonry-item-tall .masonry-img-wrapper {
        aspect-ratio: 3 / 4;
    }
}

@media (max-width: 480px) {
    .masonry-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}


/* ===== CONTENT BLOCKS ===== */
.content-block {
    background: rgba(255, 255, 255, 0.6);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.content-block h2 {
    color: var(--text);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

@media (max-width: 768px) {
    .content-block {
        padding: 1.25rem;
    }
}


/* Cookie consent */
.cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #4a4a4a;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
}

.cookie-text {
    font-size: 0.85rem;
    line-height: 1.4;
    flex: 1;
}

.cookie-btn {
    background: #6b8e23;
    border: none;
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-btn:hover {
    background: #5a7a1d;
    transform: scale(1.02);
}

@media (min-width: 768px) {
    .cookie-consent {
        left: auto;
        right: 20px;
        max-width: 450px;
    }
}

@media (max-width: 480px) {
    .cookie-consent {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .cookie-btn {
        width: 100%;
    }
}

/* ========================================================================
   MOBILE NAVIGATION WITH ANIMATION
   ======================================================================== */

@media (max-width: 991.98px) {
    /* Фикс позиционирования */
    .navbar-custom .container {
        position: relative;
    }

    /* Кастомная анимация выезда меню */
    .navbar-collapse {
        position: fixed;
        top: 100px;
        min-height: 100vh;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        background: var(--dark);
        z-index: 1040;
        padding: 2rem 1.5rem;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 0;
        margin-top: 0;
        display: block !important;
    }

    .navbar-collapse.show {
        transform: translateX(0);
    }

    /* Плавное появление */
    .navbar-collapse.collapsing {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        height: auto !important;
    }

    /* Ссылки в меню */
    .site-menu {
        flex-direction: column !important;
        gap: 1rem !important;
        width: 100%;
        align-items: flex-start !important;
    }

    .site-menu .nav-link-accent {
        font-size: 1.25rem;
        padding: 0.5rem 0;
        min-height: auto;
    }

    /* Кастомный бургер (анимированный) */
    .navbar-toggler {
        width: 30px;
        height: 24px;
        position: relative;
        border: none;
        background: transparent;
        padding: 0;
        cursor: pointer;
    }

    .navbar-toggler:focus {
        box-shadow: none;
        outline: none;
    }

    .navbar-toggler-icon {
        background-image: none !important;
        width: 100%;
        height: 100%;
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .navbar-toggler-icon::before,
    .navbar-toggler-icon::after,
    .navbar-toggler-icon span {
        content: '';
        display: block;
        width: 100%;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .navbar-toggler-icon span {
        margin: 9px 0;
    }

    /* Состояние "открыто" — превращаем в крестик */
    .navbar-toggler.collapsed .navbar-toggler-icon::before {
        transform: translateY(11px) rotate(45deg);
    }

    .navbar-toggler.collapsed .navbar-toggler-icon span {
        opacity: 0;
        transform: scaleX(0);
    }

    .navbar-toggler.collapsed .navbar-toggler-icon::after {
        transform: translateY(-11px) rotate(-45deg);
    }

    /* Выпадающее меню в мобилке */
    .dropdown-menu-catalog {
        background: rgba(74, 74, 74, 0.95);
        box-shadow: none;
        backdrop-filter: none;
        border: none;
        padding-left: 1rem;
        margin-top: 0.5rem;
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        display: none;
        transform: none;
    }

    .dropdown-catalog:hover .dropdown-menu-catalog {
        display: none;
    }

    .dropdown-catalog.show .dropdown-menu-catalog {
        display: block;
    }

    .dropdown-menu-container {
        flex-direction: column;
        gap: 1rem;
    }

    .dropdown-column {
        width: 100%;
    }
}

/* ========================================================================
   CONTACT FEEDBACK BLOCK (форма + контент рядом)
   ======================================================================== */
.contact-feedback-section {
    background-color: var(--bg-main);
}

.feedback-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

.feedback-lead {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

.feedback-features {
    margin-top: 1.5rem;
}

.feedback-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem;
    background: #fff;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.feedback-feature:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(107, 142, 35, 0.1);
}

.feedback-feature i {
    font-size: 1.75rem;
    color: var(--accent);
    flex-shrink: 0;
}

.feedback-feature h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.feedback-feature p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.feedback-contacts {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1.25rem;
}

.feedback-contacts p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.feedback-contacts i {
    font-size: 1.1rem;
    color: var(--accent);
    width: 24px;
}

.feedback-contacts a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.feedback-contacts a:hover {
    color: var(--accent);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .feedback-title {
        font-size: 1.5rem;
        text-align: center;
    }

    .feedback-lead {
        text-align: center;
    }

    .feedback-feature {
        padding: 0.6rem;
    }

    .feedback-feature i {
        font-size: 1.5rem;
    }
}


/* ========================================================================
   SCROLL ANIMATIONS
   ======================================================================== */
@media (min-width: 992px) {
    .animate-on-scroll {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .animate-on-scroll.animated {
        opacity: 1;
        transform: translateY(0);
    }

    /* Разные задержки для элементов внутри блока */
    .animate-on-scroll.delay-1 { transition-delay: 0.1s; }
    .animate-on-scroll.delay-2 { transition-delay: 0.2s; }
    .animate-on-scroll.delay-3 { transition-delay: 0.3s; }
    .animate-on-scroll.delay-4 { transition-delay: 0.4s; }
    .animate-on-scroll.delay-5 { transition-delay: 0.5s; }

    /* Альтернативные анимации */
    .animate-fade-in {
        opacity: 0;
        transition: opacity 0.8s ease;
    }

    .animate-fade-in.animated {
        opacity: 1;
    }

    .animate-slide-left {
        opacity: 0;
        transform: translateX(-30px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .animate-slide-left.animated {
        opacity: 1;
        transform: translateX(0);
    }

    .animate-slide-right {
        opacity: 0;
        transform: translateX(30px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .animate-slide-right.animated {
        opacity: 1;
        transform: translateX(0);
    }

    .animate-scale {
        opacity: 0;
        transform: scale(0.95);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }

    .animate-scale.animated {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== HOME SLIDER ===== */
.home-slider-wrapper {
    /*border-radius: 20px;*/
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.home-swiper {
    max-height: 800px;
}

.home-slider-image {
    width: 100%;
    aspect-ratio: 3 / 4;
}

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

.home-slider-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
}

.home-slider-caption h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0;
}


@media (max-width: 768px) {
    .home-slider-image {
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 576px) {
    /* Принудительное ограничение для всех контейнеров */
    .container,
    .container-wide,
    .navbar-custom .container {
        max-width: 100%;
        overflow-x: hidden;
        padding-left: 15px;
        padding-right: 15px;
    }

}

/* Отключаем анимации на мобильных устройствах */
@media (max-width: 992px) {
    .animate-on-scroll,
    .animate-fade-in,
    .animate-slide-left,
    .animate-slide-right,
    .animate-scale {
        opacity: 1 !important;
        transform: none !important;
    }

    .feature-card {
        opacity: 1 !important;
        transform: none !important;
    }
}