/* ═══════════════════════════════════════════════════════════════
   Jango — Outfit Recommender  |  Liquid Glass Fashion UI
   ═══════════════════════════════════════════════════════════════ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
    /* Palette */
    --bg:           #F8F7F4;
    --surface:      rgba(255, 255, 255, 0.72);
    --surface-solid:#FFFFFF;
    --glass:        rgba(255, 255, 255, 0.52);
    --glass-border: rgba(255, 255, 255, 0.88);
    --border:       rgba(0, 0, 0, 0.08);
    --border-med:   rgba(0, 0, 0, 0.12);

    /* Text */
    --text:         #1C1917;
    --text-strong:  #0C0A09;
    --text-muted:   #78716C;
    --text-faint:   #A8A29E;

    /* Accent — gold */
    --gold:         #CA8A04;
    --gold-dark:    #92400E;
    --gold-light:   rgba(202, 138, 4, 0.12);
    --gold-glow:    rgba(202, 138, 4, 0.22);

    /* Feedback */
    --success:      #15803D;
    --success-bg:   rgba(21, 128, 61, 0.08);
    --warning:      #D97706;
    --warning-bg:   rgba(217, 119, 6, 0.08);
    --error:        #DC2626;
    --error-bg:     rgba(220, 38, 38, 0.08);

    /* Typography */
    --font-display: 'Cormorant', Georgia, 'Times New Roman', serif;
    --font-body:    'Inter', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing scale */
    --space-1:  4px;
    --space-2:  8px;
    --space-3:  12px;
    --space-4:  16px;
    --space-5:  20px;
    --space-6:  24px;
    --space-8:  32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Radii */
    --r-sm:   8px;
    --r-md:   14px;
    --r-lg:   20px;
    --r-xl:   28px;
    --r-2xl:  40px;
    --r-full: 9999px;

    /* Shadows — warm, diffuse */
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.04), 0 1px 8px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 12px 32px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.09), 0 24px 56px rgba(0,0,0,0.08);
    --shadow-xl: 0 16px 40px rgba(0,0,0,0.12), 0 40px 80px rgba(0,0,0,0.10);
    --shadow-gold: 0 0 0 3px var(--gold-glow), 0 4px 16px rgba(202,138,4,0.18);

    /* Transitions */
    --ease-out:   cubic-bezier(0.2, 0.85, 0.2, 1);
    --ease-in:    cubic-bezier(0.4, 0, 1, 1);
    --ease-inout: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring:cubic-bezier(0.34, 1.56, 0.64, 1);
    --dur-fast:   150ms;
    --dur-med:    220ms;
    --dur-slow:   350ms;

    /* Navbar */
    --navbar-h: 68px;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    height: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--gold-light); color: var(--text-strong); }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-med); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* Focus */
:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--gold-glow);
    border-radius: var(--r-sm);
}

/* ── Glass Card Utility ───────────────────────────────────── */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-md);
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes riseIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(12px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to   { opacity: 0; transform: translateX(-50%) translateY(12px); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes dotPulse {
    0%, 80%, 100% { opacity: 0; transform: scale(0); }
    40%           { opacity: 1; transform: scale(1); }
}

/* ── NAVBAR ────────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--navbar-h);
    background: rgba(248, 247, 244, 0.80);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}
.navbar-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--space-8);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    color: inherit;
}
.brand-mark {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.brand-name {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-strong);
    letter-spacing: -0.02em;
    line-height: 1;
}
.brand-divider {
    width: 1px;
    height: 16px;
    background: var(--border-med);
    display: block;
}
.brand-sub {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}
.navbar-tech {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.tech-badge svg {
    animation: pulse-dot 2.4s ease-in-out infinite;
    color: var(--gold);
}

@media (max-width: 640px) {
    .navbar-inner { padding: 0 var(--space-4); }
    .brand-divider, .brand-sub { display: none; }
    .navbar-tech { display: none; }
}

/* ── HERO SECTION ──────────────────────────────────────────── */
.hero-section {
    padding: var(--space-12) var(--space-8) var(--space-8);
    max-width: 1440px;
    margin: 0 auto;
    animation: riseIn var(--dur-slow) var(--ease-out) both;
}
.hero-inner {
    width: 100%;
}
.hero-text {
    margin-bottom: var(--space-8);
}
.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    color: var(--text-strong);
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin-bottom: var(--space-4);
}
.hero-headline em {
    font-style: italic;
    color: var(--gold);
}
.hero-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 520px;
}

/* ── SELECTOR BAR ─────────────────────────────────────────── */
.selector-bar {
    padding: var(--space-5);
    animation: riseIn var(--dur-slow) var(--ease-out) 80ms both;
}
.selector-bar-inner {
    display: flex;
    gap: var(--space-4);
    align-items: flex-end;
}
.selector-field {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.selector-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin-bottom: var(--space-2);
}
.selector-icon { color: var(--gold); flex-shrink: 0; }

/* ── FILTER STRIP ──────────────────────────────────────────── */
.filter-strip {
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border);
    overflow: hidden;
}
.filter-strip-scroll {
    display: flex;
    gap: var(--space-4);
    align-items: flex-end;
    flex-wrap: wrap;
}
.filter-chip-group {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    flex: 1;
}
.filter-chip {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.filter-chip label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
}
.filter-chip-select,
.filter-chip input {
    height: 36px;
    padding: 0 32px 0 12px;
    background: rgba(0,0,0,0.03);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out),
                background var(--dur-fast) var(--ease-out);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    min-width: 90px;
}
.filter-chip input {
    padding: 0 12px;
    background-image: none;
}
.filter-chip-select:hover,
.filter-chip input:hover {
    border-color: var(--border-med);
    background-color: rgba(0,0,0,0.05);
}
.filter-chip-select:focus,
.filter-chip input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
    background-color: var(--surface-solid);
}
.filter-chip input::placeholder { color: var(--text-faint); }
.filter-chip input:focus { background-image: none; }

.price-range {
    display: flex;
    align-items: center;
    gap: 6px;
}
.price-range input {
    width: 80px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--r-full) !important;
    background-image: none !important;
    text-align: center;
}
.price-sep {
    font-size: 12px;
    color: var(--text-faint);
}

.filter-actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

@media (max-width: 768px) {
    .selector-bar-inner { flex-direction: column; }
    .filter-chip-group { width: 100%; }
    .filter-actions { width: 100%; justify-content: flex-end; }
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 42px;
    padding: 0 20px;
    border-radius: var(--r-full);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--dur-fast) var(--ease-out);
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    line-height: 1;
}
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
.btn-primary {
    background: var(--gold);
    color: #fff;
    box-shadow: 0 2px 10px rgba(202,138,4,0.25);
}
.btn-primary:hover:not(:disabled) {
    background: var(--gold-dark);
    box-shadow: var(--shadow-gold);
    transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}
.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border-med);
}
.btn-secondary:hover:not(:disabled) {
    border-color: var(--gold);
    color: var(--gold-dark);
    background: var(--gold-light);
    transform: translateY(-1px);
}
.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-muted);
}
.btn-ghost:hover:not(:disabled) {
    color: var(--gold);
    background: var(--gold-light);
}
.btn-lg {
    height: 48px;
    padding: 0 28px;
    font-size: 14.5px;
}
.btn-sm {
    height: 36px;
    padding: 0 16px;
    font-size: 12.5px;
}
.btn-sm.btn-primary { padding: 0 18px; }

/* ── ACTIVE FILTER TAGS ───────────────────────────────────── */
.active-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: var(--space-4);
    animation: fadeIn var(--dur-med) var(--ease-out);
}
.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--gold-light);
    border: 1px solid rgba(202,138,4,0.25);
    border-radius: var(--r-full);
    font-size: 12px;
    font-weight: 500;
    color: var(--gold-dark);
    animation: riseIn var(--dur-med) var(--ease-out) both;
}
.filter-tag.is-danger {
    background: var(--error-bg);
    border-color: rgba(220,38,38,0.2);
    color: var(--error);
    cursor: pointer;
}
.filter-tag .remove-filter {
    cursor: pointer;
    font-weight: 700;
    opacity: 0.7;
    font-size: 14px;
    line-height: 1;
    transition: opacity var(--dur-fast);
}
.filter-tag .remove-filter:hover { opacity: 1; }

/* ── MAIN CONTENT ─────────────────────────────────────────── */
.main-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-8) var(--space-16);
}
.content-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: var(--space-6);
    align-items: start;
}

@media (max-width: 1100px) {
    .content-grid { grid-template-columns: 1fr; }
    .base-item-panel { position: static; }
}

/* ── BASE ITEM PANEL ───────────────────────────────────────── */
.base-item-panel {
    position: sticky;
    top: calc(var(--navbar-h) + var(--space-6));
    overflow: hidden;
    animation: riseIn var(--dur-slow) var(--ease-out) 120ms both;
}
.panel-header {
    padding: var(--space-5) var(--space-5) 0;
    margin-bottom: var(--space-4);
}
.panel-eyebrow {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    margin-bottom: 4px;
}
.panel-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-strong);
    letter-spacing: -0.01em;
}

/* Base Item Card */
.base-item-card {
    cursor: default;
}
.base-item-image {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    background: linear-gradient(145deg, #F0EFED 0%, #E8E7E4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.base-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.base-item-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    color: var(--text-faint);
}
.base-item-placeholder svg { opacity: 0.5; }
.base-item-placeholder span { font-size: 0.78rem; font-weight: 500; }

.base-item-details { padding: var(--space-5); }
.item-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-strong);
    line-height: 1.3;
    margin-bottom: 4px;
}
.item-id {
    font-size: 0.72rem;
    color: var(--text-faint);
    letter-spacing: 0.03em;
    margin-bottom: var(--space-4);
}
.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--space-2);
}
.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.04);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
}
.meta-badge-price {
    font-weight: 700;
    color: var(--text-strong);
}
.item-description {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
    background: rgba(0,0,0,0.03);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--space-3);
    margin-top: var(--space-4);
}

/* VTO Button in Base Item */
.vto-button {
    width: 100%;
    height: 42px;
    background: var(--text);
    color: var(--bg);
    border: none;
    border-radius: var(--r-full);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: var(--space-4);
    letter-spacing: 0.02em;
    transition: all var(--dur-med) var(--ease-out);
}
.vto-button:hover:not(:disabled) {
    background: var(--text-strong);
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}
.vto-button:active:not(:disabled) { transform: scale(0.98); }
.vto-button:disabled { opacity: 0.45; cursor: not-allowed; }

/* VTO button on recommendation cards — compact variant */
.vto-btn-card {
    width: 100%;
    height: 34px;
    font-size: 0.78rem;
    margin-top: var(--space-3);
    opacity: 0.82;
}
.vto-btn-card:hover:not(:disabled) { opacity: 1; }

/* ── EMPTY / HERO EMPTY STATE ─────────────────────────────── */
.empty-state-sm {
    padding: var(--space-8) var(--space-5);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-3);
}
.empty-icon-wrap {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.04);
    border-radius: var(--r-lg);
    color: var(--text-faint);
    margin-bottom: var(--space-2);
}
.empty-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}
.empty-sub { font-size: 0.8rem; color: var(--text-faint); }

.hero-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-16) var(--space-8);
    gap: var(--space-5);
}
.hero-empty-visual {
    opacity: 0.6;
    animation: fadeIn var(--dur-slow) var(--ease-out) both;
}
.hero-empty-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-strong);
    letter-spacing: -0.02em;
}
.hero-empty-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 360px;
    line-height: 1.65;
}

/* ── RECOMMENDATIONS PANEL ────────────────────────────────── */
.recommendations-panel {
    min-height: 400px;
    animation: riseIn var(--dur-slow) var(--ease-out) 160ms both;
}
.recommendations-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-6);
    gap: var(--space-4);
}
.rec-title-group { flex: 1; }
.rec-count-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(0,0,0,0.04);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: var(--r-full);
    white-space: nowrap;
}
.rec-count-badge.has-warning {
    background: var(--warning-bg);
    border-color: rgba(217,119,6,0.25);
    color: var(--warning);
}

/* Warning Banner */
.notice-banner {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: var(--warning-bg);
    border: 1px solid rgba(217,119,6,0.2);
    border-left: 3px solid var(--warning);
    border-radius: var(--r-lg);
    margin-bottom: var(--space-6);
    animation: riseIn var(--dur-med) var(--ease-out);
}
.notice-banner-icon { color: var(--warning); flex-shrink: 0; }
.notice-banner-title { font-size: 0.85rem; font-weight: 600; color: var(--warning); }
.notice-banner-desc  { font-size: 0.8rem; color: var(--text-muted); }

/* ── CATEGORY SECTION ─────────────────────────────────────── */
.category-section {
    margin-bottom: var(--space-10);
    animation: riseIn var(--dur-slow) var(--ease-out) both;
}
.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1.5px solid var(--border);
}
.category-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-strong);
    letter-spacing: 0.01em;
    text-transform: uppercase;
}
.category-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── RECOMMENDATIONS GRID ─────────────────────────────────── */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: var(--space-5);
}

/* ── RECOMMENDATION CARD ──────────────────────────────────── */
.recommendation-card {
    background: var(--glass);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform var(--dur-med) var(--ease-out),
                box-shadow var(--dur-med) var(--ease-out),
                border-color var(--dur-med) var(--ease-out);
    display: flex;
    flex-direction: column;
    position: relative;
    animation: riseIn var(--dur-slow) var(--ease-out) both;
}
.recommendation-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(202,138,4,0.25);
}
.recommendation-card:active { transform: translateY(-2px) scale(0.99); }

.recommendation-image {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    background: linear-gradient(145deg, #F0EFED 0%, #E4E3E0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.recommendation-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--dur-slow) var(--ease-out);
}
.recommendation-card:hover .recommendation-image img {
    transform: scale(1.05);
}
.recommendation-placeholder {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-faint);
    text-align: center;
    padding: var(--space-5);
    opacity: 0.6;
}

.score-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    color: var(--text-strong);
    padding: 4px 10px;
    border-radius: var(--r-full);
    font-size: 11px;
    font-weight: 800;
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: var(--shadow-xs);
    z-index: 2;
    letter-spacing: 0.03em;
}

.recommendation-info {
    padding: var(--space-4);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.recommendation-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-strong);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.recommendation-id {
    font-size: 0.68rem;
    color: var(--text-faint);
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Category pill shown on each card (replaces the removed category section headers) */
.category-pill {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--r-full);
    z-index: 2;
}

/* Size availability badges */
.size-badge {
    display: inline-block;
    background: rgba(34,197,94,0.12);
    color: #16a34a;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--r-full);
    border: 1px solid rgba(34,197,94,0.3);
    white-space: nowrap;
}
.size-unavailable-badge {
    display: inline-block;
    background: rgba(239,68,68,0.09);
    color: #dc2626;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: var(--r-full);
    border: 1px solid rgba(239,68,68,0.2);
    white-space: nowrap;
}

/* Score Breakdown */
.score-details {
    margin-top: var(--space-3);
    padding: var(--space-3);
    background: rgba(0,0,0,0.03);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
}
.score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}
.score-label {
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 500;
}
.score-value {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--gold-dark);
}
.score-bar {
    width: 100%;
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 3px;
}
.score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold) 0%, #D4A017 100%);
    border-radius: 2px;
    transition: width 700ms var(--ease-out);
    width: 0;
}

/* ── LOADING ───────────────────────────────────────────────── */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248,247,244,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-5);
    animation: scaleIn var(--dur-med) var(--ease-out);
}
.loading-spinner-lg {
    width: 52px;
    height: 52px;
    border: 3px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
.loading-message {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}
.loading-dots::after {
    content: '';
    animation: dotPulse 1.4s ease-in-out infinite;
}

/* Skeleton */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: var(--space-5);
}
.skeleton-card {
    border-radius: var(--r-xl);
    overflow: hidden;
    border: 1px solid var(--border);
}
.skeleton-img {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--border);
    position: relative;
    overflow: hidden;
}
.skeleton-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: shimmer 1.4s infinite;
}
.skeleton-text {
    height: 14px;
    background: var(--border);
    border-radius: 4px;
    margin: var(--space-3);
}

/* ── ERROR STATE ───────────────────────────────────────────── */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-16) var(--space-8);
    gap: var(--space-4);
}
.error-icon-wrap {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--error-bg);
    border-radius: var(--r-xl);
    color: var(--error);
}
.error-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-strong);
}
.error-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 300px;
    line-height: 1.6;
}

/* ── TOAST ─────────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: var(--text);
    color: var(--bg);
    padding: 12px 20px;
    border-radius: var(--r-full);
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    opacity: 0;
    transition: transform var(--dur-med) var(--ease-out),
                opacity var(--dur-med) var(--ease-out);
    pointer-events: none;
    white-space: nowrap;
    max-width: calc(100vw - 40px);
    overflow: hidden;
    text-overflow: ellipsis;
}
.toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* ── MODALS ────────────────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    animation: fadeIn var(--dur-med) var(--ease-out);
}
.modal-panel {
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    animation: scaleIn var(--dur-med) var(--ease-spring);
    position: relative;
}
.modal-gold-bar {
    height: 3px;
    background: linear-gradient(90deg, var(--gold) 0%, #D4A017 50%, var(--gold) 100%);
}
.modal-body {
    padding: var(--space-8);
}
.modal-icon {
    width: 52px;
    height: 52px;
    background: var(--gold-light);
    border-radius: var(--r-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    margin-bottom: var(--space-5);
}
.modal-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-strong);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-3);
}
.modal-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: var(--space-5);
}
.modal-size-highlight {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    background: var(--gold-light);
    border: 1px solid rgba(202,138,4,0.2);
    border-radius: var(--r-lg);
    margin-bottom: var(--space-5);
}
.modal-size-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.modal-size-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-dark);
}
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.modal-select {
    width: 100%;
    height: 48px;
    padding: 0 40px 0 14px;
    background: rgba(0,0,0,0.04);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    margin-bottom: var(--space-5);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.modal-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}
.modal-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    background: rgba(0,0,0,0.04);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    font-family: var(--font-body);
    font-size: 13.5px;
    color: var(--text);
    transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.modal-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

/* ── VTO MODAL ─────────────────────────────────────────────── */
.vto-backdrop { align-items: flex-start; padding-top: var(--space-8); }
.vto-modal-panel {
    width: 100%;
    max-width: 1100px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    animation: slideUp var(--dur-slow) var(--ease-spring);
}
.vto-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6) 0;
    margin-bottom: var(--space-4);
}
.vto-title-group { flex: 1; }
.vto-modal-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-strong);
    letter-spacing: -0.02em;
}
.vto-intro {
    padding: 0 var(--space-6);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-5);
}
.vto-close-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.04);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--dur-fast) var(--ease-out);
    flex-shrink: 0;
}
.vto-close-btn:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
    background: var(--gold-light);
    transform: translateY(-1px);
}
.vto-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248,247,244,0.88);
    backdrop-filter: blur(8px);
    border-radius: inherit;
    z-index: 50;
}
.vto-loading-overlay[hidden] { display: none; }
.vto-loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-8);
    background: var(--surface-solid);
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    max-width: 360px;
    text-align: center;
}
.vto-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid rgba(202,138,4,0.12);
    border-top-color: var(--gold);
    animation: spin 0.9s linear infinite;
}
.vto-loading-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-strong);
    line-height: 1.5;
}
.vto-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    padding: 0 var(--space-6) var(--space-6);
}
.vto-panel { display: flex; flex-direction: column; gap: var(--space-3); }
.vto-panel-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}
.vto-tip {
    font-size: 0.78rem;
    color: var(--text-faint);
    line-height: 1.5;
}
.vto-status {
    font-size: 0.8rem;
    font-weight: 500;
    min-height: 1.25rem;
}
.vto-status.is-success, .vto-status.success { color: var(--success); }
.vto-status.is-error, .vto-status.error { color: var(--error); }
.vto-image-frame {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
    background: var(--surface-solid);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vto-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    color: var(--text-faint);
    padding: var(--space-5);
    text-align: center;
    font-size: 0.78rem;
    font-weight: 500;
}
.vto-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
}

@media (max-width: 768px) {
    .vto-grid { grid-template-columns: 1fr; }
    .vto-backdrop { padding-top: var(--space-4); align-items: flex-end; }
    .main-content { padding: var(--space-4) var(--space-4) var(--space-12); }
    .hero-section { padding: var(--space-6) var(--space-4) var(--space-4); }
    .recommendations-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
}
@media (max-width: 480px) {
    .recommendations-grid { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
}

/* ── SELECT STATES ─────────────────────────────────────────── */
select, input[type="text"], input[type="number"] {
    width: 100%;
    height: 48px;
    padding: 0 40px 0 14px;
    background: rgba(0,0,0,0.04);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    transition: border-color var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
input[type="text"], input[type="number"] {
    padding: 0 14px;
    background-image: none;
}
select:hover, input:hover { border-color: var(--border-med); }
select:focus, input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}
input::placeholder { color: var(--text-faint); }

/* ── REDUCED MOTION ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
