/* =========================================================
   Featured Products Showcase — Frontend Styles
   ========================================================= */

:root {
  --fps-card-bg: #f5f5f3;
  --fps-title-color: #1a1a1a;
  --fps-price-color: #444444;
  --fps-badge-sale-bg: #2d6a4f;
  --fps-badge-feat-bg: #e07b39;
  --fps-radius: 12px;
  --fps-gap: 20px;
  --fps-font: inherit;
}

/* ── Section ── */
.fps-showcase {
  font-family: var(--fps-font);
  margin: 2.5rem 0;
  padding: 0;
}

.fps-showcase__title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--fps-title-color);
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
}

/* ── Grid ── */
.fps-showcase__grid {
  display: grid;
  gap: var(--fps-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.fps-cols-2 { grid-template-columns: repeat(2, 1fr); }
.fps-cols-3 { grid-template-columns: repeat(3, 1fr); }
.fps-cols-4 { grid-template-columns: repeat(4, 1fr); }
.fps-cols-5 { grid-template-columns: repeat(5, 1fr); }
.fps-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* ── Card ── */
.fps-card {
  background: var(--fps-card-bg);
  border-radius: var(--fps-radius);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
}

.fps-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
}

/* ── Image wrap ── */
.fps-card__img-wrap {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1.1;
  overflow: hidden;
  text-decoration: none; /* image links never underlined */
}

.fps-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1.25rem;
  box-sizing: border-box;
  transition: transform 0.35s ease;
  display: block;
}

.fps-card:hover .fps-card__img {
  transform: scale(1.04);
}

/* ── Badges ── */
.fps-badge {
  position: absolute;
  top: 12px;
  left: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  padding: 4px 9px;
  border-radius: 5px;
  line-height: 1;
  z-index: 2;
  white-space: nowrap;
}

.fps-badge--sale {
  background: var(--fps-badge-sale-bg);
  top: 12px;
}

.fps-badge--featured {
  background: var(--fps-badge-feat-bg);
  top: 36px; /* stack below sale badge if both present */
}

/* When only featured badge (no sale) */
.fps-card:not(.fps-card--sale) .fps-badge--featured {
  top: 12px;
}

/* ── Card body ── */
.fps-card__body {
  padding: 0.75rem 0.9rem 1rem;
}

.fps-card__name {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
  line-height: 1.3;
  color: var(--fps-title-color);
}

.fps-card__name a {
  color: inherit;
  text-decoration: none;
}

.fps-card__name a:hover {
  text-decoration: none;
  text-underline-offset: 2px;
}

.fps-card__price {
  font-size: 0.88rem;
  color: var(--fps-price-color);
  margin: 0;
}

/* WooCommerce price elements */
.fps-card__price .price {
  color: var(--fps-price-color);
  font-size: 0.88rem;
}

.fps-card__price del {
  opacity: 0.55;
  font-size: 0.8rem;
  margin-right: 4px;
}

.fps-card__price ins {
  text-decoration: none;
  font-weight: 600;
}

/* ── No products ── */
.fps-no-products {
  color: #888;
  font-style: italic;
  padding: 1rem 0;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .fps-cols-6 { grid-template-columns: repeat(4, 1fr); }
  .fps-cols-5 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 860px) {
  .fps-cols-6,
  .fps-cols-5,
  .fps-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 620px) {
  .fps-cols-6,
  .fps-cols-5,
  .fps-cols-4,
  .fps-cols-3 { grid-template-columns: repeat(2, 1fr); }
  :root { --fps-gap: 14px; }
}

@media (max-width: 380px) {
  .fps-cols-6,
  .fps-cols-5,
  .fps-cols-4,
  .fps-cols-3,
  .fps-cols-2 { grid-template-columns: 1fr; }
}
