/* ============================================
   FILE: /css/main.css
   VERSION: 3.14
   PROJECT: ОКНА ORIGINAL — общий стиль сайта
   CHANGES v3.9: версия ассета поднята для cache-busting при подключении глобальной формы.
   ============================================ */
:root {
    --primary: #536377;
    --primary-hover: #398e94;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --bg-gray: #f1f5f9;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --border-light: #eef2f8;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.10);
    --radius: 16px;
    --radius-sm: 8px;
    --radius-full: 9999px;
    --container: 1280px;
    --card-img-height: 300px;
    --btn-circle-size: 44px;
    --btn-circle-svg: 20px;
    --btn-svg-stroke: #49484800;
    --font-thin: 200;
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    --heading-color: #1e293b;
    --heading-weight: 600;
    --heading-letter-spacing: -0.02em;
}

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

body {
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== ЗАГОЛОВКИ ===== */
h1 {
    font-size: 2rem;
    font-weight: var(--heading-weight);
    color: var(--heading-color);
    letter-spacing: var(--heading-letter-spacing);
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: var(--heading-weight);
    color: var(--heading-color);
    letter-spacing: var(--heading-letter-spacing);
    margin-bottom: 0.5rem;
}

/* ===== ХЛЕБНЫЕ КРОШКИ v3.13 ===== */
.site-breadcrumbs-wrap{
    max-width:var(--container);
    margin:0 auto;
    padding:18px 1rem 0;
}
.site-breadcrumbs{
    min-width:0;
}
.site-breadcrumbs ol{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:0;
    margin:0;
    padding:0;
    list-style:none;
    color:#7a858e;
    font-size:.76rem;
    line-height:1.4;
}
.site-breadcrumbs li{
    display:inline-flex;
    align-items:center;
    min-width:0;
}
.site-breadcrumbs li:not(:last-child)::after{
    content:"";
    width:5px;
    height:5px;
    margin:0 9px;
    border-top:1px solid #aab4bc;
    border-right:1px solid #aab4bc;
    transform:rotate(45deg);
    flex:0 0 auto;
}
.site-breadcrumbs a{
    color:#66727c;
    text-decoration:none;
    transition:color .18s ease;
}
.site-breadcrumbs a:hover{
    color:#284e6d;
}
.site-breadcrumbs [aria-current="page"]{
    color:#37434d;
    overflow:hidden;
    text-overflow:ellipsis;
}
@media(max-width:640px){
    .site-breadcrumbs-wrap{padding-top:13px}
    .site-breadcrumbs ol{font-size:.72rem}
    .site-breadcrumbs li:not(:last-child)::after{margin:0 7px}
}

/* Legacy selectors kept for old isolated templates, visually aligned */
.breadcrumb,.breadcrumbs{font-size:.76rem;color:#7a858e}
.breadcrumb a,.breadcrumbs a{color:#66727c;text-decoration:none}

/* ===== ШАПКА ===== */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

.logo a {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
}

.nav a:hover {
    color: var(--primary);
}


/* ===== НАВИГАЦИЯ v3.12: смысловые dropdown-группы ===== */
.nav{align-items:center}.nav-item{position:relative;display:flex;align-items:center}.nav-parent{display:inline-flex!important;align-items:center;gap:4px}.nav-caret{font-size:12px;line-height:1;transform:translateY(-1px)}.nav-dropdown-menu{position:absolute;z-index:1200;left:-14px;top:calc(100% + 12px);min-width:220px;padding:8px;background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:0 16px 35px rgba(24,39,52,.12);opacity:0;visibility:hidden;transform:translateY(-5px);transition:opacity .16s ease,transform .16s ease,visibility .16s}.nav-dropdown-menu:before{content:"";position:absolute;left:0;right:0;top:-14px;height:14px}.nav-dropdown-menu a{display:block!important;padding:8px 10px;border-radius:8px;white-space:nowrap;color:#3b444b!important;font-size:.86rem!important}.nav-dropdown-menu a:hover{background:#f4f6f7;color:#18232c!important}.nav-dropdown:hover .nav-dropdown-menu,.nav-dropdown:focus-within .nav-dropdown-menu{opacity:1;visibility:visible;transform:translateY(0)}
@media(max-width:768px){
    .mobile-group{padding-bottom:2px}
    .mobile-group-head{display:grid;grid-template-columns:minmax(0,1fr) 48px;align-items:center}
    .mobile-group-title{font-weight:500}
    .mobile-group-toggle{
        display:flex;
        align-items:center;
        justify-content:center;
        width:48px;
        min-height:48px;
        padding:0;
        border:0;
        border-bottom:1px solid var(--border-light);
        background:transparent;
        color:var(--text);
        cursor:pointer;
    }
    .mobile-group-toggle span{
        width:9px;
        height:9px;
        border-right:2px solid currentColor;
        border-bottom:2px solid currentColor;
        transform:rotate(45deg) translate(-2px,-2px);
        transition:transform .2s ease;
    }
    .mobile-group.is-open .mobile-group-toggle span{
        transform:rotate(225deg) translate(-1px,-1px);
    }
    .mobile-submenu{
        display:none;
        margin:1px 0 6px 12px;
        padding-left:10px;
        border-left:1px solid var(--border);
    }
    .mobile-group.is-open .mobile-submenu{display:block}
    .mobile-menu .mobile-submenu a{
        min-height:44px;
        display:flex;
        align-items:center;
        padding:.58rem .1rem;
        font-size:.88rem;
        color:var(--text-light);
        border-bottom:0;
    }
    .mobile-menu .mobile-submenu a:last-child{margin-bottom:2px}
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: color 0.2s;
}

.icon-btn:hover {
    color: var(--primary);
    background: var(--bg);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

/* ===== ПОДВАЛ ===== */
.site-footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
}

.footer-links {
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links:hover {
    color: #0b3b5c;
    text-decoration: none;
}

/* ===== КНОПКИ (обычные) ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-sm {
    padding: 0.35rem 0.8rem;
    font-size: 0.7rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

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

/* ===== КРУГЛЫЕ КНОПКИ (ЕДИНЫЙ СТАНДАРТ) ===== */
.btn-circle {
    width: var(--btn-circle-size);
    height: var(--btn-circle-size);
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    text-decoration: none;
    min-width: var(--btn-circle-size);
    min-height: var(--btn-circle-size);
    line-height: 1;
}

.btn-circle svg {
    width: var(--btn-circle-svg);
    height: var(--btn-circle-svg);
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    display: block;
}

.btn-circle-primary {
    background: var(--primary);
    color: #fff;
}

.btn-circle-primary:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.btn-circle-secondary {
    background: var(--bg-gray);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-circle-secondary:hover {
    background: var(--border);
    transform: scale(1.05);
}

.btn-circle-outline {
    background: transparent;
    color: var(--text-light);
    border: 1.5px solid var(--border);
}

.btn-circle-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

/* ===== КАРТОЧКИ (каталог) ===== */
.grid-catalog {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 1024px) {
    .grid-catalog {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid-catalog {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    position: relative;
}

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

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0.75rem 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    pointer-events: none;
}

.card-id {
    font-size: 0.6rem;
    font-family: monospace;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.85);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    pointer-events: auto;
}

.btn-favorite {
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s;
}

.btn-favorite:hover {
    background: #fff;
    transform: scale(1.1);
}

.btn-favorite svg {
    width: 18px;
    height: 18px;
    stroke: #e53e3e;
    stroke-width: 1.8;
    fill: none;
}

.btn-favorite.active svg {
    fill: #e53e3e;
}

.card-img {
    height: var(--card-img-height);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gray);
    padding: 0;
    overflow: hidden;
}

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

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

.card-title {
    font-weight: var(--font-medium);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-info {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.card-size {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.card-price {
    font-size: 1.2rem;
    font-weight: var(--font-bold);
    color: var(--primary);
    margin: 0;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

/* ===== КАРТОЧКА ТОВАРА (product.php) ===== */
.product-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.product-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--border);
    align-items: start;
}

@media (max-width: 768px) {
    .product-card {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

.product-gallery-wrap {
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

@media (max-width: 768px) {
    .product-gallery-wrap {
        position: static;
    }
}

.product-gallery {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gray);
    border-radius: var(--radius);
    padding: 0.5rem;
    min-height: 400px;
}

.main-image {
    max-width: 100%;
    max-height: 600px;
    object-fit: contain;
    cursor: pointer;
}

.btn-favorite-large {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-favorite-large:hover {
    transform: scale(1.1);
    background: #fff;
}

.btn-favorite-large svg {
    width: 22px;
    height: 22px;
    stroke: #e53e3e;
    stroke-width: 1.8;
    fill: none;
}

.btn-favorite-large.active svg {
    fill: #e53e3e;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-sku {
    font-size: 0.7rem;
    color: var(--text-light);
    font-family: monospace;
}

.product-title {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text);
    line-height: 1.3;
}

.product-price-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.product-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}

.product-stock {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
}

.product-stock.in-stock {
    background: #e6f7e6;
    color: #2e6b2e;
}

.product-stock.out-of-stock {
    background: #feeaea;
    color: #a33;
}

.product-actions {
    display: flex;
    gap: 0.75rem;
    margin: 0.5rem 0;
}

.product-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-top: 0.5rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.product-tabs-content {
    padding: 0.5rem 0;
}

.tab-content {
    display: none;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text);
}

.tab-content.active {
    display: block;
}

.char-item {
    display: flex;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-light);
}

.char-label {
    width: 130px;
    font-weight: 500;
    color: var(--text-light);
    flex-shrink: 0;
}

.char-value {
    color: var(--text);
}

.seo-block {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.seo-block h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.seo-block p,
.seo-block .seo-text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text);
}

.seo-block .seo-text a {
    color: var(--primary);
    text-decoration: underline;
}

/* ===== МОДАЛКА ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0 1rem;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

.page-btn.active:hover {
    background: var(--primary-hover);
}

.page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* ===== КАТАЛОГ (layout) ===== */
.catalog-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 0 0.5rem;
}

@media (max-width: 768px) {
    .catalog-layout {
        flex-direction: column;
        padding: 0;
    }
}

/* ===== ОБЩИЕ УТИЛИТЫ ===== */
.text-muted {
    color: var(--text-light);
}

.text-light {
    color: var(--text-light);
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

/* ===== АДАПТИВ (единый блок) ===== */
/* Телефон в шапке — единый стиль */
.header-phone {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .header-phone {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .header-phone {
        font-size: 1.2rem;
    }
}

/* Десктоп — скрываем бургер и мобильные кнопки */
@media (min-width: 769px) {

    .burger-btn,
    .mobile-menu,
    .filters-toggle {
        display: none !important;
    }

    .filters-sidebar {
        display: block !important;
    }

    .nav {
        display: flex !important;
    }
}

/* Мобилка — до 768px */
@media (max-width: 768px) {

    /* Шапка */
    .header-inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        gap: 0.5rem;
    }

    .logo a img {
        height: 28px;
    }

    .header-phone {
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--primary);
        text-decoration: none;
        white-space: nowrap;
    }

    .nav {
        display: none !important;
    }

    .burger-btn {
        display: flex !important;
        flex-direction: column;
        gap: 4px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.4rem;
    }

    .burger-btn span {
        width: 22px;
        height: 2px;
        background: var(--text);
        transition: all 0.3s;
        border-radius: 2px;
    }

    .burger-btn.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .burger-btn.open span:nth-child(2) {
        opacity: 0;
    }

    .burger-btn.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .mobile-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100dvh - 62px);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        background: #fff;
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        padding: 0.5rem 1.5rem max(1rem, env(safe-area-inset-bottom));
        box-shadow: 0 12px 28px rgba(30,41,59,.12);
    }

    .mobile-menu.open {
        display: block;
    }

    body.menu-open{
        overflow:hidden;
    }

    .mobile-menu ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .mobile-menu a {
        display: flex;
        align-items: center;
        min-height: 48px;
        padding: 0.65rem 0;
        color: var(--text);
        text-decoration: none;
        font-size: 0.9rem;
        border-bottom: 1px solid var(--border-light);
    }

    /* Контейнер — отступы от краёв */
    .container {
        padding: 0 1.5rem !important;
    }

    .catalog-layout {
        padding: 0 !important;
        gap: 1rem;
    }

    /* Фильтр */
    .filters-sidebar {
        display: none !important;
        width: 100% !important;
        position: static !important;
        max-height: none !important;
        margin-bottom: 1rem;
        padding: 1rem;
    }

    .filters-sidebar.open {
        display: block !important;
    }

    .filters-toggle {
        display: inline-block;
        width: auto;
        padding: 0.4rem 1.5rem;
        margin: 1rem 1rem 1rem;
        background: var(--primary);
        color: #fff;
        border: none;
        border-radius: var(--radius);
        font-size: 0.9rem;
        cursor: pointer;
    }

    /* Чекбоксы в ряд */
    .checkbox-group {
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 0.2rem 0.8rem;
    }

    .checkbox-group label {
        font-size: 0.75rem;
        white-space: nowrap;
    }

    /* Фильтр — компактно */
    .filter-group {
        margin-bottom: 0.5rem;
    }

    .filter-group label {
        font-size: 0.7rem;
        margin-bottom: 0.1rem;
    }

    .range-inputs input {
        padding: 0.3rem 0.4rem;
        font-size: 0.7rem;
    }

    .filter-actions {
        flex-direction: row;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .filter-actions .btn {
        flex: 1;
        padding: 0.4rem;
        font-size: 0.75rem;
        min-width: 80px;
    }

    /* Каталог — 1 карточка в ряд */
    .grid-catalog {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }

    .catalog-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .catalog-header .result-count {
        font-size: 0.75rem;
    }

    .catalog-header select {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    /* Карточки */
    .card-img {
        height: var(--card-img-height);
    }

    .card-title {
        font-size: 0.8rem;
    }

    .card-info {
        font-size: 0.65rem;
    }

    .card-price {
        font-size: 1rem;
    }

    .card-actions .btn-circle {
        width: 32px;
        height: 32px;
    }

    .card-actions .btn-circle svg {
        width: 16px;
        height: 16px;
    }

    .btn-favorite {
        width: 26px;
        height: 26px;
    }

    .btn-favorite svg {
        width: 14px;
        height: 14px;
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .header-phone {
        font-size: 1.2rem;
    }

    .logo a img {
        height: 24px;
    }

    .burger-btn span {
        width: 18px;
        height: 2px;
    }

    /*
    .container {
        padding: 0 0.5rem !important;
    }*/
    .filters-sidebar.open {
        padding: 0.75rem;
    }

    .checkbox-group {
        gap: 0.1rem 0.5rem;
    }

    .checkbox-group label {
        font-size: 0.65rem;
    }

    .filter-actions .btn {
        font-size: 0.65rem;
        padding: 0.3rem;
        min-width: 60px;
    }

    .card-img {
        height: var(--card-img-height);

        .card-title {
            font-size: 0.7rem;
        }

        .card-price {
            font-size: 0.9rem;
        }

        .card-actions .btn-circle {
            width: 28px;
            height: 28px;
        }

        .card-actions .btn-circle svg {
            width: 14px;
            height: 14px;
        }
    }

    @media (max-width: 768px) {
        .container {
            padding-left: 1.75rem !important;
            padding-right: 1.75rem !important;
        }
    }

    @media (max-width: 480px) {
        .container {
            padding-left: 0.5rem !important;
            padding-right: 0.5rem !important;
        }
    }

    .catalog-layout {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    @media (max-width: 768px) {
        .catalog-layout {
            padding-left: 0 !important;
            padding-right: 0 !important;
        }
    }

    .grid-catalog {
        gap: 0.75rem;
        padding: 0 1.25rem;
    }

    /* === */
    /*@media (max-width: 768px) {
    .filters-toggle-wrap {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: #fff;
        padding: 0.5rem 0.75rem;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }

    .filters-toggle {
        width: 100% !important;
        display: block !important;
        margin: 0 !important;
    }

   
    .catalog-content {
        padding-bottom: 80px;
    }*/
}

.badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e53e3e;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.3rem;
    border-radius: 50%;
    min-width: 16px;
    text-align: center;
    pointer-events: none;
}

.icon-btn {
    position: relative;
}

.btn-circle-success {
    background: #22c55e;
    color: #fff;
}

.btn-circle-success:hover {
    background: #16a34a;
    transform: scale(1.05);
}

#showFavoritesBtn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
}

#showFavoritesBtn.active {
    background: #e53e3e;
    color: #fff;
    border-color: #e53e3e;
}

#showFavoritesBtn.active svg {
    stroke: #fff;
}