/* Products listing — public/products.php */

.prd-page-section {
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
}

.prd-page-section > .container {
  max-width: 1280px;
}

/* Toolbar */
.prd-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.prd-toolbar__count {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
}

.prd-toolbar__count strong {
  color: #fff;
  font-weight: 700;
}

.prd-toolbar__hint {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

/* Category filter — horizontal scroll on small screens */
.prd-filter-panel {
  margin-bottom: 1.5rem;
  padding: clamp(0.85rem, 2.5vw, 1.15rem);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.prd-filter-panel .products-filter-header-enhanced {
  text-align: left;
  margin-bottom: 0.85rem;
}

.prd-filter-panel .products-filter-title-enhanced {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  margin-bottom: 0;
}

.prd-filter-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem;
  padding: 0.15rem 0.25rem 0.35rem;
  scrollbar-width: thin;
}

.prd-filter-scroll .products-filter-buttons-enhanced {
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0.5rem;
  width: max-content;
  min-width: 100%;
}

.prd-filter-scroll .products-filter-btn-enhanced {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0.55rem 1rem;
  font-size: 0.78rem;
  border-radius: 999px;
}

/* Product grid — max 3 columns on large screens */
.products-section.products-page-enhanced .products-grid-page-enhanced {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.85rem, 2.5vw, 1.25rem);
  width: 100%;
  max-width: 100%;
}

@media (min-width: 576px) {
  .products-section.products-page-enhanced .products-grid-page-enhanced {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .products-section.products-page-enhanced .products-grid-page-enhanced {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Card layout */
.prd-card.product-card-page-enhanced {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.prd-card.product-card-page-enhanced:hover {
  transform: translateY(-4px);
}

.prd-card .product-image-wrapper-page-enhanced {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  flex-shrink: 0;
}

.prd-card .product-image-page-enhanced {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prd-card .product-content-page-enhanced {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.35rem;
  padding: 0.9rem 1rem 1rem;
  min-width: 0;
}

.prd-card .product-title-page-enhanced a {
  color: inherit;
  text-decoration: none;
}

.prd-card .product-title-page-enhanced a:hover {
  color: var(--color-secondary, #ff6600);
}

.prd-card .product-image-wrapper-page-enhanced {
  display: block;
  text-decoration: none;
}

.prd-card .product-title-page-enhanced {
  line-height: 1.35;
  margin: 0;
  font-size: clamp(0.92rem, 2.2vw, 1.05rem);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prd-card .product-description-page-enhanced {
  font-size: 0.8rem;
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.prd-card .product-specs-enhanced {
  display: grid;
  gap: 0.25rem;
}

.prd-card .product-cta-btn-enhanced {
  margin-top: auto;
  width: 100%;
  justify-content: center;
  min-height: 42px;
}

.prd-card__featured {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #ff6600, #ff8533);
  border-radius: 999px;
}

/* Empty state */
.prd-empty.products-empty-enhanced {
  text-align: center;
  padding: clamp(2rem, 6vw, 3.5rem) 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

/* Brands — contained width */
.brands-section.brands-enhanced > .container {
  max-width: 1280px;
}

body:not(.genpro-futuristic) .prd-toolbar__count {
  color: #555;
}

body:not(.genpro-futuristic) .prd-toolbar__count strong {
  color: #111;
}

body:not(.genpro-futuristic) .prd-filter-panel {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
}

@media (max-width: 575.98px) {
  .prd-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  body.genpro-futuristic .products-page-enhanced .product-cta-btn-enhanced {
    font-size: 0.72rem !important;
    width: 100%;
    min-width: 0;
    padding: 0.55rem 0.85rem !important;
  }

  body.genpro-futuristic .products-page-enhanced .product-cta-btn-enhanced span,
  body.genpro-futuristic .products-page-enhanced .product-cta-btn-enhanced {
    font-size: 0.72rem !important;
  }
}

/* Override full-bleed layout from older products_public rules */
.products-section.products-page-enhanced {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.brands-section.brands-enhanced {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}
