/* ONLINE PARK — каталог, категория, бренды, акции, комплекты, сравнение, избранное. */

/* ── Листинг ─────────────────────────────────────────────── */

.cat-promos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 24px 0 32px; }

.cat-promo {
    position: relative; display: block; height: 175px;
    border-radius: var(--r-12); overflow: hidden;
    background: var(--bg-grey); color: var(--white);
}

.cat-promo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-promo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 6, 6, .05) 30%, rgba(6, 6, 6, .7) 100%); }
.cat-promo-body { position: absolute; left: 20px; right: 20px; bottom: 16px; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.cat-promo-body b { font-size: 18px; font-weight: 700; }
.cat-promo-body span:last-child { font-size: 13px; opacity: .85; }
.cat-promo-badge { background: var(--orange); color: var(--white); padding: 5px 12px; border-radius: var(--r-8); font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 6px; }
.cat-promo:hover { color: var(--white); }

.cat-head { display: flex; align-items: baseline; gap: 20px; margin-bottom: 24px; }
.cat-head h1 { font-size: 40px; }
.cat-count { font-size: 14px; opacity: .5; }
.cat-subs { margin-bottom: 24px; }

/* Строка фильтров */
.cat-bar { margin-bottom: 24px; }
.cat-bar-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.cat-price {
    display: inline-flex; align-items: center; gap: 10px;
    height: 50px; padding: 0 20px;
    background: var(--white); border-radius: var(--r-12);
}

.cat-price > span { font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; opacity: .5; }
.cat-price input { width: 90px; border: 0; background: 0; outline: 0; font-size: 14px; font-weight: 600; }
.cat-price input::placeholder { font-weight: 400; opacity: .3; }
.cat-price input::-webkit-outer-spin-button, .cat-price input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.cat-btn {
    display: inline-flex; align-items: center; gap: 10px;
    height: 50px; padding: 0 20px;
    background: var(--white); border: 0; border-radius: var(--r-12);
    font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--ink);
}

.cat-btn:hover { background: var(--bg-grey); }
.cat-btn-all { background: var(--blue); color: var(--white); }
.cat-btn-all:hover { background: var(--blue-h); color: var(--white); }
.cat-cnt-blue { opacity: .7; }

.cat-drop { position: relative; }
.cat-drop-panel {
    display: none; position: absolute; left: 0; top: calc(100% + 8px); z-index: 20;
    width: 280px; max-height: 340px; overflow-y: auto;
    padding: 16px; background: var(--white); border-radius: var(--r-12);
    box-shadow: 0 12px 32px rgba(6, 6, 6, .12);
}

.cat-drop-panel.is-open { display: block; }
.cat-drop-panel .btn { margin-top: 12px; }

.cat-bar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.cat-sort { position: relative; display: inline-flex; align-items: center; }
.cat-sort select {
    appearance: none; height: 50px; padding: 0 44px 0 20px;
    background: var(--white); border: 0; border-radius: var(--r-12);
    font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--ink);
}
.cat-sort .icon { position: absolute; right: 18px; pointer-events: none; }

.cat-views { display: flex; gap: 8px; }
.cat-view {
    width: 50px; height: 50px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--white); border: 0; border-radius: var(--r-12); color: var(--ink); cursor: pointer;
}
.cat-view:hover { background: var(--bg-grey); color: var(--ink); }
html:not([data-catview="list"]) .cat-view[data-catview="grid"],
[data-catview="list"] .cat-view[data-catview="list"] { background: var(--bg-grey); }

/* Чекбокс фильтра */
.cat-check { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: 14px; }
.cat-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.cat-box {
    width: 18px; height: 18px; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--ink-10); border-radius: var(--r-4);
    background: var(--white); color: transparent;
}
.cat-check input:checked + .cat-box { background: var(--blue); border-color: var(--blue); color: var(--white); }
.cat-cnt { margin-left: auto; opacity: .3; font-size: 13px; }

/* Список товаров */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-grid > * { min-width: 0; }
[data-catview="list"] .cat-switch { grid-template-columns: repeat(2, 1fr); }

.cat-empty { background: var(--white); border-radius: var(--r-24); padding: 48px; text-align: center; }
.cat-empty-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.cat-empty p { opacity: .5; margin-bottom: 20px; }

.pager { display: flex; justify-content: center; margin-top: 32px; }

.cat-seo { margin-top: 48px; background: var(--bg-grey); border-radius: var(--r-16); padding: 24px; }
.cat-seo h2 { font-size: 20px; margin-bottom: 12px; }
.cat-seo p { font-size: 14px; line-height: 1.5; max-width: 980px; }
.cat-seo p + p { margin-top: 10px; }

/* ── Выдвижная панель «Все фильтры» ──────────────────────── */

.filters-back { position: fixed; inset: 0; z-index: 60; background: rgba(6, 6, 6, .4); }

.filters {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 61;
    width: 340px; max-width: 90vw;
    background: var(--white); border-radius: 0 var(--r-24) var(--r-24) 0;
    display: flex; flex-direction: column;
}

.filters-form { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.filters-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 24px 16px; }
.filters-head h2 { font-size: 24px; }
.filters-x { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: 0; border: 0; color: var(--red); }
.filters-body { flex: 1 0 0; min-height: 0; overflow-y: auto; padding: 0 24px 16px; }
.filters-price { display: flex; gap: 8px; margin-bottom: 20px; }
.filters-price .cat-price { flex: 1 0 0; min-width: 0; background: var(--bg-grey); padding: 0 14px; }
.filters-price .cat-price input { width: 100%; }

.filter-group { border-top: 1px solid var(--bg-grey); padding: 14px 0; }
.filter-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
    padding: 0; background: 0; border: 0; text-align: left;
    font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--ink);
}
.filter-head .icon { transition: transform .15s; opacity: .4; }
.filter-group.is-open .filter-head .icon { transform: rotate(180deg); }
.filter-list { display: none; margin-top: 10px; }
.filter-group.is-open .filter-list { display: block; }
.filter-list[data-limited]:not(.is-all) .is-extra { display: none; }
.filter-more { background: 0; border: 0; padding: 6px 0; color: var(--blue); font-size: 13px; text-decoration: underline; }

.filters-foot { display: flex; gap: 12px; padding: 16px 24px 24px; border-top: 1px solid var(--bg-grey); }
.filters-foot .btn { height: 50px; border-radius: var(--r-12); }

/* ── Категория-раздел ────────────────────────────────────── */

.sec-head-simple { margin-bottom: 24px; }
.sec-head-simple h1 { font-size: 40px; }
.sec-head-simple .sec-sub { margin-top: 10px; }

/* ── Бренды ──────────────────────────────────────────────── */

.brands-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.brand-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    height: 125px; padding: 16px;
    background: var(--bg-grey); border-radius: var(--r-12);
    font-size: 18px; font-weight: 700; text-align: center;
}
.brand-card:hover { background: #e3e3de; color: var(--ink); }
.brand-card img { max-height: 40px; object-fit: contain; }
.brand-card span { font-size: 14px; font-weight: 400; opacity: .5; }

.brand-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.brand-top h1 { font-size: 40px; }
.brand-top img { max-height: 48px; object-fit: contain; }
.brand-intro { font-size: 14px; line-height: 1.5; max-width: 1180px; margin-bottom: 24px; }

/* ── Акции ───────────────────────────────────────────────── */

.promo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.promo-card { display: block; background: var(--white); border-radius: var(--r-16); overflow: hidden; }
.promo-card:hover { color: var(--ink); box-shadow: 0 4px 20px rgba(6, 6, 6, .08); }
.promo-pic { position: relative; height: 220px; background: var(--bg-grey); }
.promo-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo-badge { position: absolute; left: 16px; top: 16px; background: var(--orange); color: var(--white); padding: 5px 12px; border-radius: var(--r-8); font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.promo-body { padding: 16px 20px 20px; }
.promo-body b { display: block; font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.promo-body p { font-size: 13px; opacity: .5; margin: 0 0 10px; }
.promo-date { font-size: 12px; color: var(--blue); }

.promo-terms { max-width: 1180px; margin-bottom: 20px; }
.promo-terms p { font-size: 15px; line-height: 1.55; margin: 6px 0 0; }
.promo-left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; font-size: 14px; }
.promo-over { color: var(--red); font-weight: 600; }
.timer-light { background: transparent; gap: 8px; }
.timer-light > span { background: var(--bg-grey); color: var(--ink); border-radius: var(--r-8); }
.timer-light b { color: var(--orange); }

.promo-head { position: relative; border-radius: var(--r-24); overflow: hidden; background: var(--bg-grey); min-height: 320px; margin-bottom: 32px; color: var(--white); display: flex; align-items: flex-end; }
.promo-head img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo-head::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 6, 6, .1) 30%, rgba(6, 6, 6, .75) 100%); }
.promo-head-body { position: relative; z-index: 1; padding: 32px; }
.promo-head-body h1 { font-size: 40px; margin: 10px 0; }
.promo-head-body p { font-size: 15px; max-width: 620px; }

/* ── Комплекты ───────────────────────────────────────────── */

.set-block { border-top: 1px solid var(--ink-10); padding-top: 24px; margin-top: 32px; }
.set-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.set-kicker { display: inline-block; font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--orange); margin-bottom: 8px; }
.set-title { font-size: 28px; font-weight: 700; }
.set-desc { font-size: 14px; opacity: .6; margin: 6px 0 12px; }
.set-price { display: flex; align-items: baseline; gap: 12px; }
.set-price b { font-size: 24px; font-weight: 700; }
.set-price s { font-size: 15px; opacity: .4; }
.set-note { font-size: 13px; opacity: .5; margin-top: 4px; }
.set-cta { display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 24px; background: var(--cyan); color: var(--ink); border: 0; border-radius: var(--r-12); font-size: 15px; font-weight: 500; }
.set-cta:hover { background: #2ce89b; color: var(--ink); }
.set-rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.set-rail > * { min-width: 0; }

.chips-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }

.set-terms { margin: 20px 0 8px; max-width: 900px; }
.set-terms p { font-size: 14px; line-height: 1.5; margin: 6px 0 0; }
.cat-drop-link { display: block; padding: 8px 0; font-size: 14px; }

/* ── Сравнение ───────────────────────────────────────────── */

.cmp { display: grid; grid-template-columns: 270px 1fr; gap: 0; }
.cmp-side { padding-right: 24px; }
.cmp-side h1 { font-size: 40px; margin-bottom: 24px; }
.cmp-table { background: var(--white); border-radius: var(--r-24); overflow-x: auto; }
.cmp-row { display: grid; align-items: center; border-bottom: 1px solid var(--bg-grey); }
.cmp-row:last-child { border-bottom: 0; }
.cmp-row > * { padding: 12px 20px; font-size: 14px; }
.cmp-name { opacity: .5; }
.cmp-head-cell { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.cmp-pic { height: 180px; display: flex; align-items: center; justify-content: center; background: var(--bg); border-radius: var(--r-8); }
.cmp-pic img { max-height: 100%; object-fit: contain; }
.cmp-title { font-size: 14px; }
.cmp-actions { display: flex; align-items: center; gap: 8px; }
.cmp-remove { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-grey); border: 0; border-radius: var(--r-8); color: var(--ink); }
.cmp-remove:hover { background: #e3e3de; color: var(--red); }
/* Ячейки шапки тянутся на высоту ряда, а кнопки прижаты к низу: при разной длине названий
   карточки стояли вразнобой (однострочное название центрировало колонку по вертикали) */
.cmp-head { border-bottom: 1px solid var(--bg-grey); align-items: stretch; }
.cmp-head .cmp-title { flex: 1 0 auto; }
.cmp-diff { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; }
.cmp-diff input { position: absolute; opacity: 0; width: 0; height: 0; }
.cmp-diff input:checked + .cat-box { background: var(--blue); border-color: var(--blue); color: var(--white); }

/* ── Избранное ───────────────────────────────────────────── */

.fav-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.fav-head h1 { font-size: 40px; }
.fav-head span { font-size: 32px; font-weight: 700; color: var(--blue); }
.fav-bar { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.fav-btn { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px; background: var(--white); border: 0; border-radius: var(--r-12); font-size: 14px; color: var(--ink); }
.fav-btn:hover { background: var(--bg-grey); }
.fav-list { display: flex; flex-direction: column; gap: 12px; }
.fav-row { display: grid; grid-template-columns: 24px 150px 1fr 220px; align-items: center; gap: 20px; background: var(--white); border-radius: var(--r-16); padding: 16px 20px; }
.fav-pic { position: relative; height: 120px; border-radius: var(--r-8); overflow: hidden; background: var(--bg); }
.fav-pic img { width: 100%; height: 100%; object-fit: contain; }
.fav-name { font-size: 16px; font-weight: 600; margin-bottom: 12px; display: block; }
.fav-price { text-align: right; }
.fav-price b { display: block; font-size: 22px; font-weight: 700; }
.fav-price s { font-size: 14px; opacity: .4; }

/* ── Адаптив ─────────────────────────────────────────────── */

@media (max-width: 1199px) {
    .cat-head h1, .brand-top h1, .cmp-side h1, .fav-head h1, .sec-head-simple h1 { font-size: 30px; }
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .promo-grid, .brands-list { grid-template-columns: repeat(3, 1fr); }
    .set-rail { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 991px) {
    .cat-promos { grid-template-columns: repeat(2, 1fr); }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .promo-grid, .brands-list { grid-template-columns: repeat(2, 1fr); }
    .set-rail { grid-template-columns: repeat(2, 1fr); }
    .cmp { grid-template-columns: 1fr; }
    .cmp-side { padding: 0 0 20px; }
    .fav-row { grid-template-columns: 24px 110px 1fr; }
    .fav-price { grid-column: 2 / -1; text-align: left; }
}

@media (max-width: 767px) {
    .cat-promos { grid-template-columns: 1fr; gap: 12px; }
    .cat-head { flex-direction: column; align-items: flex-start; gap: 6px; }
    .cat-head h1 { font-size: 24px; }
    .cat-bar-form { gap: 8px; }
    /* На телефоне цена и бренд живут в панели «Все фильтры», как в макете */
    .cat-bar-form > .cat-price, .cat-bar-form > .cat-drop { display: none; }
    .cat-btn-all { flex: 1 0 0; justify-content: center; }
    .cat-btn, .cat-sort select, .cat-view { height: 46px; }
    .cat-bar-right { width: 100%; margin-left: 0; }
    .cat-sort { flex: 1 0 0; }
    .cat-sort select { width: 100%; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    [data-catview="list"] .cat-switch { grid-template-columns: 1fr; }
    .promo-grid, .brands-list { grid-template-columns: 1fr; }
    .set-rail { grid-template-columns: 1fr; }
    .set-head { flex-direction: column; align-items: flex-start; gap: 16px; }
    .fav-row { grid-template-columns: 24px 1fr; align-items: start; }
    /* Без явной колонки блок с названием уезжал в 24-пиксельную колонку чекбокса и наезжал на цену */
    .fav-row > :not(.cat-check) { grid-column: 2; }
    .fav-row > .cat-check { grid-row: 1; }
    .fav-pic { height: 160px; }
    .cat-empty { padding: 32px 20px; }
}

/* Товар в избранном закончился или снят с продажи — строка приглушена, но остаётся в списке */
.fav-row.is-off .fav-pic img, .fav-row.is-off .fav-name { opacity: .5; }

/* Поиск в неверной раскладке: подсказка, по какому запросу показаны результаты */
.cat-corrected { margin: -8px 0 20px; font-size: 14px; opacity: .6; }
