/* --- BASE & VARIABLES --- */
:root {
    --primary: #2c3e50; /* Темно-синий, строгий */
    --accent: #e67e22;  /* Оранжевый (промышленный акцент) */
    --bg-light: #f9f9f9;
    --card-bg: #eef2f5; /* Нейтральный фон под белые PNG */
    --text: #333;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    color: var(--text); 
    background: #fff; 
    line-height: 1.5; 
    font-weight: 400;
}
a { text-decoration: none; color: inherit; transition: 0.3s; }
a:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* Buttons */
.btn { 
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 30px; background: var(--primary); color: #fff; 
    font-weight: 600; font-size: 14px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
}
.btn:hover { background: #34495e; transform: translateY(-2px); }
.btn:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: #d35400; }

/* --- HEADER --- */
header { position: sticky; top: 0; background: #fff; border-bottom: 1px solid #eee; z-index: 1000; padding: 15px 0; }
.header-inner { display: flex; justify-content: space-between; align-items: center; position: relative; }
.logo { font-family: 'Roboto Slab', serif; font-weight: 900; font-size: 24px; text-transform: uppercase; color: var(--primary); letter-spacing: 0.5px; }
.logo span { color: var(--accent); }

/* Навигация на десктопе */
.nav-links { display: flex; gap: 30px; }
.nav-links a { font-size: 14px; font-weight: 500; color: #555; }
.nav-links a:hover { color: var(--accent); }

/* Кнопка мобильного меню */
.mobile-menu-btn { display: none; flex-direction: column; background: none; border: none; cursor: pointer; padding: 5px; width: 30px; height: 25px; justify-content: space-between; }
.mobile-menu-btn span { width: 100%; height: 3px; background: var(--primary); border-radius: 2px; transition: all 0.3s ease; }
.mobile-menu-btn:hover span { background: var(--accent); }

/* Активное состояние бургера */
.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

/* --- HERO --- */
.hero { 
    height: 75vh; min-height: 600px; position: relative; display: flex; align-items: center; 
    color: #fff; background: #222; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #2c3e50 0%, #000000 100%); opacity: 0.45; z-index: 1;
}
.hero img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; z-index: 0; }
.hero-content { position: relative; z-index: 2; max-width: 700px; padding-left: 5%; }
.hero h1 { font-family: 'Roboto Slab', serif; font-size: 3.5rem; line-height: 1.1; margin-bottom: 20px; font-weight: 800; }
    
.hero .btn {
    scroll-margin-top: 80px; /* Добавляем отступ для видимости кнопки при прокрутке */
}
.hero p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.9; max-width: 500px;}

/* Адаптивность для Hero */
@media (max-width: 1200px) {
    .hero h1 { font-size: 3rem; }
    .hero p { font-size: 1.1rem; }
}

@media (max-width: 992px) {
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1rem; max-width: 400px; }
    .hero-content { padding-left: 3%; }
}

@media (max-width: 768px) {
    .hero { 
        height: 60vh; 
        min-height: 500px;
    }
    .hero h1 { 
        font-size: 2rem; 
        line-height: 1.2;
    }
    .hero p { 
        font-size: 0.95rem; 
        max-width: 300px;
        margin-bottom: 25px;
    }
    .hero-content { 
        padding-left: 20px; 
        padding-right: 20px;
        text-align: center;
        max-width: 100%;
    }
    .hero .btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
}

@media (max-width: 480px) {
    .hero { 
        height: 50vh; 
        min-height: 450px;
    }
    .hero h1 { 
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    .hero p { 
        font-size: 0.9rem; 
        margin-bottom: 20px;
    }
    .hero-content { 
        padding-left: 15px; 
        padding-right: 15px;
    }
}

/* --- CATEGORIES GRID --- */
.categories { padding: 80px 0; background: #fff; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-family: 'Roboto Slab', serif; font-size: 2.2rem; margin-bottom: 10px; color: var(--primary); font-weight: 700; }

/* --- CATEGORIES GRID --- */
.categories { padding: 80px 0; background: #fff; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-family: 'Roboto Slab', serif; font-size: 2.2rem; margin-bottom: 10px; color: var(--primary); font-weight: 700; }

.cat-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    grid-template-rows: repeat(2, 1fr);
    gap: 25px; 
}

/* Адаптивность для сетки категорий */
@media (max-width: 992px) {
    .cat-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .cat-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, auto);
        gap: 20px;
    }
}


/* --- SERVICES BANNER (полная ширина) --- */
.services-banner {
    padding: 60px 0;
    background: var(--bg-light);
}

.services-card-full {
    display: block;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: 0.3s;
    text-decoration: none;
    color: inherit;
}

.services-card-full:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: transparent;
}

.services-card-content {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 30px;
}

.services-card-image {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    background-color: var(--card-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.services-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.15));
}

.services-card-text {
    flex: 1;
}

.services-card-title {
    font-family: 'Roboto Slab', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary);
}

.services-card-list {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .services-card-content {
        flex-direction: column;
        text-align: center;
    }
    
    .services-card-image {
        width: 150px;
        height: 150px;
    }
    
    .services-card-title {
        font-size: 1.5rem;
    }
}

.cat-img { 
    height: 240px; 
    background-color: var(--card-bg); 
    display: flex; align-items: center; justify-content: center;
    padding: 20px; 
}
.cat-img img { 
    width: 100%; height: 100%; 
    object-fit: contain; 
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.15)); 
    transition: transform 0.4s ease;
}
.cat-card:hover .cat-img img { transform: scale(1.08); }

.cat-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.cat-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; color: var(--primary); }
.cat-list { font-size: 0.85rem; color: #666; line-height: 1.6; margin-bottom: 20px; }
.cat-link { margin-top: auto; color: var(--accent); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; }

/* --- PRODUCTS PREVIEW --- */
.products { padding: 80px 0; background: var(--bg-light); }

/* Скрываем старую сетку */
.prod-grid { display: none; }

/* Стили для Swiper слайдера */
.products-swiper {
    padding:20px 40px; /* Добавляем отступы для стрелок */
    overflow: hidden;
}

.swiper-slide {
    height: auto;
}

.swiper-slide {
    height: auto;
}

.prod-card { 
    background: #fff; 
    padding: 15px; 
    border-radius: 8px; 
    transition: 0.3s; 
    height: 100%; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-decoration: none; 
    color: inherit;
}
.prod-card:hover { 
    box-shadow: 0 10px 20px rgba(0,0,0,0.08); 
    transform: translateY(-2px);
}

/* Кастомные стрелки слайдера */
.swiper-button-next,
.swiper-button-prev {
    color: var(--primary) !important;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    margin-top: -22px; /* Центрируем стрелки */
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: #fff;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    transform: scale(1.1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 18px;
    font-weight: bold;
}

/* Скрываем стрелки на мобильных */
@media (max-width: 768px) {
    .products-swiper {
        padding: 20px 0;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
}

.prod-img { 
    height: 260px; 
    background-color: var(--card-bg); 
    border-radius: 6px; margin-bottom: 15px; 
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.prod-img img { 
    width: 100%; height: 100%; 
    object-fit: contain; 
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1));
}

/* --- FOOTER --- */
footer { background: #222; color: #bbb; padding: 60px 0; font-size: 0.9rem; margin-top: 0; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.f-col h4 { color: #fff; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px;}
.f-col ul { list-style: none; }
.f-col ul li { margin-bottom: 10px; }
.f-col ul li a:hover { color: #fff; }

/* --- PRODUCT DETAIL PAGE (PDP) STYLES --- */
.product-page-layout { display: grid; grid-template-columns: 1fr 400px; gap: 60px; padding: 40px 0; }
.product-gallery-main { height: 500px; background: var(--card-bg); border-radius: 8px; padding: 30px; margin-bottom: 15px; }
.product-gallery-main img { height: 100%; width: 100%; object-fit: contain; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1)); }
.product-thumbnails { display: flex; gap: 10px; }
.product-thumbnails img { width: 80px; height: 80px; background: var(--bg-light); border-radius: 4px; padding: 5px; cursor: pointer; opacity: 0.7; }
.product-thumbnails img:hover { opacity: 1; border: 1px solid var(--accent); }
.config-block { background: var(--bg-light); padding: 30px; border-radius: 8px; border: 1px solid #eee; }
.config-block h3 { color: var(--primary); margin-bottom: 20px; }
.config-block select, .config-block input[type="number"] { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; appearance: none; }
.config-block select:focus, .config-block input[type="number"]:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.config-block .price-estimate { font-size: 1.5rem; font-weight: 700; color: var(--accent); margin-top: 20px; text-align: center; }
.coating-subfield { margin-top: 5px; }
.color-preview-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 0.9rem; color: #555; }
.color-swatch { width: 24px; height: 24px; border-radius: 4px; border: 1px solid #ccc; background: #f4c842; box-shadow: 0 0 0 1px rgba(0,0,0,0.05); }
.product-details-tabs { margin-top: 40px; }
.tab-headers { display: flex; border-bottom: 2px solid var(--primary); margin-bottom: 20px; }
.tab-header { padding: 10px 20px; cursor: pointer; font-weight: 600; color: #888; transition: 0.3s; }
.tab-header.active { color: var(--primary); border-bottom: 2px solid var(--accent); margin-bottom: -2px; }
.tab-content { line-height: 1.7; padding: 10px 0; }

/* --- CONTACT PAGE STYLES --- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; padding: 60px 0; }
.contact-info h2 { font-family: 'Roboto Slab', serif; color: var(--primary); margin-bottom: 20px; font-size: 2rem; font-weight: 700; }
.contact-info-block { margin-bottom: 30px; font-size: 1.1rem; }
.contact-info-block p { margin-bottom: 10px; }
.contact-map { height: 350px; background: #eef2f5; border-radius: 8px; margin-top: 30px; display: flex; align-items: center; justify-content: center; color: #666; border: 1px solid #ccc; font-weight: 500; }
.contact-form-block { background: var(--bg-light); padding: 40px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.contact-form-block h3 { margin-bottom: 25px; color: var(--primary); font-size: 1.5rem; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--text); font-size: 0.95rem; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; box-sizing: border-box; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-status { min-height: 24px; font-size: 0.9rem; margin-top: 12px; color: #555; }
.form-status.success { color: #27ae60; }
.form-status.error { color: #c0392b; }
.catalog-warning { color: #c0392b; margin-bottom: 20px; min-height: 20px; font-size: 0.9rem; }

/* --- SERVICES PAGE STYLES --- */
.services-section { padding: 80px 0; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.service-card { background: #fff; border: 1px solid #eee; padding: 30px; border-radius: 8px; transition: 0.3s; box-shadow: 0 4px 10px rgba(0,0,0,0.05); height: 100%; }
.service-card:hover { box-shadow: 0 15px 30px rgba(0,0,0,0.1); transform: translateY(-5px); border-color: var(--accent); }
.service-card .icon { font-size: 3rem; color: var(--accent); margin-bottom: 15px; display: inline-block; }
.service-card h3 { color: var(--primary); margin-bottom: 10px; font-size: 1.5rem; }
.service-card p { color: #666; line-height: 1.6; }
.feature-block { background: var(--card-bg); padding: 60px 0; margin-top: 40px; text-align: center; }
.feature-block .feature-container { display: flex; justify-content: space-around; gap: 20px; margin-top: 40px; }
.feature-block .feature-item { flex-basis: 30%; padding: 0 10px; }
.feature-block .feature-item h4 { margin-top: 10px; color: var(--primary); }
.feature-block .feature-item .icon { font-size: 2.5rem; }

/* --- PORTFOLIO STYLES --- */
.portfolio-section { padding: 60px 0; }
.portfolio-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.filter-btn { padding: 8px 18px; border: 1px solid #ccc; border-radius: 20px; font-size: 14px; font-weight: 500; cursor: pointer; transition: 0.3s; background: #fff; color: #555; }
.filter-btn:hover { background: var(--bg-light); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
/* --- УНИВЕРСАЛЬНЫЙ КЛАСС КАРТОЧЕК --- */
.card { 
    overflow: hidden; 
    border-radius: 8px; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); 
    transition: 0.3s; 
    background: #fff;
    text-decoration: none; 
    color: inherit;
    display: block;
}
.card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 15px 35px rgba(0,0,0,0.15); 
}



/* --- MOBILE & TELEGRAM OPTIMIZATION --- */
@media (max-width: 1000px) {
    .product-page-layout { grid-template-columns: 1fr; gap: 30px; }
    .product-gallery-main { height: 350px; }
}
@media (max-width: 900px) {
    .contact-layout { grid-template-columns: 1fr; gap: 30px; }
    .contact-info { order: 2; }
    .contact-form-col { order: 1; }
    .contact-map { height: 250px; }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    
    /* Показываем кнопку бургера */
    .mobile-menu-btn { display: flex; }
    
    /* Скрываем навигацию по умолчанию */
    .nav-links { 
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        right: 0; 
        background: #fff; 
        flex-direction: column; 
        gap: 0; 
        padding: 20px;
        border-top: 1px solid #eee;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 1001;
    }
    
    /* Показываем навигацию при активном меню */
    .nav-links.active { display: flex; }
    
    .nav-links a { 
        padding: 15px 20px; 
        border-bottom: 1px solid #f0f0f0;
        font-size: 14px;
        color: #333;
        transition: background 0.3s ease;
    }
    
    .nav-links a:last-child { border-bottom: none; }
    .nav-links a:hover { background: #f9f9f9; color: var(--accent); }
    
    /* Логотип и кнопка в одной строке */
    .header-inner { flex-direction: row; }
    .logo { font-size: 22px; }
    .hero { height: auto; min-height: 500px; padding: 60px 0; }
    .btn { width: 100%; margin-top: 10px; padding: 16px; font-size: 16px; }

    .container { padding: 0 15px; }
    .services-section { padding: 40px 0; }
    .services-grid { gap: 20px; }
    .feature-block .feature-container { flex-direction: column; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .portfolio-img-wrapper { height: 250px; }
}
/* Убираем синий квадрат подсветки при клике на Android/iOS */
* { -webkit-tap-highlight-color: transparent; }

/* ========================================================== */
/* 5. ИЗМЕНЕНИЯ ДЛЯ НОВОГО ФИЛЬТРА КАТАЛОГА */
/* ========================================================== */

/* Скрываем боковую панель и меняем сетку на мобильных */
@media (max-width: 900px) {
    .category-layout {
        display: block !important; /* Убираем грид-сетку для мобильных */
    }
    .category-layout aside.filters {
        display: none; /* Скрываем старую боковую панель */
    }
}

/* Стили для горизонтальных кнопок-тегов */
.filter-tabs {
    display: flex;
    flex-wrap: nowrap; /* Важно: не переносить на новую строку */
    overflow-x: auto; /* Добавляет горизонтальную прокрутку */
    padding-bottom: 10px; /* Отступ для скроллбара */
    margin-bottom: 30px;
}

.filter-tab {
    cursor: pointer;
    white-space: nowrap;
    padding: 8px 18px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    background: #f0f0f0;
    font-size: 0.9rem;
    color: #555;
    transition: all 0.2s;
}

.filter-tab:hover {
    border-color: var(--accent);
}

.filter-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* --- FILTER OPTIONS STYLE (выделение фоном вместо галочек) --- */
.filter-option {
    display: block;
    padding: 10px 15px;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
    cursor: pointer;
}

.filter-option:hover {
    background-color: #f5f5f5;
}

.filter-option input[type="checkbox"] {
    display: none;
}

.filter-option input[type="checkbox"]:checked ~ span {
    background-color: var(--primary);
    color: #fff;
}

.filter-option:has(input[type="checkbox"]:checked) {
    background-color: var(--primary);
    color: #fff;
}

.filter-option input[type="checkbox"]:checked ~ span::before {
    content: "✓ ";
    margin-right: 5px;
}

/* --- MODAL STYLES --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 20px;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--primary);
}

.modal-content h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

/* ========================================================== */
/* ==   Универсальный компонент карточки (v2)  == */
/* ========================================================== */

.product-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  color: white;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: var(--card-bg-image);
  transition: transform 0.4s ease-out;

  /* ИСПРАВЛЕНИЕ 1: Адаптация фото */
  background-size: cover;      /* Масштабирует, чтобы покрыть всю область */
  background-position: center; /* Центрирует изображение перед масштабированием */
}

.product-card:hover::before {
  transform: scale(1.1);
}

.product-card .title-overlay {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  padding: 20px 15px;
  box-sizing: border-box;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  transition: background 0.3s ease;

  /* ИСПРАВЛЕНИЕ 2: Центрирование текста */
  text-align: center; /* Центрирует весь текст внутри этого блока */
}

.product-card .title-overlay h3 {
  margin: 0;
  font-size: 1.2rem;
  color: white !important;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Адаптивность для карточек */
@media (max-width: 768px) {
  .product-card .title-overlay {
    padding:15px 12px;
  }
  
  .product-card .title-overlay h3 {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .product-card .title-overlay {
    padding: 12px 10px;
  }
  
  .product-card .title-overlay h3 {
    font-size: 1rem;
  }
}

/* ========================================================== */
/* ==        Компонент .fig-product (Рефакторинг)        == */
/* ========================================================== */

/* Блок 1: Очистка основного контейнера .fig-product */
.fig-product {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* Рамка удалена согласно ТЗ */
}

/* Блок 2: Модификация оверлея с текстом .fig-product-hover */
.fig-product-hover {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px 15px;
  box-sizing: border-box;
  /* Оверлей теперь всегда видим */
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  /* Текст отцентрирован */
  text-align: center;
}

/* Селектор .fig-product:hover .fig-product-hover удален согласно ТЗ */

.fig-product-hover h3 {
  margin: 0;
  font-size: 1.2rem;
  color: white !important;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Блок 3: Добавление эффекта увеличения для изображения .fig-product-img */
.fig-product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease-out;
}

/* Эффект увеличения при наведении */
.fig-product:hover .fig-product-img {
  transform: scale(1.1);
}

/* Hover эффект для всей карточки */
.fig-product:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* Адаптивность для .fig-product */
@media (max-width: 768px) {
  .fig-product-hover {
    padding: 15px 12px;
  }
  
  .fig-product-hover h3 {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .fig-product-hover {
    padding: 12px 10px;
  }
  
  .fig-product-hover h3 {
    font-size: 1rem;
  }
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-image: var(--card-bg-image);
    transition: transform 0.4s ease-out;
}

.product-card:hover::before {
    transform: scale(1.05);
}

.product-card .title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 15px;
    box-sizing: border-box;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    transition: background 0.3s ease;
}

.product-card .title-overlay h3 {
    margin: 0;
    font-size: 1.2rem;
    color: white !important;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Адаптивность для карточек */
@media (max-width: 768px) {
    .product-card .title-overlay {
        padding: 15px 12px;
    }
    
    .product-card .title-overlay h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .product-card .title-overlay {
        padding: 12px 10px;
    }
    
    .product-card .title-overlay h3 {
        font-size: 1rem;
    }
}

/* ========================================================== */
/* ФИКСАЦИЯ РАЗМЕРА КАРТОЧЕК В СЛАЙДЕРЕ */
/* ========================================================== */

/* Контейнер для слайдера "Примеры работ" */
.products-swiper {
    padding: 20px 40px;
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
}

/* Обертка слайдера */
.products-swiper .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

/* Каждый слайд */
.products-swiper .swiper-slide {
    height: auto;
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Карточка внутри слайдера */
.products-swiper .fig-product {
    width: 100%;
    max-width: 350px;
    height: 350px;
    margin: 0 auto;
    aspect-ratio: 1;
}

/* Адаптивность для слайдера */
@media (max-width: 1200px) {
    .products-swiper .fig-product {
        max-width: 320px;
        height: 320px;
    }
}

@media (max-width: 768px) {
    .products-swiper {
        padding: 15px 20px;
    }
    
    .products-swiper .fig-product {
        max-width: 280px;
        height: 280px;
    }
}

@media (max-width: 480px) {
    .products-swiper {
        padding: 10px;
    }
    
    .products-swiper .fig-product {
        max-width: 250px;
        height: 250px;
    }
}

/* ========================================================== */
/* СЕТКА ДЛЯ ТОВАРОВ НА СТРАНИЦЕ КАТЕГОРИИ */
/* ========================================================== */

.portfolio-section .product-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
}

@media (max-width: 992px) {
    .portfolio-section .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .portfolio-section .product-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .portfolio-section .product-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

.prod-card { 
    background: #fff; 
    padding: 15px; 
    border-radius: 8px; 
    transition: 0.3s; 
    height: 100%; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-decoration: none; 
    color: inherit;
}

.prod-card:hover { 
    box-shadow: 0 10px 20px rgba(0,0,0,0.08); 
    transform: translateY(-2px);
}

.prod-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding-top: 8px;
    padding-bottom: 8px;
}