/* =========================================
   UNCLICK REVISTA - MAIN STYLESHEET
   =========================================
   
   File Structure:
   1. Global Settings (CSS Variables, Body)
   2. Header & Navigation
   3. Hero Blocks
   4. Catalog Cards & Grid
   5. Sliders (Swiper)
   6. Fotorama Gallery
   7. Fullscreen Viewer
   8. Subscription Buttons
   9. Social Share Buttons
   10. Pagination & Search
   11. Widgets
   12. Single Catalog Page
   13. Taxonomy Pages
   14. Brands List
   15. Badges & Utilities
   
   ========================================= */

/* 1. GLOBAL SETTINGS - MODERN COLOR SCHEME */
:root {
    --primary: #e60023;
    --primary-dark: #c40000;
    --primary-light: #ff1744;
    --text: #1a1a1a;
    --text-light: #666;
    --bg: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a1a;
    --border: #e5e7eb;
    --shadow: rgba(0,0,0,0.08);
    --shadow-hover: rgba(0,0,0,0.12);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --gap: 12px;
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --surface: #ffffff; /* для светлой темы */
}

/* =========================
   DARK THEME (data-theme)
   ========================= */
html[data-theme="dark"]{
    --text: #e9eef5;
    --text-light: #a7b0bf;

    --bg: #0f1115;
    --bg-light: #141a22;
    --bg-dark: #0b0d12;

    --border: rgba(255,255,255,.14);
    --shadow: rgba(0,0,0,0.55);

    /* если где-то используешь белые карточки/плашки */
    --card: #161a22;
    --surface: #161a22; /* чуть светлее, чем --bg */
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] header{
  background: var(--bg);
  color: var(--text);
}

html[data-theme="dark"] .c-card,
html[data-theme="dark"] .catalog-card{
  background: var(--bg-light);
  border-color: var(--border);
}

/* Dark mode fix: H1 hero on brand / category pages */
html[data-theme="dark"] .brand-hero{
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

html[data-theme="dark"] .brand-hero h1,
html[data-theme="dark"] .brand-hero p{
  color: var(--text);
}

/* Dark mode fix: category/brand description block */
/* Контейнер описания рубрики: как "карточка" */
html[data-theme="dark"] .brand-description{
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
}


/* если внутри есть отдельная белая "карточка" (часто так делают) */
html[data-theme="dark"] .brand-description .container,
html[data-theme="dark"] .brand-description .wrap,
html[data-theme="dark"] .brand-description .content{
  background: var(--surface);
  color: var(--text);
}

html[data-theme="dark"] .brand-description h1,
html[data-theme="dark"] .brand-description h2,
html[data-theme="dark"] .brand-description h3,
html[data-theme="dark"] .brand-description p,
html[data-theme="dark"] .brand-description li,
html[data-theme="dark"] .brand-description a{
  color: var(--text);
}

/* Dark mode fix: hero block on country pages */
html[data-theme="dark"] .country-hero{
  background: linear-gradient(135deg, #0f1115 0%, #141a22 100%);
  border-bottom: 1px solid var(--border);
}

html[data-theme="dark"] .country-hero,
html[data-theme="dark"] .country-hero *{
  color: var(--text);
}

/* Generic dropdown containers */
html[data-theme="dark"] .dropdown{
  background: rgba(22, 26, 34, 0.96) !important; /* почти как --surface */
  border: 1px solid var(--border) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.55) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

html[data-theme="dark"] .dropdown a{
  color: var(--text) !important;
}

html[data-theme="dark"] .dropdown a:hover{
  background: rgba(255,255,255,0.06) !important;
  color: var(--text) !important;
}

/* DARK MODE: COUNTRY SELECT (DESKTOP) */
html[data-theme="dark"] .country-dropdown-desktop{
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.55) !important;
  color: var(--text) !important;
}

/* элементы списка стран (на всякий случай — универсально) */
html[data-theme="dark"] .country-dropdown-desktop a,
html[data-theme="dark"] .country-dropdown-desktop button,
html[data-theme="dark"] .country-dropdown-desktop .country-item,
html[data-theme="dark"] .country-dropdown-desktop .country-row,
html[data-theme="dark"] .country-dropdown-desktop li,
html[data-theme="dark"] .country-dropdown-desktop span{
  color: var(--text) !important;
}

/* hover/active */
html[data-theme="dark"] .country-dropdown-desktop a:hover,
html[data-theme="dark"] .country-dropdown-desktop button:hover,
html[data-theme="dark"] .country-dropdown-desktop .active,
html[data-theme="dark"] .country-dropdown-desktop .is-active{
  background: rgba(255,255,255,0.06) !important;
}

/* разделители, если есть линии */
html[data-theme="dark"] .country-dropdown-desktop hr,
html[data-theme="dark"] .country-dropdown-desktop .divider{
  border-color: var(--border) !important;
}

/* кнопка-триггер */
html[data-theme="dark"] .country-select-trigger{
  background: transparent !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

/* Контейнер подписка */
html[data-theme="dark"] .subscription-buttons-block{
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
}

/* Header divider: in the same tone as menu */
html[data-theme="dark"] .site-header{
  border-bottom: 1px solid var(--bg) !important;
  box-shadow: none !important;
}

/* Dark mode: strong text inside brand description must be white */
html[data-theme="dark"] .brand-description strong{
  color: var(--text) !important;
  font-weight: 700 !important;
}

/* Dark mode: make links visible inside brand/category description */
html[data-theme="dark"] .brand-description a{
  color: var(--primary) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

html[data-theme="dark"] .brand-description a:hover{
  color: var(--primary-light) !important;
  text-decoration-thickness: 2px;
}

/* Dark mode: mobile drawer menu */
html[data-theme="dark"] .mobile-drawer{
  background: var(--bg) !important;
  color: var(--text) !important;
  border-top: 1px solid var(--border) !important;
}

/* ссылки внутри мобильного меню */
html[data-theme="dark"] .mobile-drawer a{
  color: var(--text) !important;
}

/* hover/active */
html[data-theme="dark"] .mobile-drawer a:hover{
  color: var(--primary-light) !important;
}

html[data-theme="dark"] .mobile-drawer{
  --menu-divider: rgba(0,0,0,0.35);
}

html[data-theme="dark"] .mobile-drawer a,
html[data-theme="dark"] .mobile-drawer li,
html[data-theme="dark"] .mobile-drawer .menu-item{
  border-bottom-color: var(--menu-divider) !important;
}

html[data-theme="dark"] .mobile-drawer hr{
  border-color: var(--menu-divider) !important;
  opacity: 1 !important;
}

/* DARK MODE: MOBILE MENU DIVIDERS (main items) */

html[data-theme="dark"] .mobile-drawer{
  --menu-divider: rgba(255,255,255,0.04); /* очень слабая линия */
}

/* главные разделители (между пунктами типа Moda & Calzado / Hogar и т.д.) */
html[data-theme="dark"] .mobile-drawer .mob-item{
  border-bottom: 1px solid var(--menu-divider) !important;
}

/* иногда линия стоит на заголовке */
html[data-theme="dark"] .mobile-drawer .mob-head{
  border-bottom: 1px solid var(--menu-divider) !important;
}

/* если линия сделана псевдоэлементом */
html[data-theme="dark"] .mobile-drawer .mob-item::after,
html[data-theme="dark"] .mobile-drawer .mob-head::after{
  background: var(--menu-divider) !important;
}

/* =========================
   DARK MODE: Country bottom sheet (mobile)
   ========================= */

html[data-theme="dark"] .country-bottom-sheet{
  background: var(--surface) !important;
  color: var(--text) !important;
  box-shadow: 0 -6px 24px rgba(0,0,0,0.65) !important;
}

/* заголовок */
html[data-theme="dark"] .country-bottom-sheet h3{
  color: var(--text) !important;
}

/* затемнение фона (overlay) */
html[data-theme="dark"] .country-bottom-sheet-overlay{
  background: rgba(0,0,0,0.65) !important;
}

/* карточки стран внутри */
html[data-theme="dark"] .country-bottom-sheet .country-item,
html[data-theme="dark"] .country-bottom-sheet .country-card,
html[data-theme="dark"] .country-bottom-sheet a{
  background: var(--bg) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  color: var(--text) !important;
}

/* hover/active */
html[data-theme="dark"] .country-bottom-sheet a:hover,
html[data-theme="dark"] .country-bottom-sheet .active,
html[data-theme="dark"] .country-bottom-sheet .is-active{
  background: var(--bg-light) !important;
}

/* Dark mode: burger icon color */
html[data-theme="dark"] .burger-btn{
  color: var(--text) !important;
}

html[data-theme="dark"] .burger-btn .burger-icon,
html[data-theme="dark"] .burger-btn .close-icon{
  color: var(--text) !important;
}

/* Dark mode: desktop menu text brighter */
html[data-theme="dark"] .desktop-nav .nav-link{
  color: var(--text) !important;
  opacity: 1 !important;
}

/* на всякий случай, если цвет задан на li */
html[data-theme="dark"] .desktop-nav .nav-item{
  color: var(--text) !important;
}

/* Dark mode: rounded catalog tiles (cards) */
html[data-theme="dark"] .c-card{
  border-radius: var(--radius-lg) !important;
  overflow: hidden !important; /* чтобы углы внутри не торчали */
}

/* обёртка картинки тоже должна быть скруглена */
html[data-theme="dark"] .c-card .c-img{
  border-radius: var(--radius-lg) !important;
  overflow: hidden !important;
}

/* и сама картинка */
html[data-theme="dark"] .c-card .c-img img{
  border-radius: var(--radius-lg) !important;
}

/* если подпись снизу (c-t) — тоже скругляем низ карточки */
html[data-theme="dark"] .c-card .c-t{
  border-bottom-left-radius: var(--radius-lg) !important;
  border-bottom-right-radius: var(--radius-lg) !important;
}

/* =========================
   DARK MODE: Viewer / Slider background
   ========================= */

html[data-theme="dark"] .modern-viewer-wrapper,
html[data-theme="dark"] .image-slider,
html[data-theme="dark"] .image-slider__body,
html[data-theme="dark"] .image-slider__main,
html[data-theme="dark"] .image-slider__container{
  background: var(--bg) !important;
  color: var(--text) !important;
}

/* зона превью снизу */
html[data-theme="dark"] .image-slider__thumbs,
html[data-theme="dark"] .image-slider__thumbnails,
html[data-theme="dark"] .image-slider__thumbs-wrapper{
  background: var(--bg) !important;
  border-top: 1px solid var(--border) !important;
}

/* рамки/плитки превью */
html[data-theme="dark"] .image-slider__thumb,
html[data-theme="dark"] .image-slider__thumb img{
  border-radius: 10px !important;
}

/* активное превью (если есть выделение) */
html[data-theme="dark"] .image-slider__thumb.is-active,
html[data-theme="dark"] .image-slider__thumb.active{
  outline: 2px solid var(--primary) !important;
  outline-offset: 2px;
}

/* стрелки навигации */
html[data-theme="dark"] .image-slider__nav,
html[data-theme="dark"] .image-slider__navigation button{
  background: rgba(22, 26, 34, 0.85) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}


/* =========================
   ENDE DARK THEME (data-theme)
   ========================= */

html {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    margin: 0 !important;
    padding-top: 70px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 20px;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    margin: 0 !important;
}

@media (max-width: 899px) {
.site-header {
        justify-content: space-between;
    }
    
    .header-right {
        display: none;
    }
}

.logo {
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
    color: #000;
    display: flex;
    align-items: center;
    height: 50px;
}

.logo img,
.logo .site-logo-img {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.logo span {
    color: #e60023;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
}

.desktop-nav {
    display: none;
    height: 100%;
}

.nav-list {
    display: flex;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 30px;
}

.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    letter-spacing: -0.3px;
}

.nav-link:hover {
    color: #e60023;
    border-bottom: 2px solid #e60023;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: -2px;
    padding-top: 10px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: 240px;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-top: none;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    display: none;
    padding: 12px 0;
    border-radius: 0 0 12px 12px;
    z-index: 1000;
}

.nav-item:hover .dropdown {
    display: block;
}

.nav-item::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
    z-index: 999;
    display: none;
}

.nav-item:hover::after {
    display: block;
}

.dropdown a {
    display: block;
    padding: 8px 20px;
    text-decoration: none;
    color: #555;
    font-size: 14px;
}

.dropdown a:hover {
    background: #f9f9f9;
    color: #e60023;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100%;
}

@media (max-width: 899px) {
    .header-actions {
        display: flex !important;
    }
}

.desktop-country-select {
    position: relative;
}

.desktop-country-select::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    height: 10px;
    background: transparent;
    z-index: 999;
    display: none;
}

.desktop-country-select:hover::after {
    display: block;
}

.country-select-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(229, 231, 235, 0.8);
    background: rgba(248, 249, 250, 0.8);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text);
    text-decoration: none;
    font-family: inherit;
    outline: none;
}

.country-select-trigger:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.country-select-trigger:hover {
    background: rgba(255, 255, 255, 1);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(230, 0, 35, 0.1);
}

.country-select-trigger .country-flag-img {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.country-select-code {
    font-weight: 600;
}

.country-select-arrow {
    font-size: 8px;
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.desktop-country-select:hover .country-select-arrow {
    transform: rotate(180deg);
}

.country-dropdown-desktop {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: -2px;
    padding-top: 10px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: 180px;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    display: none;
    z-index: 1000;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}

.country-dropdown-desktop::before {
    content: '';
    position: absolute;
    top: -4px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 4px solid rgba(255, 255, 255, 0.98);
}

.desktop-country-select:hover .country-dropdown-desktop,
.desktop-country-select .country-dropdown-desktop:hover {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.country-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.country-dropdown-item:last-child {
    border-bottom: none;
}

.country-dropdown-item:hover {
    background: rgba(230, 0, 35, 0.05);
    color: var(--primary);
}

.country-dropdown-item.active {
    background: rgba(230, 0, 35, 0.08);
    color: var(--primary);
    font-weight: 600;
}

.country-dropdown-item .country-flag-img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.country-dropdown-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.country-dropdown-name {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

.country-dropdown-code {
    font-size: 11px;
    color: #999;
    font-weight: 400;
}

.country-dropdown-item.active .country-dropdown-code,
.country-dropdown-item:hover .country-dropdown-code {
    color: var(--primary);
    opacity: 0.8;
}

.country-flag-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
}

.country-flag-btn .country-flag-img {
    width: 24px;
    height: 24px;
    display: block;
}

.country-bottom-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 3000;
    transition: bottom 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
}

.country-bottom-sheet.open {
    bottom: 0;
}

.country-bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2999;
    display: none;
}

.country-bottom-sheet-overlay.open {
    display: block;
}

.country-bottom-sheet h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.country-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.country-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: #333;
}

.country-item:hover,
.country-item.active {
    border-color: #e60023;
    background: #fff5f7;
}

.country-item-flag {
    font-size: 32px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.country-flag-img {
    width: auto;
    height: auto;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.country-flag-btn .country-flag-img {
    width: 24px;
    height: 24px;
}

.country-item-flag .country-flag-img {
    width: 32px;
    height: 32px;
}

.country-item-info {
    flex: 1;
}

.country-item-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
}

.country-item-code {
    font-size: 12px;
    color: #999;
}

.burger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    color: #333;
    transition: all 0.3s ease;
}

.burger-btn.active {
    color: #333;
}

.burger-btn .burger-icon,
.burger-btn .close-icon {
    display: inline-block;
    transition: all 0.3s ease;
}

@media (max-width: 899px) {
    .burger-btn {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

.mobile-country-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.mobile-drawer {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: #fff;
    transform: translateX(-100%);
    transition: 0.3s;
    overflow-y: auto;
    padding: 20px;
    border-top: 1px solid #eee;
    z-index: 2000;
}

.mobile-drawer.open {
    transform: translateX(0);
}

.mob-item {
    border-bottom: 1px solid #f0f0f0;
}

.mob-head {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
}

.mob-list {
    display: none;
    padding-bottom: 15px;
    padding-left: 10px;
}

.mob-list a {
    display: block;
    padding: 8px 0;
    color: #666;
    text-decoration: none;
    font-size: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f9f9f9;
}

.mob-list.active {
    display: block;
}

.arrow {
    transition: 0.3s;
}

.active .arrow {
    transform: rotate(180deg);
}

@media (max-width: 899px) {
    .desktop-country-select {
        display: none;
    }
    .mobile-country-btn {
        display: block !important;
    }
    .burger-btn {
        display: block !important;
    }
}

@media (min-width: 900px) {
    .header-right {
        display: flex;
    }
    .desktop-nav {
        display: block;
    }
    .burger-btn {
        display: none;
    }
    .mobile-drawer {
        display: none;
    }
    .mobile-country-btn {
        display: none !important;
    }
    .desktop-country-select {
        display: block;
    }
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
    margin-top: auto !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

/* 3. HERO БЛОК - СОВРЕМЕННЫЙ ДИЗАЙН */
.hero-block {
    margin-top: 0;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f7 30%, #ffffff 70%, #f8f9fa 100%);
    padding: 80px 20px 70px;
    text-align: center;
    border-bottom: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.hero-block::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(230,0,35,0.08) 0%, rgba(230,0,35,0.03) 50%, transparent 80%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.hero-block::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(230,0,35,0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(20px, -20px) scale(1.1);
    }
}

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

.hero-main-title {
    font-size: 56px;
    font-weight: 900;
    margin: 0 0 16px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1.5px;
    position: relative;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(230, 0, 35, 0.1);
    animation: fadeInUp 0.8s ease-out;
}

.hero-main-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 2px;
    opacity: 0.6;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

@media (max-width: 768px) {
    .hero-block {
        padding: 60px 15px 50px;
    }
    
    .hero-main-title {
        font-size: 38px;
        letter-spacing: -1px;
    }
    
    .hero-main-title::after {
        width: 80px;
        height: 3px;
    }
    
    .hero-block::before,
    .hero-block::after {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 480px) {
    .hero-main-title {
        font-size: 32px;
    }
}

.hero-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff !important;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(230,0,35,0.3);
    border: none;
    cursor: pointer;
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(230,0,35,0.4);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

/* =========================================
   4. ЭТАЛОННАЯ КАРТОЧКА
   (Эти стили теперь работают ВЕЗДЕ одинаково)
   ========================================= */

.c-card {
    display: block;
    width: 100%;
    text-decoration: none;
    transition: var(--transition);
}

.c-card:hover .c-img {
    transform: scale(1.02);
    box-shadow: 0 8px 24px var(--shadow-hover);
}

.c-card:hover .c-t {
    color: var(--primary);
}

.c-img {
    display: block;
    width: 100%;
    height: 0 !important;
    padding-bottom: 140% !important; /* Пропорция 1:1.4 */
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf0 100%);
    box-shadow: 0 2px 12px var(--shadow);
    transition: var(--transition);
}

.c-img img {
    position: absolute; top: 0; left: 0;
    width: 100% !important; height: 100% !important;
    object-fit: cover !important;
}

.c-t {
    display: flex;
    text-align: center;
    justify-content: center;
    align-items: center;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px;
    font-size: 15px;
    margin-top: 12px;
    line-height: 1.5;
    font-weight: 600;
    color: var(--text);
    transition: var(--transition);
}

/* =========================================
   5. СЕТКА (GRID) - ЭТАЛОН
   ========================================= */
.catalog-grid-container {
    display: grid;
    /* Мобайл: 2 колонки */
    grid-template-columns: repeat(2, 1fr); 
    gap: var(--gap);
    margin-bottom: 40px;
}
@media (min-width: 768px) {
    .catalog-grid-container {
        /* Десктоп: 4 колонки */
        grid-template-columns: repeat(4, 1fr); 
    }
}

/* Рекламные блоки в сетке каталогов - точно такой же размер как карточки */
.ad-block-inline {
    display: block;
    width: 100%;
    text-decoration: none;
    transition: var(--transition);
    /* Такая же структура как .c-card */
}

.ad-block-inline .ad-content {
    display: block;
    width: 100%;
    height: 0 !important;
    padding-bottom: 140% !important; /* Такая же пропорция как у .c-img */
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 0px dashed #dee2e6;
    box-shadow: 0 2px 12px var(--shadow);
    transition: var(--transition);
}

.ad-block-inline:hover .ad-content {
    border-color: var(--primary);
    background: linear-gradient(135deg, #fff5f7 0%, #f8f9fa 100%);
    transform: scale(1.02);
    box-shadow: 0 8px 24px var(--shadow-hover);
}

.ad-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #adb5bd;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Стили для виджетов внутри рекламного блока */
.ad-block-inline .widget {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-block-inline .widget img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

.ad-label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    font-size: 15px;
    margin-top: 12px;
    line-height: 1.5;
    font-weight: 600;
    color: #999;
    text-align: center;
}

/* Рекламный блок в слайдере */
.ad-slide-inline {
    width: auto !important;
}

.ad-slide-inline .ad-block-inline {
    width: 100%;
}

.ad-slide-inline .ad-block-inline .ad-content {
    padding-bottom: 140% !important;
}

/* Рекламные блоки между секциями */
.ad-between-sections {
    max-width: 1240px;
    margin: 50px auto;
    padding: 0 20px;
    width: 100%;
}

.ad-between-sections .widget {
    width: 100%;
    margin: 0;
}

.ad-placeholder-horizontal {
    width: 100%;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: var(--radius);
    color: #adb5bd;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    transition: var(--transition);
}

.ad-placeholder-horizontal:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, #fff5f7 0%, #f8f9fa 100%);
}

@media (max-width: 768px) {
    .ad-between-sections {
        margin: 40px auto;
        padding: 0 15px;
    }
    
    .ad-placeholder-horizontal {
        min-height: 300px;
        font-size: 14px;
    }
}

/* =========================================
   6. СЛАЙДЕРЫ (КАРУСЕЛЬ)
   ========================================= */
.sw-sec {
    scroll-margin-top: 90px;
    margin: 50px auto;
    max-width: 100%;
    padding: 0 0px;
    position: relative;
    width: 100%;
}

#moda-calzado,
#cosmetica,
#hogar,
#catalogs {
    scroll-margin-top: 90px;
}

.sw-head {
    font-size: 28px; 
    font-weight: 800; 
    margin-bottom: 32px;
    display: flex; 
    align-items: center;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 !important;
    color: var(--text);
    letter-spacing: -0.5px;
}

.sw-head::before {
    content: ''; 
    display: block; 
    width: 5px; 
    height: 28px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
    margin-right: 16px; 
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(230,0,35,0.3);
}

/* SWIPER SLIDER - ОСНОВНЫЕ СТИЛИ */
.sw-slider {
    width: 100% !important;
    max-width: 1240px !important;
    margin: 0 auto 50px !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: relative !important;
}

/* Убеждаемся, что Swiper правильно инициализирован */
.sw-slider.swiper-initialized {
    overflow: hidden !important;
}

.swiper-wrapper {
    padding-top: 5px;
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box !important;
    align-items: stretch !important;
}

/* SLIDES - РАЗМЕРЫ */
.swiper-slide {
    width: auto !important;
    min-width: 0 !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    height: auto !important;
    /* Мобайл: 2 колонки */
    width: calc(50% - 10px) !important;
}

@media (min-width: 768px) {
    .swiper-slide {
        /* Десктоп: 4 колонки */
        width: calc(25% - 19px) !important;
    }
}

/* Ссылки внутри слайдов должны быть кликабельны */
.swiper-slide a {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 1;
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

/* Убеждаемся, что Swiper не блокирует клики */
.swiper-slide {
    pointer-events: auto !important;
}

.swiper-slide.swiper-slide-active a,
.swiper-slide a {
    pointer-events: auto !important;
}

/* КНОПКИ НАВИГАЦИИ */
/* Скрыть кнопки навигации, если их нет в DOM */
.sw-slider:not(:has(.swiper-button-next)) .swiper-button-next,
.sw-slider:not(:has(.swiper-button-prev)) .swiper-button-prev {
    display: none !important;
}

.swiper-button-prev,
.swiper-button-next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 30 !important;
    width: 44px !important;
    height: 44px !important;
    background: var(--primary) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-size: 20px !important;
    transition: all 0.18s ease !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12) !important;
    margin-top: 0 !important;
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-family: swiper-icons !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #fff !important;
}

.swiper-button-prev {
    left: 12px !important;
    right: auto !important;
}

.swiper-button-next {
    right: 12px !important;
    left: auto !important;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: #c40000 !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18) !important;
    transform: translateY(-50%) scale(1.06) !important;
}

.swiper-button-disabled {
    background: #ddd !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    pointer-events: none !important;
}

/* На мобильных скрываем кнопки или делаем меньше */
@media (max-width: 767px) {
    .swiper-button-prev,
    .swiper-button-next {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }
    .swiper-button-prev {
        left: 8px !important;
    }
    .swiper-button-next {
        right: 8px !important;
    }
}

/* =========================================
   7. ОСТАЛЬНОЕ
   ========================================= */
.mobile-drawer { z-index: 2000; }
.mob-list a { font-size: 16px; padding: 12px 0; border-bottom: 1px solid #f9f9f9; }

.catalog-viewer-container { padding-top: 40px; }
.cat-h1 { font-size: 28px; font-weight: 800; text-align: center; }

/* ============================================
   IMAGE SLIDER WITH THUMBNAILS
   Mobile-first слайдер с миниатюрами
   ============================================ */

/* Основной контейнер */
.image-slider {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Скрываем исходные элементы до инициализации слайдера */
.catalog-gallery > a,
.catalog-gallery > a > img,
.image-slider > a,
.image-slider > a > img {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
}

/* Основной слайдер */
.image-slider__main {
    position: relative;
    width: 100%;
    background: #f8f9fa;
    overflow: hidden;
    margin: auto;
}



.image-slider__container {
    position: relative;
    width: 100%;
    display: flex;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    min-height: 500px;
}




@media (min-width: 768px) {
    .image-slider__container {
        aspect-ratio: 4 / 3;
        min-height: 400px;
    }
    .image-slider__main {
    width: 100%;
}
}

@media (min-width: 1024px) {
    .image-slider__container {
        aspect-ratio: 16 / 9;
        min-height: 600px;
        max-height: 800px;
    }
}
.image-slider__main {
    width: 46%;
}

/* Слайды */
.image-slider__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 300ms ease-out;
    pointer-events: none;
}

.image-slider__slide[aria-hidden="false"] {
    position: relative;
    opacity: 1;
    pointer-events: auto;
}

/* Slide transition */
.image-slider__container:not(.image-slider__container--fade) .image-slider__slide {
    position: absolute;
    transform: translateX(100%);
    transition: transform 300ms ease-out;
}

.image-slider__container:not(.image-slider__container--fade) .image-slider__slide[aria-hidden="false"] {
    transform: translateX(0);
}

/* Fade transition */
.image-slider__container--fade .image-slider__slide {
    position: absolute;
    opacity: 0;
    transition: opacity 300ms ease-out;
}

.image-slider__container--fade .image-slider__slide--active {
    opacity: 1;
}

.image-slider__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

/* Skeleton loader */
.image-slider__skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    z-index: 1;
}

.image-slider__skeleton[style*="display: none"] {
    display: none !important;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Навигация (стрелки) */
.image-slider__navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: none;
    pointer-events: none;
    z-index: 10;
}

@media (min-width: 768px) {
    .image-slider__navigation {
        display: block;
    }
}

.image-slider__nav-btn {
    position: absolute;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    color: #333;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    padding: 0;
    margin: 0;
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.image-slider__nav-btn:hover,
.image-slider__nav-btn:focus {
    background: rgba(230, 0, 35, 0.9);
    border-color: rgba(230, 0, 35, 1);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(230, 0, 35, 0.4);
}

.image-slider__nav-btn:active {
    transform: scale(0.95);
}

.image-slider__nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.image-slider__nav-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.image-slider__nav-btn--prev {
    left: 20px;
}

.image-slider__nav-btn--next {
    right: 20px;
}

/* Индикатор */
.image-slider__indicator {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
    pointer-events: none;
}

@media (min-width: 768px) {
    .image-slider__indicator {
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* Миниатюры */
.image-slider__thumbnails {
    width: 100%;
    background: #fff;
    padding: 12px;
    border-top: 1px solid #eee;
    overflow: hidden;
}

.image-slider__thumbnails-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    touch-action: pan-x;
    scrollbar-width: thin;
    scrollbar-color: rgba(230, 0, 35, 0.3) transparent;
}

.image-slider__thumbnails-container::-webkit-scrollbar {
    height: 4px;
}

.image-slider__thumbnails-container::-webkit-scrollbar-track {
    background: transparent;
}

.image-slider__thumbnails-container::-webkit-scrollbar-thumb {
    background: rgba(230, 0, 35, 0.3);
    border-radius: 2px;
}

.image-slider__thumbnails-container::-webkit-scrollbar-thumb:hover {
    background: rgba(230, 0, 35, 0.5);
}

.image-slider__thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    padding: 2px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease-out;
    overflow: hidden;
    outline: none;
}

@media (min-width: 768px) {
    .image-slider__thumbnail {
        width: 80px;
        height: 80px;
        min-width: 80px;
        min-height: 80px;
    }
}

.image-slider__thumbnail:hover {
    border-color: rgba(230, 0, 35, 0.4);
    transform: scale(1.05);
}

.image-slider__thumbnail--active {
    border-color: var(--primary, #e60023);
    box-shadow: 0 0 0 2px rgba(230, 0, 35, 0.1), 0 4px 12px rgba(230, 0, 35, 0.2);
}

.image-slider__thumbnail--active:hover {
    transform: none;
}

.image-slider__thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    pointer-events: none;
}

/* Позиции миниатюр - Bottom (по умолчанию) */
.image-slider__thumbnails--bottom {
    order: 2;
}

/* Позиции миниатюр - Left */
@media (min-width: 1024px) {
    .image-slider__thumbnails--left {
        order: 0;
        width: auto;
        padding: 12px;
        border-top: none;
        border-right: 1px solid #eee;
    }

    .image-slider__thumbnails--left .image-slider__thumbnails-container {
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
        max-height: 600px;
        scroll-snap-type: y proximity;
        touch-action: pan-y;
    }

    .image-slider__thumbnails--left .image-slider__thumbnail {
        width: 80px;
        height: 80px;
        min-width: 80px;
        min-height: 80px;
    }

    .image-slider:has(.image-slider__thumbnails--left) {
        flex-direction: row;
    }

    .image-slider:has(.image-slider__thumbnails--left) .image-slider__main {
        flex: 1;
    }
}

/* Позиции миниатюр - Right */
@media (min-width: 1024px) {
    .image-slider__thumbnails--right {
        order: 3;
        width: auto;
        padding: 12px;
        border-top: none;
        border-left: 1px solid #eee;
    }

    .image-slider__thumbnails--right .image-slider__thumbnails-container {
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
        max-height: 600px;
        scroll-snap-type: y proximity;
        touch-action: pan-y;
    }

    .image-slider__thumbnails--right .image-slider__thumbnail {
        width: 80px;
        height: 80px;
        min-width: 80px;
        min-height: 80px;
    }

    .image-slider:has(.image-slider__thumbnails--right) {
        flex-direction: row;
    }

    .image-slider:has(.image-slider__thumbnails--right) .image-slider__main {
        flex: 1;
    }
}

/* Mobile адаптивность */
@media (max-width: 768px) {
    .image-slider {
        border-radius: 10px;
    }

    .image-slider__main {
        border-radius: 10px 10px 0 0;
        width: 100%;
    }

    .image-slider__thumbnails {
        padding: 8px;
    }

    .image-slider__thumbnails-container {
        gap: 8px;
    }

    .image-slider__thumbnail {
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
    }

    .image-slider__indicator {
        bottom: 12px;
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* Доступность */
.image-slider__thumbnail:focus-visible {
    outline: 2px solid var(--primary, #e60023);
    outline-offset: 2px;
}

.image-slider__nav-btn:focus-visible {
    outline: 2px solid var(--primary, #e60023);
    outline-offset: 2px;
}

.image-slider__slide[aria-hidden="true"] {
    visibility: hidden;
}

/* Отключение анимаций для prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .image-slider__slide,
    .image-slider__thumbnail,
    .image-slider__nav-btn {
        transition: none;
    }

    .image-slider__thumbnails-container {
        scroll-behavior: auto;
    }
}


/* ============================================
   КАСТОМНЫЙ FULLSCREEN VIEWER
   Полностью новая реализация для просмотра каталогов
   ============================================ */

.catalog-fullscreen-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.catalog-fullscreen-viewer.active {
    display: block;
    opacity: 1;
}

.viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

.viewer-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.viewer-toolbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
    z-index: 10;
    gap: 12px;
    flex-wrap: wrap;
}

.viewer-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    margin: 0;
    outline: none;
}

.viewer-btn:hover,
.viewer-btn:focus {
    background: rgba(230, 0, 35, 0.9);
    border-color: rgba(230, 0, 35, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(230, 0, 35, 0.4);
}

.viewer-btn:active {
    transform: scale(0.95);
}

.viewer-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.viewer-nav-group,
.viewer-zoom-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.viewer-info {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.viewer-counter {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.viewer-image-wrapper {
    position: relative;
    flex: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 80px 20px 20px;
    box-sizing: border-box;
}

.viewer-image {
    max-width: 95vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.viewer-image[style*="scale"] {
    cursor: grab;
}

.viewer-image:active {
    cursor: grabbing;
}

.viewer-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #fff;
    z-index: 5;
}

.viewer-loader p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.viewer-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

body.viewer-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

html.viewer-open {
    overflow: hidden !important;
}

@media (max-width: 768px) {
    .catalog-fullscreen-viewer {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    .viewer-toolbar {
        padding: 12px 16px;
        padding-top: calc(12px + env(safe-area-inset-top));
        gap: 8px;
    }
    
    .viewer-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
    
    .viewer-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .viewer-image-wrapper {
        padding: 70px 10px 10px;
        padding-top: calc(70px + env(safe-area-inset-top));
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }
    
    .viewer-image {
        max-width: 100vw;
        max-height: 80vh;
    }
    
    .viewer-counter {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .viewer-nav-group,
    .viewer-zoom-group {
        gap: 6px;
    }
}


/* ============================================
   КНОПКИ ПОДПИСКИ (WhatsApp и Facebook)
   ============================================ */

.subscription-buttons-block {
    margin: 40px 0;
    padding: 35px 30px;
    background: #ffffff;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.subscription-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #555;
    font-weight: 400;
}

.subscription-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.sub-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #fff;
}

.sub-btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.sub-btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    background: linear-gradient(135deg, #2fe576 0%, #25D366 100%);
}

.sub-btn-facebook {
    background: linear-gradient(135deg, #1877F2 0%, #0C63D4 100%);
}

.sub-btn-facebook:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
    background: linear-gradient(135deg, #3b8bf2 0%, #1877F2 100%);
}

.sub-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.sub-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

.sub-text {
    font-family: var(--font);
}

@media (max-width: 768px) {
    .subscription-buttons-block {
        padding: 25px 20px;
        margin: 30px 15px;
    }
    
    .subscription-description {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .subscription-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .sub-btn {
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }
}

/* ============================================
   ЯКОРНАЯ КНОПКА К СЕКЦИИ "CATÁLOGOS RELACIONADOS"
   ============================================ */

.related-catalog-anchor-button-wrapper {
    margin: 30px 0;
    padding: 0 20px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.related-catalog-anchor-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 32px;
    background: var(--primary, #e60023);
    color: #ffffff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(230, 0, 35, 0.2);
    border: none;
    cursor: pointer;
    font-family: var(--font);
}

.related-catalog-anchor-button:hover {
    background: #c4001f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 0, 35, 0.3);
    color: #ffffff;
    text-decoration: none;
}

.related-catalog-anchor-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(230, 0, 35, 0.2);
}

.related-catalog-anchor-button:focus {
    outline: 2px solid var(--primary, #e60023);
    outline-offset: 2px;
}

.anchor-button-text {
    display: inline-block;
}

.anchor-button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.related-catalog-anchor-button:hover .anchor-button-icon {
    transform: translateX(4px);
}

.anchor-button-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Скрываем кнопку, если секция отсутствует (через JavaScript) */
.related-catalog-anchor-button-wrapper[style*="display: none"] {
    display: none !important;
}

/* Offset для якоря с учетом фиксированного header */
#catalogos-relacionados {
    scroll-margin-top: 100px; /* Отступ для фиксированного header */
    scroll-padding-top: 100px; /* Дополнительная поддержка для некоторых браузеров */
}

/* Улучшаем видимость секции при скролле */
.catalog-section-spacing#catalogos-relacionados {
    position: relative;
}

@media (max-width: 768px) {
    .related-catalog-anchor-button-wrapper {
        margin: 25px 15px;
        padding: 0;
    }
    
    .related-catalog-anchor-button {
        width: 100%;
        max-width: 100%;
        padding: 12px 24px;
        font-size: 15px;
    }
    
    #catalogos-relacionados {
        scroll-margin-top: 80px; /* Меньший отступ на мобильных */
    }
}

@media (max-width: 480px) {
    .related-catalog-anchor-button {
        padding: 11px 20px;
        font-size: 14px;
        gap: 10px;
    }
    
    .anchor-button-icon {
        width: 18px;
        height: 18px;
    }
    
    .anchor-button-icon svg {
        width: 18px;
        height: 18px;
    }
    
    #catalogos-relacionados {
        scroll-margin-top: 70px;
    }
}

/* ============================================
   ВЕРТИКАЛЬНЫЕ КНОПКИ ПОДЕЛИТЬСЯ В СОЦСЕТЯХ
   Компактные, прижатые к стенке, с кнопкой скрытия
   ============================================ */

.social-share-wrapper {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.social-share-toggle {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--transition);
    margin-bottom: 4px;
    padding: 0;
}

.social-share-toggle:hover {
    background: rgba(230, 0, 35, 0.8);
    transform: translateX(2px);
}

.social-share-toggle.active {
    background: rgba(230, 0, 35, 0.8);
}

.social-share-toggle svg {
    width: 20px;
    height: 20px;
}

.social-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-share-buttons.hidden {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: var(--transition);
    text-decoration: none;
    color: #fff;
    border: none;
    margin: 0;
    padding: 0;
}

.share-btn:first-child {
    border-radius: 0 8px 0 0;
}

.share-btn:last-child {
    border-radius: 0 0 8px 0;
}

.share-btn:hover {
    transform: translateX(3px);
    filter: brightness(1.1);
}

.share-btn:hover svg {
    transform: scale(1.1);
}

.share-btn svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
    transition: transform 0.2s ease;
}

.share-facebook {
    background: #1877F2;
}

.share-pinterest {
    background: #BD081C;
}

.share-messenger {
    background: #0084FF;
}

.share-twitter {
    background: #000000;
}

.share-whatsapp {
    background: #25D366;
}

.share-telegram {
    background: #0088CC;
}

/* Адаптив для мобильных */
@media (max-width: 1024px) {
    .social-share-wrapper {
        left: 0;
    }
    
    .social-share-toggle {
        width: 36px;
        height: 36px;
    }
    
    .share-btn {
        width: 36px;
        height: 36px;
    }
    
    .share-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 768px) {
    .social-share-wrapper {
        top: auto;
        bottom: 20px;
        transform: none;
        flex-direction: row;
        left: 10px;
    }
    
    .social-share-toggle {
        width: 36px;
        height: 36px;
        border-radius: 8px 0 0 8px;
        margin-bottom: 0;
        margin-right: 4px;
    }
    
    .social-share-buttons {
        flex-direction: row;
        gap: 0;
    }
    
    .social-share-buttons.hidden {
        transform: translateX(-100%);
    }
    
    .share-btn {
        width: 36px;
        height: 36px;
    }
    
    .share-btn:first-child {
        border-radius: 0;
    }
    
    .share-btn:last-child {
        border-radius: 0 8px 8px 0;
    }
    
    .share-btn:hover {
        transform: translateY(-2px);
    }
}



/* =========================================
   8. ПАГИНАЦИЯ И ПОИСК
   ========================================= */
.pagination-wrapper {
    margin-top: 40px;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.pagination-wrapper a,
.pagination-wrapper span {
    padding: 10px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: all 0.2s;
}

.pagination-wrapper a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination-wrapper .current,
.pagination-wrapper .page-numbers.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

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

.search-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.search-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    margin-top: 0;
}

.no-results {
    text-align: center;
    padding: 60px;
    background: #f9f9f9;
    border-radius: 8px;
}

.no-results h3 {
    margin-top: 0;
}

/* =========================================
   9. ВИДЖЕТЫ И БОКОВЫЕ ПАНЕЛИ
   ========================================= */
.widget {
    margin-bottom: 20px;
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: var(--primary);
}

/* =========================================
   10. ОБЩИЕ УТИЛИТЫ
   ========================================= */
.main-catalog-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 5px 60px;
}

/* =========================================
   11. БЕЙДЖ "NUEVO"
   ========================================= */
.badge-new {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 5px 11px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(230, 0, 35, 0.5);
    line-height: 1.2;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(230, 0, 35, 0.5);
    }
    50% {
        box-shadow: 0 4px 20px rgba(230, 0, 35, 0.7);
    }
}

@media (min-width: 768px) {
    .badge-new {
        top: 14px;
        right: 14px;
        font-size: 11px;
        padding: 6px 14px;
        border-radius: 22px;
    }
}

/* =========================================
   12. SINGLE CATALOG PAGE
   ========================================= */
.single-container {
    max-width: 1345px;
    margin: 0 auto;
    padding: 5px;
}

.top-viewer-grid {
    display: grid;
    grid-template-columns: 160px 1fr 160px;
    grid-template-areas: "ad-left center ad-right";
    gap: 10px;
    align-items: start;
    margin-bottom: 50px;
    max-width: 1325px;
    
    justify-content: space-between;
}

.ad-banner-left {
    grid-area: ad-left;
}

.center-col {
    grid-area: center;
    max-width: 100%;
    overflow: hidden;
}

.ad-banner-right {
    grid-area: ad-right;
}

.ad-banner-side {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    border: 2px dashed #dee2e6;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    width: 100%;
    max-width: 160px;
}

.ad-banner-side:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, #fff5f7 0%, #f8f9fa 100%);
}

.ad-banner-side-ad {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    border: 2px dashed #dee2e6;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    width: 255px;
    height: 250px;
}

.ad-banner-side-ad:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, #fff5f7 0%, #f8f9fa 100%);
}

.image-slider__body {
    display: flex;
    justify-content: space-between;
}



.ad-banner-horizontal {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 150px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-weight: 600;
    margin: 40px 0;
    border: 2px dashed #dee2e6;
    border-radius: var(--radius);
    transition: var(--transition);
}

.ad-banner-horizontal:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, #fff5f7 0%, #f8f9fa 100%);
}

.modern-viewer-wrapper {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.seo-content-block {
    max-width: 800px;
    margin: 60px auto;
    line-height: 1.8;
    color: var(--text);
    padding: 40px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
}

.seo-content-block h2 {
    font-size: 28px;
    margin-bottom: 24px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

.seo-content-block p {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 16px;
}

.single-catalog-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 36px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.catalog-section-spacing {
    margin-top: 60px;
}

.catalog-more-btn-wrapper {
    text-align: center;
    margin: 50px 0;
}

.related-catalog-2x2 {
    margin: 40px 0;
    padding: 0 20px;
}

.related-catalog-2x2 .sw-head {
    margin-bottom: 25px;
}

.related-catalog-2x2 + .subscription-buttons-block {
    margin-top: 50px;
}

.catalog-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .catalog-grid-2x2 {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        max-width: 1240px;
    }
}


/* =========================================
   13. TAXONOMY PAGES
   ========================================= */
.country-hero {
    background: linear-gradient(135deg, #ffffff 0%, #fff5f7 30%, #ffffff 70%, #f8f9fa 100%);
    padding: 80px 20px 70px;
    text-align: center;
    border-bottom: none;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.country-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(230, 0, 35, 0.08) 0%, rgba(230, 0, 35, 0.03) 50%, transparent 80%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.country-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(230, 0, 35, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.hero-subtitle {
    font-size: 28px;
    font-weight: 700;
    margin: 24px 0 20px 0;
    color: var(--text);
    letter-spacing: -0.3px;
    position: relative;
    line-height: 1.3;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.country-hero p {
    font-size: 18px;
    color: var(--text-light);
    margin: 0;
    position: relative;
    font-weight: 500;
    letter-spacing: 0.2px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

@media (max-width: 768px) {
    .country-hero {
        padding: 60px 15px 50px;
    }
    
    .country-hero::before,
    .country-hero::after {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 480px) {
    .hero-subtitle {
        font-size: 22px;
        margin: 20px 0 16px 0;
    }
    
    .country-hero p {
        font-size: 16px;
    }
}

.seo-footer-text {
    background: linear-gradient(135deg, var(--bg-light) 0%, #ffffff 100%);
    padding: 60px 20px;
    margin-top: 100px;
    color: var(--text-light);
    border-top: 1px solid var(--border);
}

.seo-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.seo-inner h2 {
    font-size: 28px;
    text-align: center;
    color: var(--text);
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.seo-inner p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.brand-hero {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.brand-hero h1 {
    margin: 0 0 10px;
    font-size: 32px;
    font-weight: 800;
}

.brand-hero p {
    margin: 0;
    color: #666;
}

.brand-hero .brand-description {
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.brand-hero .brand-description p {
    margin: 0 0 12px 0;
}

.brand-hero .brand-description p:last-child {
    margin-bottom: 0;
}

.brand-hero .brand-description strong,
.brand-hero .brand-description b {
    font-weight: 600;
    color: #333;
}

.brand-hero .brand-description a {
    color: var(--primary, #e60023);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.brand-hero .brand-description a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.brand-hero .brand-description ul,
.brand-hero .brand-description ol {
    margin: 12px 0;
    padding-left: 24px;
}

.brand-hero .brand-description li {
    margin-bottom: 8px;
}

.brand-description {
    margin: 40px auto;
    padding: 30px;
    color: #666;
    font-size: 16px;
    line-height: 1.7;
    text-align: left;
    max-width: 900px;
    background: #f9f9f9;
    border-radius: 8px;
}

.brand-description p {
    margin: 0 0 16px 0;
}

.brand-description p:last-child {
    margin-bottom: 0;
}

.brand-description strong,
.brand-description b {
    font-weight: 600;
    color: #333;
}

.brand-description a {
    color: var(--primary, #e60023);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.brand-description a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.brand-description ul,
.brand-description ol {
    margin: 16px 0;
    padding-left: 28px;
}

.brand-description li {
    margin-bottom: 10px;
}

.brand-description h1,
.brand-description h2,
.brand-description h3,
.brand-description h4,
.brand-description h5,
.brand-description h6 {
    margin: 20px 0 12px 0;
    color: #333;
    font-weight: 600;
}

.brand-description h1:first-child,
.brand-description h2:first-child,
.brand-description h3:first-child {
    margin-top: 0;
}

@media (max-width: 768px) {
    .brand-description {
        margin: 30px 15px;
        padding: 20px;
        font-size: 15px;
        line-height: 1.6;
    }
    
    .brand-description p {
        margin: 0 0 14px 0;
    }
    
    .brand-description ul,
    .brand-description ol {
        margin: 14px 0;
        padding-left: 24px;
    }
    
    .brand-description li {
        margin-bottom: 8px;
    }
    
    .brand-description h1,
    .brand-description h2,
    .brand-description h3,
    .brand-description h4,
    .brand-description h5,
    .brand-description h6 {
        margin: 16px 0 10px 0;
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .brand-description {
        margin: 20px 10px;
        padding: 15px;
        font-size: 14px;
    }
}

/* =========================================
   14. BRANDS LIST (Front Page)
   ========================================= */
.brands-simple-list {
    margin-top: 60px;
    padding-top: 50px;
    border-top: 1px solid var(--border);
}

.brands-simple-list h3 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text);
    letter-spacing: -0.5px;
}

.brands-simple-list > div a {
    transition: var(--transition);
    border-radius: var(--radius);
}

.brands-simple-list > div a:hover {
    background: linear-gradient(135deg, #fff5f7 0%, #ffffff 100%) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 0, 35, 0.15);
}

@media (min-width: 768px) {
    .brands-simple-list > div {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 20px !important;
    }
}


/* =========================================
   15. FOOTER STYLES
   ========================================= */
.site-footer {
    background: linear-gradient(180deg, #1a1a1a 0%, #111 100%);
    color: #fff;
    padding: 60px 20px 30px;
    margin-top: 80px;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(230, 0, 35, 0.3), transparent);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    position: relative;
    z-index: 1;
}

.footer-col {
    animation: fadeInUp 0.6s ease-out;
}

.footer-col:nth-child(1) {
    animation-delay: 0.1s;
}

.footer-col:nth-child(2) {
    animation-delay: 0.2s;
}

.footer-col:nth-child(3) {
    animation-delay: 0.3s;
}

.col-center {
    text-align: left;
    overflow: hidden;
}

.col-center-inner {
    float: right;
 
}

.footer-col h3 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 12px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), transparent);
    border-radius: 2px;
}

.footer-col p {
    color: #aaa;
    line-height: 1.8;
    margin: 0;
    font-size: 14px;
}

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

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: #bbb;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 14px;
    position: relative;
    padding-left: 0;
}

.footer-col a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--primary);
}

.footer-col a:hover {
    color: #fff;
    padding-left: 20px;
    transform: translateX(5px);
}

.footer-col a:hover::before {
    opacity: 1;
    left: 0;
}

.footer-col .footer-text-item {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 12px;
    padding-left: 0;
}

.footer-col .footer-text-item::before {
    display: none;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    max-width: 150px;
    height: auto;
    display: block;
}

.footer-social {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

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

.footer-social .social-link::before {
    display: none;
}

.footer-social .social-link:hover {
    background: var(--primary, #e60023);
    transform: translateY(-3px);
    padding-left: 0;
    box-shadow: 0 4px 12px rgba(230, 0, 35, 0.3);
}

.footer-social .social-icon {
    display: none;
}

.footer-social .social-link::after {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.footer-social .social-facebook::after {
    content: 'f';
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.footer-social .social-twitter::after {
    content: 't';
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.footer-social .social-instagram::after {
    content: 'i';
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.footer-social .social-youtube::after {
    content: 'y';
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.footer-social .social-linkedin::after {
    content: 'in';
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 12px;
}

.footer-contact {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-contact .contact-item {
    margin: 8px 0;
    color: #aaa;
    font-size: 13px;
    line-height: 1.6;
}

.footer-contact .contact-item strong {
    color: #fff;
    margin-right: 8px;
}

.footer-contact .contact-item a {
    color: #bbb;
    text-decoration: none;
}

.footer-contact .contact-item a:hover {
    color: var(--primary, #e60023);
    padding-left: 0;
    transform: none;
}

.footer-contact .contact-item a::before {
    display: none;
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 50px;
    padding-top: 25px;
    color: #888;
    font-size: 13px;
    position: relative;
    z-index: 1;
}

@media (max-width: 968px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .col-center {
        text-align: left;
    }
    
    .col-center h3::after {
        left: 0;
        transform: none;
    }
    
    .footer-col:nth-child(3) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .site-footer {
        padding: 40px 15px 25px;
        margin-top: 60px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    
    .footer-col h3 {
        font-size: 18px;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
    
    .footer-col h3::after {
        width: 30px;
        height: 2px;
    }
    
    .col-center {
        text-align: left;
    }
    
    .col-center-inner {
        float: none;
        text-align: left;
    }
    
    .col-center h3::after {
        left: 0;
        transform: none;
    }
    
    .footer-col p {
        font-size: 13px;
        line-height: 1.7;
    }
    
    .footer-col a {
        font-size: 13px;
    }
    
    .footer-col li {
        margin-bottom: 10px;
    }
    
    .copyright {
        margin-top: 40px;
        padding-top: 20px;
        font-size: 12px;
        line-height: 1.6;
    }
}

@media (max-width: 360px) {
    .site-footer {
        padding: 35px 12px 20px;
    }
    
    .footer-grid {
        gap: 30px;
    }
    
    .footer-col h3 {
        font-size: 16px;
    }
}

/* =========================================
   16. SEARCH PAGE STYLES
   ========================================= */
.search-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 40px 20px;
}

.search-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.search-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    margin-top: 0;
}

.no-results {
    text-align: center;
    padding: 60px;
    background: #f9f9f9;
    border-radius: 8px;
}

.no-results h3 {
    margin-top: 0;
}

/* =========================================
   16. СТРАНИЦЫ (PAGES)
   ========================================= */
.page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.page-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--text);
    line-height: 1.2;
}

.page-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
}

.page-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 40px 0 20px;
    color: var(--text);
}

.page-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 30px 0 15px;
    color: var(--text);
}

.page-content p {
    margin-bottom: 20px;
}

.page-content ul,
.page-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.page-content li {
    margin-bottom: 10px;
}

.page-content strong {
    font-weight: 600;
    color: var(--text);
}


/* =========================================
   17. КНОПКА ЗАГРУЗКИ БОЛЬШЕ (LOAD MORE)
   ========================================= */
.catalog-load-more-wrapper {
    text-align: center;
    margin: 40px 0;
    padding: 0 20px;
}

.catalog-load-more-btn {
    background: linear-gradient(135deg, #e60023 0%, #cc001f 100%);
    color: #fff;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 0, 35, 0.3);
    text-decoration: none;
    display: inline-block;
}

.catalog-load-more-btn:hover {
    background: linear-gradient(135deg, #cc001f 0%, #b3001b 100%);
    box-shadow: 0 6px 20px rgba(230, 0, 35, 0.4);
    transform: translateY(-2px);
}

.catalog-load-more-btn:active {
    transform: translateY(0);
}

.catalog-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* =========================================
   18. АДАПТИВНОСТЬ - ЕДИНАЯ СИСТЕМА
   ========================================= */

/* TABLET: 768px - 1024px */
@media (max-width: 1024px) and (min-width: 769px) {
    .single-container {
        padding: 20px;
        max-width: 100%;
    }
    
    .top-viewer-grid {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "ad-top"
            "center"
            "ad-bottom";
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .ad-banner-left {
        grid-area: ad-top !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 90px !important;
        font-size: 13px !important;
        padding: 12px !important;
        box-sizing: border-box !important;
    }
    
    .ad-banner-right {
        grid-area: ad-bottom;
        min-height: 90% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 90px !important;
        font-size: 13px !important;
        padding: 12px !important;
        box-sizing: border-box !important;
    }
    
    .center-col {
        grid-area: center;
    }
    
    .single-catalog-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    
    .catalog-grid-2x2 {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    
    .hero-block {
        padding: 60px 20px 50px;
    }
    
    .hero-title {
        font-size: 36px;
    }
}

/* MOBILE: ≤ 768px - ПОЛНАЯ ПЕРЕРАБОТКА */
@media (max-width: 768px) {
    html, body {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    body {
        padding-top: 70px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .site-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding: 0 12px !important;
        z-index: 1000 !important;
        height: 70px;
        box-sizing: border-box !important;
    }
    
    .single-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }
    
    .top-viewer-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-areas: 
            "ad-top"
            "center"
            "ad-bottom" !important;
        gap: 12px !important;
        margin: 0 0 20px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .ad-banner-left {
        grid-area: ad-top !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 480px !important;
        font-size: 13px !important;
        padding: 12px !important;
        box-sizing: border-box !important;
    }
    
    .ad-banner-right {
        grid-area: ad-bottom !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 480px !important;
        font-size: 13px !important;
        padding: 12px !important;
        box-sizing: border-box !important;
    }
    
    .center-col {
        grid-area: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    .single-catalog-title {
        font-size: 22px !important;
        font-weight: 700 !important;
        margin: 0 0 18px 0 !important;
        padding: 0 8px !important;
        text-align: center !important;
        line-height: 1.3 !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }
    
    .modern-viewer-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    
    .catalog-grid-2x2 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 0 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .catalog-card {
        width: 100% !important;
        border-radius: 10px !important;
        overflow: hidden !important;
    }
    
    .catalog-card-img {
        width: 100% !important;
        border-radius: 10px 10px 0 0 !important;
    }
    
    .related-catalog-2x2 {
        width: 100% !important;
        max-width: 100% !important;
        margin: 25px 0 !important;
        padding: 0 12px !important;
        box-sizing: border-box !important;
    }
    
    .hero-block {
        padding: 45px 12px 35px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .hero-title {
        font-size: 26px !important;
        margin-bottom: 12px !important;
        line-height: 1.3 !important;
    }
    
    .hero-subtitle {
        font-size: 17px !important;
        margin: 12px 0 !important;
    }
    
    .seo-content-block {
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px 15px !important;
        margin: 35px auto !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
    }
    
    .seo-content-block h2 {
        font-size: 22px !important;
        margin-bottom: 18px !important;
    }
    
    .seo-content-block p {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
    
    .subscription-buttons-block {
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px 12px !important;
        margin: 25px 0 !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .subscription-btn {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 14px !important;
        box-sizing: border-box !important;
    }
    
    .page-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 25px 12px 35px !important;
        box-sizing: border-box !important;
    }
    
    .page-title {
        font-size: 26px !important;
        margin-bottom: 18px !important;
    }
    
    .page-content {
        font-size: 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .page-content h2 {
        font-size: 22px !important;
        margin: 25px 0 12px !important;
    }
    
    .page-content h3 {
        font-size: 19px !important;
        margin: 20px 0 10px !important;
    }
    
    .catalog-load-more-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 25px 0 !important;
        padding: 0 12px !important;
        box-sizing: border-box !important;
    }
    
    .catalog-load-more-btn {
        width: 100% !important;
        max-width: 100% !important;
        padding: 14px 24px !important;
        font-size: 14px !important;
        box-sizing: border-box !important;
    }
    
    .country-hero {
        width: 100% !important;
        max-width: 100% !important;
        padding: 45px 12px 35px !important;
        box-sizing: border-box !important;
    }
    
    .hero-subtitle {
        font-size: 18px !important;
    }
    
    .catalog-section-spacing {
        margin-top: 35px !important;
    }
    
    .sw-head {
        font-size: 24px !important;
        margin-bottom: 18px !important;
        padding: 0 8px !important;
    }
    
    .catalog-more-btn-wrapper {
        margin: 30px 0 !important;
        padding: 0 12px !important;
    }
    
    .ad-banner-horizontal {
        width: 100% !important;
        max-width: 100% !important;
        margin: 20px 0 !important;
        padding: 15px !important;
        box-sizing: border-box !important;
    }
}

/* SMALL MOBILE: < 480px - ДОПОЛНИТЕЛЬНАЯ ОПТИМИЗАЦИЯ */
@media (max-width: 480px) {
    .site-header {
        padding: 0 8px !important;
        height: 65px !important;
    }
    
    .single-container {
        padding: 10px !important;
    }
    
    .top-viewer-grid {
        gap: 10px !important;
        margin-bottom: 18px !important;
    }
    
    .ad-banner-left,
    .ad-banner-right {
        min-height: 280px !important;
        font-size: 12px !important;
        padding: 10px !important;
    }
    
    .single-catalog-title {
        font-size: 20px !important;
        margin-bottom: 15px !important;
        padding: 0 5px !important;
    }
    
    
    .catalog-grid-2x2 {    
        gap: 10px !important;
        padding: 0 5px !important;
    }
    
    .hero-block {
        padding: 35px 10px 28px !important;
    }
    
    .hero-title {
        font-size: 22px !important;
        margin-bottom: 10px !important;
    }
    
    .hero-subtitle {
        font-size: 15px !important;
        margin: 10px 0 !important;
    }
    
    .seo-content-block {
        padding: 18px 12px !important;
        margin: 28px auto !important;
    }
    
    .seo-content-block h2 {
        font-size: 20px !important;
        margin-bottom: 14px !important;
    }
    
    .seo-content-block p {
        font-size: 13px !important;
    }
    
    .subscription-buttons-block {
        padding: 18px 10px !important;
        margin: 22px 0 !important;
        gap: 8px !important;
    }
    
    .subscription-btn {
        padding: 12px 18px !important;
        font-size: 13px !important;
    }
    
    .related-catalog-2x2 {
        margin: 22px 0 !important;
        padding: 0 10px !important;
    }
    
    .page-container {
        padding: 22px 10px 28px !important;
    }
    
    .page-title {
        font-size: 22px !important;
        margin-bottom: 14px !important;
    }
    
    .page-content {
        font-size: 13px !important;
    }
    
    .page-content h2 {
        font-size: 19px !important;
        margin: 22px 0 10px !important;
    }
    
    .page-content h3 {
        font-size: 17px !important;
        margin: 18px 0 8px !important;
    }
    
    .catalog-load-more-btn {
        padding: 12px 20px !important;
        font-size: 13px !important;
    }
    
    .country-hero {
        padding: 35px 10px 28px !important;
    }
    
    .hero-subtitle {
        font-size: 16px !important;
    }
    
    .catalog-section-spacing {
        margin-top: 28px !important;
    }
    
    .sw-head {
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }
    
    .catalog-more-btn-wrapper {
        margin: 25px 0 !important;
    }
}

/* EXTRA SMALL: < 360px */

@media (max-width: 360px) {
    .single-catalog-title {
        font-size: 18px;
    }
    
    
    .hero-title {
        font-size: 20px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .catalog-card-title {
        font-size: 14px;
    }
    
    .seo-content-block h2 {
        font-size: 18px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .page-content h2 {
        font-size: 18px;
    }
    
    .page-content h3 {
        font-size: 16px;
    }
}

@media (max-width: 1299px) {
    .image-slider__main {
        width: 100%;
    }
}

/* Light theme: make links visible inside brand description */
.brand-description a,
.brand-description a:link,
.brand-description a:visited{
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-underline-offset: 3px;
}

/* если внутри ссылки есть <strong>/<span> — пусть наследуют цвет ссылки */
.brand-description a *{
  color: inherit;
}

/* hover */
.brand-description a:hover{
  color: var(--primary-dark);
  text-decoration-color: var(--primary-dark);
}


/* Force link color inside brand description (incl. nested strong/span) */
html[data-theme="dark"] body .brand-description a,
html[data-theme="dark"] body .brand-description a:link,
html[data-theme="dark"] body .brand-description a:visited{
  color: var(--primary) !important;
  text-decoration: underline !important;
  text-decoration-color: var(--primary) !important;
  text-underline-offset: 3px;
}

/* IMPORTANT: if link text is wrapped in <strong>/<span>, inherit link color */
html[data-theme="dark"] body .brand-description a *{
  color: inherit !important;
}

/* hover */
html[data-theme="dark"] body .brand-description a:hover{
  color: var(--primary-light) !important;
  text-decoration-color: var(--primary-light) !important;
}

/* Card title: more space + better clamp (ALL THEMES) */
.c-card .c-t{
  padding: 12px 12px 16px !important;   /* больше воздуха снизу */
  margin-top: 0 !important;
  line-height: 1.35 !important;
  font-size: 16px !important;          /* чуть крупнее, читабельнее */
  min-height: calc(1.35em * 3) !important; /* место под 3 строки */
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;    /* было 2 — станет 3 */
  overflow: hidden !important;
}

/* если где-то переопределён margin у .c-t */
.c-card .c-t + *{
  margin-top: 0 !important;
}

/* Card title: allow 3 full lines (ALL THEMES) */
.c-card .c-t{
  height: auto !important;
  max-height: none !important;

  /* место под 3 строки + паддинги */
  line-height: 1.35 !important;
  -webkit-line-clamp: 3 !important;

  padding: 12px 12px 16px !important;
  box-sizing: border-box !important;

  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;

  /* ключевое: min-height с учётом паддинга */
  min-height: calc(1.35em * 3 + 28px) !important;
}

/* =========================================
   FINAL: Card title clamp
   Desktop: 2 lines | Mobile: 3 lines
   No fixed height / no min-height (auto height)
   ВСТАВИТЬ В САМЫЙ КОНЕЦ custom.css
   ========================================= */

.c-card .c-t,
a.c-card .c-t{
  /* перебиваем базовый .c-t (там display:flex + height:42px) */
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;

  overflow: hidden !important;

  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;

  /* чтобы отступ снизу был и текст не “прилипал” */
  margin-top: 12px !important;
  padding: 0 10px 12px !important;

  line-height: 1.35 !important;
  text-align: center !important;
}

/* desktop: 2 строки */
/*@media (min-width: 900px){
  .c-card .c-t,
  a.c-card .c-t{
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
  }
} */

/* mobile: 3 строки */
/* @media (max-width: 899px){
  .c-card .c-t,
  a.c-card .c-t{
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
  }
} */

/* Клик должен проходить только на активный слайд */
.image-slider__slide {
  pointer-events: none;
}

.image-slider__slide--active {
  pointer-events: auto;
}

/* На всякий случай: если где-то был pointer-events на img */
.image-slider__img {
  pointer-events: none;
}

.image-slider__slide--active .image-slider__img {
  pointer-events: auto;
  cursor: zoom-in; /* удобно на десктопе */
}

/* page counter — left top corner */
.image-slider__indicator{
  position: absolute;
  top: 2px;        /* margin top */
  left: 2px;       /* margin left */

  bottom: auto;
  right: auto;
  transform: none;

  opacity: .75;
  color: rgba(255,255,255,.9);
  background: rgba(0,0,0,.35);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  z-index: 9999;
}


.brand-description {
	white-space: pre-line;
}

/* === Mobile menu must be above gallery page counter === */
@media (max-width: 1024px) {

  /* поднять слой хедера/меню выше любых элементов галереи */
  .elementor-location-header,
  header.site-header,
  .site-header {
    position: relative;
    z-index: 999999 !important;
  }

  /* поднять dropdown-меню (Elementor nav) */
  .elementor-nav-menu--dropdown,
  .elementor-nav-menu__container {
    position: relative;
    z-index: 1000000 !important;
  }

  /* опустить счётчик (индикатор) галереи ниже меню */
  .image-slider__indicator {
    z-index: 1 !important;
  }

  /* на всякий случай — если есть другой класс счётчика */
  .viewer-counter,
  .catalog-viewer__counter,
  .catalog-counter {
    z-index: 1 !important;
  }
}

/* === Thumbnails: show page numbers on preview === */

/* 1) контейнер превью (подставил несколько вариантов селекторов — лишние не мешают) */
.image-slider__thumbs,
.image-slider__thumbnails,
.catalog-thumbs,
.catalog-thumbnails {
  counter-reset: page;
}

/* 2) каждый элемент превью */
.image-slider__thumb,
.image-slider__thumbs a,
.image-slider__thumbs button,
.image-slider__thumbnails a,
.image-slider__thumbnails button,
.catalog-thumbs a,
.catalog-thumbnails a {
  counter-increment: page;
  position: relative;
}

/* 3) сама цифра */
.image-slider__thumb::after,
.image-slider__thumbs a::after,
.image-slider__thumbs button::after,
.image-slider__thumbnails a::after,
.image-slider__thumbnails button::after,
.catalog-thumbs a::after,
.catalog-thumbnails a::after {
  content: counter(page);
  position: absolute;
  left: 6px;
  top: 6px;

  font-size: 12px;
  font-weight: 700;
  line-height: 1;

  padding: 4px 6px;
  border-radius: 999px;

  color: rgba(255,255,255,.95);
  background: rgba(0,0,0,.35);

  pointer-events: none; /* важно: не ломаем клик по превью */
  z-index: 2;
}


/* === FINAL: 3 lines for card titles on desktop + mobile === */
.c-card .c-t,
a.c-card .c-t{
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  line-clamp: 3 !important;
  overflow: hidden !important;

  height: auto !important;
  max-height: none !important;
  min-height: calc(1.35em * 3 + 28px) !important;

  margin-top: 12px !important;
  padding: 0 10px 12px !important;
  box-sizing: border-box !important;

  line-height: 1.35 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  text-align: center !important;

  justify-content: flex-start !important;
  align-items: flex-start !important;
}