/* ═══════════════════════════════════════════════════════════════════════
   VividHome — Featured Products Grid
   Product cards with hover overlay, sale badge
   ═══════════════════════════════════════════════════════════════════════ */

.vh-feat {
  position: relative;
  padding: var(--vh-section-py) 0;
  background-color: var(--vh-cream);
  overflow: hidden;
}

/* Subtle grain */
.vh-feat::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  pointer-events: none;
}


/* ── Header ── */

.vh-feat__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--vh-space-12);
  position: relative;
}

.vh-feat__eyebrow {
  display: inline-block;
  font-family: var(--vh-font-body);
  font-size: var(--vh-text-xs);
  font-weight: var(--vh-weight-semibold);
  letter-spacing: var(--vh-tracking-widest);
  text-transform: uppercase;
  color: var(--vh-purple);
  margin-bottom: var(--vh-space-4);
}

.vh-feat__title {
  font-family: var(--vh-font-heading);
  font-size: clamp(2rem, 4.5vw, var(--vh-text-5xl));
  font-weight: var(--vh-weight-light);
  line-height: var(--vh-leading-tight);
  letter-spacing: var(--vh-tracking-tighter);
  color: var(--vh-ink);
}

.vh-feat__title em {
  font-style: normal;
  background: var(--vh-gradient-cta);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Outline button for dark-on-light */
.vh-btn--outline-dark {
  display: inline-flex;
  align-items: center;
  gap: var(--vh-space-2);
  padding: var(--vh-space-3) var(--vh-space-6);
  font-family: var(--vh-font-body);
  font-size: var(--vh-text-sm);
  font-weight: var(--vh-weight-semibold);
  color: var(--vh-ink);
  background: transparent;
  border: 1.5px solid var(--vh-sand);
  border-radius: var(--vh-radius-full);
  text-decoration: none;
  transition: all var(--vh-duration-base) var(--vh-ease-out);
  white-space: nowrap;
  flex-shrink: 0;
}

.vh-btn--outline-dark:hover {
  border-color: var(--vh-purple);
  color: var(--vh-purple);
  transform: translateY(-1px);
}


/* ── Product grid ── */

.vh-feat__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--vh-space-6);
  position: relative;
}


/* ── Product card ── */

.vh-feat__card {
  position: relative;
}

.vh-feat__card-link {
  display: block;
  text-decoration: none;
}

.vh-feat__card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--vh-radius-xl);
  overflow: hidden;
  background: var(--vh-linen);
}

.vh-feat__card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--vh-duration-slower) var(--vh-ease-out);
}

.vh-feat__card-link:hover img {
  transform: scale(1.05);
}

.vh-feat__card-placeholder {
  width: 100%;
  height: 100%;
  transition: transform var(--vh-duration-slower) var(--vh-ease-out);
}

.vh-feat__card-link:hover .vh-feat__card-placeholder {
  transform: scale(1.05);
}

/* Sale badge */
.vh-feat__card-badge {
  position: absolute;
  top: var(--vh-space-3);
  left: var(--vh-space-3);
  z-index: 2;
  font-family: var(--vh-font-body);
  font-size: 0.65rem;
  font-weight: var(--vh-weight-bold);
  letter-spacing: var(--vh-tracking-wider);
  text-transform: uppercase;
  color: var(--vh-white);
  background: var(--vh-gradient-cta);
  padding: var(--vh-space-1) var(--vh-space-3);
  border-radius: var(--vh-radius-full);
}

/* Hover overlay — hidden */
.vh-feat__card-overlay {
  display: none;
}


/* ── Card body ── */

.vh-feat__card-body {
  padding: var(--vh-space-4) var(--vh-space-1) 0;
}

.vh-feat__card-cat {
  font-family: var(--vh-font-body);
  font-size: 0.65rem;
  font-weight: var(--vh-weight-semibold);
  letter-spacing: var(--vh-tracking-wider);
  text-transform: uppercase;
  color: var(--vh-stone);
  display: block;
  margin-bottom: var(--vh-space-1);
}

.vh-feat__card-title {
  font-family: var(--vh-font-heading);
  font-size: var(--vh-text-lg);
  font-weight: var(--vh-weight-regular);
  color: var(--vh-ink);
  line-height: var(--vh-leading-snug);
  margin: 0 0 var(--vh-space-2);
}

.vh-feat__card-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--vh-duration-fast) var(--vh-ease-out);
}

.vh-feat__card-title a:hover {
  color: var(--vh-purple);
}

.vh-feat__card-price {
  font-family: var(--vh-font-body);
  font-size: var(--vh-text-sm);
  font-weight: var(--vh-weight-semibold);
  color: var(--vh-charcoal);
}

/* WooCommerce price HTML overrides */
.vh-feat__card-price del {
  color: var(--vh-stone);
  font-weight: var(--vh-weight-regular);
  margin-right: var(--vh-space-2);
}

.vh-feat__card-price ins {
  text-decoration: none;
  color: var(--vh-magenta);
}


/* ── Responsive ── */

@media (max-width: 1023px) {
  .vh-feat__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Hide last 2 cards on tablet */
  .vh-feat__card:nth-child(n+7) {
    display: none;
  }
}

@media (max-width: 767px) {
  .vh-feat__header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--vh-space-4);
  }

  .vh-feat__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--vh-space-4);
  }

  /* Show only 4 on mobile */
  .vh-feat__card:nth-child(n+5) {
    display: none;
  }

}
