/* ============================================================
   PRODUCTS PAGE — Editorial / Premium Dark Theme
   Scoped to .hf-products so it won't leak into other templates
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=Manrope:wght@300;400;500;600;700&display=swap');

.hf-products {
  /* Page-scoped tokens (fall back to your theme's vars if defined) */
  --hf-ink:        var(--ink, #0b1220);
  --hf-ink-soft:   var(--ink-soft, #111a2c);
  --hf-ink-card:   var(--ink-card, #15203a);
  --hf-slate:      var(--slate, #2a3550);
  --hf-paper:      var(--paper, #f4ede1);
  --hf-paper-mute: rgba(244, 237, 225, 0.65);
  --hf-paper-dim:  rgba(244, 237, 225, 0.42);
  --hf-gold:       var(--gold, #c8a25a);
  --hf-gold-soft:  rgba(200, 162, 90, 0.18);

  --hf-serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --hf-sans:  'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  background: var(--hf-ink);
  color: var(--hf-paper);
  font-family: var(--hf-sans);
  font-feature-settings: 'ss01', 'ss02';
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow: hidden;
}

/* Subtle radial atmosphere */
.hf-products::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(200, 162, 90, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(78, 137, 174, 0.10), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hf-products .hf-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  position: relative;
  z-index: 1;
}

/* ---------- HERO ---------- */
.hf-hero {
  padding: clamp(5rem, 12vw, 9rem) 0 clamp(3rem, 6vw, 5rem);
  text-align: center;
  position: relative;
}

.hf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--hf-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--hf-gold);
  margin-bottom: 1.5rem;
}
.hf-eyebrow::before,
.hf-eyebrow::after {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--hf-gold);
  opacity: 0.6;
}

.hf-hero h1 {
  font-family: var(--hf-serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  color: var(--hf-paper);
}
.hf-hero h1 em {
  font-style: italic;
  font-variation-settings: 'opsz' 120, 'SOFT' 100;
  color: var(--hf-gold);
}

.hf-hero p {
  max-width: 620px;
  margin: 0 auto;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.65;
  color: var(--hf-paper-mute);
}

/* ---------- CATEGORY HEADER ---------- */
.hf-category {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
  scroll-margin-top: 6rem;
}

.hf-cat-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--hf-slate);
  flex-wrap: wrap;
}

.hf-cat-title {
  font-family: var(--hf-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--hf-paper);
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.hf-cat-title .hf-cat-num {
  font-family: var(--hf-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--hf-gold);
  margin-right: 0.25rem;
}

.hf-cat-count {
  font-family: var(--hf-sans);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hf-paper-dim);
}

/* ---------- PRODUCT GRID ---------- */
.hf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: clamp(1.5rem, 2.5vw, 2.25rem);
}

/* ---------- PRODUCT CARD ---------- */
.hf-card {
  background: var(--hf-ink-card);
  border: 1px solid var(--hf-slate);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s ease,
              box-shadow 0.5s ease;
  position: relative;
}
.hf-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.hf-card:hover {
  transform: translateY(-6px);
  border-color: var(--hf-gold);
}
.hf-card:hover::after { opacity: 1; }

.hf-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--hf-ink-soft);
}
.hf-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}
.hf-card:hover .hf-card-media img { transform: scale(1.06); }

.hf-card-index {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: var(--hf-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--hf-paper);
  background: rgba(11, 18, 32, 0.75);
  backdrop-filter: blur(8px);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.hf-card-body {
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hf-card-name {
  font-family: var(--hf-serif);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.005em;
  line-height: 1.2;
  margin: 0 0 0.85rem;
  color: var(--hf-paper);
}

.hf-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.hf-badge {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 2px;
  background: var(--hf-gold-soft);
  color: var(--hf-gold);
  border: 1px solid rgba(200, 162, 90, 0.25);
}

.hf-card-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--hf-paper-mute);
  margin: 0 0 1.25rem;
  flex: 1;
}

.hf-specs {
  border-top: 1px solid var(--hf-slate);
  padding-top: 1rem;
  margin-bottom: 1.25rem;
  display: grid;
  gap: 0.5rem;
}
.hf-spec {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.75rem;
  font-size: 0.82rem;
  line-height: 1.5;
}
.hf-spec dt {
  color: var(--hf-paper-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 500;
  padding-top: 0.15rem;
}
.hf-spec dd {
  color: var(--hf-paper-mute);
  margin: 0;
}

.hf-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem;
  background: transparent;
  border: 1px solid var(--hf-slate);
  border-radius: 2px;
  color: var(--hf-paper);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  margin-top: auto;
}
.hf-card-cta:hover {
  background: var(--hf-gold);
  border-color: var(--hf-gold);
  color: var(--hf-ink);
}
.hf-card-cta:focus-visible,
.hf-cta-button:focus-visible {
  outline: 2px solid var(--hf-gold);
  outline-offset: 3px;
}
.hf-card-cta .hf-arrow {
  transition: transform 0.3s ease;
}
.hf-card-cta:hover .hf-arrow { transform: translateX(4px); }

/* ---------- CLOSING CTA ---------- */
.hf-cta-strip {
  margin: clamp(4rem, 8vw, 7rem) 0 clamp(5rem, 9vw, 8rem);
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(2rem, 5vw, 4rem);
  background: linear-gradient(135deg, var(--hf-ink-soft) 0%, var(--hf-ink-card) 100%);
  border: 1px solid var(--hf-slate);
  border-radius: 4px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hf-cta-strip::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 50%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(200, 162, 90, 0.12), transparent 70%);
  pointer-events: none;
}
.hf-cta-strip h3 {
  font-family: var(--hf-serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
  position: relative;
}
.hf-cta-strip p {
  margin: 0;
  color: var(--hf-paper-mute);
  font-size: 1rem;
  position: relative;
}
.hf-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.75rem;
  background: var(--hf-gold);
  color: var(--hf-ink);
  border: none;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
}
.hf-cta-button:hover {
  background: var(--hf-paper);
  transform: translateY(-2px);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 720px) {
  .hf-cta-strip { grid-template-columns: 1fr; text-align: left; }
  .hf-spec { grid-template-columns: 80px 1fr; }
}

/* ---------- ENTRANCE ANIMATION ---------- */
@keyframes hf-rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hf-hero > *,
.hf-cat-head,
.hf-card {
  animation: hf-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hf-hero .hf-eyebrow { animation-delay: 0.05s; }
.hf-hero h1          { animation-delay: 0.15s; }
.hf-hero p           { animation-delay: 0.25s; }
.hf-cat-head         { animation-delay: 0.35s; }
.hf-card:nth-child(1) { animation-delay: 0.40s; }
.hf-card:nth-child(2) { animation-delay: 0.48s; }
.hf-card:nth-child(3) { animation-delay: 0.56s; }
.hf-card:nth-child(4) { animation-delay: 0.64s; }
.hf-card:nth-child(5) { animation-delay: 0.72s; }
.hf-card:nth-child(6) { animation-delay: 0.80s; }
.hf-card:nth-child(n+7) { animation-delay: 0.88s; }

@media (prefers-reduced-motion: reduce) {
  .hf-hero > *, .hf-cat-head, .hf-card,
  .hf-card-media img, .hf-card, .hf-card-cta {
    animation: none !important;
    transition: none !important;
  }
}