/* ============================================================
   ZARA SPRING 2026 — Fashion Recommender Dashboard
   Premium editorial aesthetic: near-black + warm ivory + gold
   Fonts: Cormorant Garamond (display) + Inter (body)
   ============================================================ */

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

:root {
    /* Palette */
    --bg: #0a0a09;
    --bg-card: #111110;
    --bg-surface: #161614;
    --border: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.18);

    --ivory: #f5f0e8;
    --ivory-dim: #b8b0a0;
    --gold: #c9a96e;
    --gold-light: #dfc08a;
    --red-acc: #c94f4f;

    /* Type */
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;

    /* Spacing */
    --radius: 4px;
    --radius-lg: 10px;
    --gap: 1px;
    /* grid gap */
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--ivory);
    font-family: var(--font-sans);
    font-size: 13px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--gold);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── Hero Header ─────────────────────────────────────────── */
.hero {
    position: relative;
    text-align: center;
    padding: 80px 24px 60px;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(201, 169, 110, 0.12) 0%, transparent 70%),
        var(--bg);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a96e' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 1;
    pointer-events: none;
}

.hero__eyebrow {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: var(--gold);
    margin-bottom: 16px;
}

.hero__title {
    font-family: var(--font-serif);
    font-size: clamp(52px, 8vw, 96px);
    font-weight: 300;
    color: var(--ivory);
    line-height: 1;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.hero__title em {
    font-style: italic;
    color: var(--gold);
}

.hero__sub {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.2em;
    color: var(--ivory-dim);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero__meta {
    font-size: 11px;
    color: var(--ivory-dim);
    letter-spacing: 0.05em;
}

/* ── Controls ────────────────────────────────────────────── */
.controls {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 9, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.controls__inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Search */
.controls__search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 14px;
    max-width: 380px;
    transition: border-color 0.2s;
}

.controls__search:focus-within {
    border-color: var(--gold);
}

.controls__search .icon {
    width: 14px;
    height: 14px;
    color: var(--ivory-dim);
    flex-shrink: 0;
}

.controls__search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--ivory);
    font-size: 13px;
    font-family: var(--font-sans);
    padding: 10px 0;
}

.controls__search input::placeholder {
    color: var(--ivory-dim);
}

/* Filter groups */
.controls__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--ivory-dim);
    text-transform: uppercase;
    white-space: nowrap;
}

/* Chips */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    padding: 4px 11px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--ivory-dim);
    font-size: 11px;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    letter-spacing: 0.04em;
}

.chip:hover {
    border-color: var(--border-hover);
    color: var(--ivory);
}

.chip.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--bg);
    font-weight: 500;
}

/* Color chip — small dot prefix */
.chip--color::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 6px;
    background: var(--chip-color, #888);
    vertical-align: middle;
}

/* Price range */
.filter-group--price {
    gap: 10px;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--ivory-dim);
}

#priceSlider {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--gold) 0%, var(--gold) var(--pct, 100%), var(--border-hover) var(--pct, 100%));
    outline: none;
    cursor: pointer;
}

#priceSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.2);
    transition: box-shadow 0.2s;
}

#priceSlider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 5px rgba(201, 169, 110, 0.3);
}

/* Sort Dropdown */
.sort-select {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--ivory);
    font-family: var(--font-sans);
    font-size: 11px;
    padding: 4px 28px 4px 10px;
    border-radius: var(--radius);
    outline: none;
    cursor: pointer;
    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='%23b8b0a0' 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 8px center;
    transition: border-color 0.2s;
}

.sort-select:hover,
.sort-select:focus {
    border-color: var(--gold);
}

.sort-select option {
    background: var(--bg-surface);
    color: var(--ivory);
}

/* Clear button */
.btn-clear {
    background: none;
    border: 1px solid var(--border);
    color: var(--ivory-dim);
    font-size: 11px;
    font-family: var(--font-sans);
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}

.btn-clear:hover {
    border-color: var(--red-acc);
    color: var(--red-acc);
}

/* ── Stats Bar ───────────────────────────────────────────── */
.stats-bar {
    max-width: 1600px;
    margin: 0 auto;
    padding: 10px 24px;
    font-size: 11px;
    color: var(--ivory-dim);
    letter-spacing: 0.08em;
}

/* ── Product Grid ─────────────────────────────────────────── */
.grid-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* ── Product Card ─────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    animation: fadeUp 0.35s ease both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(201, 169, 110, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(201, 169, 110, 0.1);
}

/* Image wrapper */
.card__img-wrap {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #1a1a18;
}

.card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s ease, opacity 0.3s ease;
    opacity: 0;
}

.card__img.loaded {
    opacity: 1;
}

.card:hover .card__img {
    transform: scale(1.04);
}

/* Label badge */
.card__label {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.card__label--new {
    background: var(--gold);
    color: var(--bg);
}

.card__label--limited {
    background: #8b5cf6;
    color: #fff;
}

.card__label--sale {
    background: var(--red-acc);
    color: #fff;
}

/* Image placeholder (while loading) */
.card__img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.card__img-placeholder span {
    font-size: 48px;
}

/* Card body */
.card__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.card__meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card__name {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 400;
    color: var(--ivory);
    line-height: 1.25;
    flex: 1;
    padding-right: 8px;
}

.card__price {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--gold);
    white-space: nowrap;
}

/* Tags row */
.card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag-pill {
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 10px;
    color: var(--ivory-dim);
    letter-spacing: 0.04em;
}

.tag-pill--category {
    border-color: rgba(201, 169, 110, 0.2);
    color: var(--gold);
    font-weight: 500;
}

/* Color + theme row */
.card__palette {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.card__theme {
    font-size: 10px;
    color: var(--ivory-dim);
    font-style: italic;
    font-family: var(--font-serif);
}

/* Card Actions (Shop button) */
.card__actions {
    padding: 0 16px 16px;
    margin-top: auto;
}

.btn-shop {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px 0;
    background: rgba(201, 169, 110, 0.1);
    color: var(--gold-light);
    border: 1px solid rgba(201, 169, 110, 0.2);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-shop:hover {
    background: var(--gold);
    color: var(--bg);
    text-decoration: none;
}

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 100px 24px;
    color: var(--ivory-dim);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h2 {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 8px;
    color: var(--ivory);
}

.empty-state p {
    font-size: 13px;
}

/* ── Recommender Rail ─────────────────────────────────────── */
.recommender {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(13, 13, 11, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--border);
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    max-height: 55vh;
    overflow-y: auto;
}

.recommender:not([hidden]) {
    transform: translateY(0);
}

.recommender[hidden] {
    display: block !important;
    /* override hidden to allow animation */
    transform: translateY(100%);
}

.recommender__inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px 24px 32px;
}

.recommender__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.recommender__title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 300;
    color: var(--ivory);
}

.recommender__close {
    background: none;
    border: 1px solid var(--border);
    color: var(--ivory-dim);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.recommender__close:hover {
    border-color: var(--red-acc);
    color: var(--red-acc);
}

/* Selected item summary */
.rec-selected {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(201, 169, 110, 0.05);
    border: 1px solid rgba(201, 169, 110, 0.15);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 20px;
}

.rec-selected__img {
    width: 50px;
    height: 68px;
    object-fit: cover;
    object-position: top;
    border-radius: var(--radius);
    background: #1a1a18;
    flex-shrink: 0;
}

.rec-selected__info {}

.rec-selected__name {
    font-family: var(--font-serif);
    font-size: 16px;
    color: var(--ivory);
    margin-bottom: 4px;
}

.rec-selected__details {
    font-size: 11px;
    color: var(--ivory-dim);
    display: flex;
    gap: 12px;
}

/* Recommender rail */
.rec-rail {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

/* Mini card for rail */
.mini-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    animation: fadeUp 0.3s ease both;
}

.mini-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 169, 110, 0.3);
}

.mini-card__img-wrap {
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #1a1a18;
    position: relative;
}

.mini-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    opacity: 0;
    transition: opacity 0.3s, transform 0.4s;
}

.mini-card__img.loaded {
    opacity: 1;
}

.mini-card:hover .mini-card__img {
    transform: scale(1.06);
}

.mini-card__body {
    padding: 10px 12px;
}

.mini-card__name {
    font-family: var(--font-serif);
    font-size: 14px;
    color: var(--ivory);
    margin-bottom: 3px;
    line-height: 1.2;
}

.mini-card__price {
    font-size: 12px;
    color: var(--gold);
    font-weight: 500;
    margin-bottom: 8px;
}

.btn-shop--mini {
    padding: 6px 0;
    font-size: 10px;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 24px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--ivory-dim);
    letter-spacing: 0.04em;
}

/* ── Utility ─────────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
    .hero__title {
        font-size: 48px;
    }

    .controls__inner {
        padding: 12px 16px;
    }

    .controls__filters {
        gap: 10px;
    }

    .grid-wrapper {
        padding: 0 16px 100px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .rec-rail {
        grid-template-columns: repeat(2, 1fr);
    }
}