/* ==========================================================================
   products.css  —  styling ONLY for products.html (the catalogue grid)
   The single-product page has its own file: product.css
   Banner + breadcrumb styles are shared — see components.css
   ========================================================================== */

/* Optional heading text over the banner */
.products-banner { display: grid; place-items: center; }
.products-banner__title {
  position: absolute;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,.35);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

/* count line */
.products-count {
  margin-bottom: 1.2rem;
  font-size: .9rem;
  color: var(--ink-soft);
}
.products-count strong { color: var(--green-900); font-family: var(--font-head); font-weight: 600; }
.products-count a { color: var(--gold); font-weight: 600; margin-left: .4rem; }
.products-count a:hover { text-decoration: underline; }

/* category filter bar */
.products-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2.2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}
.pfilter {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .9rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink-soft);
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.pfilter span { font-size: .7rem; opacity: .6; }
.pfilter:hover { border-color: var(--gold); color: var(--green-900); }
.pfilter.is-active { background: var(--green-900); border-color: var(--green-900); color: #fff; }
.pfilter.is-active span { opacity: .8; }

/* Product grid */
.products-page__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
}

.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold-soft);
  border-radius: 4px;
  overflow: hidden;
  text-align: left;
  transition: transform .3s ease, box-shadow .3s ease, border-top-color .3s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); border-top-color: var(--gold); }

.product-card__media {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.product-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.product-card:hover .product-card__media img { transform: scale(1.07); }

.product-card__body { padding: 1rem 1rem 1.2rem; }
.product-card__cat {
  display: block;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .3rem;
}
.product-card__body h3 {
  font-size: 1rem;
  margin-bottom: .8rem;
  color: var(--green-900);
}
.product-card__body .btn { padding: .45rem 1rem; font-size: .78rem; }

.products-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
}
.products-empty a { color: var(--green-700); font-weight: 600; }

/* Responsive */
@media (max-width: 1080px) { .products-page__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .products-page__grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; } }

@media (max-width: 640px) {
  /* filter becomes a swipeable single row, not a tall wrap */
  .products-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 1rem;
    margin: 0 -1rem 1.6rem;
    padding-inline: 1rem;
  }
  .products-filter::-webkit-scrollbar { display: none; }
  .pfilter { flex-shrink: 0; }
  .product-card__body { padding: .75rem .8rem .9rem; }
  .product-card__cat { font-size: .56rem; }
  .product-card__body h3 { font-size: .88rem; margin-bottom: .55rem; }
  .product-card__body .btn { width: 100%; justify-content: center; padding: .45rem .6rem; font-size: .72rem; }
  .products-count { font-size: .82rem; }
  .products-count a { display: inline-block; margin-left: 0; }
}
@media (max-width: 360px) { .products-page__grid { grid-template-columns: repeat(2, 1fr); gap: .7rem; } }
