:root {
    --bg: #f6f2ed;
    --bg-soft: rgba(255, 255, 255, 0.7);
    --panel: rgba(255, 255, 255, 0.84);
    --panel-strong: rgba(255, 255, 255, 0.96);
    --line: rgba(70, 61, 54, 0.10);
    --line-strong: rgba(70, 61, 54, 0.16);
    --text: #1f2428;
    --muted: #66707a;
    --soft: #8d949d;
    --green: #2f8f5b;
    --green-bg: rgba(47, 143, 91, 0.12);
    --yellow: #b9821f;
    --yellow-bg: rgba(185, 130, 31, 0.12);
    --red: #c45757;
    --red-bg: rgba(196, 87, 87, 0.14);
    --accent: #b8a88d;
    --accent-2: #d7c8b8;
    --shadow: 0 24px 70px rgba(56, 44, 32, 0.10);
    --shadow-soft: 0 12px 30px rgba(56, 44, 32, 0.08);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 10%, rgba(217, 206, 188, 0.35), transparent 28%),
        radial-gradient(circle at 90% 0%, rgba(189, 214, 205, 0.26), transparent 22%),
        linear-gradient(180deg, #faf7f3 0%, #f3efe9 100%);
}

button, input {
    font: inherit;
}

button {
    cursor: pointer;
}

.page-shell {
    position: relative;
    min-height: 100vh;
    padding: 28px;
    overflow: hidden;
}

.ambient {
    position: fixed;
    inset: auto;
    border-radius: 999px;
    filter: blur(40px);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}

.ambient-a {
    width: 420px;
    height: 420px;
    right: -120px;
    top: 80px;
    background: rgba(208, 224, 214, 0.45);
}

.ambient-b {
    width: 360px;
    height: 360px;
    left: -120px;
    bottom: 40px;
    background: rgba(226, 214, 197, 0.55);
}

.hero,
.workspace {
    position: relative;
    z-index: 1;
}

.hero {
    display: grid;
    gap: 24px;
    align-items: end;
    margin-bottom: 24px;
}

.hero-search-full {
    width: 100%;
}

.eyebrow-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.hero-copy,
.hero-search,
.panel,
.stat-card,
.product-card {
    backdrop-filter: blur(14px);
}

.hero-copy {
    padding: 8px 2px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.hero h1 {
    margin: 0 0 12px;
    font-family: "Fraunces", serif;
    font-size: clamp(2.2rem, 3.6vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    max-width: 12ch;
}

.hero p {
    margin: 0;
    max-width: 62ch;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--muted);
}

.hero-search {
    padding: 22px;
    border-radius: var(--radius-xl);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero-search label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: #2d343a;
}

.search-row {
    display: flex;
    gap: 12px;
}

.search-box {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 18px;
    background: var(--panel-strong);
    border: 1px solid var(--line-strong);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
    padding: 0 14px;
}

.search-icon {
    color: var(--accent);
    font-size: 1.1rem;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 18px 0;
    color: var(--text);
}

.search-box input::placeholder {
    color: #98a0a8;
}

.icon-btn,
.secondary-btn,
.text-btn {
    border: 0;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(128, 112, 92, 0.08);
    color: var(--muted);
}

.secondary-btn {
    padding: 0 16px;
    border-radius: 16px;
    background: #eadfce;
    color: #463b30;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(129, 103, 70, 0.12);
}

.text-btn {
    padding: 0;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
}

.icon-btn:hover,
.secondary-btn:hover,
.text-btn:hover {
    transform: translateY(-1px);
}

.search-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

.workspace {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.filter-rail,
.detail-rail {
    min-width: 0;
}

.feed {
    min-width: 0;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.panel-soft {
    padding: 18px;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.panel-title h2 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.filter-list {
    display: grid;
    gap: 16px;
}

.filter-groups {
    display: grid;
    gap: 16px;
}

.filter-group {
    padding: 14px;
    border-radius: 20px;
    background: rgba(255,255,255,0.58);
    border: 1px solid rgba(70,61,54,0.08);
}

.filter-group-head h3 {
    margin: 0 0 6px;
    font-size: 0.98rem;
}

.filter-group-head p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.filter-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    position: relative;
    width: auto;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(101, 87, 72, 0.12);
    background: rgba(255, 255, 255, 0.65);
    color: var(--text);
    text-align: left;
    font-weight: 700;
}

.filter-chip.active {
    border-color: rgba(71, 113, 86, 0.28);
    background: rgba(237, 246, 240, 0.95);
    box-shadow: 0 14px 26px rgba(71, 113, 86, 0.10);
}

.mini-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 18px;
}

.mini-summary > div,
.mini-summary > div {
    padding: 14px;
}

.mini-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mini-summary strong {
    font-size: 1.25rem;
}

.unit-price-filter {
    margin-top: 18px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255,255,255,0.58);
    border: 1px solid rgba(70,61,54,0.08);
}

.unit-price-filter input[type="range"] {
    width: 100%;
    margin-top: 12px;
    accent-color: var(--green);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.84rem;
    color: var(--muted);
}

.sort-control {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.sort-control label {
    font-size: 0.84rem;
    color: var(--muted);
    font-weight: 700;
}

.sort-control select {
    width: 100%;
    border: 1px solid rgba(70,61,54,0.12);
    background: rgba(255,255,255,0.82);
    color: var(--text);
    border-radius: 14px;
    padding: 12px 14px;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.product-card {
    position: relative;
    border-radius: 24px;
    background: rgba(255,255,255,0.82);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
    animation: cardIn 320ms ease both;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(56, 44, 32, 0.12);
    border-color: rgba(95, 88, 79, 0.18);
}

.product-card.selected {
    border-color: rgba(47, 143, 91, 0.35);
    box-shadow: 0 0 0 1px rgba(47, 143, 91, 0.15), var(--shadow-soft);
}

.product-media {
    position: relative;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(70, 61, 54, 0.08);
    background: linear-gradient(180deg, rgba(250, 247, 242, 0.8), rgba(255,255,255,0.5));
}

.product-image {
    width: 82px;
    height: 110px;
    border-radius: 20px;
    overflow: hidden;
    flex: 0 0 auto;
    background: #efe7db;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 14px 25px rgba(56, 44, 32, 0.15);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-headline {
    min-width: 0;
}

.product-headline h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.product-subline {
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 10px;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.badge-safe { background: rgba(47, 143, 91, 0.11); color: var(--green); }
.badge-vegan { background: rgba(102, 128, 109, 0.12); color: #4f765d; }
.badge-fragrance { background: rgba(185, 130, 31, 0.12); color: var(--yellow); }
.badge-sensitive { background: rgba(89, 126, 170, 0.12); color: #5a78a0; }

.product-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
    align-items: stretch;
}

.metric {
    padding: 12px;
    border-radius: 16px;
    background: rgba(251, 250, 248, 0.9);
    border: 1px solid rgba(70, 61, 54, 0.08);
    display: flex;
    flex-direction: column;
    min-height: 88px;
}

.metric span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    margin-bottom: 6px;
    line-height: 1.25;
    min-height: 2.5em;
}

.metric strong {
    font-size: 1.25rem;
    line-height: 1;
    margin-top: auto;
}

.highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.highlight {
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid rgba(70, 61, 54, 0.1);
}

.highlight-good { background: var(--green-bg); color: var(--green); }
.highlight-neutral { background: var(--yellow-bg); color: var(--yellow); }
.highlight-bad { background: var(--red-bg); color: var(--red); }

.product-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.primary-btn {
    flex: 1;
    border: 0;
    border-radius: 16px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #dfc9af, #c7b08d);
    color: #2b231b;
    font-weight: 800;
    box-shadow: 0 12px 22px rgba(109, 82, 51, 0.14);
}

.compare-toggle {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    border: 1px solid rgba(70, 61, 54, 0.12);
    background: rgba(255,255,255,0.82);
    color: var(--muted);
}

.compare-toggle.active {
    background: rgba(47, 143, 91, 0.12);
    color: var(--green);
    border-color: rgba(47, 143, 91, 0.28);
}

.compare-panel {
    margin-top: 16px;
}

.compare-empty {
    color: var(--muted);
    line-height: 1.7;
    padding: 14px 0 4px;
}

.compare-table-wrap {
    overflow: auto;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.compare-table th,
.compare-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(70, 61, 54, 0.08);
    text-align: left;
    vertical-align: top;
}

.compare-table th {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 700;
}

.compare-table td {
    font-size: 0.95rem;
}

.detail-panel {
    position: sticky;
    top: 18px;
    min-height: 520px;
}

.detail-empty {
    height: 100%;
    min-height: 520px;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
    gap: 14px;
    padding: 24px;
    color: var(--muted);
}

.detail-placeholder {
    width: 128px;
    height: 128px;
    display: grid;
    place-items: center;
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(223, 201, 175, 0.9), rgba(207, 222, 214, 0.95));
    color: #2c2c2c;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 18px 28px rgba(56, 44, 32, 0.14);
}

.detail-head {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(70, 61, 54, 0.08);
}

.detail-image {
    width: 128px;
    height: 168px;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 18px 34px rgba(56, 44, 32, 0.16);
}

.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-title {
    margin: 0 0 8px;
    font-family: "Fraunces", serif;
    font-size: 1.65rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.score-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(70, 61, 54, 0.1);
    font-weight: 800;
}

.score-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.detail-copy {
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

.analysis-grid {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.analysis-section {
    padding: 14px;
    border-radius: 20px;
    background: rgba(255,255,255,0.64);
    border: 1px solid rgba(70,61,54,0.08);
}

.analysis-section h3 {
    margin: 0 0 10px;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
}

.ingredient-list {
    display: grid;
    gap: 8px;
}

.ingredient-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.ingredient-tag {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ingredient-name {
    font-weight: 700;
    color: #2a3136;
}

.ingredient-detail {
    color: var(--muted);
    font-size: 0.88rem;
    margin-top: 2px;
}

.ingredient-green { background: var(--green-bg); color: var(--green); }
.ingredient-yellow { background: var(--yellow-bg); color: var(--yellow); }
.ingredient-red { background: var(--red-bg); color: var(--red); }

.compat-grid {
    display: grid;
    gap: 10px;
}

.compat-item {
    display: grid;
    gap: 6px;
}

.compat-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.88rem;
}

.progress {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(70, 61, 54, 0.08);
    overflow: hidden;
}

.progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.progress-green { background: linear-gradient(90deg, #95d2af, var(--green)); }
.progress-yellow { background: linear-gradient(90deg, #e0c074, var(--yellow)); }
.progress-red { background: linear-gradient(90deg, #e9a19d, var(--red)); }

.ingredient-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid rgba(70,61,54,0.08);
    background: rgba(255,255,255,0.66);
}

.pill-good { color: var(--green); background: var(--green-bg); }
.pill-warn { color: var(--yellow); background: var(--yellow-bg); }
.pill-bad { color: var(--red); background: var(--red-bg); }

.product-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 24px;
}

.product-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(33, 27, 22, 0.45);
    backdrop-filter: blur(10px);
}

.product-modal-card {
    position: relative;
    width: min(960px, 100%);
    max-height: min(88vh, 980px);
    overflow: auto;
    padding: 24px;
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(42, 30, 20, 0.28);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(70, 61, 54, 0.12);
    border-radius: 999px;
    background: rgba(255,255,255,0.88);
    color: var(--text);
    font-size: 1.35rem;
    line-height: 1;
}

.modal-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    padding-right: 56px;
    margin-bottom: 18px;
}

.modal-kicker {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 800;
}

.product-modal h2 {
    margin: 0 0 6px;
    font-family: "Fraunces", serif;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.modal-subtitle {
    margin: 0;
    color: var(--muted);
}

.modal-metrics {
    display: grid;
    gap: 10px;
    align-self: start;
}

.modal-metric {
    min-width: 180px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(70,61,54,0.08);
}

.modal-metric span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.78rem;
}

.modal-metric strong {
    font-size: 1.1rem;
}

.modal-summary {
    padding: 16px;
    border-radius: 22px;
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(70,61,54,0.08);
    margin-bottom: 18px;
}

.modal-summary h3,
.modal-section h3 {
    margin: 0 0 10px;
    font-size: 1rem;
}

.modal-summary p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.7;
}

.modal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-links .primary-btn,
.modal-links .secondary-btn {
    flex: 0 0 auto;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 14px;
}

.modal-section {
    padding: 16px;
    border-radius: 22px;
    background: rgba(255,255,255,0.64);
    border: 1px solid rgba(70,61,54,0.08);
}

.claim-list {
    display: grid;
    gap: 12px;
}

.claim-card {
    padding: 14px;
    border-radius: 18px;
    background: rgba(250,247,242,0.8);
    border: 1px solid rgba(70,61,54,0.08);
}

.claim-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    align-items: center;
}

.claim-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--green-bg);
    color: var(--green);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.claim-card h4 {
    margin: 0 0 8px;
    font-size: 0.96rem;
}

.claim-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 0.92rem;
}

.claim-card a {
    color: var(--green);
    font-size: 0.84rem;
    font-weight: 700;
}

.claim-empty {
    color: var(--muted);
    line-height: 1.65;
    font-size: 0.92rem;
}

.ingredient-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.synergy-panel {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(70,61,54,0.08);
}

.synergy-panel h4 {
    margin: 0 0 10px;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.synergy-list {
    display: grid;
    gap: 10px;
}

.synergy-card {
    padding: 12px;
    border-radius: 16px;
    background: rgba(250,247,242,0.85);
    border: 1px solid rgba(70,61,54,0.08);
}

.synergy-pill {
    background: rgba(47, 143, 91, 0.12);
}

.synergy-count {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.synergy-card h4 {
    margin: 0 0 8px;
    font-size: 0.96rem;
}

.synergy-card p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.9rem;
}

.synergy-ingredient-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.synergy-empty {
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.92rem;
}

.ingredient-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(70,61,54,0.08);
    font-size: 0.78rem;
    font-weight: 700;
}

.ingredient-green { background: var(--green-bg); color: var(--green); }
.ingredient-yellow { background: var(--yellow-bg); color: var(--yellow); }
.ingredient-red { background: var(--red-bg); color: var(--red); }

.hidden {
    display: none !important;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .product-grid {
        grid-template-columns: 1fr;
    }

    .filter-rail {
        display: grid;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .modal-hero,
    .modal-grid {
        grid-template-columns: 1fr;
    }

    .product-modal-card {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding: 16px;
    }

    .search-row {
        flex-direction: column;
    }

    .filter-rail {
        grid-template-columns: 1fr;
    }

    .mini-summary {
        grid-template-columns: 1fr;
    }

    .product-modal {
        padding: 12px;
    }

    .product-modal-card {
        padding: 18px;
        max-height: 92vh;
    }
}
