/* ==========================================================================
   Archive — shop + product-category pages (Boutique.dc / Animaux.dc)
   Hero band · category pills · toolbar · 3-col grid · round-pill pagination.
   Scoped to product archives so it can't touch the homepage [products] grids.
   ========================================================================== */

/* --- Hero band --- */
/* WooCommerce's products header is empty here (page title hidden, description
   folded into the hero), so collapse it — otherwise it leaves a gap above the
   hero. Its markup is hardcoded in archive-product.php (no hook), hence CSS. */
.woocommerce-products-header { display: none; }
.jl-shop-hero { margin: 0; }
.jl-shop-hero__band {
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: 48px;
  align-items: center;
  padding: clamp(36px, 5vw, 58px) clamp(28px, 5vw, 60px);
  border-radius: 24px;
  background: linear-gradient(120deg, var(--jl-cream-tint) 0%, var(--jl-cream) 100%);
  overflow: hidden;
}
.jl-shop-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--jl-bordeaux);
}
.jl-shop-hero__title {
  margin: 0 0 20px;
  font-family: var(--jl-serif);
  font-weight: 600;
  font-size: clamp(40px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -.01em;
}
.jl-shop-hero__lead {
  max-width: 440px;
  margin: 0;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--jl-text-70);
}
/* gold "jewel" medallion */
.jl-shop-hero__medallion {
  justify-self: center;
  width: 188px;
  height: 188px;
  padding: 11px;
  border-radius: 50%;
  background: linear-gradient(145deg, #D6B878, #9C7836);
  box-shadow: 0 26px 50px rgba(110, 28, 47, .18);
}
.jl-shop-hero__medallion-inner {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(243, 233, 219, .7);
  background: var(--jl-cream-pale);
}
.jl-shop-hero__medallion img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- Category filter pills --- */
.jl-shop-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 44px 0 26px;
}
.jl-shop-pills .jl-pill {
  font-size: 13px;
  font-weight: 500;
  color: var(--jl-ink);
  background: #fff;
  border: 1px solid var(--jl-line);
  border-radius: var(--jl-r-pill);
  padding: 11px 22px;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.jl-shop-pills .jl-pill:hover { border-color: var(--jl-bordeaux); color: var(--jl-bordeaux); }
.jl-shop-pills .jl-pill.is-active {
  background: var(--jl-bordeaux);
  border-color: var(--jl-bordeaux);
  color: var(--jl-cream);
}

/* --- Toolbar: Storefront's .storefront-sorting (result count + sort), bordered --- */
.woocommerce .storefront-sorting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid var(--jl-line);
  border-bottom: 1px solid var(--jl-line);
}
.woocommerce .storefront-sorting::before,
.woocommerce .storefront-sorting::after { content: none; } /* drop Storefront's clearfix */

/* Storefront tucks a pagination nav inside the sorting bar AND prints the whole
   bar again after the loop. The design wants the toolbar to hold only the count
   (left) + sort (right), with pagination centered at the very bottom. So: drop
   the pagination from the top bar, and in the trailing copy strip the toolbar
   chrome + the duplicate count/sort, keeping just its pagination. */
.woocommerce .storefront-sorting > .woocommerce-pagination { display: none; }
.woocommerce ul.products ~ .storefront-sorting {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}
.woocommerce ul.products ~ .storefront-sorting .woocommerce-ordering,
.woocommerce ul.products ~ .storefront-sorting .woocommerce-result-count { display: none; }
.woocommerce ul.products ~ .storefront-sorting > .woocommerce-pagination { display: block; }

.woocommerce .storefront-sorting .woocommerce-result-count {
  order: -1; /* count on the left, sort on the right (DOM order is reversed) */
  margin: 0;
  font-size: 13px;
  color: var(--jl-text-50);
}
.woocommerce .storefront-sorting .woocommerce-ordering { margin: 0; }
.woocommerce .storefront-sorting .woocommerce-ordering select.orderby {
  -webkit-appearance: none;
  appearance: none;
  font: 500 13px var(--jl-sans);
  color: var(--jl-ink);
  background: #fff url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='13'%20height='13'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%236E1C2F'%20stroke-width='2'%3E%3Cpath%20d='m6%209%206%206%206-6'/%3E%3C/svg%3E") no-repeat right 16px center;
  border: 1px solid var(--jl-line);
  border-radius: var(--jl-r-pill);
  padding: 11px 40px 11px 20px;
  cursor: pointer;
}

/* --- Grid: 4 columns, scoped to product archives (body carries the class) --- */
.post-type-archive-product ul.products,
.tax-product_cat ul.products,
.tax-product_tag ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px 30px;
  margin: 42px 0 0;
}
.post-type-archive-product ul.products::before,
.post-type-archive-product ul.products::after,
.tax-product_cat ul.products::before,
.tax-product_cat ul.products::after { content: none; }
.post-type-archive-product ul.products li.product,
.tax-product_cat ul.products li.product,
.tax-product_tag ul.products li.product {
  /* override Storefront's float-grid (width:30.79%; float:left) so each card
     fills its grid cell — parent-theme-enforced layout, hence !important */
  width: auto !important;
  margin: 0 !important;
  float: none !important;
}

/* --- Pagination: round pills, centered below the grid ---
   Storefront forces the list to inline-block and the Customizer injects inline
   rules (`.woocommerce-pagination .page-numbers li .page-numbers.current` etc.,
   specificity 0,4,1) that grey out the active page and links. Everything here is
   prefixed with the `.woocommerce` wrapper and matches that li-deep shape so our
   bordeaux pills win on specificity. */
/* Storefront floats the pagination nav and gives it top/bottom borders; reset to
   a full-width, centered, borderless row. */
.woocommerce .woocommerce-pagination {
  width: 100%;
  float: none;
  text-align: center;
  border: 0;
  padding: 0;
}
.woocommerce .woocommerce-pagination ul.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  gap: 8px;
  margin-top: 60px;
  padding: 0;
  border: 0;
}
.woocommerce .woocommerce-pagination ul.page-numbers li { border: 0; margin: 0; }
/* Pill styling targets the items only (a/span inside li) — `.page-numbers` is
   ALSO the ul's class, so an unscoped rule would draw a pill box around the
   whole list. */
.woocommerce .woocommerce-pagination li .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 6px;
  border-radius: var(--jl-r-pill);
  border: 1px solid var(--jl-line);
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
/* ink text on the inactive pills — out-specifies the Customizer's grey rule */
.woocommerce .woocommerce-pagination .page-numbers li .page-numbers:not(.current) { color: var(--jl-ink); }
/* active page: solid bordeaux */
.woocommerce .woocommerce-pagination .page-numbers li .page-numbers.current {
  background: var(--jl-bordeaux);
  border-color: var(--jl-bordeaux);
  color: var(--jl-cream);
}
.woocommerce .woocommerce-pagination a.page-numbers:hover { border-color: var(--jl-bordeaux); }
.woocommerce .woocommerce-pagination .page-numbers.dots { border: 0; background: transparent; color: var(--jl-text-40); }

/* Prev/Next carry words, not glyphs. Storefront hides the link text
   (text-indent:-9999px) and draws a Font Awesome arrow in ::after — undo both,
   then widen into worded pills (Next solid bordeaux). */
.woocommerce .woocommerce-pagination .page-numbers.prev,
.woocommerce .woocommerce-pagination .page-numbers.next {
  width: auto;
  min-width: 0;
  padding: 0 22px;
  font-size: 13px;
  text-indent: 0;
  overflow: visible;
}
.woocommerce .woocommerce-pagination .page-numbers.prev::after,
.woocommerce .woocommerce-pagination .page-numbers.next::after { display: none; }
.woocommerce .woocommerce-pagination .page-numbers.prev { margin-right: 6px; }
.woocommerce .woocommerce-pagination .page-numbers li a.page-numbers.next {
  margin-left: 6px;
  background: var(--jl-bordeaux);
  border-color: var(--jl-bordeaux);
  color: var(--jl-cream);
}
.woocommerce .woocommerce-pagination .page-numbers li a.page-numbers.next:hover {
  background: var(--jl-bordeaux-dark);
  border-color: var(--jl-bordeaux-dark);
  color: var(--jl-cream);
}

/* --- Dark "personnalisé" CTA band (Animaux category) --- */
.jl-cta-band {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 48px;
  align-items: center;
  margin: 64px 0 0;
  padding: clamp(36px, 5vw, 54px) clamp(28px, 5vw, 60px);
  background: var(--jl-ink);
  color: var(--jl-cream);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 26px 54px rgba(27, 21, 18, .16);
}
.jl-cta-band__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--jl-brass);
}
.jl-cta-band__title {
  margin: 0 0 14px;
  font-family: var(--jl-serif);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  color: var(--jl-cream);
}
.jl-cta-band__title em { color: var(--jl-brass); font-style: italic; }
.jl-cta-band__lead {
  max-width: 520px;
  margin: 0;
  font-size: 15.5px;
  line-height: 1.7;
  color: rgba(243, 233, 219, .72);
}
.jl-cta-band__btn {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 17px 32px;
  border-radius: var(--jl-r-pill);
  background: var(--jl-brass);
  color: var(--jl-ink);
  font: 600 15px/1 var(--jl-sans);
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease;
}
.jl-cta-band__btn:hover { background: var(--jl-brass-light); color: var(--jl-ink); }

@media (max-width: 820px) {
  .jl-cta-band { grid-template-columns: 1fr; gap: 28px; }
  .jl-cta-band__btn { justify-self: start; }
  .jl-shop-hero__band { grid-template-columns: 1fr; gap: 28px; text-align: left; }
  .jl-shop-hero__medallion { justify-self: start; width: 132px; height: 132px; }
  .post-type-archive-product ul.products,
  .tax-product_cat ul.products,
  .tax-product_tag ul.products { grid-template-columns: repeat(3, 1fr); gap: 24px 18px; }
}
@media (max-width: 480px) {
  .post-type-archive-product ul.products,
  .tax-product_cat ul.products,
  .tax-product_tag ul.products { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
}
