/* =====================================================================
   iРемонт — единая дизайн-система (подключается последней на всех страницах)
   Цвета, скругления, кнопки, карточки и анимации — одинаковые везде.
   Правило: страницы держат только разметку и логику, внешний вид — здесь.
   ===================================================================== */
:root {
    --fx-text: #1d1d1f;      /* основной текст */
    --fx-text2: #6e6e73;     /* вторичный текст */
    --fx-text3: #86868b;     /* подписи */
    --fx-bg: #f5f5f7;        /* фон страницы и блоков */
    --fx-card: #ffffff;      /* карточки */
    --fx-blue: #0071E3;      /* действия и ссылки */
    --fx-blue-h: #0062c4;
    --fx-blue-soft: rgba(0, 113, 227, 0.1);
    --fx-green: #34C759;     /* только WhatsApp и «в наличии» */
    --fx-line: #d2d2d7;
    --fx-line2: #e8e8ed;
    --fx-r-s: 8px;           /* бейджи, мелкие элементы */
    --fx-r-m: 12px;          /* поля ввода, иконки */
    --fx-r-l: 18px;          /* карточки товаров и плитки */
    --fx-r-xl: 28px;         /* большие блоки, баннеры, шапка */
    --fx-r-full: 999px;      /* кнопки, чипы */
    --fx-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --fx-spring: cubic-bezier(0.34, 1.3, 0.5, 1);
    --fx-font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --fx-wide: 1200px;
}

/* ---------- База ---------- */
html, body { overflow-x: clip; }
/* Цвет «за краями» страницы при оверскролле: сверху — фон страницы, у подвала — цвет подвала (переключает fx.js) */
html { background-color: #f5f5f7; }
html.fx-at-bottom { background-color: #1d1d1f; }
/* Без увеличения щипком и двойным касанием — сайт ведёт себя как приложение */
html { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    font-family: var(--fx-font) !important;
    color: var(--fx-text);
    background-color: var(--fx-bg) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    text-rendering: optimizeLegibility;
}
a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--fx-blue); outline-offset: 2px; }
::selection { background: rgba(0, 113, 227, 0.18); }

/* ---------- Шапка ----------
   Вид и переключатель — прежние (из страниц). Меняется только фон: то же матовое стекло,
   что у подложки выбора устройства (.glass-card), без нижней кромки и свечений. */
.site-header {
    /* Сверху плотный #f5f5f7, к низу плавно переходит в белое матовое стекло; под шапкой мягкая тень */
    background: linear-gradient(180deg, #f5f5f7 0%, rgba(245, 245, 247, 0.88) 22%, rgba(248, 248, 250, 0.62) 48%, rgba(255, 255, 255, 0.42) 75%, rgba(255, 255, 255, 0.5) 100%) !important;
    -webkit-backdrop-filter: saturate(200%) blur(14px) !important;
    backdrop-filter: saturate(200%) blur(14px) !important;
    box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    border: 0 !important;
}
.site-header::after { display: none !important; }

/* ---------- Шапка внутренних страниц: «Назад» · заголовок · меню ---------- */
.site-header:has(.hdr-page) {
    /* Фиксирована, как на главной: при оверскролле не уезжает вместе с контентом */
    position: fixed !important; top: 0; left: 0; right: 0; width: 100%;
    height: 60px; padding: 0 !important; display: flex; align-items: center;
}
body:has(.site-header .hdr-page) { padding-top: 60px; }
.header-inner.hdr-page {
    display: grid !important; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px;
    width: 100%; flex-direction: initial !important;
    /* Одинаково на всех страницах: кнопки в 6px от краёв экрана */
    max-width: none !important; margin: 0 !important; padding: 0 6px 0 12px !important; box-sizing: border-box;
}
.hdr-back {
    position: relative; width: 36px; height: 36px; margin: 0; padding: 0;
    border: 0; border-radius: 50%; background: var(--fx-blue); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 15px; cursor: pointer;
    box-shadow: none;
    transition: transform 0.15s ease, background-color 0.2s ease; -webkit-tap-highlight-color: transparent;
}
.hdr-back::before { content: ""; position: absolute; inset: -4px; }   /* зона касания 44px */
.hdr-back:hover { background: var(--fx-blue-h); }
.hdr-back:active { transform: scale(0.9); }
.hdr-back i { margin-left: 0; }
.hdr-title {
    margin: 0; text-align: center;
    font-size: 17px; font-weight: 600; letter-spacing: -0.3px; color: var(--fx-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    animation: fxFadeUp 0.35s var(--fx-ease) both;
}
.hdr-page .menu-drop { justify-self: end; margin: 0 !important; }
/* Крупный заголовок страницы дублировал бы шапку — прячем, текст остаётся источником для шапки */
.category-head-title[data-hdr-title], .st-title[data-hdr-title] { display: none !important; }

/* ---------- Заголовки секций ---------- */
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.section-title, .content-container h2.text-xl {
    margin: 0;
    font-size: 21px !important;
    font-weight: 600 !important;
    letter-spacing: -0.3px;
    line-height: 1.25 !important;
    color: var(--fx-text);
}
.section-title span { color: var(--fx-text3); }
#sales-section .section-title span { color: inherit; }
.section-more {
    font-size: 14px;
    color: var(--fx-blue);
    text-decoration: none;
    white-space: nowrap;
    padding: 10px 0;
    margin: -10px 0;
}
.section-more:hover { color: var(--fx-blue-h); }
.section-note { font-size: 12px; color: var(--fx-text3); text-align: center; margin: 14px 0 0; }

/* ---------- Карточки и блоки ---------- */
.glass-card { border-radius: var(--fx-r-xl) var(--fx-r-xl) 0 0; }

/* ---------- Плитки категорий (вариант 1) ---------- */
.home-section { position: relative; z-index: 1; padding-top: 22px !important; }
.category-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    max-height: none !important;
    overflow: visible !important;
}
.category-card {
    position: relative;
    display: block !important;
    height: 120px;
    padding: 14px !important;
    box-sizing: border-box;
    border: 0 !important;
    border-radius: var(--fx-r-l) !important;
    background: #fff !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none !important;
    overflow: hidden;
    text-align: left !important;
    color: var(--fx-text);
    text-decoration: none;
    isolation: isolate;
}
.category-card--wide { grid-column: span 2; height: 136px; }
.category-text { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 2px; max-width: 100%; }
.category-card--wide .category-text { max-width: 55%; }
.category-title {
    font-size: 17px !important;
    font-weight: 600 !important;
    letter-spacing: -0.2px !important;
    line-height: 1.2;
    color: var(--fx-text) !important;
    overflow-wrap: normal !important;
    hyphens: auto;
}
.category-sub { font-size: 12px; color: var(--fx-text3); line-height: 1.3; }
.category-more {
    position: absolute; left: 14px; bottom: 14px; z-index: 2;
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 14px; font-weight: 500; color: var(--fx-blue);
}
.category-more i { font-size: 10px; transition: transform 0.3s var(--fx-ease); }
.category-icon {
    position: absolute !important;
    right: -4px; bottom: -8px;
    width: 84px !important; height: 84px !important;
    max-width: none !important;
    margin: 0 !important;
    background: none !important;
    display: flex; align-items: flex-end; justify-content: flex-end;
    z-index: 1;
    transition: transform 0.6s var(--fx-ease);
}
.category-card--wide .category-icon { right: 10px; bottom: -14px; width: 150px !important; height: 150px !important; }
.category-icon img { width: 100% !important; height: 100% !important; max-height: none !important; object-fit: contain; object-position: right bottom; }
.category-go {
    position: absolute; left: 14px; bottom: 14px; z-index: 2;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--fx-bg); color: var(--fx-text2);
    display: flex; align-items: center; justify-content: center; font-size: 12px;
    transition: transform 0.3s var(--fx-ease), background-color 0.2s ease, color 0.2s ease;
}
@media (hover: hover) { .category-card:hover .category-go { transform: translateX(3px); background: var(--fx-blue); color: #fff; } }
.category-card--all {
    display: flex !important; flex-direction: column; justify-content: space-between;
    background: var(--fx-blue-soft) !important;
}
.category-card--all { align-items: flex-start; }
.category-card--all .category-title { color: var(--fx-blue) !important; text-align: left; }
.category-all-ic {
    width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--fx-blue);
    display: flex; align-items: center; justify-content: center; font-size: 13px;
    transition: transform 0.3s var(--fx-ease);
}
@media (hover: hover) {
    .category-card:hover .category-icon { transform: scale(1.06) translateY(-4px); }
    .category-card:hover .category-more i, .category-card--all:hover .category-all-ic { transform: translateX(3px); }
}

/* ---------- Карточки товаров (белые на сером) ---------- */
.popular-grid, .products-grid, .recommended-grid { gap: 10px !important; }
.popular-card, .product-card-vertical, .recommended-card {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    padding: 8px !important;
    border: 0 !important;
    border-radius: var(--fx-r-l) !important;
    background: var(--fx-card) !important;
    box-shadow: none !important;
    color: var(--fx-text);
    text-decoration: none;
    height: 100%;
    box-sizing: border-box;
}
.popular-media { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #fff; }
.popular-card img, .product-card-vertical img, .recommended-card img {
    width: 100% !important;
    aspect-ratio: 1;
    height: auto !important;
    object-fit: contain !important;
    margin: 0 !important;
    border-radius: 10px !important;
    transition: transform 0.6s var(--fx-ease);
}
.popular-media img { width: 100% !important; height: 100% !important; }
.popular-title, .product-title, .recommended-title {
    padding: 0 6px;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    min-height: 2.6em;
    margin: 0 !important;
    color: var(--fx-text) !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
}
.popular-footer, .product-footer, .recommended-footer { padding: 0 6px 6px; margin-top: auto; }
.popular-category, .product-category, .recommended-category {
    font-size: 12px !important;
    font-weight: 400 !important;
    color: var(--fx-text3) !important;
    margin: 0 0 6px !important;
    text-transform: none !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.popular-price, .product-price, .recommended-price {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: var(--fx-text) !important;
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    letter-spacing: -0.2px;
}
.popular-rating, .product-rating, .recommended-rating { font-size: 12px !important; color: var(--fx-text3) !important; gap: 3px !important; }
.popular-rating span, .product-rating span, .recommended-rating span { font-size: 12px !important; font-weight: 400 !important; }
.popular-rating i, .product-rating i, .recommended-rating i { font-size: 11px !important; color: #ff9f0a !important; }
.popular-rating .far.fa-star, .product-rating .far.fa-star, .recommended-rating .far.fa-star { color: #d2d2d7 !important; }
@media (hover: hover) {
    .popular-card:hover img, .product-card-vertical:hover img, .recommended-card:hover img { transform: scale(1.04); }
    .popular-card:hover, .product-card-vertical:hover, .recommended-card:hover, .category-card:hover, .device-card:hover { transform: translateY(-2px); }
}

/* ---------- Устройства (вкладка «Ремонт») ---------- */
.device-grid { gap: 10px !important; }
.device-card {
    border-radius: var(--fx-r-l) !important;
    background: var(--fx-card) !important;
    padding: 14px 8px 12px !important;
    min-height: 44px;
}
.device-icon { background: transparent !important; border-radius: var(--fx-r-m) !important; }
.device-title { font-size: 14px !important; font-weight: 500 !important; color: var(--fx-text) !important; }
.device-card.selected { box-shadow: inset 0 0 0 2px var(--fx-blue) !important; }
.device-selected-chip { border-radius: var(--fx-r-xl) !important; }
.device-selected-chip .chip-change { min-height: 44px; font-size: 14px !important; }
.repair-controls-block select, .repair-controls-block button {
    min-height: 48px;
    border-radius: var(--fx-r-m) !important;
    font-size: 15px !important;
    color: var(--fx-text);
}
.repair-controls-block select { background-color: var(--fx-bg) !important; }
.repair-controls-block button, .repair-controls-empty-btn { border-radius: var(--fx-r-full) !important; color: #fff !important; }
.repair-controls-empty { border-radius: var(--fx-r-l) !important; }
.repair-controls-empty-btn { min-height: 44px; padding: 0 22px !important; font-weight: 500 !important; font-size: 15px !important; }

/* Выбор устройства: плитки листаются только вбок */
.rp-devices {
    display: flex; gap: 10px;
    overflow-x: auto; overflow-y: hidden;
    margin: 0 -16px; padding: 2px 16px 4px;
    scroll-snap-type: x mandatory; scroll-padding: 0 16px;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    scrollbar-width: none;
}
.rp-devices::-webkit-scrollbar { display: none; }
.rp-dev {
    position: relative; flex: 0 0 200px; height: 104px;
    display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
    padding: 14px 16px; box-sizing: border-box;
    border: 0; border-radius: var(--fx-r-l);
    background: #fff;
    text-align: left; font: inherit; color: var(--fx-text);
    overflow: hidden; cursor: pointer; scroll-snap-align: start;
    transition: box-shadow 0.25s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.rp-dev:active { transform: scale(0.97); }
.rp-dev.on { box-shadow: inset 0 0 0 2px var(--fx-blue); }
.rp-dev-name { position: relative; z-index: 2; font-size: 17px; font-weight: 600; letter-spacing: -0.2px; transition: color 0.25s ease; }
.rp-dev.on .rp-dev-name { color: var(--fx-blue); }
.rp-dev img { position: absolute; right: 6px; bottom: -6px; width: 92px; height: 92px; object-fit: contain; object-position: right bottom; transition: transform 0.5s var(--fx-ease); }
@media (hover: hover) { .rp-dev:hover img { transform: scale(1.06) translateY(-3px); } }
#rp-body { margin-top: 14px; }
.rp-field { display: block; }
.rp-label { display: block; margin: 0 0 6px 4px; font-size: 13px; font-weight: 500; color: var(--fx-text2); }
.rp-select { position: relative; display: flex; align-items: center; height: 52px; border-radius: var(--fx-r-m); background: #fff; box-shadow: inset 0 0 0 1px var(--fx-line2); transition: box-shadow 0.2s ease; }
.rp-select:focus-within { box-shadow: inset 0 0 0 2px var(--fx-blue); }
.rp-select img { position: absolute; left: 12px; width: 28px; height: 28px; object-fit: contain; pointer-events: none; }
.rp-select select {
    flex: 1; height: 100%; min-width: 0;
    padding: 0 40px 0 50px; border: 0; outline: 0; background: transparent;
    font: 500 17px var(--fx-font); color: var(--fx-text);
    -webkit-appearance: none; appearance: none; cursor: pointer;
}
.rp-select select.empty { color: var(--fx-text3); font-weight: 400; }
.rp-select select option { color: var(--fx-text); }
.rp-select > i { position: absolute; right: 16px; font-size: 13px; color: var(--fx-text3); pointer-events: none; }
.rp-hint { margin-top: 14px; padding: 16px; border-radius: var(--fx-r-l); background: rgba(255, 255, 255, 0.6); font-size: 14px; color: var(--fx-text2); display: flex; align-items: center; gap: 10px; }
.rp-hint i { color: var(--fx-blue); }
.rp-list-title { margin: 18px 0 8px 4px; font-size: 13px; font-weight: 500; color: var(--fx-text2); }
.rp-list { border-radius: var(--fx-r-l); background: #fff; overflow: hidden; }
.rp-item + .rp-item { border-top: 1px solid #f0f0f2; }
.rp-row {
    width: 100%; min-height: 64px; padding: 12px 14px;
    display: flex; align-items: center; gap: 12px;
    border: 0; background: transparent; font: inherit; color: var(--fx-text); text-align: left; cursor: pointer;
    -webkit-tap-highlight-color: transparent; transition: background-color 0.2s ease;
}
.rp-row:active { background: var(--fx-bg); }
.rp-row-ic { width: 38px; height: 38px; flex-shrink: 0; border-radius: var(--fx-r-m); background: var(--fx-bg); color: var(--fx-text3); display: flex; align-items: center; justify-content: center; font-size: 16px; transition: background-color 0.25s ease, color 0.25s ease; }
.rp-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rp-row-name { font-size: 16px; font-weight: 500; line-height: 1.25; }
.rp-row-sub { font-size: 12px; color: var(--fx-text3); }
.rp-row-price { font-size: 16px; font-weight: 600; white-space: nowrap; color: var(--fx-blue); }
.rp-row-price small { font-size: 12px; font-weight: 500; color: var(--fx-blue); opacity: 0.75; }
.rp-row-chev { font-size: 12px; color: #c7c7cc; transition: transform 0.3s var(--fx-ease), color 0.25s ease; }
.rp-item.open .rp-row-ic { background: var(--fx-blue-soft); color: var(--fx-blue); }
.rp-item.open .rp-row-name { font-weight: 600; }
.rp-item.open .rp-row-chev { transform: rotate(90deg); color: var(--fx-blue); }
/* Аккордеон: плавно 0fr → 1fr, без прыжков */
.rp-acc { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.38s var(--fx-ease); }
.rp-item.open .rp-acc { grid-template-rows: 1fr; }
.rp-acc-inner { min-height: 0; overflow: hidden; }
.rp-cards { padding: 2px 14px 16px; opacity: 0; transform: translateY(-6px); transition: opacity 0.3s ease, transform 0.38s var(--fx-ease); }
.rp-item.open .rp-cards { opacity: 1; transform: none; }
.rp-vars { display: flex; flex-direction: column; gap: 10px; }
.rp-var {
    display: flex; flex-direction: column; gap: 4px; width: 100%;
    padding: 14px; border: 0; border-radius: var(--fx-r-l); background: #fff;
    box-shadow: inset 0 0 0 1px var(--fx-line2);
    font: inherit; color: var(--fx-text); text-align: left; cursor: pointer;
    transition: box-shadow 0.25s ease, transform 0.15s ease; -webkit-tap-highlight-color: transparent;
}
.rp-var:active { transform: scale(0.98); }
.rp-var[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--fx-blue); }
.rp-var-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rp-var-name { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; }
.rp-var-badge { flex-shrink: 0; height: 24px; padding: 0 10px; border-radius: var(--fx-r-full); background: var(--fx-blue-soft); color: var(--fx-blue); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; }
.rp-var-desc { font-size: 14px; line-height: 1.4; color: var(--fx-text2); }
.rp-var-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 6px; }
.rp-var-meta { font-size: 12px; line-height: 1.5; color: var(--fx-text3); }
.rp-var-price { font-size: 24px; font-weight: 700; letter-spacing: -0.4px; color: var(--fx-blue); white-space: nowrap; line-height: 1.1; }
.rp-var-price small { font-size: 14px; font-weight: 500; }
.rp-actions { display: flex; gap: 8px; margin-top: 12px; }
.rp-send { flex: 1; min-height: 50px; border: 0; border-radius: var(--fx-r-full); background: var(--fx-blue); color: #fff; font: 500 16px var(--fx-font); cursor: pointer; transition: background-color 0.2s ease, transform 0.15s ease; }
.rp-send:hover { background: var(--fx-blue-h); }
.rp-send:active, .rp-wa:active { transform: scale(0.96); }
.rp-wa { width: 50px; height: 50px; flex-shrink: 0; border-radius: 50%; background: var(--fx-green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; text-decoration: none; transition: transform 0.15s ease; }
@media (min-width: 1100px) {
    .rp-devices { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; gap: 14px; }
    .rp-dev { flex: none; width: auto; }
    #rp-body { max-width: 900px; }
    .rp-vars { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: stretch; }
    .rp-actions { max-width: 420px; }
}

/* Пакеты ремонта */
.repair-package-card { border: 0 !important; border-radius: var(--fx-r-xl) !important; box-shadow: none !important; }
.repair-package-card.featured { box-shadow: inset 0 0 0 2px var(--fx-blue) !important; }
.repair-package-name { font-size: 21px !important; font-weight: 600 !important; letter-spacing: -0.3px; color: var(--fx-text); }
.repair-package-desc { font-size: 14px !important; color: var(--fx-text2) !important; line-height: 1.45 !important; }
.repair-package-badge { border-radius: var(--fx-r-full) !important; font-weight: 600 !important; }
.repair-package-price-big { background: none !important; padding: 0 !important; border-radius: 0 !important; color: var(--fx-blue); }
.repair-package-price-big .num { font-size: 28px !important; font-weight: 700 !important; letter-spacing: -0.5px; }
.repair-package-price-big .unit { font-size: 15px !important; color: var(--fx-blue) !important; font-weight: 500; }
.rp-stat-label { font-size: 11px !important; color: var(--fx-text3) !important; }
.rp-stat-value { font-size: 13px !important; color: var(--fx-text) !important; }
.rp-desc-btn { min-height: 36px; border-radius: var(--fx-r-full) !important; font-size: 13px !important; }
.repair-check-item { font-size: 13px !important; color: var(--fx-text2) !important; }
.repair-package-btns button, .repair-package-btns .rp-call-icon {
    min-height: 48px;
    border-radius: var(--fx-r-full) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
}
.repair-package-btns .rp-select { background: var(--fx-blue) !important; }
.repair-package-btns .rp-select:hover { background: var(--fx-blue-h) !important; }
.repair-package-btns .rp-select i { color: var(--fx-blue) !important; }
.rp-form-field { border-radius: var(--fx-r-m) !important; min-height: 48px; font-size: 16px !important; }
.rp-form-send { border-radius: var(--fx-r-full) !important; min-height: 48px; }
.repair-addon-chip { border-radius: var(--fx-r-full) !important; min-height: 36px; }
.repair-trust-bar, .info-stats, .status-link-card { border-radius: var(--fx-r-xl) !important; box-shadow: none !important; }
.repair-trust-num { font-size: 28px !important; color: var(--fx-blue) !important; }
.trust-title { margin: 0 0 8px !important; }
.repair-trust-label { font-size: 12px !important; color: var(--fx-text3) !important; }
.repair-article-item { border-radius: var(--fx-r-l) !important; box-shadow: none !important; border: 0 !important; }
.repair-article-header { min-height: 56px; }
.repair-article-icon { border-radius: 50% !important; }
.swiper-pagination-bullet { border-radius: var(--fx-r-full) !important; }
.banner-tile-swiper .swiper-slide { border-radius: var(--fx-r-xl) !important; }

/* ---------- Меню: шапка «опускается» вниз, внутри — содержимое меню ----------
   Панель лежит под шапкой (z-index 999 < 1000) и раскрывается из её контура clip-path'ом,
   поэтому выглядит как продолжение шапки. Фон и стекло — те же, что у шапки. */
#menu-overlay { z-index: 998 !important; background: rgba(0, 0, 0, 0.22) !important; }
#menu-panel {
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: auto !important;
    width: 100% !important; max-width: none !important;
    max-height: min(88vh, 760px);
    z-index: 999 !important;
    padding-top: 60px;
    transform: none !important;
    border-radius: 0 0 var(--fx-r-xl) var(--fx-r-xl) !important;
    background: linear-gradient(180deg, #f5f5f7 0%, rgba(245, 245, 247, 0.92) 30%, rgba(250, 250, 252, 0.86) 100%) !important;
    -webkit-backdrop-filter: saturate(200%) blur(20px) !important;
    backdrop-filter: saturate(200%) blur(20px) !important;
    box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.28) !important;
    clip-path: inset(0 0 calc(100% - 60px) 0 round 0 0 var(--fx-r-xl) var(--fx-r-xl));
    visibility: hidden;
    transition: clip-path 0.5s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.5s !important;
}
#menu-panel.open {
    clip-path: inset(0 0 0 0 round 0 0 var(--fx-r-xl) var(--fx-r-xl));
    visibility: visible;
    transition: clip-path 0.5s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s !important;
}
#menu-panel .menu-head { display: none !important; }     /* закрытие — тем же бургером в шапке */
#menu-panel .menu-scroll { padding: 8px 16px 20px !important; max-width: 720px; width: 100%; margin: 0 auto; box-sizing: border-box; }
#menu-panel .menu-info { margin-top: 0 !important; }
/* Пока меню открыто, шапка сливается с панелью: без тени и нижнего скругления */
body:has(#menu-panel.open) .site-header {
    box-shadow: none !important;
    border-radius: 0 !important;
    background: #f5f5f7 !important;
    transition: border-radius 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
/* Бургер превращается в крестик */
.menu-drop i { transition: transform 0.35s var(--fx-ease); }
body:has(#menu-panel.open) .menu-drop i { transform: rotate(90deg); }
body:has(#menu-panel.open) .menu-drop i::before { content: "\f00d"; }
.menu-close { width: 44px !important; height: 44px !important; border-radius: 50% !important; }
.menu-cta, .menu-group { border-radius: var(--fx-r-l) !important; }
.menu-row { min-height: 48px; }
.menu-row-chip { flex: 0 0 26px !important; width: 26px !important; height: 26px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; }
.menu-row > span:not(.menu-row-chip) { flex: 1 1 auto; }
.menu-cta-chip, .menu-row-chip { border-radius: var(--fx-r-s) !important; }
@media (min-width: 768px) {
    #menu-panel .menu-scroll { display: grid !important; grid-template-columns: 1fr 1fr; align-items: start; gap: 12px 16px !important; }
    #menu-panel .menu-cta-row, #menu-panel .menu-foot { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { #menu-panel, #menu-panel.open { transition: none !important; } }

/* ---------- Подвал: тёмный, всё по центру — одинаково на всех страницах ---------- */
.site-footer {
    background: #1d1d1f !important;
    border-top: 0 !important;
    border-radius: var(--fx-r-xl) var(--fx-r-xl) 0 0;
    padding: 32px 0 calc(28px + env(safe-area-inset-bottom)) !important;
    margin-top: 32px !important;
    text-align: center;
    /* При оверскролле внизу открывается область под страницей. Тени того же цвета тянут подвал вниз,
       поэтому он не «отрывается» от края экрана. Тени не увеличивают высоту страницы. */
    box-shadow: 0 150px 0 #1d1d1f, 0 300px 0 #1d1d1f, 0 450px 0 #1d1d1f, 0 600px 0 #1d1d1f,
                0 750px 0 #1d1d1f, 0 900px 0 #1d1d1f, 0 1050px 0 #1d1d1f, 0 1200px 0 #1d1d1f;
}
.site-footer .content-container { padding-top: 0 !important; padding-bottom: 0 !important; }
.site-footer h3 { font-size: 12px !important; font-weight: 600 !important; letter-spacing: 0.04em !important; text-transform: uppercase; color: #86868b !important; margin: 0 0 6px !important; }
.site-footer p, .site-footer div.footer-value, .site-footer .footer-value { font-size: 14px !important; color: #f5f5f7 !important; line-height: 1.45 !important; }
.footer-grid { text-align: center !important; gap: 16px !important; justify-content: center; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1) !important; text-align: center !important; margin-top: 22px !important; padding-top: 20px !important; }
.footer-social { justify-content: center !important; gap: 12px !important; margin-bottom: 14px !important; }
.footer-social a {
    width: 44px !important; height: 44px !important;
    border: 0 !important;
    background: rgba(255,255,255,0.1) !important;
    color: #f5f5f7 !important;
    font-size: 17px;
}
.footer-social a:hover { background: var(--fx-blue) !important; color: #fff !important; }
.footer-copyright { color: #86868b !important; font-size: 12px !important; }
@media (min-width: 768px) {
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 280px)) !important; }
}

/* ---------- Кнопки и поля (общие) ---------- */
.fx-btn, .btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 50px; padding: 0 24px;
    border: 0; border-radius: var(--fx-r-full);
    background: var(--fx-blue); color: #fff;
    font: 500 17px/1 var(--fx-font);
    cursor: pointer; text-decoration: none;
}
.fx-btn:hover, .btn-primary:hover { background: var(--fx-blue-h); }
input[type="text"], input[type="tel"], input[type="number"], input[type="search"], input[type="password"], input[type="email"], select, textarea {
    font-family: var(--fx-font);
}


/* =====================================================================
   Каталог (category.html)
   ===================================================================== */
.category-products-grid { gap: 10px !important; }
.category-head { background: transparent !important; padding: 6px 0 0 !important; margin-bottom: 14px !important; border-radius: 0 !important; }
.category-head-title { font-size: 28px !important; font-weight: 700 !important; letter-spacing: -0.5px !important; margin: 0 0 12px !important; color: var(--fx-text) !important; }
.category-search {
    display: flex; align-items: center; gap: 8px;
    height: 44px; padding: 0 12px; margin-bottom: 10px;
    border-radius: var(--fx-r-m); background: rgba(118, 118, 128, 0.12);
    color: var(--fx-text3); font-size: 15px;
}
.category-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: 400 17px var(--fx-font); color: var(--fx-text); -webkit-appearance: none; appearance: none; }
.category-search input::placeholder { color: var(--fx-text3); }
.category-search:focus-within { box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.35); }
.category-filters { gap: 8px !important; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
.category-filters::-webkit-scrollbar { display: none; }
.category-filters .filter-select { flex: 0 0 auto !important; width: auto !important; max-width: 220px; }
.pagination-btn { white-space: nowrap; }
.filter-select, .category-filters .filter-select {
    height: 36px;
    padding: 0 28px 0 14px !important;
    border: 0 !important;
    border-radius: var(--fx-r-full) !important;
    background-color: #fff !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: var(--fx-text) !important;
    background-position: right 11px center !important;
}
.filter-select.default, .category-filters .filter-select.default { color: var(--fx-text) !important; }
.filter-select:not(.default), .category-filters .filter-select:not(.default) { background-color: var(--fx-text) !important; color: #fff !important; font-weight: 500 !important; }
.filter-select:focus { box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.35) !important; }
.pagination-container { border-top: 0 !important; margin-top: 18px !important; }
.pagination-info { font-size: 13px !important; color: var(--fx-text3) !important; }
.pagination-btn {
    min-height: 44px; padding: 0 20px !important;
    border-radius: var(--fx-r-full) !important;
    background: #fff !important; color: var(--fx-blue) !important;
    font-size: 15px !important; font-weight: 500 !important;
}
.pagination-btn:disabled { color: var(--fx-text3) !important; opacity: 0.6 !important; }
@media (min-width: 768px) {
    .category-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 14px !important; }
    .category-head { display: grid; grid-template-columns: 1fr minmax(240px, 360px); column-gap: 16px; align-items: center; }
    .category-head-title { grid-column: 1; margin: 0 !important; }
    .category-search { grid-column: 2; margin: 0; }
    .category-filters { grid-column: 1 / -1; margin: 12px 0 0; padding: 0; justify-content: flex-start; overflow: visible; }
    .category-filters .filter-select { flex: 0 0 auto !important; min-width: 170px; }
}
@media (min-width: 1100px) {
    .category-products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 16px !important; }
    .category-head-title { font-size: 40px !important; }
}


/* =====================================================================
   Карточка товара (product.html)
   ===================================================================== */
.product-gallery { border-radius: var(--fx-r-xl) !important; background: #fff !important; }
.product-info {
    background: #fff !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
    box-shadow: none !important;
    border-radius: var(--fx-r-xl) !important;
    padding: 20px !important;
    margin-bottom: 0 !important;
}
.product-cat-label { font-size: 12px; font-weight: 600; color: var(--fx-text3); margin-bottom: 4px; }
.product-name { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.2; color: var(--fx-text); }
.price-wrapper { margin: 14px 0 18px !important; gap: 12px !important; justify-content: space-between; flex-wrap: nowrap !important; }
.price {
    font-size: 28px !important; font-weight: 700 !important; letter-spacing: -0.5px;
    color: var(--fx-text) !important; background: none !important; padding: 0 !important; border-radius: 0 !important;
}
.buy-btn {
    display: inline-flex !important; align-items: center; justify-content: center; gap: 8px;
    min-height: 50px; padding: 0 26px !important;
    border-radius: var(--fx-r-full) !important;
    background: var(--fx-blue) !important;
    font-size: 17px !important; font-weight: 500 !important;
}
.buy-btn:hover { background: var(--fx-blue-h) !important; }
.buy-btn i { font-size: 15px; }
.rating-block { border: 0 !important; border-radius: var(--fx-r-l) !important; background: var(--fx-bg) !important; padding: 12px 16px !important; }
.rating-stars i { font-size: 24px !important; padding: 4px 2px; }
.rating-prompt, .rating-count { font-size: 12px !important; color: var(--fx-text3) !important; }
.average-rating { font-size: 28px !important; color: var(--fx-text) !important; }
.rating-divider { background: var(--fx-line2) !important; }
.product-sub { margin: 0 0 6px; font-size: 17px; font-weight: 600; color: var(--fx-text); }
.product-desc { margin: 0; font-size: 15px; line-height: 1.5; color: var(--fx-text2); }
.specs { border-top: 1px solid var(--fx-line2) !important; font-size: 14px !important; }
.specs .flex { padding: 4px 0; font-size: 14px !important; }
.specs .text-gray-500 { color: var(--fx-text3) !important; font-weight: 400 !important; font-size: 14px !important; }
.specs span:last-child { color: var(--fx-text) !important; }
.product-related { margin-top: 28px; }
.modal-content { border-radius: var(--fx-r-xl) !important; }
.modal-close { width: 44px !important; height: 44px !important; border-radius: 50% !important; }
@media (min-width: 900px) {
    #product-content { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 32px; align-items: start; padding-top: 24px !important; }
    #product-content > .product-gallery { position: sticky; top: 96px; margin: 0 !important; animation: none !important; transform: none !important; }
    #product-content > .product-below { display: contents; }
    #product-content .product-info { grid-column: 2; padding: 32px !important; }
    #product-content .product-related { grid-column: 1 / -1; margin-top: 48px; }
    .product-name { font-size: 40px; letter-spacing: -0.8px; }
    .price { font-size: 34px !important; }
}


/* =====================================================================
   Выкуп (buyout.html)
   ===================================================================== */
.buyout-card, .buyout-visit-card, .buyout-acc, .buyout-glass-card { border-radius: var(--fx-r-xl) !important; box-shadow: none !important; }
.buyout-hero-title { font-size: 28px !important; letter-spacing: -0.5px !important; }
.buyout-hero-sub, .buyout-step-hint, .buyout-visit-sub, .buyout-how-text, .buyout-tradein-text, .buyout-ti-base, .buyout-ti-hint { font-weight: 400 !important; color: var(--fx-text2) !important; }
.buyout-step-hint { font-size: 14px !important; }
.buyout-step-title, .buyout-visit-title { font-size: 21px !important; letter-spacing: -0.3px !important; }
.buyout-step-num { background: var(--fx-blue) !important; }
.buyout-field-label { font-size: 15px !important; font-weight: 500 !important; }
.buyout-select { min-height: 48px; border-radius: var(--fx-r-m) !important; font-size: 16px !important; background-color: var(--fx-bg) !important; border: 0 !important; color: var(--fx-text) !important; }
.buyout-band-grid { gap: 8px !important; }
.buyout-band-btn {
    min-height: 44px; border-radius: var(--fx-r-m) !important;
    background: var(--fx-bg) !important; color: var(--fx-text) !important;
    font-size: 15px !important; font-weight: 500 !important;
}
.buyout-band-btn.active { background: var(--fx-blue) !important; color: #fff !important; }
/* Недоступно: не «серая кнопка-призрак», а явно пустая ячейка с контуром */
.buyout-band-btn:disabled { background: transparent !important; color: #aeaeb2 !important; box-shadow: inset 0 0 0 1px var(--fx-line2) !important; font-weight: 400 !important; }
.buyout-option-row { min-height: 52px; border-bottom-color: var(--fx-line2) !important; }
.buyout-option-row label { font-size: 16px !important; font-weight: 400 !important; color: var(--fx-text) !important; white-space: normal !important; }
.buyout-option-group { background: rgba(118, 118, 128, 0.12) !important; border-radius: var(--fx-r-full) !important; padding: 3px !important; gap: 0 !important; }
.buyout-option-btn { min-height: 34px; min-width: 56px; padding: 0 14px !important; font-size: 15px !important; font-weight: 400 !important; color: var(--fx-text) !important; border-radius: var(--fx-r-full) !important; }
.buyout-option-btn.active { background: #fff !important; color: var(--fx-blue) !important; font-weight: 500 !important; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important; }
.buyout-price-card { border-radius: var(--fx-r-xl) !important; }
.buyout-price-value { font-size: 40px !important; }
.buyout-btn-primary, .buyout-btn-secondary, #buyout-send-btn, .buyout-sticky-btn { min-height: 50px; font-size: 17px !important; border-radius: var(--fx-r-full) !important; }
.buyout-btn-secondary { color: var(--fx-text) !important; }
.buyout-btn-secondary .fa-whatsapp { color: var(--fx-green); }
.buyout-sticky-btn { min-height: 44px; font-size: 15px !important; }
.buyout-sticky { border-radius: var(--fx-r-xl) var(--fx-r-xl) 0 0; border-top: 0 !important; box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06); }
.buyout-sticky-label { font-size: 12px !important; }
.buyout-acc-head { min-height: 56px; }
.buyout-conditions-block { border-radius: var(--fx-r-l) !important; }
.buyout-tradein { border-radius: var(--fx-r-l) !important; }
.buyout-ti-pay-value { color: var(--fx-blue) !important; }

/* =====================================================================
   Статус ремонта (status.html)
   ===================================================================== */
.st-title { font-size: 28px !important; letter-spacing: -0.5px !important; }
.st-card, .st-rows, .st-works { background: #fff !important; border-radius: var(--fx-r-xl) !important; }
.st-input { border-radius: var(--fx-r-m) !important; border-color: var(--fx-line) !important; height: 50px !important; font-size: 17px !important; }
.st-btn { border-radius: var(--fx-r-full) !important; font-weight: 500 !important; }
.st-status { border-radius: var(--fx-r-xl) !important; }
.st-error { border-radius: var(--fx-r-m) !important; }
.st-row { border-bottom-color: var(--fx-line2) !important; min-height: 48px; align-items: center; }
.st-actions > * { min-height: 50px; border-radius: var(--fx-r-full) !important; }
.st-call { background: #fff !important; }
.st-wa { background: var(--fx-green) !important; }
.st-again { min-height: 44px; }

/* Формы-страницы на компьютере: аккуратная колонка по центру, а не растянутая */
@media (min-width: 768px) {
    .content-container:has(.buyout-card), .content-container:has(.st-wrap) { max-width: 720px !important; }
    .buyout-sticky-inner { max-width: 720px !important; }
}

/* =====================================================================
   Анимации — одни на весь сайт
   ===================================================================== */
/* Появление при прокрутке: карточки выезжают снизу и проявляются */
.category-card, .device-card, .popular-card, .product-card-vertical, .recommended-card,
.repair-article-item, .info-stats, .repair-trust-bar, .fx-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s var(--fx-ease), transform 0.6s var(--fx-ease), box-shadow 0.25s ease, background-color 0.25s ease !important;
}
.is-revealed, .fx-reveal.fx-in { opacity: 1; transform: none; }
/* Нажатие: короткое «утапливание» без задержки */
.category-card:active, .device-card:active, .popular-card:active, .product-card-vertical:active, .recommended-card:active,
.is-revealed:active {
    transform: scale(0.97) !important;
    transition-duration: 0.15s !important;
    transition-delay: 0s !important;
}
/* Кнопки «утапливаются» при нажатии (только те, у которых transform не занят позиционированием) */
.fx-btn, .btn-primary, .menu-row, .menu-cta, .repair-controls-empty-btn, .rp-form-send, .repair-addon-chip,
.buyout-option-btn, .pagination-btn, .st-btn, .filter-select { transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease; }
.fx-btn:active, .btn-primary:active, .menu-row:active, .menu-cta:active, .repair-controls-empty-btn:active, .rp-form-send:active,
.repair-addon-chip:active, .buyout-option-btn:active, .pagination-btn:active, .st-btn:active { transform: scale(0.96); }
/* Плавная смена вкладок «Продажа / Ремонт» */
#sales-section:not(.hidden), #repair-section:not(.hidden) { animation: fxFadeUp 0.45s var(--fx-ease) both; }
@keyframes fxFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    .category-card, .device-card, .popular-card, .product-card-vertical, .recommended-card,
    .repair-article-item, .info-stats, .repair-trust-bar, .repair-package-card, .fx-reveal { opacity: 1 !important; transform: none !important; }
}

/* =====================================================================
   Компьютер: широкая сетка вместо узкой колонки
   ===================================================================== */
@media (min-width: 768px) {
    .content-container { max-width: 720px !important; }
    .header-inner { max-width: 720px !important; }
    .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .category-card--wide { grid-column: span 3; height: 180px; }
    .category-card--wide .category-icon { width: 200px !important; height: 200px !important; right: 24px; bottom: -20px; }
    .category-card { height: 150px; }
    .category-icon { width: 120px !important; height: 120px !important; }
    .products-grid, .recommended-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 14px !important; }
    #sales-section .glass-card, #device-select-card.glass-card {
        padding-left: max(16px, calc(50vw - 360px + 16px)) !important;
        padding-right: max(16px, calc(50vw - 360px + 16px)) !important;
    }
}
@media (min-width: 1100px) {
    .content-container { max-width: var(--fx-wide) !important; padding-left: 24px !important; padding-right: 24px !important; }
    .header-inner { max-width: var(--fx-wide) !important; padding: 0 24px !important; }
    .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 14px !important; }
    .category-card--wide { grid-column: span 2; grid-row: span 2; height: auto; min-height: 314px; padding: 24px !important; }
    .category-card--wide .category-title { font-size: 28px !important; letter-spacing: -0.5px !important; }
    .category-card--wide .category-sub { font-size: 14px; }
    .category-card--wide .category-go { left: 24px; bottom: 24px; width: 40px; height: 40px; font-size: 14px; }
    .category-card--wide .category-icon { width: 300px !important; height: 300px !important; right: 20px; bottom: -40px; }
    .popular-grid, .products-grid, .recommended-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 16px !important; }
    .popular-card, .product-card-vertical, .recommended-card { padding: 12px !important; }
    .section-title, .content-container h2.text-xl { font-size: 28px !important; letter-spacing: -0.5px; }
    .home-section { padding-top: 40px; }
    .device-grid { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
    #sales-section .glass-card, #device-select-card.glass-card {
        padding-left: max(24px, calc(50vw - 600px + 24px)) !important;
        padding-right: max(24px, calc(50vw - 600px + 24px)) !important;
    }
    .repair-packages-grid:not(.as-swiper):not(.single) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .site-footer { padding: 40px 0 !important; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 280px)) !important; }
}
@media (min-width: 768px) {
    .repair-packages-panel-inner, .repair-tier-swiper { max-width: 720px !important; }
    .repair-trust-bar, .repair-trust-bar-inner { max-width: none !important; }
    .repair-trust-bar { padding: 28px !important; }
}
@media (min-width: 1100px) {
    .banner-tile-swiper-outer { height: 300px !important; }
    .banner-tile-swiper .swiper-slide.grow-active { scale: 1 !important; }
    .banner-tile-swiper .swiper-slide-prev, .banner-tile-swiper .swiper-slide-next { translate: 0 !important; }
    .repair-packages-panel-inner, .repair-tier-swiper { max-width: 900px !important; }
    .repair-trust-bar-inner { flex-direction: row !important; flex-wrap: wrap; align-items: center !important; column-gap: 32px !important; }
    .repair-trust-bar-inner .trust-title { flex: 0 0 100%; }
    .repair-trust-bar-inner .trust-row { flex: 1 1 0; margin-top: 0 !important; }
    .repair-articles-list { display: grid !important; grid-template-columns: 1fr 1fr; gap: 12px !important; align-items: start; }
}
@media (min-width: 1100px) {
    /* На главной 6 популярных и 6 «с этим покупают» — ровно один ряд */
    .recommended-grid, .popular-grid { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
}
@media (min-width: 1400px) {
    .products-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}

/* Нижняя плашка выкупа: пока цены нет — полностью скрыта (не только сдвинута) */
.buyout-sticky:not(.show) { visibility: hidden; transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.35s; }
.buyout-sticky.show { visibility: visible; }

/* =====================================================================
   Страница iPhone (iphone.html) и шапка выкупа — шире на компьютере
   ===================================================================== */
.iphone-config-card, .iphone-trust-wrap-inner, .iphone-compare-wrap-inner { border-radius: var(--fx-r-xl); }
@media (min-width: 768px) {
    .iphone-promo-inner, .iphone-picker-inner, .iphone-colorpick, .iphone-storagepick, .iphone-detail-inner { max-width: 720px !important; }
    .content-container:has(.iphone-trust-wrap-inner), .content-container:has(.iphone-config-card) { max-width: 720px !important; }
    .buyout-hero-inner { max-width: 600px !important; }
}

/* =====================================================================
   Панель администратора (admin.html) — те же токены
   ===================================================================== */
#admin-content { max-width: 960px !important; }
#admin-content .shadow-md, #admin-content .shadow-lg { box-shadow: none !important; }
#admin-content .bg-white.rounded-lg, #admin-content .bg-white.rounded-xl, #admin-content .bg-white.rounded-2xl { border-radius: var(--fx-r-xl) !important; }
#admin-content .bg-white.rounded-lg.p-6 { padding: 24px !important; }
#admin-content .rounded-lg:not(.bg-white) { border-radius: var(--fx-r-m) !important; }
#admin-content input[type="text"], #admin-content input[type="number"], #admin-content input[type="password"],
#admin-content input[type="search"], #admin-content input[type="url"], #admin-content input[type="tel"],
#admin-content select, #admin-content textarea, #admin-password-input {
    border: 1px solid var(--fx-line) !important;
    border-radius: var(--fx-r-m) !important;
    background-color: #fff;
    font-size: 15px;
    min-height: 44px;
    color: var(--fx-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#admin-content input:focus, #admin-content select:focus, #admin-content textarea:focus, #admin-password-input:focus {
    outline: none !important; border-color: var(--fx-blue) !important; box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15) !important;
}
#admin-content input[type="checkbox"], #admin-content input[type="radio"] { min-height: 0; accent-color: var(--fx-blue); width: 18px; height: 18px; }
#admin-content .bg-accent, #admin-login-btn { border-radius: var(--fx-r-full) !important; min-height: 44px; font-weight: 500 !important; }
#admin-content button.bg-accent:hover, #admin-content a.bg-accent:hover { background: var(--fx-blue-h) !important; }
#admin-content .bg-gray-200 { background: rgba(118, 118, 128, 0.12) !important; border-radius: var(--fx-r-full) !important; min-height: 44px; }
#admin-content .bg-gray-50 { background: var(--fx-bg) !important; border-color: transparent !important; border-radius: var(--fx-r-l) !important; }
#admin-content h1.text-3xl { font-size: 28px !important; letter-spacing: -0.5px; }
#admin-content h2.text-xl { font-size: 21px !important; font-weight: 600 !important; letter-spacing: -0.3px; }
#admin-content .text-gray-600 { color: var(--fx-text2) !important; }
#admin-content .text-gray-500 { color: var(--fx-text3) !important; }
.upload-area { border-radius: var(--fx-r-l) !important; border-color: var(--fx-line) !important; }
.image-preview-item { border-radius: var(--fx-r-m) !important; }
/* Вкладки админки — сегментированный переключатель */
#admin-content > .flex.justify-center.overflow-x-auto {
    justify-content: flex-start !important;
    gap: 4px !important;
    padding: 4px !important;
    border: 0 !important;
    border-radius: var(--fx-r-full);
    background: rgba(118, 118, 128, 0.12);
    scrollbar-width: none;
}
#admin-content > .flex.justify-center.overflow-x-auto > button {
    min-height: 36px; padding: 0 16px !important;
    border-radius: var(--fx-r-full);
    color: var(--fx-text) !important;
    font-size: 14px !important;
    border-bottom: 0 !important;
}
#admin-content > .flex.justify-center.overflow-x-auto > button.tab-active {
    background: #fff; color: var(--fx-blue) !important; font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
#admin-auth-overlay { background: var(--fx-bg) !important; }
#admin-auth-overlay > div { box-shadow: none !important; padding: 32px 24px !important; }

/* Каталог: заголовок теперь в шапке — поиск и фильтры без пустой колонки */
@media (min-width: 768px) {
    .category-head:has(.category-head-title[data-hdr-title]) { display: block; }
    .category-head:has(.category-head-title[data-hdr-title]) .category-search { max-width: 420px; }
}

/* =====================================================================
   Баннеры: три стиля (banners.js) — светлый, тёмный, фото
   ===================================================================== */
.banner-tile-swiper .swiper-slide { border-radius: var(--fx-r-xl) !important; scale: 1 !important; translate: 0 !important; overflow: hidden; }
.banner-tile-swiper .swiper-slide img { scale: 1 !important; }
/* Соседние баннеры чуть приглушены — активный спокойно выходит вперёд */
.banner-tile-swiper .swiper-slide { opacity: 0.55; transition: opacity 0.5s var(--fx-ease) !important; }
.banner-tile-swiper .swiper-slide-active, .banner-tile-swiper .swiper-slide-duplicate-active { opacity: 1; }
.swiper-pagination-bullet-active .bullet-fill { animation: none !important; }
.swiper-pagination-bullet { position: relative; width: 18px !important; height: 5px !important; margin: 0 3px !important; border-radius: 3px !important; background: #d2d2d7 !important; transition: width 0.35s var(--fx-ease); }
.swiper-pagination-bullet-active { width: 30px !important; }
.swiper-pagination-bullet::after { content: ""; position: absolute; inset: -12px -3px; }   /* удобная зона нажатия */
.bullet-fill { width: 0; transition: width 0.1s linear; }

.bn {
    position: relative; height: 100%; box-sizing: border-box;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 22px; border-radius: var(--fx-r-xl); overflow: hidden; isolation: isolate;
    color: var(--fx-text); -webkit-tap-highlight-color: transparent;
}
.bn--link { cursor: pointer; }
.bn--light { background: linear-gradient(135deg, #ffffff 0%, #eef0f4 100%); }
.bn--dark { background: radial-gradient(120% 90% at 85% 100%, #3a3a3c 0%, #1d1d1f 62%); color: #fff; }
.bn--photo { background: #1d1d1f; color: #fff; justify-content: flex-end; }
.bn .bn-img { position: absolute; z-index: -1; pointer-events: none; }
.bn--light .bn-img, .bn--dark .bn-img {
    right: -4px; bottom: -6px; width: 48% !important; height: 104% !important;
    object-fit: contain !important; object-position: right bottom;
    transition: transform 0.8s var(--fx-ease);
}
.bn--photo .bn-img { inset: 0; width: 100% !important; height: 100% !important; object-fit: cover !important; }
.bn-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.25) 45%, rgba(0,0,0,0) 70%); pointer-events: none; }
.bn-text { position: relative; max-width: 56%; }
.bn--photo .bn-text { max-width: 78%; }
.bn-label { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.bn-title { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.1; }
.bn--light .bn-title { color: var(--fx-text); }
.bn-sub { margin-top: 6px; font-size: 14px; line-height: 1.35; color: var(--fx-text2); }
.bn--dark .bn-sub { color: #a1a1a6; }
.bn--photo .bn-sub { color: rgba(255,255,255,0.85); }
.bn-foot { position: relative; display: flex; align-items: center; justify-content: space-between; }
.bn--photo .bn-foot { position: absolute; right: 22px; bottom: 22px; }
.bn--photo .bn-text + .bn-foot:has(.bn-btn) { position: relative; right: auto; bottom: auto; margin-top: 14px; }
.bn-btn { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: var(--fx-r-full); background: var(--fx-blue); color: #fff; font-size: 15px; font-weight: 500; white-space: nowrap; transition: background-color 0.2s ease, transform 0.15s ease; }
.bn--dark .bn-btn, .bn--photo .bn-btn { background: #fff; color: var(--fx-blue); }
.bn-go { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.9); color: var(--fx-text); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.bn--link:active .bn-btn, .bn--link:active .bn-go { transform: scale(0.95); }
@media (hover: hover) { .bn--link:hover .bn-img { transform: scale(1.03); } .bn--light.bn--link:hover .bn-btn { background: var(--fx-blue-h); } }
.bn--bare { padding: 0; }
@media (min-width: 768px) {
    .banner-tile-swiper-outer { height: 300px !important; }
    .bn { padding: 32px; }
    .bn-title { font-size: 34px; }
    .bn--photo .bn-foot { right: 32px; bottom: 32px; }
}
@media (min-width: 1100px) {
    .banner-tile-swiper-outer { height: 420px !important; }
    .banner-tile-swiper .swiper-slide { opacity: 1; }
    .bn { padding: 48px; }
    .bn-label { font-size: 15px; margin-bottom: 6px; }
    .bn-title { font-size: 48px; letter-spacing: -1px; }
    .bn-sub { font-size: 19px; margin-top: 10px; }
    .bn-text { max-width: 50%; }
    .bn-btn { height: 48px; padding: 0 24px; font-size: 17px; }
    .bn--light .bn-img, .bn--dark .bn-img { right: 40px; width: 44% !important; }
    .bn--photo .bn-foot { right: 48px; bottom: 48px; }
}

/* Админка: выбор стиля и предпросмотр */
.bn-style-seg { display: inline-flex; padding: 3px; border-radius: var(--fx-r-full); background: rgba(118,118,128,0.12); gap: 0; }
.bn-style-seg button { min-height: 34px; padding: 0 16px; border: 0; border-radius: var(--fx-r-full); background: transparent; font-size: 14px; color: var(--fx-text); cursor: pointer; }
.bn-style-seg button.on { background: #fff; color: var(--fx-blue); font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
.bn-preview { width: 340px; max-width: 100%; height: auto; aspect-ratio: 16 / 9; }
.bn-preview--wide { width: 100%; height: auto; aspect-ratio: 1200 / 420; }
.bn-preview--wide .bn { padding: 24px; }
.bn-preview--wide .bn-title { font-size: 24px; }
.bn-thumb { width: 120px; height: 70px; flex-shrink: 0; }
.bn-thumb .bn { padding: 8px; border-radius: 10px; }
.bn-thumb .bn-label, .bn-thumb .bn-sub, .bn-thumb .bn-foot { display: none; }
.bn-thumb .bn-title { font-size: 11px; letter-spacing: 0; }
/* Предпросмотр в админке всегда в «телефонных» размерах, независимо от ширины экрана админки */
.bn-preview .bn { padding: 18px !important; }
.bn-preview .bn-label { font-size: 11px !important; margin-bottom: 2px !important; }
.bn-preview .bn-title { font-size: 22px !important; letter-spacing: -0.4px !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bn-preview .bn-sub { font-size: 13px !important; margin-top: 4px !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bn-preview .bn-text { max-width: 56% !important; }
.bn-preview .bn--photo .bn-text { max-width: 78% !important; }
.bn-preview .bn-btn { height: 36px !important; padding: 0 16px !important; font-size: 14px !important; }
.bn-preview .bn--light .bn-img, .bn-preview .bn--dark .bn-img { right: -4px !important; width: 48% !important; }
.bn-preview .bn--photo .bn-foot { right: 18px !important; bottom: 18px !important; }
.bn-preview--wide .bn { padding: 18px 22px !important; }
.bn-preview--wide .bn-label { font-size: 10px !important; margin-bottom: 2px !important; }
.bn-preview--wide .bn-title { font-size: 20px !important; letter-spacing: -0.3px !important; }
.bn-preview--wide .bn-sub { font-size: 12px !important; margin-top: 4px !important; }
.bn-preview--wide .bn-text { max-width: 55% !important; }
.bn-preview--wide .bn-btn { height: 32px !important; padding: 0 14px !important; font-size: 13px !important; }
.bn-preview--wide .bn--photo .bn-foot { right: 18px !important; bottom: 18px !important; }
.bn-preview--wide .bn--light .bn-img, .bn-preview--wide .bn--dark .bn-img { right: 24px !important; width: 42% !important; }

/* Баннер на телефоне: пропорция 16:9 вместо фиксированной высоты — растёт вместе с шириной экрана */
.banner-tile-swiper-outer { height: auto !important; }
.banner-tile-swiper { height: auto !important; padding: 0 !important; }
.banner-tile-swiper .swiper-wrapper { height: auto !important; }
.banner-tile-swiper .swiper-slide { height: auto !important; aspect-ratio: 16 / 9; }
/* Под 16:9 текст компактнее: заголовок до 2 строк, подзаголовок в 1 строку, кнопка ниже */
@media (max-width: 767px) {
    .bn { padding: 18px; }
    .bn-label { font-size: 11px; margin-bottom: 2px; }
    .bn-title { font-size: 22px; letter-spacing: -0.4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .bn-sub { font-size: 13px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .bn-btn { height: 36px; padding: 0 16px; font-size: 14px; }
    .bn-go { width: 40px; height: 40px; }
    .bn--photo .bn-foot { right: 18px; bottom: 18px; }
    .bn--photo .bn-text + .bn-foot:has(.bn-btn) { margin-top: 10px; }
}
@media (min-width: 768px) {
    .banner-tile-swiper-outer { height: auto !important; }
    .banner-tile-swiper .swiper-slide { aspect-ratio: auto; height: 340px !important; }
}
@media (min-width: 1100px) {
    .banner-tile-swiper-outer { height: auto !important; }
    .banner-tile-swiper .swiper-slide { height: 420px !important; }
}

/* =====================================================================
   Ремонт: блок «Кто чинит ваш iPhone»
   ===================================================================== */
/* Белая подложка под блоком — ровная, со скруглением, без размытия */
#repair-below-packages { padding-top: 0 !important; padding-bottom: 20px; margin-top: 24px !important; }
#repair-below-packages::before { filter: none !important; border-radius: var(--fx-r-xl); }
.why { padding: 24px 0 8px; display: flex; flex-direction: column; gap: 14px; }
.why-sub { margin-top: 14px !important; }
.master { position: relative; height: 300px; border-radius: var(--fx-r-xl); overflow: hidden; isolation: isolate;
    background: linear-gradient(165deg, #d9cfc4 0%, #a8978a 55%, #4a3f37 100%); }
.master-photo { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.master-photo[hidden] { display: none; }
.master-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.66) 0%, rgba(0,0,0,0.2) 42%, rgba(0,0,0,0) 62%); pointer-events: none; }
.master-cap { position: absolute; left: 18px; right: 18px; bottom: 18px; color: #fff; display: flex; flex-direction: column; gap: 2px; }
.master-cap small { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.82); }
.master-cap b { font-size: 26px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.1; }
.master-cap span { font-size: 14px; color: rgba(255,255,255,0.88); }
.master-quote { position: relative; margin: 0; padding: 18px 18px 16px; border-radius: var(--fx-r-l); background: var(--fx-bg); }
.master-quote::before { content: "\201C"; display: block; height: 18px; font-size: 44px; font-weight: 700; line-height: 0.9; color: var(--fx-blue); }
.master-quote p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--fx-text); }
.master-quote cite { display: block; margin-top: 10px; font-size: 13px; font-style: normal; color: var(--fx-text3); }
.why-facts { display: flex; gap: 10px; }
.why-facts > div { flex: 1; min-width: 0; padding: 14px 8px; border-radius: var(--fx-r-l); background: var(--fx-bg); text-align: center; display: flex; flex-direction: column; gap: 2px; }
.why-facts b { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; color: var(--fx-blue); white-space: nowrap; }
.why-facts span { font-size: 12px; line-height: 1.3; color: var(--fx-text2); }
.why-visit { padding: 16px; display: flex; flex-direction: column; gap: 12px; border-radius: var(--fx-r-l); background: var(--fx-bg); }
.why-visit-row { display: flex; align-items: center; gap: 12px; }
.why-visit b { display: block; font-size: 15px; font-weight: 600; color: var(--fx-text); }
.why-visit small { display: block; margin-top: 1px; font-size: 13px; color: var(--fx-text2); line-height: 1.35; }
.why-ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: #fff; color: var(--fx-text); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.why-visit-btns { display: flex; gap: 8px; }
.why-route { flex: 1; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--fx-r-full); background: var(--fx-blue); color: #fff !important; font-size: 15px; font-weight: 500; text-decoration: none; transition: background-color 0.2s ease, transform 0.15s ease; }
.why-route:hover { background: var(--fx-blue-h); }
.why-wa { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; background: var(--fx-green); color: #fff !important; display: flex; align-items: center; justify-content: center; font-size: 22px; text-decoration: none; transition: transform 0.15s ease; }
.why-route:active, .why-wa:active { transform: scale(0.96); }
@media (min-width: 768px) { .master { height: 380px; } }
@media (min-width: 1100px) {
    .why { display: grid; grid-template-columns: 5fr 6fr; column-gap: 32px; row-gap: 14px; align-items: start; }
    .why > .section-title:first-child { grid-column: 1 / -1; }
    .master { grid-column: 1; grid-row: 2 / span 3; height: 460px; }
    .master-quote { grid-column: 2; }
    .master-quote p { font-size: 19px; }
    .why-facts { grid-column: 2; }
    .why > .why-sub { grid-column: 2; margin-top: 6px !important; }
    .why-visit { grid-column: 2; }
}

/* ===== Ремонт: белый блок под шапкой (устройство и модель) + плитки ремонтов ===== */
.rp-top {
    position: relative; width: 100vw; left: 50%; margin-left: -50vw; margin-top: -84px;
    padding-top: 84px; border-radius: 0 0 var(--fx-r-xl) var(--fx-r-xl);
    background: linear-gradient(180deg, #f5f5f7 0%, #f5f5f7 60px, #ffffff 300px);   /* сверху как фон страницы, к низу белый */
    box-shadow: 0 10px 30px -24px rgba(0,0,0,0.25);
}
.rp-top-inner { max-width: 28rem; margin: 0 auto; padding: 4px 16px 20px; box-sizing: border-box; }
.rp-title { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.7px; line-height: 1.1; color: var(--fx-text); }
.rp-title span { color: var(--fx-text3); }
.rp-facts {
    display: flex; margin-top: 16px; padding: 14px 6px; border-radius: 18px;
    background: linear-gradient(135deg, #0a84ff 0%, #0058c4 100%); box-shadow: 0 12px 26px -16px rgba(0,113,227,0.8);
}
.rp-facts > div { flex: 1; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.rp-facts > div + div { border-left: 1px solid rgba(255,255,255,0.22); }
.rp-facts b { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; color: #fff; }
.rp-facts span { font-size: 11px; line-height: 1.25; color: rgba(255,255,255,0.82); }
.rp-sub { margin: 16px 2px 0; font-size: 14px; color: var(--fx-text2); }
.rp-hero2 {
    position: relative; overflow: hidden; isolation: isolate; height: 220px; border-radius: 24px;
    background: radial-gradient(120% 90% at 85% 100%, #3a3a3c 0%, #1d1d1f 65%);
}
.rp-hero2 img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.rp-hero2-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0,0,0,0.74) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0) 72%); }
.rp-hero2-pin {
    position: absolute; right: 14px; top: 14px; height: 26px; padding: 0 10px; border-radius: var(--fx-r-full);
    background: rgba(255,255,255,0.88); display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--fx-text);
}
.rp-hero2-pin i { color: var(--fx-blue); font-size: 12px; }
.rp-hero2-text { position: absolute; left: 18px; right: 18px; bottom: 16px; }
.rp-hero2 .rp-title { font-size: 26px; color: #fff; }
.rp-hero2 .rp-title span { color: rgba(255,255,255,0.72); }
.rp-hero2 .rp-title #rp-hero-any, .rp-hero2 .rp-title b { color: #fff; font-weight: inherit; }
.rp-hero2 + .rp-devs { margin-top: 16px; }
.rp-hero2-sub { margin: 7px 0 0; font-size: 14px; line-height: 1.4; color: rgba(255,255,255,0.9); }
.rp-hero2-sub b { color: #fff; font-weight: 600; }
.rp-devs {
    display: flex; gap: 8px; margin: 10px -16px 0; padding: 2px 16px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.rp-devs::-webkit-scrollbar { display: none; }
.rp-dev2 {
    position: relative; flex: 0 0 calc((min(100vw, 448px) - 140px) / 2); height: 100px; padding: 12px 14px; overflow: hidden; scroll-snap-align: start;
    display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
    border: 0; border-radius: 18px; background: var(--fx-bg); color: var(--fx-text); text-align: left; cursor: pointer;
    transition: transform 0.2s var(--fx-ease), box-shadow 0.2s ease, background-color 0.2s ease; -webkit-tap-highlight-color: transparent;
}
.rp-dev2:active { transform: scale(0.96); }
.rp-dev2 span { position: relative; z-index: 1; display: block; font-size: 15px; font-weight: 600; line-height: 1.2; }
.rp-dev2 img { position: absolute; right: 8px; bottom: 6px; width: 66px; height: 66px; object-fit: contain; object-position: right bottom; pointer-events: none; }
.rp-dev2.on { background: rgba(0,113,227,0.08); box-shadow: inset 0 0 0 2px var(--fx-blue); color: var(--fx-blue); }
.rp-model {
    position: relative; display: flex; align-items: center; gap: 10px; height: 52px; margin-top: 12px; padding: 0 14px;
    border-radius: 14px; background: var(--fx-bg); cursor: pointer; font-size: 16px; font-weight: 500; color: var(--fx-text);
}
.rp-model img { width: 28px; height: 28px; object-fit: contain; pointer-events: none; }
.rp-model span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-model > i { font-size: 14px; color: var(--fx-text3); }
.rp-model select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; cursor: pointer; -webkit-appearance: none; appearance: none; }
.rp-model.empty { box-shadow: inset 0 0 0 2px var(--fx-blue); }
.rp-model.empty span { color: var(--fx-text3); font-weight: 400; }
.rp-model.empty > i { color: var(--fx-blue); }
.rp-model:focus-within { box-shadow: inset 0 0 0 2px var(--fx-blue); }
.rp-list-box { margin-top: 18px; }
.rp-list-title2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.3px; line-height: 1.2; color: var(--fx-text); }
.rp-list-title2 span { color: var(--fx-text3); }
.rp-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 6px 2px 10px; }
.rp-list-head small { flex-shrink: 0; font-size: 13px; color: var(--fx-text3); }
.rp-list-note { margin: 10px 4px 0; font-size: 13px; line-height: 1.45; color: var(--fx-text3); }
.rp-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rp-tile {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column; align-items: flex-start; min-height: 132px; padding: 14px;
    border: 0; border-radius: var(--fx-r-l); background: #fff; text-align: left; color: var(--fx-text);
    cursor: pointer; transition: transform 0.2s var(--fx-ease), box-shadow 0.2s ease, opacity 0.3s ease, filter 0.3s ease; -webkit-tap-highlight-color: transparent;
}
.rp-tile:active { transform: scale(0.97); }
.rp-tile.on { box-shadow: inset 0 0 0 2px var(--fx-blue); }
.rp-tile-name { position: relative; z-index: 1; max-width: 100%; font-size: 15px; font-weight: 600; line-height: 1.22; }
.rp-tile-foot { position: relative; z-index: 1; margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; max-width: 100%; }
.rp-tile-price { font-size: 18px; font-weight: 700; color: var(--fx-blue); white-space: nowrap; }
.rp-tile-price small { font-size: 12px; font-weight: 400; color: var(--fx-text3); }
.rp-tile-time { position: relative; z-index: 1; margin-bottom: 3px; font-size: 12px; color: var(--fx-text3); line-height: 1.3; }
.rp-tile-ic { position: absolute; right: 12px; bottom: 12px; z-index: 0; font-size: 40px; line-height: 1; color: #f5f5f7; transition: color 0.25s ease; }
.rp-tile.on .rp-tile-ic { color: var(--fx-blue); opacity: 0.18; }
/* открыт один ремонт — остальные гаснут, акцент на выбранном */
.rp-tiles.has-open .rp-tile:not(.on) { opacity: 0.42; filter: grayscale(1); }
.rp-tiles.has-open .rp-tile:not(.on) .rp-tile-price { color: var(--fx-text3); }
.rp-panel { grid-column: 1 / -1; border-radius: var(--fx-r-l); background: #fff; padding: 14px 0 2px; opacity: 0; transform: translateY(-6px); transition: opacity 0.3s ease, transform 0.35s var(--fx-ease); }
.rp-panel.in { opacity: 1; transform: none; }
.rp-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 0 14px 10px; }
.rp-panel-title { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.rp-panel-close { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--fx-bg); color: var(--fx-text2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.rp-panel .rp-cards { opacity: 1; transform: none; }
.rp-panel .rp-var { background: var(--fx-bg); }

@media (min-width: 768px) {
    .rp-top-inner { max-width: 720px; padding-top: 12px; }
    .rp-hero2 { height: 300px; }
    .rp-hero2 .rp-title { font-size: 36px; }
    .rp-hero2-text { left: 28px; bottom: 24px; }
    .rp-devs { margin: 10px 0 0; padding: 2px 0 4px; }
    .rp-dev2 { flex: 1 1 0; min-width: 110px; }
    .rp-model { max-width: 420px; }
    .rp-list-box { max-width: 720px; margin-left: auto; margin-right: auto; }
    .rp-tiles { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
    .rp-top-inner, .rp-list-box { max-width: 900px; }
    .rp-tiles { grid-template-columns: repeat(4, 1fr); }
}

/* «Новые iPhone» в магазине — тот же песочный «титан», что у карточки модели в ремонте */
.category-card--wide { background: linear-gradient(160deg, #f7f3ee 0%, #efe7dc 100%) !important; }
.category-card--wide .category-go { background: #fff; }

/* Баннер на телефоне: высота от ширины экрана, а не от ширины слайда — после поворота туда-обратно
   слайд может на мгновение остаться «альбомной» ширины, и баннер раздувался */
@media (max-width: 767px) {
    .banner-tile-swiper .swiper-slide { aspect-ratio: auto !important; height: calc((min(100vw, 448px) - 32px) * 9 / 16) !important; }
}

/* Телефон повернули горизонтально — просим вернуть вертикально (сайт свёрстан под вертикальный экран) */
.fx-rotate { display: none; }
html.fx-landscape .fx-rotate {
    display: flex; position: fixed; inset: 0; z-index: 100000; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    background: #f5f5f7; color: var(--fx-text); text-align: center; padding: 24px; font-family: var(--fx-font);
}
html.fx-landscape body { overflow: hidden; }
.fx-rotate-ic { width: 56px; height: 56px; border-radius: 50%; background: #fff; color: var(--fx-blue); display: flex; align-items: center; justify-content: center; font-size: 24px; animation: fxRot 1.6s var(--fx-ease) infinite; }
.fx-rotate b { font-size: 19px; font-weight: 700; letter-spacing: -0.3px; }
.fx-rotate span { font-size: 14px; color: var(--fx-text2); }
@keyframes fxRot { 0%, 20% { transform: rotate(-90deg); } 60%, 100% { transform: rotate(0deg); } }


.rp-pulse { animation: rpPulse 0.9s var(--fx-ease) 2; }
@keyframes rpPulse { 0%, 100% { transform: none; } 30% { transform: scale(1.03); box-shadow: inset 0 0 0 2px var(--fx-blue), 0 0 0 8px rgba(0,113,227,0.18); } }

/* Обновление страницы потягиванием вниз — в приложении на экране «Домой» (там нет обновления браузера).
   Кольцо заполняется по мере потягивания, после отпускания — крутится, пока грузится страница. */
.fx-ptr {
    position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 66px); z-index: 60;
    width: 40px; height: 40px; margin-left: -20px; border-radius: 50%; background: #fff; color: var(--fx-blue);
    display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px -6px rgba(0,0,0,0.25);
    opacity: 0; transform: translateY(-50px); pointer-events: none;
}
.fx-ptr-ring { position: absolute; inset: 6px; width: 28px; height: 28px; transform: rotate(-90deg); }
.fx-ptr-ring circle { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 69.1; stroke-dashoffset: 69.1; }
.fx-ptr-ring .bg { stroke: #e8e8ed; stroke-dashoffset: 0; }
.fx-ptr-arrow { width: 13px; height: 13px; transition: transform 0.2s ease, opacity 0.15s ease; }
.fx-ptr.ready .fx-ptr-arrow { transform: rotate(180deg); }
.fx-ptr.spin .fx-ptr-arrow { opacity: 0; }
.fx-ptr.spin .fx-ptr-ring { animation: fxPtrSpin 0.75s linear infinite; }
.fx-ptr.spin .fx-ptr-ring .fg { stroke-dashoffset: 48 !important; transition: stroke-dashoffset 0.2s ease; }
@keyframes fxPtrSpin { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
