/* ============================================================
   Cards For Cunts — style.css
   Organised by section. Edit card/shelf/filter sections freely.
   Brand tokens live in :root — change them once, they cascade.
   ============================================================ */

/* TOKENS */
:root {
  color-scheme: dark;
  --black:      #0a0a0a;
  --red:        #c0392b;
  --red-dark:   #922b21;
  --cream:      #f5f0e8;
  --gold:       #c9a84c;
  --mid:        #1e1e1e;
  --text-light: #a0998e;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--black);
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black);
  border-bottom: 1px solid #222;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  height: 52px;
  transition: box-shadow 0.3s;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--cream);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}
.nav-logo-title span { color: var(--red); }
.nav-tagline {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.58rem;
  color: var(--text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
}
.nav-instagram {
  color: var(--text-light);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.nav-instagram:hover { color: #fff; }

/* ── AFFILIATE BAR ── */
.affiliate-bar {
  position: sticky;
  top: 52px;
  z-index: 99;
  background: #111;
  border-bottom: 1px solid #222;
  text-align: center;
  padding: 0.4rem 1rem;
  font-size: 0.65rem;
  color: var(--text-light);
  letter-spacing: 0.03em;
}
.affiliate-bar a { color: var(--gold); text-decoration: none; }
.affiliate-bar a:hover { text-decoration: underline; }

/* ── HERO ── */
.hero {
  position: relative;
  padding: 2rem 1.25rem 1.5rem;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(192,57,43,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid var(--red-dark);
  padding: 0.25rem 0.75rem;
  margin-bottom: 0.9rem;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 0.6rem;
}
.hero h1 em { font-style: italic; color: var(--red); }
.hero-sub {
  font-size: 0.9rem;
  color: var(--text-light);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
  display: none;
}
@media (min-width: 640px) {
  .hero { padding: 4rem 2rem 2.5rem; }
  .hero h1 { margin-bottom: 1rem; }
  .hero-sub { display: block; margin-bottom: 1rem; }
}

/* ── FILTER PANEL ── */
.filter-panel {
  padding: 1rem 0 0;
  max-width: 1100px;
  margin: 0 auto;
}
.filter-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}
.filter-row-label {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  padding: 0 1.25rem;
}
.filter-row-btns {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.1rem 1.25rem 0.4rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filter-row-btns::-webkit-scrollbar { display: none; }
.filter-divider {
  height: 1px;
  background: #222;
  margin: 0 1.25rem 0.6rem;
}
.filter-btn {
  background: #1c1c1c;
  border: 1px solid #3c3c3c;
  color: #c0b8b0;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 1.1rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  border-radius: 2px;
  flex-shrink: 0;
  line-height: 1;
}
.filter-btn:hover { border-color: #666; color: var(--cream); background: #262626; }
.filter-btn.occasion.active  { background: var(--red);  border-color: var(--red);  color: #fff; }
.filter-btn.recipient.active { background: var(--gold); border-color: var(--gold); color: #0a0a0a; font-weight: 600; }

/* ── REEL SHELF ── */
.reel-shelf {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 0 1.25rem;
  display: none;
}
.reel-shelf.visible {
  display: block;
  margin-top: 1.1rem;
}

.reel-shelf-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  padding-right: 1.25rem;
}
.reel-shelf-eyebrow {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}
.reel-shelf-eyebrow svg {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.35rem;
  margin-top: -2px;
}
.reel-shelf-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1rem, 3.5vw, 1.3rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.2;
}
.reel-shelf-line {
  flex: 1;
  height: 1px;
  background: #222;
  align-self: center;
}
.reel-shelf-track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}
.reel-shelf-track::-webkit-scrollbar { display: none; }

/* Shelf cards */
.shelf-card {
  flex-shrink: 0;
  width: 130px;
  background: var(--mid);
  border: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.shelf-card:hover { border-color: var(--red-dark); transform: translateY(-2px); }
.shelf-card-thumb {
  aspect-ratio: 5 / 7;
  background: #1a1612;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shelf-card-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.shelf-card-occasion {
  position: absolute;
  bottom: 0.4rem;
  left: 0.4rem;
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--red);
  color: white;
  padding: 0.12rem 0.4rem;
}
.shelf-card-body {
  padding: 0.6rem 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.shelf-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--cream);
  flex: 1;
}
.shelf-card-buy {
  display: block;
  background: var(--red);
  color: white;
  font-size: 0.6rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.45rem 0.5rem;
  text-align: center;
  transition: background 0.2s;
  font-weight: 500;
}
.shelf-card-buy:hover { background: var(--red-dark); }

/* Shelf scroll progress — lozenge slides along a track */
.reel-shelf { position: relative; }

.shelf-progress {
  display: none; /* shown by JS once shelf has multiple cards */
  margin: 0.3rem 0 0.6rem;
  height: 3px;
  background: #222;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.shelf-progress.visible { display: block; }

.shelf-progress-lozenge {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.1s ease, left 0.1s ease;
  will-change: left, width;
}

@media (min-width: 640px) {
  .shelf-card { width: 200px; }
}

/* ── STICKY BAR ── */
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #111;
  border-top: 1px solid #2a2a2a;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.sticky-bar.visible { transform: translateY(0); }
.sticky-bar-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.sticky-bar-label {
  font-size: 0.52rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}
.sticky-bar-desc {
  font-family: 'Playfair Display', serif;
  font-size: 0.82rem;
  color: var(--cream);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sticky-bar-btn {
  background: var(--red);
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.6rem 1rem;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
  flex-shrink: 0;
  border-radius: 2px;
}
.sticky-bar-btn:hover { background: var(--red-dark); }
.sticky-bar-close {
  background: transparent;
  border: none;
  color: #555;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.25rem;
  flex-shrink: 0;
  transition: color 0.2s;
}
.sticky-bar-close:hover { color: var(--text-light); }

/* Mobile/tablet only — Instagram traffic is phone-based */
@media (min-width: 1024px) {
  .sticky-bar { display: none !important; }
}

/* ── MAIN GRID ── */
.grid-section {
  max-width: 1100px;
  margin: 0.75rem auto 0;
  padding: 0 1.25rem;
}
.grid-section-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.grid-section-label {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}
.grid-section-line { flex: 1; height: 1px; background: #1e1e1e; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding-bottom: 5rem;
}
@media (max-width: 360px)  { .grid { grid-template-columns: 1fr; } }
@media (min-width: 640px)  { .grid { grid-template-columns: repeat(3, 1fr); gap: 1.1rem; } }
@media (min-width: 960px)  { .grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }

/* ── CARD ── */
.card {
  background: var(--mid);
  border: 1px solid #252525;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
}
.card:hover { border-color: var(--red-dark); transform: translateY(-2px); }
.card-thumb {
  aspect-ratio: 5 / 7;
  background: #161616;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }

.card-occasion {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--red);
  color: white;
  padding: 0.15rem 0.45rem;
}
.card-body {
  padding: 0.7rem 0.75rem 0.9rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--cream);
}
.card-desc { font-size: 0.75rem; color: var(--text-light); line-height: 1.5; flex: 1; display: none; }
@media (min-width: 640px) {
  .card-desc  { display: block; }
  .card-title { font-size: 0.95rem; }
  .card-body  { padding: 0.9rem 1rem 1.1rem; }
}
@media (min-width: 960px) {
  .card-title { font-size: 1.05rem; }
  .card-body  { padding: 1.1rem 1.2rem 1.4rem; }
}
.card-footer { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.5rem; }
.card-link-primary {
  display: block;
  background: var(--red);
  color: white;
  font-size: 0.65rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  text-align: center;
  transition: background 0.2s;
  font-weight: 500;
}
.card-link-primary:hover { background: var(--red-dark); }
.card-link {
  display: block;
  background: transparent;
  border: 1px solid #2e2e2e;
  color: var(--text-light);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  text-align: center;
  transition: border-color 0.2s, color 0.2s;
}
.card-link:hover { border-color: #555; color: var(--cream); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid #1a1a1a;
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: 0.72rem;
  color: #444;
  line-height: 1.8;
}
footer a { color: #555; text-decoration: underline; }

/* Fallback cards shown when no exact recipient match exists */
.card.fallback {
  opacity: 0.75;
  border-color: #1e1e1e;
}

/* Notice above grid explaining fallback cards */
.fallback-notice {
  font-size: 0.78rem;
  color: var(--text-light);
  line-height: 1.6;
  padding: 0 0 0.75rem;
  display: none;
  border-left: 2px solid #333;
  padding-left: 0.75rem;
  margin-bottom: 0.25rem;
}
.fallback-notice.visible { display: block; }

/* ── UTILITIES ── */
.hidden { display: none !important; }
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  color: var(--text-light);
  font-size: 0.82rem;
  line-height: 1.6;
  display: none;
}
.no-results.visible { display: block; }

/* ── IMAGE LOADING SHIMMER ── */
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.card-thumb,
.shelf-card-thumb {
  background: linear-gradient(90deg, #1a1a1a 25%, #242420 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
}
.card-thumb img,
.shelf-card-thumb img {
  position: relative;
  z-index: 1;
}
