/* Featured page: reuse landing featured carousel behavior without importing index.css */

/* Container query for product card widths in carousels */
.featured-page .featured-section .carousel {
  container-type: inline-size;
}

/* Full-bleed featured sections (edge-to-edge with small gutters) */
.featured-page .featured-section .container {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 8px;
  padding-right: 8px;
}

@media (min-width: 900px) {
  .featured-page .featured-section .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Featured sections: 3-up grid, no sideways scroll */
.featured-page .featured-section .carousel.featured-carousel {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  column-gap: 2px;
  row-gap: 12px;
  overflow-x: hidden;
  overflow-y: visible;
  padding: 0;
}

/* Also apply to regular carousel (engvall.arts section) */
.featured-page .featured-section .carousel:not(.featured-carousel) {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  column-gap: 2px;
  row-gap: 12px;
  overflow-x: hidden;
  overflow-y: visible;
  padding: 0;
}

.featured-page .featured-section .carousel.featured-carousel .product-card {
  width: 100%;
  min-width: 0;
}

/* Product card metadata styling - centered */
.featured-page .featured-section .product-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

/* Mobile: 2 columns for better readability */
@media (max-width: 768px) {
  .featured-page .featured-section .carousel.featured-carousel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Also apply to regular carousel (engvall.arts section) */
  .featured-page .featured-section .carousel:not(.featured-carousel) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (max-width: 520px) {
  .featured-page .featured-section .product-card {
    flex-basis: 41%;
  }

  /* Switch to 2 columns on small widths */
  .featured-page .featured-section .carousel.featured-carousel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
