/* ==========================================================================
   product-showcase.css — "Trendy Design in 2026" featured products.
   Requires common.css.

   A horizontal product slider. Each product card shows an image (with a
   hover swap), a Sale badge + discount %, the product name, the original
   (struck-through) price next to the sale price, and a "View Options" CTA.

   Desktop : ~5 cards visible. Tablet / mobile: ~2 cards with a peek, paged
             by the prev/next buttons in product-showcase.js.
   ========================================================================== */

.product-showcase {
  background: #fff;
}

.product-showcase__inner {
  padding-top: 3.9rem;
  padding-bottom: 3rem;
}

.product-showcase__header {
  margin-bottom: 2.5rem;
}

.product-showcase__title {
  margin: 0;
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.2;
}

.product-showcase__description {
  margin: 1rem 0 0;
  font-size: 1.5rem;
  line-height: 1.6;
  color: rgba(var(--text-color), 0.75);
}

/* --- Track ---------------------------------------------------------------- */
.product-showcase__list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc(50% - 0.75rem);
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.product-showcase__list::-webkit-scrollbar {
  display: none;
}

.product-showcase__item {
  scroll-snap-align: start;
}

/* --- Card ----------------------------------------------------------------- */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.product-card:hover {
  box-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.08);
}

/* Media */
.product-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f6f6f6;
}

.product-card__image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.product-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

.product-card__image--hover {
  opacity: 0;
}

.product-card__media:hover .product-card__image--hover {
  opacity: 1;
}

/* Badges (top-left, stacked horizontally) */
.product-card__badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  display: flex;
  gap: 0.6rem;
}

.product-card__badge,
.product-card__discount {
  padding: 0.3rem 0.9rem;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.05rem;
  border-radius: 4px;
}

.product-card__badge {
  background: #b91c1c;
  color: #fff;
  text-transform: uppercase;
}

.product-card__discount {
  background: #121212;
  color: #fff;
}

/* Wishlist toggle. Same heart as Maxshop: white-filled when unselected, red
   when saved. State (.is-active) is set client-side by wishlist.js. */
.product-card__wishlist {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  padding: 0;
  background: rgba(255, 255, 255, 0.9);
  border: 0;
  border-radius: 50%;
  color: #e11d48;
  cursor: pointer;
  box-shadow: 0 0.1rem 0.4rem rgba(0, 0, 0, 0.12);
  transition: color 0.2s ease, background 0.2s ease;
}

.product-card__wishlist svg {
  width: 2rem;
  height: 2rem;
  fill: #fff;
  stroke: currentColor;
}

.product-card__wishlist:hover {
  background: #fff;
}

/* Saved: filled red heart */
.product-card__wishlist.is-active svg {
  fill: currentColor;
}

/* Content */
.product-card__content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 1.5rem 1.4rem 1.8rem;
}

.product-card__name {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.35;
  /* Always reserve two lines so the price + CTA below align across cards.
     Longer names are clamped to two lines with an ellipsis. */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-height: calc(1.6rem * 1.35 * 2);
  overflow: hidden;
}

.product-card__name a {
  color: inherit;
  text-decoration: none;
}

.product-card__name a:hover {
  text-decoration: underline;
}

.product-card__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.product-card__price-old {
  font-size: 1.5rem;
  color: rgba(var(--text-color), 0.5);
}

.product-card__price-current {
  font-size: 1.9rem;
  font-weight: 600;
  color: #b91c1c;
}

.product-card__price-unit {
  font-size: 1.3rem;
  color: rgba(var(--text-color), 0.6);
}

/* "(inc VAT)" / "(exc VAT)" tag next to the price */
.product-card__price-vat {
  font-size: 1.2rem;
  color: rgba(var(--text-color), 0.55);
}

/* Selling-unit / pack size line, e.g. "pack of 1.44 m²" */
.product-card__pack {
  margin-top: 0.4rem;
  font-size: 1.3rem;
  color: rgba(var(--text-color), 0.6);
  margin-bottom: 0rem;
}

/* CTA */
.product-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  min-height: 4.4rem;
  padding: 0 2rem;
  background: #121212;
  color: #fff;
  font-size: 1.4rem;
  letter-spacing: 0.05rem;
  text-decoration: none;
  border-radius: 6px;
  /* keep a gap above the button when content is short */
  margin-block-start: 1.6rem;
  transition: background 0.2s ease;
}

.product-card__cta:hover {
  background: #000;
}

/* --- Controls ------------------------------------------------------------- */
.product-showcase__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.product-showcase__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  padding: 0;
  background: transparent;
  border: 1px solid #d9d9d9;
  border-radius: 50%;
  color: #303030;
  cursor: pointer;
}

.product-showcase__button:hover {
  background: rgba(var(--text-color), 0.06);
}

.product-showcase__button svg {
  width: 1.4rem;
  height: 1rem;
}

.product-showcase__button--prev svg {
  transform: rotate(90deg);
}

.product-showcase__button--next svg {
  transform: rotate(-90deg);
}

.product-showcase__button:disabled {
  opacity: 0.3;
  cursor: default;
}

/* --- Tablet --------------------------------------------------------------- */
@media (min-width: 750px) {
  .product-showcase__list {
    grid-auto-columns: calc((100% - 4rem) / 3);
  }
}

/* --- Desktop -------------------------------------------------------------- */
@media (min-width: 990px) {
  .product-showcase__inner {
    padding-top: 5.2rem;
    padding-bottom: 4rem;
  }

  .product-showcase__title {
    font-size: 4rem;
  }

  .product-showcase__list {
    grid-auto-columns: calc((100% - 6rem) / 5);
  }
}
