﻿/* Ported as-is from design/featured-collections-section.html.
   The file's own comment says its shared body/eyebrow/headline block is
   removable once already defined globally  this theme already sets
   `body` (font, margin) in style.css, with a different (light) background
   than this block's #0a0908, so keeping that one line here would silently
   turn the whole site's background black. That line is the only thing
   dropped; box-sizing and .eyebrow/.headline are kept exactly as given. */
* { box-sizing: border-box; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #C9A236;
  margin-bottom: 22px;
}
.eyebrow::before { content: ''; width: 36px; height: 1px; background: #C9A236; flex-shrink: 0; }
.headline {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: clamp(34px, 3.6vw, 46px);
  font-weight: 700;
  line-height: 1.28;
  color: #fbf8f2;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 28px rgba(0,0,0,0.35);
  margin: 0 0 40px;
  max-width: 520px;
}

/* =================================================================
   FEATURED COLLECTIONS SECTION
   ================================================================= */
.featured-section {
  position: relative;
  background: linear-gradient(175deg, #100d09 0%, #0a0908 55%, #0a0908 100%);
  padding: 48px 72px 70px;
}
.featured-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,162,54,0.5), transparent);
}

/* Simplified at the client's request to match an older, plainer design
   just a centered heading, no eyebrow badge or descriptive paragraph (see
   the PHP template's own comment). */
.featured-head {
  text-align: center;
  margin-bottom: 26px;
}
.featured-head .headline {
  margin: 0 auto;
  padding-bottom: 14px;
  max-width: 640px;
  font-size: clamp(26px, 2.4vw, 34px);
  position: relative;
  display: inline-block;
}
/* Thin centered underline accent under the heading, matching the
   reference's simple rule-under-title treatment. */
.featured-head .headline::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 64px;
  height: 1px;
  background: #C9A236;
  transform: translateX(-50%);
}

/* Full-bleed color band holding the tabs, breaking out of the section's
   own side padding to reach the viewport edges regardless of breakpoint
   (a fixed negative-margin trick tied to one padding value would silently
   stop matching the moment that padding changed at a different width). */
.tab-row-band {
  position: relative;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 22px 24px;
  margin-bottom: 28px;
  /* Dark theme's own subtle tint (a peach band would clash against this
     section's near-black default background)  html[data-theme="light"]
     below swaps in the client's actual reference color, #f5ede6. */
  background: rgba(255,255,255,0.03);
}
.tab-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 1400px;
  margin: 0 auto;
}
/* Simple bordered box (white/gray at rest)  gold when active, near-black
   on hover  replacing the old sliding-black-fill treatment, matching the
   client's reference. The smooth scale-up/down on hover is new too, per
   the client's own note that the old site's tabs did this. */
.tab-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 10px 22px;
  border: 1px solid rgba(28,23,18,0.35);
  border-radius: var(--fm-radius-sm);
  background: #ffffff;
  font-family: 'Jost', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #1c1712;
  cursor: pointer;
  transform: scale(1);
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tab-btn:hover {
  color: #ffffff;
  border-color: #1c1712;
  background: #1c1712;
  transform: scale(1.08);
}
.tab-btn.is-active {
  color: #ffffff;
  border-color: #C9A236;
  background: #C9A236;
}
.tab-btn.is-active:hover { transform: scale(1.08); }

/* product grid  the .jewel-card itself lives in the shared
   assets/css/product-card.css, enqueued alongside this file (see
   inc/enqueue.php). Its Quick Summary drawer opens within its own card's
   width, not beside it, so there's no viewport-edge-flip or narrow-width
   fallback to keep in sync here  all that's left here is this section's
   own column counts. */
.product-panel { display: none; }
.product-panel.is-active { display: block; }

/* auto-fill  each card keeps its natural width and the grid adds/drops
   whole columns as the container resizes, instead of a fixed column
   count stretching every card to fill leftover space (which is what
   this used to do at repeat(4, 1fr)). Same 220px basis as .product-grid
   in page-collection.css, so cards size consistently between the two. */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  /* Capped and centered so a short row (e.g. 4 cards) doesn't sit
     left-aligned with a big empty gap on wide screens. */
  max-width: 1600px;
  margin: 0 auto;
}

/* Product count per breakpoint (client-specified): up to 8 on desktop and
   mobile, 6 on tablet. The PHP payload already fetches only 8 per tab (see
   fm_get_featured_collections_payload(8) in inc/woocommerce-featured.php),
   so desktop and mobile need no rule here  they just show everything
   fetched; only the tablet range needs to hide the 7th/8th card. Scoped
   to .featured-section since .product-grid is also the shop/collection
   grid's own class name (page-collection.css) and this must never affect
   that page's product count. */
@media (min-width: 761px) and (max-width: 1024px) {
  .featured-section .product-grid > .jewel-card:nth-child(n+7) { display: none; }
}

@media (max-width: 760px) {
  .featured-section { padding: 40px 26px 50px; }
  .featured-head { margin-bottom: 14px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tab-row-band { padding: 18px 16px; }
  .tab-row { gap: 8px; }
  .tab-btn { padding: 9px 18px; font-size: 11px; letter-spacing: 1px; }
}
@media (max-width: 480px) {
  .featured-section { padding-left: 16px; padding-right: 16px; }
  .product-grid { gap: 8px; }
  .jewel-body { padding: 12px 12px 14px; }
}

/* =========================================================
   LIGHT THEME
   This file predates base/tokens.css and is written in literal hex (see
   the file-header comment), so every color is restated directly rather
   than via a token redefinition  see site-footer.css's own light-theme
   block for the same situation. First of the home page's post-hero
   sections, so it opens the alternating F5EDE6/FFFFFF sequence that
   continues through trending-products.css (F5EDE6), gifts-for-love.css
   (FFFFFF), testimonials.css (F5EDE6) and latest-posts.css (FFFFFF).
   ========================================================= */
html[data-theme="light"] .eyebrow { color: #C9A236; }
html[data-theme="light"] .headline { color: #000000; text-shadow: none; }
html[data-theme="light"] .featured-section { background: #F5EDE6; }
/* .tab-btn itself is deliberately NOT re-colored per theme here (unlike
   the rest of this file)  its white/border/gold-active/dark-hover look
   (see the base rule above) is the client's reference design and reads
   correctly against either theme's .tab-row-band background below, so
   there's nothing left to override. Only the band's own tint differs. */
html[data-theme="light"] .tab-row-band { background: #f5ede6; }
