/*
Theme Name: Logic of Craft Reflex
Theme URI: https://logicofcraft.com
Description: Авторская тема для мастерской-блога Logic of Craft. Минималистичный дизайн с упором на крафт, ручную работу и визуальную подачу.
Version: 4.0.0
Author: Logic of Craft
Text Domain: logic-of-craft-reflex
*/

/* =====================================================================
   1. ПЕРЕМЕННЫЕ И СБРОСЫ
   ===================================================================== */

:root {
    --color-bg:        #000000;
    --color-surface:   #1c1e1d;
    --color-cream:     #f4f1ee;
    --color-gold:      #d4a373;
    --color-gold-light:#e0b88a;
    --color-text:      #ffffff;
    --color-text-dark: #1a1a1a;
    --color-muted:     rgba(255,255,255,0.6);
    --color-muted-dark:rgba(0,0,0,0.5);
    --font-body:       'Montserrat', sans-serif;
    --font-heading:    'Playfair Display', serif;
    --header-h:        80px;
    --frame-gap:       40px;
    --transition:      0.3s ease;
}

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

body, html {
    width: 100%;
    background: var(--color-bg);
    font-family: var(--font-body);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition), opacity var(--transition);
}
a:hover { opacity: 0.8; }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =====================================================================
   2. РАМКА САЙТА (ДЕСКТОП)
   ===================================================================== */

/* Обнуляем стили <main> чтобы не было неожиданных margin/padding */
.site-main {
    display: block;
    margin: 0;
    padding: 0;
}

@media (min-width: 1025px) {
    .site-frame {
        margin: 0 var(--frame-gap);
        min-height: calc(100vh - var(--header-h));
        position: relative;
        background: var(--color-bg);
        overflow: hidden;
    }
    /* Hero-split занимает всё доступное пространство рамки */
    .hero-split { height: calc(100vh - var(--header-h)); }
}

/* =====================================================================
   3. ШАПКА (HEADER)
   ===================================================================== */

.main-header {
    width: 100%;
    height: var(--header-h);
    background: var(--color-cream);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 120px;
    position: relative;
    z-index: 10000;
}

.main-header a,
.main-header .nav-right a {
    color: var(--color-text-dark) !important;
    text-decoration: none !important;
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 400;
    transition: color var(--transition);
}
.main-header a:hover { opacity: 0.6; }

.nav-right {
    display: flex;
    gap: 60px;
}

/* Пункты wp_nav_menu внутри .nav-right */
.nav-right .menu-item { list-style: none; }
.nav-right .menu-item a {
    color: var(--color-text-dark) !important;
    font-size: 13px;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 400;
}

/* --- Мобильная кнопка --- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10001;
}
.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-dark);
    transition: var(--transition);
}
.mobile-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translateY(7px); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translateY(-7px); }

/* --- Мобильное меню --- */
.mobile-menu-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.mobile-menu-overlay.active { display: flex; }

.mobile-nav-list {
    list-style: none;
    text-align: center;
}
.mobile-nav-list li { margin: 20px 0; }
.mobile-nav-list a {
    color: #fff !important;
    font-family: var(--font-heading);
    font-size: 28px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* =====================================================================
   4. HERO-СЕКЦИЯ (70/30)
   ===================================================================== */

.hero-split {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.hero-left {
    width: 75%;
    min-height: 100%;  /* Наследуем высоту от .hero-split, а не 100vh — исправлено */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #2a2520; /* Fallback: тёплый тёмный цвет на случай если фото не загрузится */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 80px;
}

/* Затемняющий оверлей для лучшей читаемости */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 30%,
        rgba(0,0,0,0.3) 100%
    );
    pointer-events: none;
}

.hero-right {
    width: 25%;
    background: var(--color-surface);
    min-height: 100%; /* Согласовано с hero-left: наследуем от .hero-split */
    display: flex;
    flex-direction: column;
    justify-content:  top;
    padding: 80px 40px;
}

/* =====================================================================
   5. ТИПОГРАФИКА HERO
   ===================================================================== */

.hero-title {
    position: relative;
    z-index: 2;
    margin-top: 160px;
    font-family: var(--font-heading) !important;
    font-size: clamp(60px, 8vw, 140px);
    letter-spacing: 5px;
    line-height: 0.95;
    text-transform: uppercase;
    font-weight: 400; /* Исправлено с 5 на 400 */
    /* Эффект прозрачных букв с обводкой — как на референсе */
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.85);
    text-stroke: 2px rgba(255, 255, 255, 0.85);
    
}

.title-top {
    display: inline-block;
    padding-left: 0.55em;
}

.hero-subtitle {
    position: relative;
    z-index: 2;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 30px;
    margin-left: 60px;
    opacity: 0.85;
    font-weight: 300;
}

/* =====================================================================
   6. ПРАВАЯ ПАНЕЛЬ — СЛОГАН И ТОВАР
   ===================================================================== */

.loc-card-star {
    width: 70px;
    height: 70px;
    margin-bottom: 30px;
}
.loc-card-star img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Star_1.png теперь имеет прозрачный фон (RGBA). Фильтр не нужен. */
}

.loc-card-slogan {
    font-family: var(--font-heading) !important;
    font-size: clamp(21px, 3.5vw, 35px) !important;
    font-weight: 400;
    line-height: 1.05 !important;
    margin-bottom: 25px;
    color: var(--color-text);
}
.slogan-italic {
    display: block;
    font-style: italic;
}

.loc-orange-divider {
    width: 150px;
    height: 2px;
    background: var(--color-gold);
    margin-bottom: 30px;
}

.loc-card-excerpt {
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-muted);
    margin-bottom: 30px;
}

.loc-explore-btn {
    display: inline-block;
    color: var(--color-text);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--color-gold);
    padding-bottom: 5px;
    margin-bottom: 40px;
    transition: border-color var(--transition), color var(--transition);
}
.loc-explore-btn:hover {
    border-color: var(--color-gold-light);
    color: var(--color-gold-light);
    opacity: 1;
}

/* Мини-карточка товара */
.loc-mini-product {
    display: flex;
    gap: 20px;
    align-items: center;
}
.p-thumb img {
    width: 240px;
    height: auto;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform var(--transition);
}
.p-thumb img:hover { transform: scale(1.03); }

.p-content h4 {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--color-gold);
    margin-bottom: 5px;
    text-transform: uppercase;
}
.p-content p {
    font-size: 12px;
    opacity: 0.5;
    margin-bottom: 10px;
}
.p-shop-btn {
    color: var(--color-text);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 1px;
    border-bottom: 1px solid #fff;
    padding-bottom: 2px;
    transition: border-color var(--transition), color var(--transition);
}
.p-shop-btn:hover {
    color: var(--color-gold);
    border-color: var(--color-gold);
    opacity: 1;
}

/* =====================================================================
   7. ФУТЕР
   ===================================================================== */

.site-footer {
    background: var(--color-cream);
    padding: 80px 100px 40px;
    border-top: 1px solid rgba(0,0,0,0.05);
    color: var(--color-text-dark);
}

.footer-inner-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}

/* Соцсети */
.footer-socials-group {
    display: flex;
    gap: 40px;
    flex: 1;
}

.social-item {
    text-align: center;
    text-decoration: none !important;
    color: var(--color-text-dark) !important;
    width: 140px;
    transition: transform var(--transition);
}
.social-item:hover {
    transform: translateY(-4px);
    opacity: 1;
}

.social-icon-box {
    width: 45px;
    height: 45px;
    margin: 0 auto 15px;
}

.custom-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition);
}
.social-item:hover .custom-icon {
    transform: scale(1.1);
}

.social-item h4 {
    font-size: 10px;
    letter-spacing: 1px;
    line-height: 1.4;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
}

.social-item p {
    font-size: 11px;
    opacity: 0.6;
    line-height: 1.3;
}

/* Блок новостей (Beyond the Making) */
.footer-news-group {
    display: flex;
    align-items: center;
    gap: 40px;
    padding-left: 60px;
    border-left: 1px solid rgba(0,0,0,0.1);
}

.news-text { max-width: 320px; text-align: left; }

.news-label {
    font-size: 10px;
    letter-spacing: 2px;
    opacity: 0.5;
    display: block;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.news-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 15px;
}

.news-excerpt {
    font-size: 13px;
    opacity: 0.7;
    margin-bottom: 15px;
    line-height: 1.5;
}

.news-link {
    font-size: 10px;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--color-text-dark);
    text-decoration: none;
    display: inline-block;
    padding-bottom: 2px;
    text-transform: uppercase;
    transition: border-color var(--transition);
}
.news-link:hover { border-color: var(--color-gold); color: var(--color-gold); opacity: 1; }

.news-photo {
    width: 250px;
    height: 180px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
}
.news-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}
.news-photo:hover img { transform: scale(1.05); }

/* Копирайт */
.footer-bottom {
    max-width: 1600px;
    margin: 60px auto 0;
    padding-top: 30px;
    border-top: 1px solid rgba(0,0,0,0.08);
    text-align: center;
    font-size: 12px;
    opacity: 0.5;
}

/* Скрываем старые блоки (наследие) */
.quote-block, blockquote.wp-block-quote, #quote-section {
    display: none !important;
}

/* =====================================================================
   8. ВНУТРЕННИЕ СТРАНИЦЫ — ОБЩИЕ
   ===================================================================== */

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px 100px;
}

/* --- Хлебные крошки --- */
.loc-breadcrumbs {
    font-size: 12px;
    letter-spacing: 1px;
    margin-bottom: 80px; /*настройка положения хлебных крошек*/
    opacity: 0.6;
}
.loc-breadcrumbs a { border-bottom: 1px solid rgba(255,255,255,0.3); padding-bottom: 1px; }
.loc-breadcrumbs a:hover { opacity: 1; border-color: var(--color-gold); }
.breadcrumb-sep { margin: 0 8px; }
.breadcrumb-current { opacity: 1; }

/* --- Архив / Сетка карточек --- */
.archive-header {
    margin-bottom: 60px;
    text-align: center;
}
.archive-title {
    font-family: var(--font-heading);
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
}
.archive-desc {
    margin-top: 15px;
    font-size: 14px;
    opacity: 0.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.card {
    background: var(--color-surface);
    border-radius: 6px;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.card-image { overflow: hidden; display: block; }
.card-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform var(--transition);
}
.card:hover .card-image img { transform: scale(1.05); }

.card-body { padding: 25px 25px 30px; }

.card-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 10px;
    line-height: 1.3;
}
.card-title a { color: var(--color-text); }
.card-title a:hover { color: var(--color-gold); opacity: 1; }

.card-price {
    display: inline-block;
    color: var(--color-gold);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.card-type {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 8px;
}

.card-excerpt {
    font-size: 13px;
    line-height: 1.6;
    color: var(--color-muted);
    margin-bottom: 15px;
}

.card-link {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-gold);
    border-bottom: 1px solid var(--color-gold);
    padding-bottom: 2px;
}
.card-link:hover { color: var(--color-gold-light); border-color: var(--color-gold-light); opacity: 1; }

/* --- Пагинация --- */
.pagination {
    margin-top: 60px;
    text-align: center;
}
.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 13px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    transition: var(--transition);
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: #000;
}

/* =====================================================================
   9. SINGLE (ОДИНОЧНАЯ ЗАПИСЬ)
   ===================================================================== */

.single-article { max-width: 900px; margin: 0 auto; }

.single-hero-image {
    margin: -60px -40px 40px;
    overflow: hidden;
    border-radius: 0 0 8px 8px;
}
.single-hero-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.single-meta {
    font-size: 12px;
    letter-spacing: 1px;
    opacity: 0.5;
    margin-bottom: 15px;
    text-transform: uppercase;
}
.meta-sep { margin: 0 8px; }

.single-title {
    font-family: var(--font-heading);
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.single-body {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255,255,255,0.85);
}
.single-body p { margin-bottom: 1.5em; }
.single-body h2, .single-body h3 { font-family: var(--font-heading); margin: 2em 0 0.8em; font-weight: 400; }
.single-body h2 { font-size: 28px; }
.single-body h3 { font-size: 22px; }
.single-body img { border-radius: 6px; margin: 1em 0;max-width: 300px; }
.single-body a { color: var(--color-gold); border-bottom: 1px solid var(--color-gold); }

/* Коллекции — цена и кнопка */
.collection-details {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--color-surface);
    border-radius: 6px;
}
.collection-price {
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--color-gold);
}

/* Мастерская — материалы */
.workshop-materials {
    background: var(--color-surface);
    padding: 25px;
    border-radius: 6px;
    margin-bottom: 30px;
}
.workshop-materials h3 {
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 10px;
}

/* Сетка процесса (мастерская) */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0 30px;
}
.process-item img,

/* Таксономии */
.single-taxonomies {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
}
.tax-group { margin-bottom: 8px; }
.tax-group a { color: var(--color-gold); }

/* Навигация между записями */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
}
.post-navigation a {
    color: var(--color-gold);
    max-width: 45%;
    display: inline-block;
}

/* =====================================================================
   10. СТРАНИЦА PAGE
   ===================================================================== */

.page-article { max-width: 900px; margin: 0 auto; }

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 400;
    margin-bottom: 40px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.page-body {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255,255,255,0.85);
}
.page-body p { margin-bottom: 1.5em; }

/* =====================================================================
   11. СТРАНИЦА 404
   ===================================================================== */

.error-404-page {
    text-align: center;
    padding: 120px 40px;
}

.error-code {
    font-family: var(--font-heading);
    font-size: clamp(80px, 15vw, 200px);
    color: transparent;
    -webkit-text-stroke: 2px var(--color-gold);
    line-height: 1;
    margin-bottom: 20px;
}

.error-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 15px;
}

.error-desc {
    font-size: 15px;
    opacity: 0.6;
    max-width: 500px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.error-actions { margin-bottom: 40px; }

.error-search { max-width: 400px; margin: 0 auto; }
.error-search p { font-size: 13px; opacity: 0.5; margin-bottom: 15px; }

/* =====================================================================
   12. КНОПКИ
   ===================================================================== */

.btn {
    display: inline-block;
    padding: 14px 30px;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn--gold {
    background: var(--color-gold);
    color: #000;
}
.btn--gold:hover {
    background: var(--color-gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212,163,115,0.3);
    opacity: 1;
}

.btn--outline {
    background: transparent;
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
}
.btn--outline:hover {
    background: var(--color-gold);
    color: #000;
    opacity: 1;
}

/* =====================================================================
   13. ФОРМА ПОИСКА
   ===================================================================== */

.loc-search-form {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    overflow: hidden;
}

.loc-search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
}
.loc-search-input::placeholder { color: var(--color-muted); }

.loc-search-btn {
    padding: 12px 16px;
    background: var(--color-gold);
    border: none;
    cursor: pointer;
    color: #000;
    transition: background var(--transition);
}
.loc-search-btn:hover { background: var(--color-gold-light); }

.search-form-wrapper { margin-bottom: 40px; }

/* =====================================================================
   14. РЕЗУЛЬТАТ БЕЗ ЗАПИСЕЙ
   ===================================================================== */

.no-results {
    text-align: center;
    padding: 80px 20px;
}
.no-results h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 15px;
}
.no-results p {
    opacity: 0.6;
    margin-bottom: 25px;
}

/* =====================================================================
   15. АНИМАЦИИ ПОЯВЛЕНИЯ
   ===================================================================== */

.loc-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.loc-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* КРИТИЧНО: Hero-элементы ВСЕГДА видимы — они выше fold, анимация через CSS @keyframes */
.hero-split .loc-animate {
    opacity: 1;               /* Переопределяем opacity: 0 для hero-элементов */
    transform: translateY(0); /* Убираем скрытие для элементов hero */
    animation: locHeroFadeUp 0.8s ease both;
}
.hero-split .loc-animate[data-delay="200"] {
    animation-delay: 0.2s;
}

@keyframes locHeroFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Разные задержки через data-delay (обрабатываются в JS) */

/* =====================================================================
   16. АДАПТИВНОСТЬ
   ===================================================================== */

@media (max-width: 1200px) {
    .main-header { padding: 0 60px; }
    .footer-inner-row { flex-direction: column; gap: 60px; }
    .footer-news-group { border-left: none; padding-left: 0; flex-direction: column; text-align: center; }
    .footer-socials-group { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 1024px) {
    .site-frame { margin: 0; }

    /* Hero — вертикальная раскладка */
    .hero-split { flex-direction: column; min-height: auto; }
    .hero-left {
        width: 100%;
        min-height: 70vh; /* На мобильных — фиксированная высота */
        padding: 120px 30px 60px;
    }
    .hero-right {
        width: 100%;
        min-height: auto;
        padding: 60px 30px;
    }
    .hero-title { margin-top: 40px; }
    .hero-subtitle { margin-left: 0; }

    /* Header */
    .main-header {
        padding: 0 20px;
        position: fixed;
        top: 0;
        z-index: 10000;
    }
    .nav-right { display: none; }
    .mobile-menu-toggle { display: flex; }

    /* Контент */
    .content-wrapper { padding: 40px 20px 80px; }
    .card-grid { grid-template-columns: 1fr; gap: 25px; }

    /* Footer */
    .site-footer { padding: 50px 20px 30px; }
    .footer-socials-group { gap: 20px; }
    .social-item { width: auto; min-width: 100px; }

    /* Single */
    .single-hero-image { margin: -40px -20px 30px; }
}

@media (max-width: 600px) {
    .hero-title { font-size: clamp(40px, 12vw, 70px); }
    .title-top { padding-left: 0; }
    .hero-left { padding-left: 20px; padding-right: 20px; }
    .loc-card-slogan { font-size: 24px !important; }
    .loc-mini-product { flex-direction: column; align-items: flex-start; }
    .footer-socials-group { flex-direction: column; align-items: center; }
    .news-photo { width: 100%; height: auto; }
    .process-grid, { grid-template-columns: 1fr 1fr; }
    .archive-title { font-size: 28px; }
}
/* ============================================================
   Стили для страницы /gallery/ (архив loc_gallery)
   ============================================================ */

/* Сетка для альбомов галереи */
.loc-gallery-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

/* Карточка альбома */
.loc-gallery-archive-item {
    background: var(--color-surface);
    border-radius: 6px;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.loc-gallery-archive-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* Изображение */
.loc-gallery-archive-image {
    overflow: hidden;
    display: block;
}
.loc-gallery-archive-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform var(--transition);
}
.loc-gallery-archive-item:hover .loc-gallery-archive-image img {
    transform: scale(1.05);
}

/* Тело карточки */
.loc-gallery-archive-body {
    padding: 25px 25px 30px;
}

.loc-gallery-archive-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 10px;
    line-height: 1.3;
}
.loc-gallery-archive-title a {
    color: var(--color-text);
}
.loc-gallery-archive-title a:hover {
    color: var(--color-gold);
    opacity: 1;
}

.loc-gallery-archive-excerpt {
    font-size: 13px;
    line-height: 1.6;
    color: var(--color-muted);
    margin-bottom: 15px;
}

.loc-gallery-archive-link {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-gold);
    border-bottom: 1px solid var(--color-gold);
    padding-bottom: 2px;
}
.loc-gallery-archive-link:hover {
    color: var(--color-gold-light);
    border-color: var(--color-gold-light);
    opacity: 1;
}

/* ============================================================
   ПОЛНОЕ ПЕРЕОПРЕДЕЛЕНИЕ ДЛЯ СТРАНИЦЫ /gallery/
   НЕ УДАЛЯЙТЕ ЭТОТ БЛОК — ОН НУЖЕН ДЛЯ ПРАВИЛЬНОЙ РАБОТЫ
   ============================================================ */

/* Сбрасываем конфликтующие стили только для галереи */
.post-type-archive-loc_gallery .card-grid,
.post-type-archive-loc_gallery .card,
.post-type-archive-loc_gallery .card-image,
.post-type-archive-loc_gallery .card-image img,
.post-type-archive-loc_gallery .card-body,
.post-type-archive-loc_gallery .card-title,
.post-type-archive-loc_gallery .card-excerpt,
.post-type-archive-loc_gallery .card-link {
    all: unset !important;
    display: block !important;
}

/* Центрируем плитки плагина */
.post-type-archive-loc_gallery .myg-layout-tiles .myg-item,
.post-type-archive-loc_gallery .myg-layout-tiles .myg-thumb-wrap,
.post-type-archive-loc_gallery .myg-layout-tiles .myg-thumb {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    float: none !important;
    text-align: center !important;
}

.post-type-archive-loc_gallery .myg-layout-tiles .myg-thumb {
    object-fit: cover !important;
}

/* Если в галерее используется другой макет (grid/masonry) — тоже центрируем */
.post-type-archive-loc_gallery .myg-item,
.post-type-archive-loc_gallery .myg-thumb-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    text-align: center !important;
}

.post-type-archive-loc_gallery .myg-thumb {
    object-fit: cover !important;
}

/* ====
   17. ИНТЕГРАЦИЯ ПЛАГИНА MyInteriorGallery
   ==== */

/*
 * Тема сбрасывает img { max-width: 100%; height: auto; }
 * Для плиток плагина изображение должно заполнять контейнер,
 * поэтому переопределяем только внутри обёртки плагина.
 */
.myg-gallery-wrapper .myg-thumb-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: block;
}

.myg-gallery-wrapper .myg-thumb-wrap .myg-thumb {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

/* Ссылка-обёртка занимает 100% высоты ячейки */
.myg-gallery-wrapper .myg-item > a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Лайтбокс поверх шапки */
.myg-lightbox {
    z-index: 1000000 !important;
}

/* Пустой альбом */
.loc-empty-notice {
    color: rgba(255, 255, 255, 0.4);
    padding: 40px 0;
    font-size: 14px;
}