/*
 * FHEERA — products-page.css
 * Editorial Redesign v3.0
 *
 * Design direction: The Row · COS · DUMA
 * Tone: Quiet luxury. Clean canvas. Human-crafted.
 *
 * Everything here is intentional.
 * If it doesn't need to be here, it isn't.
 */

/* ─────────────────────────────────────────────────────────────
   01. TOKENS — page-scoped overrides
   These sit on top of global design tokens without touching them.
───────────────────────────────────────────────────────────── */
:root {
  --page-bg:        #FAFAF8;      /* off-white canvas — warmer than #fff */
  --page-text:      #1A1A18;      /* near-black, never pure #000 */
  --page-muted:     #8C8880;      /* body meta, secondary text */
  --page-ghost:     #C8C4BE;      /* very light — dividers, placeholder */
  --page-gold:      #B8975A;      /* accent — price, active state */
  --page-gold-dim:  rgba(184,151,90,0.35);

  --nav-height:     80px;

  /* Type */
  --f-serif:  'Cormorant Garamond', Georgia, serif;
  --f-sans:   'Jost', system-ui, sans-serif;

  /* Easing */
  --ease-luxury: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─────────────────────────────────────────────────────────────
   02. PAGE FOUNDATION
   White canvas. No heavy shadows. Room to breathe.
───────────────────────────────────────────────────────────── */
body {
  background: var(--page-bg) !important;
  color: var(--page-text);
}

/* Prevent the scrollbar from jumping */
html { overflow-y: scroll; }

/* ─────────────────────────────────────────────────────────────
   03. UTILITY
───────────────────────────────────────────────────────────── */
.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;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 72px);
}

/* ─────────────────────────────────────────────────────────────
   04. NAVBAR — override for light pages
   On white backgrounds, nav must be immediately legible.
───────────────────────────────────────────────────────────── */
.nav.nav--dark,
.nav.nav--dark.scrolled {
  background: rgba(250, 250, 248, 0.96) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: none;
}

.nav.nav--dark .nav__link,
.nav.nav--dark .nav-desktop-link,
.nav.nav--dark .logo-brand,
.nav.nav--dark #nav-logo,
.nav.nav--dark .nav-icon-btn {
  color: rgba(26, 26, 24, 0.65) !important;
}

.nav.nav--dark .nav__link:hover,
.nav.nav--dark .nav-desktop-link:hover {
  color: var(--page-text) !important;
}

.nav.nav--dark .nav__link::after,
.nav.nav--dark .nav-desktop-link::after {
  background: var(--page-gold);
}

/* ─────────────────────────────────────────────────────────────
   05. PAGE HEADER — editorial, centered, unhurried
───────────────────────────────────────────────────────────── */
.page-header {
  margin-top: var(--nav-height);
  padding: clamp(72px, 12vh, 120px) 0 clamp(40px, 6vh, 64px);
  background: var(--page-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  text-align: center;
}

/* Eyebrow: decorative label */
.page-header__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  font-family: var(--f-sans);
  font-size: 0.68rem;           /* was 0.55rem — now matches PDP */
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--page-muted);
  margin-bottom: 1.6rem;
}

.eyebrow-line {
  display: block;
  width: 32px;
  height: 1px;
  background: var(--page-ghost);
  flex-shrink: 0;
}

/* Main heading */
.page-header__title {
  font-family: var(--f-serif);
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 300;
  line-height: 0.92;
  color: var(--page-text);
  letter-spacing: -0.01em;
  text-transform: none;       /* not all-caps — too aggressive for this direction */
}

/* Search result meta */
.page-header__search-meta {
  margin-top: 1.4rem;
  font-family: var(--f-sans);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--page-muted);
}
.page-header__search-meta em {
  color: var(--page-text);
  font-style: italic;
  font-family: var(--f-serif);
}

/* ─────────────────────────────────────────────────────────────
   06. FILTER BAR — minimal, architectural
   Invisible when idle. Present when needed.
───────────────────────────────────────────────────────────── */
.filter-bar {
  position: sticky;
  top: var(--nav-height);
  z-index: 100;
  background: rgba(250, 250, 248, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  padding: 0.75rem 0;
}

.filter-form {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Inputs & selects */
.filter-input,
.filter-select {
  height: 30px;
  padding: 0 0.85rem;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.13);
  color: var(--page-text);
  font-family: var(--f-sans);
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  outline: none;
  border-radius: 0;
  transition: border-color 0.25s ease;
  appearance: none;
  -webkit-appearance: none;
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--page-text);
  color: var(--page-text);
}

.filter-input::placeholder {
  color: var(--page-ghost);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
}

.filter-field--search {
  position: relative;
}

.filter-icon {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  transform: translateY(-50%);
  color: var(--page-ghost);
  pointer-events: none;
}

.filter-input--search {
  width: 180px;
  padding-left: 2.1rem;
}

.filter-select {
  width: 148px;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23C8C4BE'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  cursor: pointer;
}
.filter-select option {
  background: #fff;
  color: var(--page-text);
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Apply button */
.btn--filter {
  height: 30px;
  padding: 0 1.1rem;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.18);
  color: var(--page-muted);
  font-family: var(--f-sans);
  font-size: 0.55rem;
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.btn--filter:hover {
  border-color: var(--page-text);
  color: var(--page-text);
}

/* Clear link */
.filter-clear {
  font-family: var(--f-sans);
  font-size: 0.55rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--page-ghost);
  text-decoration: none;
  transition: color 0.2s ease;
}
.filter-clear:hover { color: var(--page-muted); }

/* Item count */
.filter-count {
  margin-left: auto;
  font-family: var(--f-sans);
  font-size: 0.55rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--page-ghost);
  white-space: nowrap;
}

/* ─────────────────────────────────────────────────────────────
   07. CATALOG SECTION
───────────────────────────────────────────────────────────── */
.catalog-section {
  padding: clamp(56px, 8vw, 96px) 0 clamp(80px, 12vw, 160px);
  background: var(--page-bg);
}

/* ─────────────────────────────────────────────────────────────
   08. PRODUCT GRID — generous, editorial
   Not a catalog. A lookbook.
───────────────────────────────────────────────────────────── */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(40px, 5vw, 72px) clamp(28px, 3vw, 48px);
}

@media (max-width: 1024px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {

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

  .container {
    padding: 0 14px;
  }

}

/* ─────────────────────────────────────────────────────────────
   11. EMPTY STATE — calm, editorial
───────────────────────────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 10rem 2rem;
  text-align: center;
}

.empty-state__icon { color: var(--page-ghost); }

.empty-state__label {
  font-family: var(--f-sans);
  font-size: 0.58rem;
  font-weight: 300;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--page-ghost);
}

.empty-state__action {
  display: inline-block;
  font-family: var(--f-sans);
  font-size: 0.58rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--page-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--page-ghost);
  padding-bottom: 0.2rem;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.empty-state__action:hover {
  color: var(--page-text);
  border-color: var(--page-text);
}

/* ─────────────────────────────────────────────────────────────
   12. QUICK VIEW MODAL — minimal panel
───────────────────────────────────────────────────────────── */
.quick-view {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 24, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.quick-view--open { display: flex; }

.quick-view__panel {
  background: var(--page-bg);
  border: 1px solid rgba(0, 0, 0, 0.09);
  padding: 3rem;
  max-width: 840px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.quick-view__close {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  background: none;
  border: none;
  color: var(--page-ghost);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}
.quick-view__close:hover { color: var(--page-text); }

/* ─────────────────────────────────────────────────────────────
   13. RESPONSIVE CLEANUP
───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .filter-input--search { width: 120px; }
  .filter-select { width: 110px; }
  .filter-count { width: 100%; margin-left: 0; padding-top: 0.25rem; }

  .page-header__title {
    font-size: clamp(2.4rem, 10vw, 4rem);
  }
}

@media (max-width: 520px) {

  .fh-card__name {
    font-size: 1.05rem;
    line-height: 1.1;
  }

  .fh-card__cat {
    font-size: 0.46rem;
    letter-spacing: 0.24em;
  }

  .fh-card__overlay {
    padding: 0 10px 10px;
  }

  .fh-card__wishlist {
    width: 30px;
    height: 30px;
  }

}