/* ============================================================ */
/* ===== БАЗА (токены/сброс/шапка/подвал — как на home.html) ===== */
/* ============================================================ */

:root {
    --accent: #87FF32;
    --accent-dark: #6fd43a;
    --white: #F4FBF3;
    --black: #101413;
    --primary: #2c7873;
    --primary-dark: #1e5a56;
    --text-dark: #101413;
    --text-medium: #444444;
    --text-light: #666666;
    --text-muted: #888888;
    --header-height: 80px;
    --transition: 0.3s ease;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.12);
    --radius: 16px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    background: var(--white);
    color: var(--text-dark);
    min-height: 100vh;
    padding: 20px;
    padding-top: calc(var(--header-height) + 30px);
}

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

a {
    text-decoration: none;
    color: inherit;
}

button, input, select {
    font-family: inherit;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--text-dark);
    box-shadow: 0 4px 20px rgba(135, 255, 50, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(135, 255, 50, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid rgba(16, 20, 19, 0.15);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(44, 120, 115, 0.05);
    transform: translateY(-3px);
}

/* ===== ШАПКА ===== */
.header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 20px 0 20px;
    background: transparent;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.header-wrapper * {
    pointer-events: auto;
}

.header-wrapper.scrolled {
    background: transparent;
    padding-top: 8px;
    padding-bottom: 8px;
}

.header {
    max-width: 1200px;
    width: 100%;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid rgba(16, 20, 19, 0.08);
    padding: 0 16px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.header-wrapper.scrolled .header {
    height: calc(var(--header-height) - 12px);
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
    cursor: pointer;
    margin-right: 5px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(135, 255, 50, 0.3);
}

.header-logo-icon {
    cursor: pointer;
    pointer-events: none;
    width: 36px;
    height: 36px;
    background: var(--black);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: var(--accent);
    transition: transform var(--transition);
    flex-shrink: 0;
}

.header-logo-icon img {
    width: 62%;
    height: 62%;
    object-fit: contain;
    display: block;
    pointer-events: none;
}

.header-logo:hover .header-logo-icon {
    transform: scale(1.05) rotate(-4deg);
}

.header-logo-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    cursor: pointer;
    pointer-events: none;
}

.header-logo-text span {
    color: var(--text-dark);
}

.header-logo:hover .header-logo-text {
    color: var(--primary);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    flex-wrap: nowrap;
}

.header-nav li {
    position: relative;
    flex-shrink: 0;
}

.header-nav a {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-nav a i {
    font-size: 0.75rem;
    opacity: 0.5;
}

.header-nav a:hover {
    color: var(--text-dark);
    background: rgba(16, 20, 19, 0.05);
}

.header-nav a:hover i {
    opacity: 0.8;
    color: var(--primary);
}

.header-nav a.active {
    color: var(--primary);
    background: rgba(44, 120, 115, 0.08);
}

.header-nav a.active i {
    opacity: 1;
    color: var(--primary);
}

.header-nav a.delivery-btn {
    color: var(--text-light);
    background: transparent;
    border: none;
    padding: 5px 10px;
}

.header-nav a.delivery-btn:hover {
    color: var(--text-dark);
    background: rgba(16, 20, 19, 0.05);
}

/* ===== КНОПКА КОРЗИНЫ В ШАПКЕ (см. комментарий в home.css) ===== */
.header-cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    background: var(--black);
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 700;
    transition: all var(--transition);
}

.header-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 20, 19, 0.25);
}

.header-cart-btn i {
    font-size: 1.25rem;
}

.header-cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--accent);
    color: var(--text-dark);
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid var(--white);
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    z-index: 100;
    flex-shrink: 0;
    margin-left: 5px;
}

.burger span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: all var(--transition);
    transform-origin: center;
}

.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}
.burger.active span:nth-child(2) {
    opacity: 0;
}
.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* ===== ПОДВАЛ ===== */
.footer-note {
    text-align: center;
    padding: 25px;
    color: var(--text-medium);
    font-size: 0.95rem;
    border-top: 1px solid rgba(16, 20, 19, 0.1);
    background: rgba(16, 20, 19, 0.02);
    font-weight: 500;
    margin-top: 60px;
}

.contacts-footer {
    margin-top: 30px;
    padding: 20px;
    border-top: 1px solid rgba(16, 20, 19, 0.1);
}

.contacts-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-item {
    text-align: center;
}

.contact-label {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
    font-size: 1rem;
}

.contact-value {
    color: var(--text-medium);
    font-weight: 500;
}

.contact-link {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

@media (max-width: 880px) {
    :root {
        --header-height: 64px;
    }
    body {
        padding: 12px;
        padding-top: calc(var(--header-height) + 20px);
    }
    .header-wrapper {
        padding: 8px 12px 0 12px;
    }
    .header {
        padding: 0 14px;
        height: var(--header-height);
        border-radius: 12px;
    }
    .header-wrapper.scrolled .header {
        height: calc(var(--header-height) - 8px);
    }
    .header-logo-text {
        font-size: 0.95rem;
    }
    .header-logo-icon {
        width: 30px;
        height: 30px;
        font-size: 15px;
    }
    .header-cart-btn {
        padding: 8px 10px;
        margin-left: 4px;
    }
    .header-cart-label {
        display: none;
    }
    .header-cart-btn i {
        font-size: 1.15rem;
    }
    .header-nav {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background: var(--white);
        padding: 70px 30px 30px;
        gap: 2px;
        z-index: 60;
        align-items: stretch;
        overflow-y: auto;
        justify-content: flex-start;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .header-nav.open {
        display: flex;
        transform: translateX(0);
    }
    .header-nav a {
        font-size: 1.1rem;
        padding: 14px 18px;
        border-radius: 10px;
        justify-content: flex-start;
        white-space: normal;
        border: none;
        color: var(--text-dark);
    }
    .header-nav a:hover {
        background: rgba(16, 20, 19, 0.05);
    }
    .header-nav a.active {
        background: rgba(44, 120, 115, 0.08);
        color: var(--primary);
    }
    .header-nav a i {
        width: 28px;
        text-align: center;
        font-size: 1.1rem;
        opacity: 0.6;
    }
    .burger {
        display: flex;
    }
    body.menu-open {
        overflow: hidden;
    }
    .contacts-container {
        flex-direction: column;
        gap: 15px;
    }
    .contact-item {
        text-align: left;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 56px;
    }
    body {
        padding: 8px;
        padding-top: calc(var(--header-height) + 14px);
    }
    .header-wrapper {
        padding: 6px 6px 0 6px;
    }
    .header-logo-text {
        font-size: 0.8rem;
    }
    .header-logo-icon {
        width: 28px;
        height: 28px;
        font-size: 13px;
        border-radius: 7px;
    }
    .header {
        padding: 0 10px;
        border-radius: 10px;
        height: var(--header-height);
    }
}

/* ============================================================ */
/* ===== КАТАЛОГ: ЗАГОЛОВОК + ПОИСК ===== */
/* ============================================================ */

.catalog-hero {
    padding: 30px 0 10px;
    text-align: center;
}

.catalog-hero h1 {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.catalog-hero h1 span {
    color: var(--primary);
}

.catalog-hero > .container > p {
    color: var(--text-medium);
    font-size: 1.05rem;
    max-width: 620px;
    margin: 0 auto 24px;
}

.catalog-search {
    max-width: 520px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid rgba(16, 20, 19, 0.12);
    border-radius: 14px;
    padding: 0 16px;
    box-shadow: var(--shadow);
    transition: border-color var(--transition);
}

.catalog-search:focus-within {
    border-color: var(--primary);
}

.catalog-search i.fa-magnifying-glass {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.catalog-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 14px 12px;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.catalog-search-clear {
    display: none;
    border: none;
    background: rgba(16, 20, 19, 0.06);
    color: var(--text-medium);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.catalog-search.has-value .catalog-search-clear {
    display: block;
}

/* ============================================================ */
/* ===== КАТАЛОГ: ОБЩАЯ РАСКЛАДКА ===== */
/* ============================================================ */

.catalog-section {
    padding: 30px 0 80px;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 32px;
    align-items: start;
}

.catalog-filters-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid rgba(16, 20, 19, 0.12);
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
    cursor: pointer;
    grid-column: 1 / -1;
}

.catalog-filters-toggle-count {
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    padding: 1px 8px;
}

/* ============================================================ */
/* ===== БОКОВАЯ ПАНЕЛЬ ФИЛЬТРОВ ===== */
/* ============================================================ */

.catalog-filters {
    background: #fff;
    border: 1px solid rgba(16, 20, 19, 0.08);
    border-radius: var(--radius);
    padding: 20px;
    position: sticky;
    top: calc(var(--header-height) + 20px);
    max-height: calc(100vh - var(--header-height) - 40px);
    overflow-y: auto;
}

.filters-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.filters-panel-header h2 {
    font-size: 1.1rem;
    font-weight: 800;
    flex: 1;
}

.filters-reset {
    border: none;
    background: none;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 6px;
}

.filters-reset:hover {
    text-decoration: underline;
}

.filters-close {
    display: none;
    border: none;
    background: rgba(16, 20, 19, 0.06);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text-dark);
}

.filter-group {
    padding: 16px 0;
    border-bottom: 1px solid rgba(16, 20, 19, 0.08);
}

.filter-group:first-of-type {
    padding-top: 0;
}

.filter-group:last-of-type {
    border-bottom: none;
}

.filter-group-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.filter-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 2px;
    font-size: 0.9rem;
    color: var(--text-medium);
    cursor: pointer;
    user-select: none;
}

.filter-check input {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.filter-check:hover span {
    color: var(--text-dark);
}

.filter-check input:checked ~ span {
    color: var(--text-dark);
    font-weight: 600;
}

/* --- Диапазон цен --- */

.price-slider {
    position: relative;
    height: 32px;
    margin-bottom: 6px;
}

.price-slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(16, 20, 19, 0.1);
    border-radius: 4px;
    transform: translateY(-50%);
}

.price-slider-fill {
    position: absolute;
    top: 0;
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
}

.price-range-input {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    -webkit-appearance: none;
    appearance: none;
    background: none;
    pointer-events: none;
    margin: 0;
}

.price-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.price-range-input::-moz-range-thumb {
    pointer-events: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.price-range-input::-webkit-slider-runnable-track {
    background: transparent;
}

.price-inputs {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.price-input-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-input-field label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.price-input-field input {
    border: 1px solid rgba(16, 20, 19, 0.15);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.9rem;
    width: 100%;
    color: var(--text-dark);
}

.price-input-field input:focus {
    outline: none;
    border-color: var(--primary);
}

.price-inputs-dash {
    color: var(--text-muted);
    padding-bottom: 8px;
}

.catalog-apply-mobile {
    display: none;
    width: 100%;
    justify-content: center;
    margin-top: 16px;
}

.catalog-filters-backdrop {
    display: none;
}

/* ============================================================ */
/* ===== ПАНЕЛЬ ИНСТРУМЕНТОВ (сортировка / вид / счётчик) ===== */
/* ============================================================ */

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.catalog-results-count {
    color: var(--text-medium);
    font-size: 0.9rem;
    font-weight: 600;
}

.catalog-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.catalog-sort {
    border: 1px solid rgba(16, 20, 19, 0.15);
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    background: #fff;
    cursor: pointer;
}

.catalog-sort:focus {
    outline: none;
    border-color: var(--primary);
}

.view-toggle {
    display: flex;
    border: 1px solid rgba(16, 20, 19, 0.15);
    border-radius: 10px;
    overflow: hidden;
}

.view-toggle-btn {
    border: none;
    background: #fff;
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.view-toggle-btn + .view-toggle-btn {
    border-left: 1px solid rgba(16, 20, 19, 0.15);
}

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

/* ===== Активные фильтры (чипы) ===== */

.catalog-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.catalog-active-filters:empty {
    display: none;
    margin-bottom: 0;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(44, 120, 115, 0.08);
    color: var(--primary);
    border-radius: 20px;
    padding: 6px 8px 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
}

.filter-chip button {
    border: none;
    background: rgba(44, 120, 115, 0.15);
    color: var(--primary);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.65rem;
    line-height: 1;
}

/* ============================================================ */
/* ===== КАРТОЧКИ ТОВАРОВ ===== */
/* ============================================================ */

.catalog-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.catalog-grid.view-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.product-tile {
    position: relative;
    display: flex;
    gap: 20px;
    background: #fff;
    border: 1px solid rgba(16, 20, 19, 0.08);
    border-radius: var(--radius);
    padding: 16px;
    transition: box-shadow var(--transition), transform var(--transition);
}

.product-tile:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* Ссылка на страницу товара растянута на всю карточку этим невидимым
   слоем — так карточка целиком кликабельна, но кнопка "в корзину" (у неё
   z-index выше) остаётся отдельной, независимо кликабельной кнопкой. */
.product-tile-cover {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.product-tile-img {
    width: 160px;
    aspect-ratio: 1 / 1;
    height: auto;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #eef3ed;
}

.product-tile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-tile-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.product-tile-volume {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(44, 120, 115, 0.08);
    border-radius: 20px;
    padding: 3px 10px;
    display: inline-block;
    margin-bottom: 8px;
    width: fit-content;
}

.product-tile-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.3;
}

.product-tile-subtitle {
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

.product-tile-desc {
    font-size: 0.88rem;
    color: var(--text-medium);
    line-height: 1.5;
    margin-bottom: 12px;
    flex: 1;
}

.product-tile-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    flex-wrap: wrap;
}

.product-tile-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark);
}

.product-tile-cart-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}

.product-tile-cart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.product-tile-cart-btn.added {
    background: var(--accent-dark);
}

/* Счётчик количества — показывается вместо кнопки "В корзину", когда
   товар уже добавлен. */
.cart-qty-stepper {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(44, 120, 115, 0.08);
    border-radius: 10px;
    padding: 5px 8px;
}
.cart-qty-stepper .qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    border: none;
    background: #fff;
    color: var(--primary);
    font-weight: 800;
    cursor: pointer;
    flex-shrink: 0;
}
.cart-qty-stepper .qty-btn:hover {
    background: var(--primary);
    color: #fff;
}
.cart-qty-stepper .qty-value {
    min-width: 16px;
    text-align: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text-dark);
}

/* --- Вид "сетка": фото сверху, карточка вертикальная --- */

.catalog-grid.view-grid .product-tile {
    flex-direction: column;
}

.catalog-grid.view-grid .product-tile-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
}

.catalog-grid.view-grid .product-tile-footer {
    flex-wrap: wrap;
}


/* ============================================================ */
/* ===== ПУСТОЙ РЕЗУЛЬТАТ ===== */
/* ============================================================ */

.catalog-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-medium);
}

.catalog-empty i {
    font-size: 2.2rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.catalog-empty p {
    margin-bottom: 16px;
    font-size: 1rem;
}

/* ============================================================ */
/* ===== ПАГИНАЦИЯ ===== */
/* ============================================================ */

.catalog-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-top: 34px;
}

.catalog-pagination #showMoreBtn {
    display: none;
}

.catalog-pages {
    display: flex;
    gap: 8px;
}

.catalog-pages button {
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(16, 20, 19, 0.15);
    background: #fff;
    color: var(--text-dark);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}

.catalog-pages button:hover {
    border-color: var(--primary);
}

.catalog-pages button.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ============================================================ */
/* ===== АДАПТИВ ===== */
/* ============================================================ */

@media (max-width: 1024px) {
    .catalog-layout {
        grid-template-columns: 240px 1fr;
        gap: 24px;
    }
    .product-tile-img {
        width: 130px;
        aspect-ratio: 1 / 1;
        height: auto;
    }
}

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

    .catalog-filters-toggle {
        display: flex;
    }

    .catalog-filters {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(360px, 88vw);
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1100;
        display: flex;
        flex-direction: column;
    }

    .catalog-filters.open {
        transform: translateX(0);
    }

    .filters-close {
        display: block;
    }

    .catalog-apply-mobile {
        display: flex;
    }

    .catalog-filters-backdrop.open {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(16, 20, 19, 0.4);
        z-index: 1050;
    }

    .catalog-grid.view-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (max-width: 600px) {
    .catalog-hero h1 {
        font-size: 1.7rem;
    }

    .product-tile {
        flex-direction: column;
    }

    .product-tile-img {
        width: 100%;
        aspect-ratio: 1 / 1;
        height: auto;
    }

    .catalog-grid.view-grid {
        grid-template-columns: 1fr;
    }

    .catalog-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .catalog-toolbar-right {
        justify-content: space-between;
    }

    .catalog-sort {
        flex: 1;
    }
}
