/* =========================================
   ЄДИНІ СТИЛІ ДЛЯ ВСІХ ДИНАМІЧНИХ КАТЕГОРІЙ
   (Файл: dynamic-category.css)
========================================= */
* { box-sizing: border-box; }

/* Фікс злиття відступів */
.page-content { display: flow-root; }

/* --- 1. ПРІОРИТЕТ ШАРІВ (Z-INDEX) --- */
section { position: relative; width: 100%; z-index: 10; }
.category-hero { z-index: 20; }
.subcat-section { z-index: 15; }
/* Каскад для підсекцій (щоб маски лягали правильно) */
.subcat-section:nth-of-type(1) { z-index: 19; }
.subcat-section:nth-of-type(2) { z-index: 18; }
.subcat-section:nth-of-type(3) { z-index: 17; }
.subcat-section:nth-of-type(4) { z-index: 16; }
.category-cta-section { z-index: 12; }
.relative-z { position: relative; z-index: 10; width: 100%; }
.text-center { text-align: center; }

/* --- 2. ХЛІБНІ КРИХТИ --- */
.breadcrumbs-standalone {
    position: absolute;
    top: calc(var(--header-height, 100px) + 30px);
    left: 0; right: 0;
    width: calc(100% - (var(--grid-offset, 60px) * 2));
    max-width: calc(var(--max-width, 1600px) - (var(--grid-offset, 60px) * 2));
    margin: 0 auto;
    padding: 0 40px; 
    z-index: 30; 
}
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none !important; padding: 0; margin: 0; }
.breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.breadcrumbs a, .breadcrumbs .separator, .breadcrumbs .current { 
    font-family: var(--font-main); color: #a0a0a0; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; text-decoration: none; transition: all 0.3s; text-shadow: 0px 1px 4px rgba(0,0,0,0.8);
}
.breadcrumbs .current { color: #888888; }
.breadcrumbs a:hover { color: #ffffff; }

/* --- 3. ГЕРОЙ ТА ФОНИ --- */
.category-hero, .subcat-section {
    width: calc(100% - (var(--grid-offset, 60px) * 2));
    max-width: calc(var(--max-width, 1600px) - (var(--grid-offset, 60px) * 2));
    margin: 0 auto;
    position: relative;
    background-size: 100% auto; background-repeat: no-repeat; background-position: center top; 
    background-color: var(--bg-color, #0B0B0D);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: clamp(250px, 40vw, 500px) 0 80px 0; 
}
.category-hero { 
    margin-top: var(--header-height, 100px); 
    padding-top: clamp(200px, 35vw, 400px); 
}
.category-hero .container, .subcat-section .container { padding: 0 40px; }

/* --- 4. МАСКИ ТА ГРАДІЄНТИ --- */
.hero-overlay-gradient, .subcat-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
}
.hero-overlay-gradient {
    background-image: 
        linear-gradient(to bottom, rgba(11,11,13,0.85) 0%, transparent 120px),
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 100% 100%, 80px 80px, 80px 80px;
}
.subcat-overlay {
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 80px 80px, 80px 80px;
}
.category-hero::before, .subcat-section::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%;
    aspect-ratio: 16 / 9; max-height: 100%; 
    background: linear-gradient(to bottom, transparent 65%, rgba(11,11,13,0.8) 85%, #0B0B0D 100%);
    z-index: 2; pointer-events: none;
}
.category-hero::after, .subcat-section::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, #0B0B0D 0%, rgba(11,11,13,0.95) 20%, rgba(11,11,13,0.6) 40%, transparent 65%);
    z-index: 3; pointer-events: none;
}

/* --- 5. ТЕКСТИ --- */
.cat-hero-title { font-size: clamp(40px, 5vw, 65px); font-weight: 800; color: #fff; text-transform: uppercase; line-height: 1.1; margin: 0 0 20px 0; text-align: left; }
.cat-hero-desc { font-size: 16px; color: rgba(255,255,255,0.9); max-width: 600px; line-height: 1.5; font-weight: 400; margin: 0; text-align: left; }
.subcat-main-title { font-size: clamp(36px, 4vw, 56px); font-weight: 800; color: #fff; text-transform: uppercase; margin: 0 0 60px 0; letter-spacing: 2px; text-align: center; }
.orange-badge { color: var(--primary, #FF5A1F); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px; display: block; }

/* --- 6. МОДУЛЬ: СІТКА КАРТОК (як в id_1) --- */
.subcat-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; width: 100%; }
.subcat-grid.cols-2 .subcat-card { width: calc(50% - 20px); }
.subcat-grid.cols-3 .subcat-card { width: calc(33.333% - 27px); }
.subcat-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.card-text-wrapper { background: transparent; width: 100%; max-width: 320px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }

.subcat-card .card-title { 
    display: flex; align-items: flex-end; justify-content: center; min-height: 70px; 
    font-size: 24px; font-weight: 700; color: #fff; text-transform: uppercase; 
    margin: 0 0 15px 0; padding-bottom: 15px; width: 100%; border-bottom: 1px solid rgba(255, 255, 255, 0.15); text-align: center;
}
.subcat-card .card-subtitle { 
    color: var(--primary, #FF5A1F); font-size: 10px; font-weight: 600; 
    margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; text-align: center;
}
.subcat-card .card-desc { 
    font-size: 14px; color: #cccccc; line-height: 1.6; margin-bottom: 30px; flex-grow: 1; text-align: center;
}

/* --- 7. МОДУЛЬ: ШИРОКОФОРМАТНІ БЛОКИ OVERLAP (як в id_9) --- */
.max-width-1400 { max-width: 1400px !important; margin: 0 auto; }

.overlap-row {
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 140px;
}

.overlap-row:last-of-type { margin-bottom: 60px; }

.overlap-row.reverse { flex-direction: row-reverse; }

.overlap-img {
    width: 65%;
    height: auto;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
}

.overlap-img img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.overlap-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent 70%, rgba(11, 11, 13, 0.55) 88%, #0B0B0D 100%);
    z-index: 2;
    pointer-events: none;
}

.overlap-row.reverse .overlap-img::after {
    background: linear-gradient(to left, transparent 70%, rgba(11, 11, 13, 0.55) 88%, #0B0B0D 100%);
}

.overlap-text {
    width: 45%;
    position: relative;
    z-index: 5;
    margin-left: -10%;
    padding: 40px;
}

.overlap-row.reverse .overlap-text {
    margin-left: 0;
    margin-right: -10%;
}

.overlap-text .card-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 20px;
    border: none;
    padding: 0;
    display: block;
    text-align: left;
}

.overlap-text .card-desc {
    font-size: 15px;
    color: #ccc;
    line-height: 1.7;
    text-align: left;
    margin: 0;
}

/* --- 8. КНОПКИ (НЕОН) --- */
.btn-wrapper { width: 280px; height: 60px; position: relative; margin: 0 auto; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.btn-content span { font-size: 12px !important; font-weight: 700; letter-spacing: 1px; }
.btn-bg { fill: url(#btnGradient); stroke: rgba(255,255,255,0.2); stroke-width: 1; transition: fill 0.3s ease, stroke 0.3s ease; }
.neon-corner { fill: none; stroke: var(--primary, #ff4900); stroke-width: 4px; filter: drop-shadow(0 0 10px rgba(255, 94, 0, 1)); transition: stroke-width 0.2s ease, filter 0.2s ease; }
.btn-wrapper:hover .btn-bg { fill: url(#btnGradientHover); stroke: rgba(255, 255, 255, 0.5); }
.btn-wrapper:active { transform: scale(0.95); filter: brightness(1.2); }
.btn-wrapper:active .btn-bg { fill: url(#btnGradientActive); }

/* --- 9. ЛІНІЇ ТА ХРЕСТИКИ --- */
.hero-bottom-line, .section-bottom-line { position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; z-index: 50; }
.hero-bottom-line::before, .section-bottom-line::before {
    content: ''; position: absolute; top: 0; left: -100vw; right: -100vw; height: 1px; background-color: rgba(255, 255, 255, 0.15); z-index: 1;
}
.hero-bottom-line .cross, .section-bottom-line .cross { position: absolute; top: 0; width: 11px; height: 11px; z-index: 2; }
.hero-bottom-line .cross.left, .section-bottom-line .cross.left { left: 0; transform: translate(-50%, -50%); } 
.hero-bottom-line .cross.right, .section-bottom-line .cross.right { right: 0; transform: translate(50%, -50%); }

/* --- 10. АНІМАЦІЇ --- */
.reveal-block { opacity: 0; transform: translateY(80px); transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal-block.is-visible { opacity: 1; transform: translateY(0); }

/* --- 11. CTA ОРАНЖЕВИЙ БЛОК ЗНИЗУ --- */
.category-cta-section {
    padding: 60px 0 80px 0; position: relative; z-index: 5;
    width: calc(100% - (var(--grid-offset, 60px) * 2));
    max-width: calc(var(--max-width, 1600px) - (var(--grid-offset, 60px) * 2));
    margin: 0 auto;
}
.cta-orange-box {
    background-color: var(--primary, #FF5A1F); padding: 50px 60px; display: flex; flex-direction: column; align-items: flex-start; gap: 30px;
    width: 100%; max-width: 1000px; margin: 0 auto;
}
.cta-orange-box h3 { color: #fff; font-family: var(--font-main); font-size: 32px; font-weight: 700; margin: 0; line-height: 1.2; max-width: 700px; }
.btn-outline.footer-contact-btn {
    display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; color: #fff; padding: 0 45px; height: 56px;
    text-decoration: none; text-transform: uppercase; font-weight: 700; font-size: 14px; letter-spacing: 1px; transition: all 0.3s ease; width: auto; background: transparent;
}
.btn-outline.footer-contact-btn:hover { background-color: #fff; color: var(--primary, #FF5A1F); }

/* --- 12. АДАПТИВНІСТЬ (ОБ'ЄДНАНА) --- */
.centered-section { align-items: center; text-align: center; }
.centered-section .subcat-card { width: 100% !important; max-width: 800px; margin: 0 auto;}
.centered-section .card-text-wrapper .subcat-main-title { border-bottom: 1px solid rgba(255, 255, 255, 0.15); padding-bottom: 15px; margin-bottom: 15px; display: inline-block; }

@media (max-width: 1200px) {
    .subcat-grid.cols-3 .subcat-card { width: calc(50% - 20px); }
    .category-hero, .subcat-section { padding: clamp(200px, 35vw, 300px) 0 40px 0; }
}

@media (max-width: 1024px) {
    /* Для блоків Overlap */
    .overlap-row, .overlap-row.reverse { flex-direction: column; height: auto; margin-bottom: 100px; }
    .overlap-img { width: 100%; height: auto; } 
    .overlap-img::after, .overlap-row.reverse .overlap-img::after { background: linear-gradient(to bottom, transparent 20%, rgba(11,11,13,0.8) 60%, #0B0B0D 100%) !important; }
    .overlap-text, .overlap-row.reverse .overlap-text { width: 100%; margin: -80px 0 0 0 !important; padding: 20px; text-align: center; }
    .overlap-text .card-title, .overlap-text .card-desc { text-align: center !important; }
    
    /* Для CTA блоку */
    .cta-orange-box { padding: 40px; align-items: center; text-align: center; }
    .cta-orange-box h3 { font-size: 24px; }
}

@media (max-width: 768px) {
    /* Базові відступи */
    .category-hero .container, .subcat-section .container { padding: 0 20px; }
    .category-hero, .subcat-section { width: calc(100% - (var(--grid-offset, 20px) * 2)); padding: clamp(150px, 45vw, 300px) 0 40px 0; }
    
    /* Для блоків Сітки (Grid) */
    .subcat-grid { gap: 40px; }
    .subcat-grid.cols-2 .subcat-card, .subcat-grid.cols-3 .subcat-card { width: 100%; }
    .subcat-card { align-items: center !important; text-align: center !important; }
    .card-text-wrapper { display: flex; flex-direction: column; align-items: center; text-align: center; }
    .subcat-card .card-title { display: inline-block; text-align: center; } 
    .subcat-card .card-subtitle, .subcat-card .card-desc { text-align: center; }
    
    /* Для блоків Overlap */
    .overlap-img { height: 280px; }
    
    /* Спільне */
    .btn-wrapper { margin: 0 auto !important; }
    
    /* CTA Блок */
    .category-cta-section { width: calc(100% - (var(--grid-offset, 20px) * 2)); }
    .cta-orange-box { width: 100%; padding: 35px 20px; gap: 25px; align-items: center; text-align: center; }
    .cta-orange-box h3 { font-size: 20px; }
    .btn-outline.footer-contact-btn { padding: 0 30px; font-size: 12px; height: 50px; }
}