/* ============================================
   1. ПЕРЕМЕННЫЕ И БАЗОВЫЕ СТИЛИ
   ============================================ */
:root {
    --bg: #f4f4f2;
    --card-bg: #ffffff;
    --text: #2b2b2b;
    --text-light: #6b6b6b;
    --accent: #1a1a1a;
    --line: rgba(0, 0, 0, 0.08);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    --transition: 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    --font-mono: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --grid-columns: 4;
    --nav-width: 72px;
    --nav-item-size: 48px;
    --nav-icon-size: 22px;
    --nav-gap: 12px;
    --nav-padding: 20px;
    --nav-radius: 12px;
    --nav-tooltip-font: 13px;
    --nav-tooltip-gap: 8px;
    --nav-badge-size: 18px;
    --nav-badge-font: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    font-family: var(--font-sans);
    color: var(--text);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ============================================
   2. НАВИГАЦИЯ (фиксированная, адаптивная)
   ============================================ */
.nav {
    position: fixed;
    z-index: 100;
    background: rgba(244, 244, 242, 0.85);
    backdrop-filter: blur(20px);
    transition: background var(--transition);
    display: flex;
}

.nav-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px; /* 👈 фиксированная ширина для всех иконок */
    height: 44px; /* 👈 фиксированная высота для всех иконок */
    cursor: pointer;
    color: var(--text);
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.2s;
}

.nav-icon:hover {
    background: rgba(0, 0, 0, 0.04);
}

.nav-icon:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
}

.nav-icon svg {
    width: var(--nav-icon-size);
    height: var(--nav-icon-size);
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.nav-icon.active {
    background: rgba(0, 0, 0, 0.08);
}

.badge {
    position: absolute;
    top: 6px; /* 👈 бейдж в верхней части иконки */
    right: 8px; /* 👈 бейдж у правого края */
    width: 8px;
    height: 8px;
    background: #c7512e;
    border-radius: 50%;
    border: 2px solid var(--bg);
    display: none;
    z-index: 2;
}

.badge.visible {
    display: block;
}

.nav-icon .badge {
    top: 2px;
    right: 0;
    width: auto;
    min-width: var(--nav-badge-size);
    height: var(--nav-badge-size);
    padding: 0 3px;
    border-radius: 20px;
    color: #fff;
    font: 600 var(--nav-badge-font)/calc(var(--nav-badge-size) - 4px) var(--font-sans);
    text-align: center;
}

/* Десктоп: вертикальная панель */
@media (min-width: 768px) {
    .nav {
        left: 0;
        top: 0;
        bottom: 0;
        width: var(--nav-width);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--nav-gap);
        border-right: 1px solid var(--line);
        padding: var(--nav-padding) 0;
    }

    .nav-icon {
        width: var(--nav-item-size);
        height: var(--nav-item-size);
        border-radius: var(--nav-radius);
        white-space: nowrap;
    }

    .nav-icon::after {
        content: attr(data-tooltip);
        position: absolute;
        left: calc(100% + var(--nav-tooltip-gap));
        top: 50%;
        transform: translateY(-50%);
        opacity: 0;
        visibility: hidden;
        font-size: var(--nav-tooltip-font);
        font-family: var(--font-mono);
        background: var(--text);
        color: #fff;
        padding: .5em 1em;
        border-radius: 40px;
        white-space: nowrap;
        transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
        pointer-events: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .nav-icon:hover::after,
    .nav-icon:focus-visible::after {
        opacity: 1;
        visibility: visible;
    }
}

@media (min-width: 1920px) {
    :root {
        --nav-width: 96px;
        --nav-item-size: 64px;
        --nav-icon-size: 28px;
        --nav-gap: 16px;
        --nav-padding: 28px;
        --nav-radius: 16px;
        --nav-tooltip-font: 14px;
        --nav-tooltip-gap: 12px;
        --nav-badge-size: 22px;
        --nav-badge-font: 12px;
    }
}

@media (min-width: 2560px) {
    :root {
        --nav-width: 112px;
        --nav-item-size: 72px;
        --nav-icon-size: 32px;
        --nav-gap: 20px;
        --nav-padding: 32px;
        --nav-radius: 18px;
        --nav-tooltip-font: 15px;
        --nav-badge-size: 24px;
    }
}

@media (min-width: 3840px) {
    :root {
        --nav-width: 152px;
        --nav-item-size: 96px;
        --nav-icon-size: 44px;
        --nav-gap: 28px;
        --nav-padding: 44px;
        --nav-radius: 24px;
        --nav-tooltip-font: 18px;
        --nav-badge-size: 30px;
        --nav-badge-font: 15px;
    }
}

/* Мобильная: горизонтальная внизу */
@media (max-width: 767px) {
    .nav {
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(64px + env(safe-area-inset-bottom));
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        border-top: 1px solid var(--line);
        padding: 0 12px env(safe-area-inset-bottom);
        gap: 4px;
    }

    .nav-icon {
        width: 44px;
        height: 44px;
    }

    .badge {
        top: 6px;
        right: 8px;
    }

    .nav-icon::after {
        display: none;
    }
}

/* ============================================
   3. ОБЩАЯ СТРУКТУРА СТРАНИЦЫ
   ============================================ */
.main-content {
    margin-left: 0;
    padding: 24px 20px 100px;
    max-width: 1600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .main-content {
        width: min(calc(100% - var(--nav-width)), 1600px);
        margin-left: calc(var(--nav-width) + max(0px, (100% - var(--nav-width) - 1600px) / 2));
        margin-right: 0;
        padding: 40px 40px 60px;
    }
}

.catalog-header {
    margin: 32px 0 0;
    padding: 0 20px;
    text-align: left;
}

@media (min-width: 768px) {
    .catalog-header {
        width: min(calc(100% - var(--nav-width)), 1600px);
        margin-left: calc(var(--nav-width) + max(0px, (100% - var(--nav-width) - 1600px) / 2));
        margin-right: 0;
        padding: 40px 40px 0;
        max-width: 1600px;
    }
}

.catalog-header__title-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.catalog-header h1 {
    font-family: var(--font-mono);
    font-size: 36px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0;
}

.catalog-header__description {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.5;
    max-width: 620px;
    margin: 12px 0 0;
}

.catalog-header__count {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
    white-space: nowrap;
}

.catalog-header__count strong {
    font-weight: 500;
}

/* Футер */
.footer {
    margin-top: 80px;
    padding: 48px 40px 24px;
    border-top: 1px solid var(--line);
    background: var(--bg);
}

@media (min-width: 768px) {
    .footer {
        margin-left: var(--nav-width);
    }
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col {
    flex: 1;
    min-width: 180px;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.footer-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
}

.footer-title {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.05em;
    margin: 0 0 16px;
    font-weight: 400;
}

.footer-feedback-contact {
    margin: 12px 0;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.footer-feedback-contact a {
    color: var(--text);
    text-underline-offset: 3px;
}

.feedback-pending {
    font-size: 12px;
}

.availability-note {
    margin: 0;
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.5;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    margin-top: 32px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--text-light);
}

/* ============================================
   4. ФИЛЬТРЫ (десктоп + мобильный)
   ============================================ */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 40px;
    font-size: 13px;
    font-family: var(--font-mono);
    cursor: pointer;
}

.active-filter-chip:hover {
    background: rgba(0, 0, 0, 0.08);
}

.filter-chip {
    padding: 4px 15px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    border: 1px solid var(--line);
    font-size: 14px;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-light);
}

.filter-chip.active {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}

.filter-chip:hover:not(.active) {
    background: rgba(0, 0, 0, 0.04);
}

/* Десктопная панель фильтров (выезжает слева) */
.desktop-filter-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 33.333%;
    max-width: 500px;
    min-width: 280px;
    background: rgba(244, 244, 242, 0.98);
    backdrop-filter: blur(20px);
    z-index: 150;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-right: 1px solid var(--line);
    overflow-y: auto;
}

/* Стилизация скроллбара для фильтров */
.desktop-filter-panel::-webkit-scrollbar {
    width: 4px;
}

.desktop-filter-panel::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 4px;
}

.desktop-filter-panel::-webkit-scrollbar-track {
    background: var(--line);
    border-radius: 4px;
}

.desktop-filter-panel.open {
    transform: translateX(0);
}

.filter-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 140;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.filter-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

/* Мобильная панель фильтров (выезжает снизу) */
.mobile-filter-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 350;
    padding: 24px;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    max-height: 70vh;
    overflow-y: auto;
}

.mobile-filter-panel.open {
    transform: translateY(0);
}

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    max-height: 120px;
    overflow-y: auto;
    padding: 4px 0;
}

/* Стилизация скроллбара для фильтров */
.filter-group::-webkit-scrollbar {
    width: 4px;
}

.filter-group::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 4px;
}

.filter-group::-webkit-scrollbar-track {
    background: var(--line);
    border-radius: 4px;
}

.filter-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    margin-right: 32px;
}

/* Кнопка вызова фильтров */
.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--line);
    border-radius: 48px;
    font-family: var(--font-mono);
    font-size: 14px;
    cursor: pointer;
}

.filter-toggle-btn:hover {
    background: #fff;
    border-color: var(--text);
}

/* ============================================
   5. ПОИСК И СОРТИРОВКА
   ============================================ */
.search-sort-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-bar {
    flex: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 48px;
    padding: 8px 18px;
    border: 1px solid var(--line);
    transition: all 0.2s;
}

.search-bar:focus-within {
    background: #fff;
    border-color: var(--text);
}

.search-icon {
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: var(--font-sans);
    padding: 6px 0;
}

.search-bar input::placeholder {
    color: var(--text-light);
    opacity: 0.6;
}

.search-clear {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-light);
    padding: 0 4px;
    opacity: 0.6;
}

.search-clear:hover {
    opacity: 1;
}

.sort-selector {
    display: flex;
    flex: 1;
    min-width: 120px;
    gap: 8px;
}

.sort-selector select {
    width: 100%;
    padding: 14px 40px 14px 16px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--line);
    border-radius: 48px;
    font-size: 14px;
    font-family: var(--font-sans);
    color: var(--text);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px;
}

@media (max-width: 767px) {
    .search-sort-bar {
        flex-direction: column;
        gap: 12px;
    }

    .search-bar {
        padding: 6px 14px;
    }
}

/* ============================================
   6. КАРТОЧКИ КАТАЛОГА И СЕТКА
   ============================================ */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns), 1fr);
    gap: 24px;
    transition: grid-template-columns 0.3s;
}

@media (max-width: 767px) {
    .catalog-grid {
        gap: 16px;
    }
}

.card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    --decor-card-shadow: 0 2px 5px rgba(0, 0, 0, .08), 0 6px 20px rgba(0, 0, 0, .14);
    box-shadow: var(--decor-card-shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, .1), 0 12px 32px rgba(0, 0, 0, .18);
}

.card-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover .card-actions {
    opacity: 1;
}

@media (max-width: 767px) {
    .card-actions {
        opacity: 1;
        top: 8px;
        right: 8px;
    }
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    color: var(--text);
}

.action-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.action-btn.favorited svg {
    fill: #c7512e;
    stroke: #c7512e;
}

@media (max-width: 767px) {
    .action-btn {
        width: 28px;
        height: 28px;
    }

    .action-btn svg {
        width: 13px;
        height: 12px;
    }
}

.card-info {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    margin-top: 0;
    z-index: 2; /* 000 */
}

.card-brand {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.5); /* 000 */
    padding: 4px 16px; /* 000 */
    border-radius: 20px; /* 000 */
    width: fit-content; /* 000 */
    margin-bottom: 2px; /* 000 */
}

.card-name {
    font-size: 16px;
    font-weight: 450;
    font-family: var(--font-mono);
    background-color: rgba(255, 255, 255, 0.5); /* 000 */
    padding: 2px 12px;
    border-radius: 20px; /* 000 */
    margin-bottom: 12px;
    /* Обрезка текста с троеточием */
    white-space: nowrap; /* Запрещаем перенос строк */
    overflow: hidden; /* Скрываем всё, что не влезает */
    text-overflow: ellipsis; /* Добавляем троеточие в конце */
    width: 100%; /* Гарантируем, что блок занимает всю ширину */
}

.decor-card__emboss {
    display: block;
    color: #ababab;
    font-size: 11px;
    line-height: 1.35;
    letter-spacing: 0.01em;
    padding-left: 8px; /* 000 */
    padding-right: /* 000 */;
    /* Обрезка текста с троеточием */ /* 000 */
    white-space: nowrap; /* Запрещаем перенос строк */
    overflow: hidden; /* Скрываем всё, что не влезает */
    text-overflow: ellipsis; /* Добавляем троеточие в конце */
    width: 100%; /* Гарантируем, что блок занимает всю ширину */
}

.price-circles {
    display: flex;
    gap: 4px;
    margin-top: 12px;
    align-items: center;
}

.price-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text);
    opacity: 0.12;
}

.price-circle.active-circle {
    opacity: 0.9;
    width: 12px;
    height: 12px;
}

/* Мозаичный режим */
.catalog-grid.mosaic-mode {
    gap: 0;
}

.catalog-grid.mosaic-mode .card {
    border-radius: 0;
    box-shadow: none;
    transform: none;
}

.catalog-grid.mosaic-mode .card-info,
.catalog-grid.mosaic-mode .decor-card__overlay,
.catalog-grid.mosaic-mode .card-actions {
    display: none;
}

.catalog-grid.mosaic-mode .card-img {
    aspect-ratio: 1 / 1;
}

/* Кнопка "Показать ещё" */
.load-more {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.load-more-btn {
    padding: 12px 32px;
    border-radius: 48px;
    background: transparent;
    border: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 14px;
    cursor: pointer;
}

.load-more-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--text);
}

/* ============================================
   7. ДЕТАЛЬНЫЙ ПРОСМОТР (оверлей)
   ============================================ */
.detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(244, 244, 242, 0.98);
    backdrop-filter: blur(20px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.detail-overlay.open {
    opacity: 1;
    visibility: visible;
}

.detail-container {
    position: relative;
    width: min(70vw, 1400px);
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 85vh;
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.detail-image {
    flex: 1;
    position: relative;
    background: var(--bg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-image-inner {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}

.detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Навигация внутри детального окна */
.detail-nav {
    position: sticky;
    top: -24px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    z-index: 10;
    background-color: white;
    margin: -24px -24px 0 -24px;
    padding: 18px;
}

.detail-nav button {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-nav-close {
    grid-column: 2;
}

.detail-header {
    margin-bottom: 8px;
}

.detail-brand {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    font-size: 12px;
}

.detail-name {
    font-size: 28px;
    font-family: var(--font-mono);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 32px;
}

/* Ценовые кружки в деталях */
.detail-price-group {
    margin-bottom: 8px;
}

.price-category-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.price-category-name {
    font-weight: 500;
    font-family: var(--font-mono);
}

.price-circles-detail {
    display: flex;
    gap: 6px;
    align-items: center;
}

.detail-price-circle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text);
    opacity: 0.12;
}

.detail-price-circle.active-circle {
    opacity: 0.9;
    width: 18px;
    height: 18px;
}

.price-hint {
    font-size: 12px;
    color: var(--text);
    margin-top: 4px;
    opacity: 0.5;
}

/* Характеристики */
.specs-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 8px 0;
    padding: 8px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.spec-icon {
    width: 24px;
    min-width: 24px;
    height: 24px;
    color: var(--text-light);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 18px 18px;
}

/* The layout reserves this space for the approved detail SVG set. */

.spec-label {
    width: 100px;
    color: var(--text-light);
    font-size: 13px;
}

.spec-value {
    font-family: var(--font-mono);
    font-size: 13px;
}

.manufacturer-link {
    margin-top: 8px;
    font-size: 12px;
    text-align: right;
}

.manufacturer-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
    text-decoration: none;
}

.manufacturer-link a:hover {
    color: var(--text);
}

/* Нейроподборка */
.neural-recommendations {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.recommendation-block {
    margin-bottom: 20px;
}

.recommendation-title {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-light);
    margin-bottom: 12px;
}

.combinations {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.combo-swatch {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 1px solid var(--line);
    transition: transform 0.2s, border-color 0.2s;
}

.combo-swatch:hover {
    transform: scale(1.05);
    border-color: var(--text);
}

/* Кнопки в деталях */
.detail-actions {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.detail-actions > .share-button,
.detail-actions > .detail-favorite-group {
    flex: 0 1 auto;
    width: auto;
    min-width: 0;
}

.detail-actions .btn {
    width: auto;
    max-width: 100%;
    padding-inline: 12px;
    white-space: nowrap;
}

.detail-actions > .detail-favorite-tags {
    flex: 0 0 100%;
    max-width: 100%;
}

.btn {
    padding: 12px 24px;
    border-radius: 40px;
    font-size: 14px;
    font-family: var(--font-mono);
    cursor: pointer;
    border: 1px solid var(--line);
    background: #fff;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}

.btn:hover {
    opacity: 0.85;
}

/* Адаптив детального окна */
@media (max-width: 767px) {
    .detail-container {
        flex-direction: column;
        aspect-ratio: auto;
        width: 95vw;
        height: 90vh;
        border-radius: 16px;
    }

    .detail-image {
        flex: 0 0 40%;
        min-height: 200px;
    }

    .detail-content {
        padding: 20px;
    }

    .detail-name {
        font-size: 22px;
    }

    .combo-swatch {
        width: 55px;
        height: 55px;
    }

    .detail-nav {
        margin: -20px -20px 0 -20px;
        padding: 16px 20px 8px;
        position: sticky;
        top: -20px;
        background-color: white;
    }
}

/* ============================================
   8. ТЕГИ (в карточках и избранном)
   ============================================ */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg);
    border-radius: 20px;
    font-size: 11px;
    font-family: var(--font-mono);
    cursor: pointer;
}

.tag .remove-tag {
    cursor: pointer;
    font-size: 14px;
    opacity: 0.6;
}

.tag .remove-tag:hover {
    opacity: 1;
}

.add-tag-btn {
    background: transparent;
    border: 1px dashed var(--line);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-family: var(--font-mono);
    cursor: pointer;
    color: var(--text-light);
}

.mini-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 12px;
    font-family: var(--font-mono);
}

.add-tag-to-card {
    background: transparent;
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 9px;
    font-family: var(--font-mono);
    cursor: pointer;
    margin-left: 4px;
}

/* ============================================
   9. СТРАНИЦА "ИЗБРАННОЕ" (favorites.html)
   ============================================ */
.favorites-page {
    margin-left: 0;
    padding: 24px 20px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .favorites-page {
        margin-left: var(--nav-width);
        padding: 40px 40px 60px;
    }
}

.favorites-header h1 {
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 8px;
}

.favorites-count {
    color: var(--text-light);
    font-size: 14px;
}

.favorites-toolbar {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 48px;
    padding: 16px 24px;
    margin-bottom: 32px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.mode-switch {
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
    gap: 8px;
}

.mode-btn {
    padding: 6px 16px;
    border-radius: 40px;
    background: transparent;
    border: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 13px;
    cursor: pointer;
}

.mode-btn.active {
    background: var(--text);
    color: white;
    border-color: var(--text);
}

/* Галерея избранного */
.favorites-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.gallery-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.gallery-card-img {
    position: relative;
    aspect-ratio: 3/4;
    background-size: cover;
    background-position: center;
}

.card-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-card:hover .card-delete {
    opacity: 1;
}

.drag-handle {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 40px; /* 000 */
    height: 40px; /* 000 */
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 18px;
    padding-bottom: 2px;
}

.gallery-card:hover .drag-handle {
    opacity: 1;
}

.gallery-card-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.gallery-card-brand {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-light);
}

.gallery-card-name {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-price-circles {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.gallery-price-circle {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text);
    opacity: 0.2;
}

.gallery-price-circle.active-circle {
    opacity: 0.9;
    width: 7px;
    height: 7px;
}

/* Мозаика в избранном */
.favorites-mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 0;
    margin-bottom: 40px;
}

.mosaic-card {
    background: var(--card-bg);
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.mosaic-card-img {
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
}

.mosaic-card-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.mosaic-card:hover .mosaic-card-delete {
    opacity: 1;
}

.mosaic-card-tag {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    font-family: var(--font-mono);
    pointer-events: none;
}

/* Режим сравнения */
.favorites-compare {
    display: flex;
    overflow-x: auto;
    gap: 0;
    padding-bottom: 20px;
    margin-bottom: 40px;
}

.compare-card {
    flex: 0 0 280px;
    background: var(--card-bg);
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    position: relative;
}

.compare-card-img {
    aspect-ratio: 3/4;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    position: relative;
}

.compare-remove-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.compare-card:hover .compare-remove-overlay {
    opacity: 1;
}

.compare-card-info {
    padding: 12px;
}

.compare-card-brand {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-light);
}

.compare-card-name {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 500;
}

.compare-price-circles {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    align-items: center;
}

.compare-price-circle {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text);
    opacity: 0.2;
}

.compare-price-circle.active-circle {
    opacity: 0.9;
    width: 10px;
    height: 10px;
}

/* Фильтры по тегам в избранном */
.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-tags-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 40px;
}

.filter-hint {
    font-size: 12px;
    color: var(--text-light);
}

.selected-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--text);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-family: var(--font-mono);
}

.remove-selected-tag {
    cursor: pointer;
    font-size: 14px;
    opacity: 0.7;
}

.clear-filters-btn {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    cursor: pointer;
    font-family: var(--font-mono);
}

/* Кнопки действий в избранном */
.favorites-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.empty-favorites {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

/* ============================================
   10. ПОЛНОЭКРАННОЕ ИЗОБРАЖЕНИЕ
   ============================================ */
.fullsize-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    cursor: pointer;
}

.fullsize-overlay.open {
    opacity: 1;
    visibility: visible;
}

.fullsize-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    cursor: default;
}

.fullsize-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.fullsize-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   11. ПАНЕЛЬ ИЗБРАННОГО (выезжающая справа)
   ============================================ */
.favorites-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 360px;
    background: #fff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    z-index: 300;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    padding: 32px;
}

.favorites-panel.open {
    transform: translateX(0);
}

@media (max-width: 767px) {
    .favorites-panel {
        width: 100%;
        height: 50vh;
        top: auto;
        bottom: 0;
        transform: translateY(100%);
        border-radius: 24px 24px 0 0;
    }

    .favorites-panel.open {
        transform: translateY(0);
    }
}

.fav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.fav-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    flex: 1;
}

.fav-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    margin-bottom: 8px;
}

.fav-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    background-size: cover;
    flex-shrink: 0;
}

.fav-info {
    flex: 1;
}

.fav-info .fav-name {
    font-weight: 500;
    font-family: var(--font-mono);
}

.fav-info .fav-brand {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

.fav-remove {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.4;
    font-size: 18px;
    padding: 4px;
}

/* ============================================
   12. КНОПКИ УПРАВЛЕНИЯ (раскладка, масштаб)
   ============================================ */
.layout-controls {
    position: static;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    margin-bottom: 20px;
    gap: 8px;
    z-index: 50;
}

.ctrl-btn {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    font-family: var(--font-mono);
    color: var(--text);
}

.ctrl-btn.active-ctrl {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}

.scale-reference {
    position: fixed;
    bottom: 200px;
    right: 80px;
    width: 80px;
    height: 80px;
    border: 1px dashed var(--text);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-light);
    z-index: 51;
}

.scale-reference.active {
    display: flex;
}

@media (max-width: 767px) {
    .scale-reference {
        bottom: 180px;
        right: 70px;
    }
}

/* ============================================
   13. УТИЛИТЫ И ПЕРЕНОСИМЫЕ КЛАССЫ
   ============================================ */
.card-ghost {
    opacity: 0.4;
    background: var(--bg);
}

.card-drag {
    transform: scale(1.03);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.watermark {
    position: fixed;
    bottom: 20px;
    left: 20px;
    font-size: 11px;
    color: var(--text-light);
    opacity: 0.3;
    font-family: var(--font-mono);
    z-index: 0;
}

/* ============================================
   14. АДАПТИВНЫЕ ПРАВКИ (общие)
   ============================================ */
@media (max-width: 767px) {
    .favorites-toolbar {
        flex-direction: column;
        align-items: stretch;
        border-radius: 24px;
    }

    .favorites-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .compare-card {
        flex: 0 0 260px;
    }

    .drag-handle,
    .card-delete,
    .mosaic-card-delete {
        opacity: 1; /* на мобильных всегда видны */
    }

    .favorites-mosaic {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ============================================
15. ЦЕНОВАЯ ШКАЛА (вместо кружков)
============================================ */

/* Контейнер шкалы */
.price-scale {
    position: relative;
    margin-top: 4px; /* 000 */
    padding: 0 8px; /* 000 */
}

/* Компактная шкала (в карточке) */
.price-scale-compact {
    width: 75%; /* 000 */
    height: 20px; /* 000 */
    display: flex;
    align-items: center;
    position: relative;
}

/* Детальная шкала (в модальном окне) */
.price-scale-detailed {
    width: 159px;
    height: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Линия-трек */
.price-scale-track {
    position: relative;
    width: 100%;
    /* height: 2px; */
    background: var(--line);
    border-radius: 1px;
    overflow: visible;
}

/* Градиентная подложка (едва заметная) */
.price-scale-track::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(
            to right,
            rgba(0, 0, 0, 0.02) 0%,
            rgba(0, 0, 0, 0.06) 100%
    );
    border-radius: 5px;
    pointer-events: none;
}

/* Маркер (точка) */
.price-scale-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--text);
    opacity: 0.6;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 2;
    box-shadow: rgba(0, 0, 0, 0.03) 0px 0px 0px 5px;
}

/* При наведении на карточку маркер увеличивается */
.card:hover .price-scale-marker {
    opacity: 0.9;
    width: 14px;
    height: 14px;
}

/* В детальной версии маркер крупнее */
.price-scale-detailed .price-scale-marker {
    width: 8px;
    height: 8px;
    opacity: 0.8;
}

.price-scale-detailed:hover .price-scale-marker {
    opacity: 1;
    width: 10px;
    height: 10px;
}

/* Подписи под детальной шкалой */
.price-scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-light);
    opacity: 0.5;
    letter-spacing: 0.02em;
}

/* Тултип (всплывающая подсказка) */
.price-scale-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-family: var(--font-mono);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

/* Стрелочка тултипа */
.price-scale-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--text);
}

/* Показ тултипа при наведении */
.price-scale-compact:hover .price-scale-tooltip,
.price-scale-detailed:hover .price-scale-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Адаптив для мобильных */
@media (max-width: 767px) {
    .price-scale-compact {
        /*width: 40px;*/ /* 000 */
    }

    .price-scale-detailed {
        width: 120px;
    }

    .price-scale-labels {
        font-size: 9px;
    }
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    15% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    85% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* Стили для <img> внутри карточки (для SSR и SEO) */
/* Фиксируем пропорции карточки и изображения */
.card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4; /* Жесткое соотношение сторон */
    overflow: hidden;
    background-color: #f5f5f5; /* Фон пока картинка грузится */
}

.card-img-inner {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Обрезает лишнее, сохраняя пропорции */
    object-position: center;
    display: block;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.detail-favorite-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

dialog.fullsize-overlay {
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    margin: 0;
    padding: 24px;
    border: 0;
    color: white;
}

dialog.fullsize-overlay[open] {
    display: flex;
    opacity: 1;
    visibility: visible;
}

dialog.fullsize-overlay::backdrop {
    background: rgba(0, 0, 0, 0.9);
}

dialog.fullsize-overlay .fullsize-container {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
}

dialog.fullsize-overlay .fullsize-image {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
}

dialog.fullsize-overlay .fullsize-close {
    top: 8px;
    right: 8px;
    z-index: 1;
}

@media (max-width: 767px) {
    dialog.fullsize-overlay {
        padding: 12px;
    }
}

/* ============================================
   14. СОВМЕСТИМОСТЬ С СЕРВЕРНЫМ КОНТРАКТОМ
   Исходная визуальная система сохранена; эти правила подключают к ней
   безопасные SSR-компоненты и новые data-атрибуты.
   ============================================ */
[hidden] {
    display: none !important;
}

.visually-hidden,
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.decor-card {
    position: relative;
}

.decor-card__link {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
}

.decor-card__media {
    display: block;
}

.decor-card__overlay {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 1;
}

.decor-card__overlay .card-name { margin-bottom: 0; }

.decor-card__body {
    display: flex;
}

.decor-card__brand,
.decor-card__name {
    display: block;
}

.decor-card__status,
.status-note,
.screen-warning,
.demo-note {
    color: var(--text-light);
    font-size: 12px;
}

.decor-card__actions {
    z-index: 2;
}

.favorite-button.is-favorite {
    color: #c7512e;
}

.favorite-button.is-favorite svg {
    fill: #c7512e;
    stroke: #c7512e;
}

.decor-card.is-favorite .card-actions {
    opacity: 1;
}

.badge:not([hidden]) {
    display: block;
}

.card.is-favorite {
    box-shadow: 0 0 0 1px rgba(199, 81, 46, 0.28), var(--decor-card-shadow);
}

.price-scale--empty {
    color: var(--text-light);
    font-size: 11px;
    margin-top: 10px;
}

.catalog-grid[data-columns="2"] {
    --grid-columns: 2;
}

.catalog-grid[data-columns="3"] {
    --grid-columns: 3;
}

.catalog-grid[data-columns="4"] {
    --grid-columns: 4;
}

.catalog-grid[data-columns="5"] {
    --grid-columns: 5;
}

.sort-selector > label {
    flex: 1;
    min-width: 0;
}

.catalog-grid.is-mosaic {
    gap: 0;
}

.catalog-grid.is-mosaic .card {
    border-radius: 0;
    box-shadow: none;
    transform: none;
}

.catalog-grid.is-mosaic .card-info,
.catalog-grid.is-mosaic .decor-card__overlay,
.catalog-grid.is-mosaic .card-actions {
    display: none;
}

.catalog-grid.is-mosaic .decor-card__tags-row {
    display: none;
}

.catalog-grid.is-mosaic .card-img {
    aspect-ratio: 1 / 1;
}

.ctrl-btn[aria-pressed="true"] {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}

.empty-state {
    grid-column: 1 / -1;
    padding: 64px 20px;
    text-align: center;
    color: var(--text-light);
}

.empty-state h2 {
    color: var(--text);
    font-family: var(--font-mono);
    font-weight: 400;
}

.empty-state .btn,
.empty-state .button {
    margin-top: 20px;
}

dialog.desktop-filter-panel {
    margin: 0;
    border: 0;
    height: 100vh;
    max-height: none;
    color: var(--text);
}

dialog.desktop-filter-panel[open] {
    display: flex;
    transform: translateX(0);
}

dialog.desktop-filter-panel:not([open]) {
    display: none;
}

dialog.desktop-filter-panel::backdrop {
    background: rgba(0, 0, 0, 0.3);
}

.filter-dialog__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-dialog__header h2 {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 400;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.filter-form fieldset {
    border: 0;
}

.filter-form legend {
    margin-bottom: 8px;
    color: var(--text-light);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 40px;
    background: rgba(255, 255, 255, .55);
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
}

.filter-options label:has(input:checked) {
    color: #fff;
    background: var(--text);
}

.filter-options input {
    accent-color: var(--text);
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    margin: 0;
}

.filter-options label span {
    min-width: 0;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.filter-options label[hidden] {
    display: none;
}

.filter-disclosure {
    margin-top: 10px;
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 12px;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

dialog.filter-dialog {
    overflow: hidden;
}

.filter-dialog__header {
    flex-shrink: 0;
}

.filter-dialog .filter-form {
    min-height: 0;
    overflow-y: auto;
    padding: 0 4px 84px 0;
    overscroll-behavior: contain;
}

.filter-apply-floating {
    position: absolute;
    bottom: auto;
    right: auto;
    width: max-content;
    max-width: calc(100% - 16px);
    z-index: 5;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
    transition: background-color .2s, color .2s, box-shadow .2s;
}

.filter-apply-floating[hidden] {
    display: none;
}

/* One segmented scale for catalog, favorites, modal and SEO detail. */
.price-scale .price-scale-track {
    display: flex;
    gap: 0;
    height: 6px;
    background: linear-gradient(to right, rgba(166, 133, 62, .04), rgba(166, 133, 62, .5));
    border-radius: 3px;
}

.price-scale-track::before,
.price-scale-track::after {
    content: none;
}

.price-scale-segment + .price-scale-segment::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 2px;
    height: 8px;
    background: rgb(255 255 255);
    border-radius: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.price-scale-segment + .price-scale-segment::before { left: 0; }

.price-scale-segment,
.price-scale-legend-item {
    --range-color: #dbd8d2;
}

.price-scale-segment:nth-child(2), .price-scale-legend-item:nth-child(2) { --range-color: #c7c4be; }
.price-scale-segment:nth-child(3), .price-scale-legend-item:nth-child(3) { --range-color: #aaa7a2; }
.price-scale-segment:nth-child(4), .price-scale-legend-item:nth-child(4) { --range-color: #8c8985; }
.price-scale-segment:nth-child(5), .price-scale-legend-item:nth-child(5) { --range-color: #6b6966; }
.price-scale-segment:nth-child(6), .price-scale-legend-item:nth-child(6) { --range-color: #454441; }

.price-scale-segment {
    position: relative;
    flex-basis: 0;
    min-width: 0;
    border-radius: 3px;
    background: transparent;
}

.price-scale-segment.is-current {
    outline: 0;
}

.price-scale .price-scale-marker {
    background: var(--text);
    border: 0;
    opacity: .65;
    box-shadow: none;
}

.price-scale.price-scale-compact {
    width: 100%;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 0 8px;
}

.price-scale-category {
    width: 100%;
    color: var(--text-light);
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
}

.price-scale.price-scale-detailed {
    width: 100%;
    height: auto;
    margin-top: 0;
    gap: 8px;
    padding: 0;
    align-items: flex-start;
}

.price-scale-detailed .price-scale-track { width: 50%; }
.price-scale-prefix-short { display: none; }

@media (max-width: 767px) {
    .decor-card__body .price-scale { display: none; }
    .decor-card__body:not(:has(.decor-card__status)) { display: none; }
    .price-scale-compact .price-scale-prefix-full { display: none; }
    .price-scale-compact .price-scale-prefix-short { display: inline; }
    .price-scale-compact .price-scale-category { display: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .decor-card .catalog-favorite-tags { padding-left: 8px; padding-right: 8px; }
    .favorite-tags .remove-tag { display: none; }
}
.price-scale-detailed .price-scale-category { text-align: left; font-size: 12px; }

.price-scale-legend {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
    width: 100%;
}

.price-scale-legend-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
    color: var(--text-light);
    font-size: 11px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.price-scale-legend-item.is-current {
    color: var(--text);
    font-weight: 600;
}

.price-scale-legend-dot {
    flex: 0 0 6px;
    height: 6px;
    margin-top: 4px;
    border-radius: 50%;
    background: var(--range-color);
}

.filter-dialog__actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

dialog.detail-overlay:not([open]) {
    display: none;
}

dialog.detail-overlay[open] {
    display: flex;
    opacity: 1;
    visibility: visible;
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    border: 0;
    padding: 0;
}

dialog.detail-overlay::backdrop {
    background: rgba(244, 244, 242, 0.98);
    backdrop-filter: blur(20px);
}

.detail-image > a {
    display: block;
    width: 100%;
    height: 100%;
}

.detail-image-inner {
    object-fit: cover;
    display: block;
}

.detail-nav-back {
    color: var(--text);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 12px;
}

.detail-page {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-page .detail-container {
    box-shadow: 0 30px 60px rgba(0, 0, 0, .15);
}

.combo-swatch {
    position: relative;
    overflow: hidden;
    display: block;
}

.combo-swatch img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.combo-swatch small {
    position: absolute;
    inset: auto 3px 3px;
    padding: 2px 4px;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    font-size: 8px;
}

.screen-warning {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    max-width: calc(100% - 32px);
    overflow-wrap: anywhere;
    margin: 0;
    padding: 6px 10px 4px;
    font-size: 10px;
    border-radius: 8px;
    color: rgba(255, 255, 255, .9);
    background: rgba(0, 0, 0, .38);
    backdrop-filter: blur(6px);
    pointer-events: none;
    text-align: right;
}

.favorites-header {
    margin-bottom: 28px;
}

.favorites-toolbar [data-favorites-summary] {
    margin-left: auto;
    color: var(--text-light);
    font-size: 13px;
}

.mode-btn[aria-pressed="true"] {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}

.tag-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -16px 0 24px;
}

.favorites-gallery .card {
    min-width: 0;
}

.favorites-gallery .decor-card:hover .drag-handle {
    opacity: 1;
}

.favorites-view .drag-handle {
    z-index: 4;
    opacity: 1;
    touch-action: none;
}

.favorites-view .drag-handle svg {
    width: 18px; /* 000 */
    height: 18px;
    fill: currentColor;
}



.favorites-view .drag-handle:active {
    cursor: grabbing;
}

.favorites-view .is-dragging {
    opacity: .55;
}

.favorite-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 0 12px 12px;
}

.favorite-tags[hidden] {
    display: none;
}

.decor-card__tags-row {
    display: flex;
    align-items: center;
    flex: 0 0 39px;
    min-width: 0;
    height: 39px;
    border-top: 1px solid var(--line);
}

.catalog-favorite-tags {
    flex: 1 1 0;
    flex-wrap: nowrap;
    align-items: center;
    min-width: 0;
    min-height: 39px;
    overflow-x: auto;
    padding: 5px 16px; /* 000 */
    scrollbar-width: none;
}

.catalog-favorite-tags::-webkit-scrollbar {
    display: none;
}

.catalog-favorite-tags .tag,
.catalog-favorite-tags .add-tag-btn {
    flex: 0 0 auto;
}

.detail-favorite-tags {
    max-width: 280px;
    padding: 0;
}

.favorite-tags .tag {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    border-radius: 20px;
    padding: 0 4px;
    min-height: 28px;
    background: var(--bg);
    font-size: 10px;
}

.favorite-tags .tag-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
    font: inherit;
    min-height: 28px;
}

.favorite-tags .tag-name:focus-visible,
.tag-filter-edit:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: -2px;
}

.favorite-tags .tag-name:hover {
    text-decoration: underline;
}

.tag-filter-group {
    display: inline-flex;
    align-items: stretch;
    min-width: 0;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 20px;
}

.tag-filter-list .filter-chip {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.tag-filter-group .filter-chip {
    border: 0;
    border-radius: 20px 0 0 20px;
}

.tag-filter-edit {
    flex: 0 0 32px;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0 20px 20px 0;
    min-height: 32px;
    background: transparent;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
}

.tag-filter-edit:hover { background: rgba(0, 0, 0, .04); }

.tag-edit-dialog {
    margin: auto;
    width: min(440px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--text);
    background: var(--card-bg);
}

.tag-edit-dialog::backdrop { background: rgba(0, 0, 0, .3); }
.tag-edit-dialog h2 { font-size: 22px; margin-bottom: 12px; }
.tag-edit-dialog p { margin-bottom: 16px; font-size: 14px; overflow-wrap: anywhere; }
.tag-edit-current { font-weight: 600; }
.tag-edit-dialog label { display: block; font-size: 14px; }
.tag-edit-dialog input {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font: 16px var(--font-sans);
}
.tag-edit-error { color: #8d2d22; margin-top: 12px; }
.tag-edit-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.favorite-tags button {
    border: 0;
    background: var(--bg);
    border-radius: 20px;
    padding: 4px 8px;
    font-size: 10px;
    cursor: pointer;
}

.favorite-tags .remove-tag {
    flex: 0 0 28px;
    width: 28px;
    min-height: 28px;
    padding: 0;
    background: transparent;
    opacity: .6;
}

.favorite-tags .add-tag-btn {
    border: 1px dashed var(--line);
    background: transparent;
    color: var(--text-light);
}

.spec-icon svg,
.spec-icon img {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}

.favorite-select {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 0 12px 12px;
    font-size: 11px;
}

.favorite-mosaic-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.favorite-mosaic-item a,
.favorite-mosaic-item img {
    display: block;
    width: 100%;
    height: 100%;
}

.favorite-mosaic-item img {
    object-fit: cover;
}

.favorite-mosaic-status {
    position: absolute;
    inset: auto 6px 6px;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    padding: 3px 6px;
    font-size: 10px;
}

.favorites-compare {
    display: flex;
    gap: 0;
    overflow-x: auto;
    align-items: stretch;
    margin-bottom: 40px;
    padding-bottom: 20px;
}

.favorites-compare .decor-card {
    flex: 0 0 clamp(240px, 25%, 320px);
    min-width: 0;
    border-radius: 0;
}

.favorites-compare .card-img-inner {
    width: 100%;
}

.favorites-compare .decor-card:hover {
    transform: none;
}

.favorites-compare table {
    border-collapse: collapse;
    min-width: 100%;
    background: rgba(255, 255, 255, .45);
}

.favorites-compare th,
.favorites-compare td {
    min-width: 150px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.favorites-compare th {
    position: sticky;
    left: 0;
    background: var(--bg);
    font-family: var(--font-mono);
}

.favorites-compare img {
    width: 120px;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.compare-heading {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.compare-heading a {
    color: var(--text);
    font-family: var(--font-mono);
}

.missing-favorite {
    padding: 24px;
    background: rgba(255, 255, 255, .5);
    color: var(--text-light);
}

.favorites-empty {
    padding: 60px 20px;
    text-align: center;
}

.drag-handle {
    z-index: 3;
    border: 0;
}

.share-dialog {
    border: 0;
    border-radius: 20px;
    padding: 28px;
    width: min(440px, calc(100vw - 32px));
    color: var(--text);
}

.share-dialog::backdrop {
    background: rgba(0, 0, 0, .25);
    backdrop-filter: blur(8px);
}

.share-dialog form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.share-dialog h2 {
    font-family: var(--font-mono);
    font-weight: 400;
}

.share-dialog label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
}

.share-dialog input,
.share-dialog select {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
}

.notice {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 500;
    transform: translateX(-50%);
    padding: 10px 18px;
    color: #fff;
    background: var(--text);
    border-radius: 40px;
    font-family: var(--font-mono);
    font-size: 12px;
}

.notice--error {
    background: #8d2d22;
}

.name-tooltip {
    position: fixed;
    left: 50%;
    bottom: 84px;
    z-index: 1100;
    width: max-content;
    max-width: calc(100vw - 32px);
    transform: translateX(-50%);
    padding: 10px 14px;
    border-radius: 12px;
    color: #fff;
    background: var(--text);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    font-family: var(--font-mono);
    font-size: 13px;
    text-align: center;
}

.home-page {
    margin-left: 0;
    padding: 40px 20px 100px;
    max-width: 1400px;
    margin-right: auto;
}

.home-hero {
    min-height: 58vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 48px;
    align-items: center;
}

.home-hero__content h1 {
    max-width: 820px;
    font: 400 clamp(36px, 6vw, 76px)/1.02 var(--font-mono);
    letter-spacing: -.05em;
}

.eyebrow {
    color: var(--text-light);
    font: 11px var(--font-mono);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 14px;
}

.home-hero__lead {
    max-width: 650px;
    margin-top: 22px;
    color: var(--text-light);
    font-size: 17px;
}

.home-search {
    display: flex;
    max-width: 680px;
    margin-top: 30px;
    background: rgba(255, 255, 255, .6);
    border: 1px solid var(--line);
    border-radius: 48px;
    padding: 5px;
}

.home-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 10px 16px;
    font: inherit;
}

.button {
    padding: 11px 22px;
    border: 1px solid var(--line);
    border-radius: 40px;
    color: #fff;
    background: var(--text);
    text-decoration: none;
    font: 13px var(--font-mono);
    cursor: pointer;
}

.button--ghost, .button--secondary {
    color: var(--text);
    background: transparent;
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    margin-bottom: 48px;
}

.home-stat {
    margin-bottom: 48px;
    padding: 30px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .55);
}

.home-stat strong {
    display: block;
    font: 64px var(--font-mono);
}

.home-stat span, .home-stat small {
    display: block;
    color: var(--text-light);
}

.home-steps, .home-note {
    padding: 48px 0;
    border-top: 1px solid var(--line);
}

.home-steps {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0 48px;
}

.home-steps__eyebrow {
    grid-column: 1;
}

.home-steps__row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
    align-items: start;
}

.home-note {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0 48px;
}

.home-note__eyebrow {
    grid-column: 1;
}

.home-note__row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
    align-items: start;
}

.home-steps h2, .home-note h2 {
    font: 400 28px var(--font-mono);
}

.home-steps ol {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.home-steps li {
    padding: 22px;
    background: rgba(255, 255, 255, .48);
    border-radius: 12px;
}

.home-steps li strong, .home-steps li span {
    display: block;
}

.home-steps li strong {
    font-family: var(--font-mono);
    margin-bottom: 8px;
}

.home-steps li span, .home-note__row > p {
    color: var(--text-light);
}

@media (min-width: 768px) {
    .home-page,
    .favorites-page {
        width: min(calc(100% - var(--nav-width)), 1400px);
        margin-left: calc(var(--nav-width) + max(0px, (100% - var(--nav-width) - 1400px) / 2));
        margin-right: 0;
    }

    .home-page {
        padding: 60px 40px 100px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .home-steps__row {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 767px) {
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
    }

    .catalog-header {
        padding: 0 20px;
    }

    .catalog-header h1 {
        font-size: 28px;
    }

    .catalog-grid[data-columns] {
        --grid-columns: 2;
    }

    .favorites-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .favorites-gallery .drag-handle,
    .favorites-mosaic .drag-handle {
        opacity: 1;
    }

    dialog.desktop-filter-panel {
        width: 100%;
        max-width: none;
        min-width: 0;
        height: min(78vh, 700px);
        top: auto;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
    }

    dialog.desktop-filter-panel[open] {
        transform: translateY(0);
    }

    .detail-page {
        padding: 20px 10px 90px;
    }

    .detail-page .detail-container {
        width: 100%;
        height: auto;
        max-height: none;
    }

    dialog.detail-overlay[open] {
        align-items: stretch;
        justify-content: stretch;
    }

    dialog.detail-overlay .detail-container {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
        box-shadow: none;
    }

    dialog.detail-overlay .detail-content {
        padding: 16px;
    }

    dialog.detail-overlay .detail-nav {
        top: -16px;
        margin: -16px -16px 0;
        padding: 12px 16px 6px;
    }

    .screen-warning {
        top: 12px;
        right: auto;
        bottom: auto;
        left: 12px;
        max-width: calc(100% - 24px);
        text-align: left;
    }

    .home-page {
        padding-top: 32px;
    }

    .home-hero {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .home-hero__content h1 {
        font-size: 38px;
    }

    .home-stat {
        display: none;
    }

    .home-search {
        flex-direction: column;
        border-radius: 18px;
    }

    .home-steps {
        grid-template-columns: 1fr;
    }

    .home-steps__eyebrow {
        grid-column: 1;
    }

    .home-steps__row {
        grid-column: 1;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .home-note {
        grid-template-columns: 1fr;
    }

    .home-note__eyebrow {
        grid-column: 1;
    }

    .home-note__row {
        grid-column: 1;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .home-steps ol {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 767px) { /* 000 */
    .drag-handle {
        width: 28px;
        height: 28px;
    }

    .favorites-view .drag-handle svg {
        width: 10px;
        height: 19px;
        fill: currentColor;
    }
}

/* A permanent group article is shared by every card presentation. */
.decor-card__meta { display: flex; align-items: baseline; gap: 4px; flex-shrink: 0; }
.decor-card__meta .decor-card__brand { flex: 0 1 auto; width: fit-content; max-width: 100%; min-width: 0; padding: 2px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.decor-card__article { flex: 0 0 auto; padding: 0 10px 0 4px; color: #888; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.detail-article { margin-top: 6px; color: #777; font-size: 14px; font-variant-numeric: tabular-nums; }

/* Shared action dimensions, without changing toolbar or modal controls. */
.decor-card .action-btn, .favorites-view .drag-handle { width: 28px; height: 28px; padding: 0; }
.decor-card .action-btn svg, .favorites-view .drag-handle svg { width: 13px; height: 13px; }

.tag-picker-dialog fieldset { border: 0; margin-bottom: 16px; min-width: 0; }
.tag-picker-dialog legend { font-size: 14px; margin-bottom: 8px; }
.tag-picker-options { display: grid; gap: 8px; max-height: 32dvh; overflow-y: auto; }
.tag-picker-options label { display: flex; align-items: flex-start; gap: 8px; }
.tag-picker-options span { min-width: 0; overflow-wrap: anywhere; }
.tag-picker-options input[type="checkbox"] { flex: 0 0 16px; width: 16px; height: 16px; padding: 0; margin-top: 2px; }

.share-dialog { position: relative; margin: auto; max-height: calc(100dvh - 32px); overflow-y: auto; }
.share-dialog-close { position: absolute; right: 14px; top: 10px; width: 36px; height: 36px; border: 0; background: transparent; font-size: 26px; cursor: pointer; }
.share-dialog h2 { padding-right: 30px; }
.share-dialog fieldset { border: 0; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
[data-share-selection] { max-height: 200px; overflow-y: auto; }
[data-share-selection] label { display: flex; flex-direction: row; align-items: center; gap: 8px; padding: 8px 0; }
[data-share-selection] input { flex: 0 0 auto; }
[data-share-selection] span { overflow-wrap: anywhere; }
[data-share-message] { font-size: 13px; overflow-wrap: anywhere; }
[data-share-message][role="alert"] { color: #8d2d22; }
[data-share-result] { display: flex; flex-direction: column; gap: 12px; }
[data-share-url] { width: 100%; min-width: 0; }
.library-tabs, .library-actions { display:flex; gap:8px; flex-wrap:wrap; margin:16px 0; }
.library-tabs [aria-pressed="true"] { background:var(--accent, #a52d48); color:white; }
.library-panel { padding:16px; border:1px solid #ddd; border-radius:12px; min-width:0; }
.library-panel label { display:flex; flex-direction:column; gap:6px; }
.library-panel select { max-width:100%; width:100%; padding:10px; }
.collection-comment { white-space:pre-wrap; overflow-wrap:anywhere; margin:12px 0; }
.favorites-header h1 { overflow-wrap:anywhere; min-width:0; }
.library-remove { display:block; margin:8px; padding:6px 10px; background:#fff; border:1px solid #ccc; border-radius:6px; cursor:pointer; }
.favorite-mosaic-item .library-remove { position:absolute; bottom:4px; left:4px; right:4px; margin:0; padding:4px; font-size:11px; z-index:2; }
.favorite-mosaic-item[data-library-item] .favorite-mosaic-status { bottom:32px; }
.share-dialog textarea { width:100%; padding:10px; border:1px solid #ccc; border-radius:8px; font:inherit; resize:vertical; }
[data-picker-items] { display:grid; gap:10px; max-height:45dvh; overflow-y:auto; margin:16px 0; }
[data-picker-items] label, [data-project-include] { display:flex; gap:8px; align-items:center; }
[data-picker-items] input, [data-project-include] input { width:auto; }
[data-library-message]:empty { display:none; }
.library-info { margin:12px 0; font-size:13px; color:#666; overflow-wrap:anywhere; }

.scroll-top {
    position: fixed;
    right: 28px;
    bottom: 24px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text);
    box-shadow: 0 3px 14px rgba(0, 0, 0, .16);
    cursor: pointer;
}
.scroll-top[hidden] { display: none; }
.scroll-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.scroll-top:hover { background: var(--bg); }
.scroll-top:focus-visible, .layout-controls .ctrl-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
body:has(dialog[open]) .scroll-top { visibility: hidden; }
@media (max-width: 767px) {
    .scroll-top { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* Favorites workspace controls; shared decor cards retain their own styles. */
.favorites-page > .library-tabs {
    flex-wrap: nowrap;
    gap: 28px;
    margin: 0 0 32px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    scrollbar-width: thin;
}
.library-tabs .library-tab {
    flex: 0 0 auto;
    padding: 12px 0 15px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--text-light);
    font: 14px var(--font-sans);
    cursor: pointer;
    white-space: nowrap;
}
.library-tabs .library-tab[aria-pressed="true"] { border-bottom-color: var(--text); color: var(--text); background: transparent; }
.library-tabs .library-tab:hover { color: var(--text); }
.favorites-page > .favorites-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 28px; }
.favorites-heading { min-width: 0; }
.favorites-page .favorites-actions { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 10px; margin: 0; flex: 0 0 auto; max-width: 50%; }
.workspace-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: rgba(255, 255, 255, .6);
    font: 13px var(--font-sans);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
}
.workspace-button--primary { color: #fff; background: var(--text); border-color: var(--text); }
.workspace-button:hover { opacity: .85; }
.workspace-button:disabled { opacity: .45; cursor: default; }
.workspace-popup { position: relative; min-width: 0; }
.workspace-popup > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; cursor: pointer; list-style: none; background: rgba(255, 255, 255, .55); }
.workspace-popup > summary::-webkit-details-marker { display: none; }
.favorites-more > summary { background: transparent; border-color: transparent; }
.workspace-popup__panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; width: min(320px, calc(100vw - 40px)); max-height: min(360px, 50dvh); overflow-y: auto; padding: 6px; background: var(--card-bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.favorites-menu { left: auto; right: 0; width: min(260px, calc(100vw - 40px)); }
.favorites-menu button { display: block; width: 100%; min-height: 42px; padding: 10px 12px; border: 0; border-radius: 4px; background: transparent; color: var(--text); font: 13px var(--font-sans); text-align: left; cursor: pointer; }
.favorites-menu button:hover { background: var(--bg); }
.favorites-menu .workspace-danger { color: #8d2d22; }
.favorites-page > .library-panel { border: 0; border-radius: 0; padding: 0; margin-bottom: 24px; }
.library-controls { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.library-controls label { flex: 1 1 260px; max-width: 480px; min-width: 0; color: var(--text-light); font-size: 12px; }
.library-controls select { min-height: 42px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: rgba(255, 255, 255, .6); font: 14px var(--font-sans); }
.library-panel .collection-comment:empty { display: none; }
.library-panel .collection-comment { margin: 16px 0 0; color: var(--text-light); font-size: 14px; line-height: 1.6; }
.favorites-page > .favorites-toolbar { flex-direction: row; padding: 14px 0; margin-bottom: 24px; gap: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; backdrop-filter: none; justify-content: space-between; }
.favorites-tag-menu { width: 220px; max-width: 100%; }
[data-tag-filter-label] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favorites-tag-menu .tag-filter-list { display: block; margin: 0; }
.favorites-tag-menu .tag-filter-group { display: grid; grid-template-columns: minmax(0, 1fr) 38px; width: 100%; border: 0; border-radius: 0; }
.favorites-tag-menu .tag-filter-option { position: relative; display: block; width: 100%; min-width: 0; min-height: 42px; padding: 10px 32px 10px 12px; border: 0; border-radius: 4px; background: transparent; color: var(--text); font: 14px var(--font-sans); text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.favorites-tag-menu .tag-filter-option:hover, .favorites-tag-menu .tag-filter-option[aria-pressed="true"] { background: var(--bg); }
.favorites-tag-menu .tag-filter-option[aria-pressed="true"]::after { content: '✓'; position: absolute; right: 10px; top: 12px; font-size: 12px; }
.favorites-tag-menu .tag-filter-edit { border: 0; border-radius: 4px; min-height: 42px; font-size: 16px; }
.favorites-toolbar .mode-switch { gap: 4px; }
.favorites-toolbar .mode-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 10px 12px; border: 0; border-radius: 6px; font: 13px var(--font-sans); color: var(--text-light); background: transparent; }
.favorites-toolbar .mode-btn[aria-pressed="true"] { color: var(--text); background: rgba(0, 0, 0, .06); }
.favorites-toolbar .mode-btn:hover { color: var(--text); }
.mode-btn svg { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.favorites-mode-select { display: none; }
.favorites-page > .library-info { margin: 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-light); font-size: 12px; line-height: 1.6; }
.favorites-page ~ .share-dialog .btn { border-radius: 8px; }
.library-tab:focus-visible, .workspace-button:focus-visible, .workspace-popup summary:focus-visible, .workspace-popup button:focus-visible, .favorites-toolbar .mode-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
@media (max-width: 767px) {
    .favorites-page > .library-tabs { gap: 24px; margin-bottom: 24px; }
    .library-tabs .library-tab { font-size: 13px; }
    .favorites-page > .favorites-header { flex-direction: column; gap: 18px; margin-bottom: 24px; }
    .favorites-page .favorites-actions { position: relative; max-width: 100%; width: 100%; }
    .favorites-more { position: static; }
    .favorites-heading h1 { font-size: 28px; }
    .favorites-page > .favorites-toolbar { gap: 10px; flex-wrap: nowrap; }
    .favorites-toolbar .mode-switch { display: none; }
    .favorites-tag-menu { flex: 1 1 0; width: auto; }
    .favorites-mode-select { display: block; flex: 1 1 0; min-width: 0; }
    .favorites-mode-select select { width: 100%; min-height: 42px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .55); color: var(--text); font: 12px var(--font-sans); }
    .favorites-tag-menu > summary { padding: 10px; gap: 6px; }
    .library-controls label { flex-basis: 100%; max-width: none; }
    .library-controls .workspace-button { flex: 1 1 auto; }
}

/* Manufacturer directory and catalogue introductions. */
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 24px; color: var(--text-light); font-size: 13px; }
.breadcrumbs a, .brand-official, .brand-about a, .catalog-header__description a, .brand-entry a, .manufacturer-link a { color: inherit; text-underline-offset: 4px; }
.brands-header { max-width: 760px; margin-bottom: 36px; }
.brands-header h1 { font: 400 36px/1.15 var(--font-mono); margin-bottom: 14px; }
.brands-header p, .brand-summary { color: var(--text-light); line-height: 1.65; }
.brands-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.brand-entry { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; min-width: 0; padding: 32px; background: var(--card-bg); border: 1px solid var(--line); border-radius: 8px; }
.brand-entry h2 { font: 400 26px var(--font-mono); }
.brand-entry h2 a { text-decoration: none; }
.brand-entry p { color: var(--text-light); line-height: 1.65; }
.brand-entry__link { display: flex; justify-content: space-between; align-items: center; gap: 24px; width: 100%; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); text-decoration: none; font-size: 14px; }
.brand-entry__logo { max-width: 180px; height: 48px; object-fit: contain; }
.brand-summary { max-width: 860px; margin: 18px 0 12px; }
.brand-official { display: inline-block; font-size: 13px; }
.brand-about { max-width: 860px; padding-top: 28px; margin-top: 36px; border-top: 1px solid var(--line); }
.brand-about h2 { font: 400 26px var(--font-mono); margin-bottom: 18px; }
.brand-about p { color: var(--text-light); line-height: 1.75; margin-bottom: 16px; }
.brand-about a { font-size: 13px; }
.catalog-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 24px 0; }
.catalog-pagination a, .catalog-pagination span { min-width: 36px; padding: 8px; text-align: center; color: var(--text); }
.catalog-pagination [aria-current] { font-weight: 700; }
[data-catalog-enhanced] .catalog-pagination { display: none; }
@media (max-width: 767px) {
    .brands-grid { grid-template-columns: 1fr; gap: 16px; }
    .brand-entry { padding: 24px; }
    .brands-header h1 { font-size: 28px; }
    .brand-summary { font-size: 14px; }
}
