/* ═══════════════════════════════════════════════════════════════════
   PLP v2 "Explore" — Phase A (theme v1.1.24)
   Loaded only on product-category pages using the Explore layout.
   Plan: repo docs/2026-09-07-plp-layout-v2.md
   ═══════════════════════════════════════════════════════════════════ */

/* ── Banner: light, title left, category tiles right ─────────────── */
.archive-banner--explore {
  background: var(--color-white, #fff);
  color: var(--color-charcoal);
  border-bottom: 1px solid var(--color-grey-200);
  padding-bottom: var(--space-8);
}
.archive-banner--explore .archive-banner__breadcrumb,
.archive-banner--explore .archive-banner__breadcrumb a { color: var(--color-grey-600); }
.archive-banner--explore .archive-banner__breadcrumb a:hover { color: var(--color-bronze); }
.archive-banner--explore .archive-banner__breadcrumb .breadcrumb_last { color: var(--color-charcoal); }
.archive-banner--explore .archive-banner__title {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: clamp(var(--text-3xl), 4.5vw, 3.5rem);
  margin-bottom: var(--space-3);
}
.archive-banner--explore .archive-banner__description { color: var(--color-grey-700); }

.archive-banner__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-10);
  align-items: end;
}
.archive-banner--explore:not(.archive-banner--has-tiles) .archive-banner__inner { grid-template-columns: 1fr; }

/* Tiles: image with the name beneath (BoConcept-style). One horizontal track
   on every viewport — swipe on touch; on desktop prev/next arrows appear only
   when there are more tiles than fit (assets/js/plp-explore.js). */
.plp-tiles { position: relative; width: max-content; min-width: 0; max-width: min(100%, 720px); } /* sizes to its tiles, so ≤4 never overflow (v1.1.26) */
.plp-tiles__track {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.plp-tiles__track::-webkit-scrollbar { display: none; }
.plp-tile {
  display: block;
  width: 156px;
  flex-shrink: 0;
  scroll-snap-align: start;
  color: var(--color-charcoal);
  text-decoration: none;
}
.plp-tile__image {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-grey-200);
}
.plp-tile img,
.plp-tile__placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--duration-slow) var(--ease-out-expo);
}
.plp-tile__placeholder { background: linear-gradient(160deg, #d8cfc2, #b9a98f); }
.plp-tile__name {
  display: block;
  margin-top: var(--space-2);
  font-family: var(--font-subheading);
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  color: var(--color-charcoal);
}
.plp-tile:hover img { transform: scale(1.05); }
.plp-tile:hover .plp-tile__name { color: var(--color-bronze); }
.plp-tile.is-active .plp-tile__name { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

.plp-tiles__arrow {
  position: absolute;
  top: 38%;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--color-charcoal-dark);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.4);
  transform: translateY(-50%);
}
.plp-tiles__arrow[hidden] { display: none; } /* v1.1.27: display:flex above was overriding the hidden attribute */
.plp-tiles__arrow--prev { left: -12px; }
.plp-tiles__arrow--next { right: -12px; }
.plp-tiles__arrow:hover { background: var(--color-bronze); }
/* Fade hint on the overflowing edge (toggled by JS) */
.plp-tiles.has-next::after,
.plp-tiles.has-prev::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 56px;
  pointer-events: none;
  z-index: 1;
}
.plp-tiles.has-next::after { right: 0; background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff); }
.plp-tiles.has-prev::before { left: 0; background: linear-gradient(to left, rgba(255, 255, 255, 0), #fff); }

@media (max-width: 1023px) {
  .archive-banner__inner { grid-template-columns: 1fr; gap: var(--space-6); }
  .plp-tiles { max-width: none; }
  /* Bleed the track to the viewport edge so the cut-off tile hints at more */
  .plp-tiles__track { margin-right: calc(-1 * var(--container-padding, 20px)); padding-right: var(--container-padding, 20px); }
  .plp-tile { width: 140px; }
  .plp-tiles__arrow { display: none; }
  .plp-tiles.has-next::after, .plp-tiles.has-prev::before { display: none; }
}

/* ── Toolbar: "Explore all · N pieces" + Sort ─────────────────────── */
.archive-toolbar--explore { border-bottom: 0; padding-bottom: 0; }
.plp-toolbar__heading { display: flex; align-items: baseline; gap: var(--space-5); }
.plp-toolbar__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  margin: 0;
}
.plp-toolbar__count { font-family: var(--font-subheading); font-size: var(--text-sm); color: var(--color-grey-600); }
.plp-toolbar__controls { display: flex; gap: var(--space-3); align-items: center; }
.plp-toolbar__sort {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 var(--space-2) 0 var(--space-4);
  border: 1px solid var(--color-grey-300);
}
.plp-toolbar__sort-label { font-family: var(--font-subheading); font-size: var(--text-sm); color: var(--color-grey-600); margin-right: 4px; }
.plp-toolbar__sort .woocommerce-ordering { margin: 0; }
.plp-toolbar__sort .woocommerce-ordering select {
  border: 0;
  height: 42px;
  padding: 0 var(--space-6) 0 var(--space-1);
  background: transparent;
  font-weight: 500;
  color: var(--color-charcoal);
}
@media (max-width: 600px) {
  .archive-toolbar--explore .archive-toolbar__inner { flex-direction: column; align-items: flex-start; }
}

/* ── Cards: name + price row ───────────────────────────────────────── */
.card-product--explore .card-product__content { padding: var(--space-4) 0 0; }
.card-product__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); }
.card-product--explore .card-product__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 400;
  letter-spacing: 0;
  margin-bottom: 0;
}
.card-product--explore .card-product__price {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-charcoal);
  white-space: nowrap;
}
/* Price below the name (Shop Tweaks → Category Layout, v1.1.28) */
.card-product__row--stacked { display: block; }
.card-product__row--stacked .card-product__price { margin-top: var(--space-1); white-space: normal; }
.plp-explore--no-suffix .card-product--explore .woocommerce-price-suffix { display: none; }
