/* =============================================
   SHOP ARCHIVE — Figma node 43:1292
   Hero category cards + sidebar filters + grid + pagination
   ============================================= */

.shop-archive {
  background: var(--color-bg);
  padding-top: 32px;
}

/* -----------------------------------------------
   PAGE TITLE  "Produtos" — centred Astralaga
   ----------------------------------------------- */
.shop-archive__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 400;
  color: var(--color-brown);
  text-align: center;
  margin: 0 0 32px 0;
  line-height: 1;
}

/* -----------------------------------------------
   CATEGORY HERO CARDS  (only on main shop page)
   5 horizontal cards with image + dark overlay + label
   ----------------------------------------------- */
.shop-cat-hero {
  padding-inline: var(--container-pad);
  margin-bottom: 48px;
}

.shop-cat-hero__row {
  max-width: var(--container-max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.shop-cat-hero__card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 1 / 0.62;          /* matches Figma card proportions */
  background: var(--color-tan-light);
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}

.shop-cat-hero__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 52, 27, .18);
}

.shop-cat-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dark gradient overlay bottom→middle to keep label legible */
.shop-cat-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(79, 52, 27, .68) 0%,
    rgba(79, 52, 27, .15) 50%,
    transparent 100%
  );
}

.shop-cat-hero__label {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-bg);
}

@media (max-width: 768px) {
  .shop-cat-hero__row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .shop-cat-hero__row { grid-template-columns: 1fr; }
}

/* -----------------------------------------------
   CATEGORY HERO  (Figma node 48:1732)
   Shown ONLY on product_cat / product_tag archives.
   Full-bleed edge-to-edge — the floating header pill flows OVER it
   (like the homepage hero). No container, no border-radius.
   ----------------------------------------------- */

/* Cancel the global "push main below the fixed header" rule on category
   archives — the hero is supposed to start at y=0 with the header floating
   on top of it (same trick the homepage uses). */
body.tax-product_cat .site-main,
body.tax-product_tag .site-main {
  padding-top: 0;
}

.cat-hero {
  position: relative;
  width: 100%;
  margin: 0 0 32px 0;
}

.cat-hero__inner {
  position: relative;
  width: 100%;
  height: clamp(360px, 32vw, 460px);    /* Figma ≈ 420px on 1440 canvas */
  overflow: hidden;
  background: var(--color-brown);
  /* deliberately NO border-radius — Figma is edge-to-edge */
}

.cat-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Soft fade so title/desc remain readable on any photo.
   Figma: hero has a natural light-tan background; we add a subtle
   left-to-right wash to anchor the text without darkening the photo. */
.cat-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(79, 52, 27, .45) 0%,
    rgba(79, 52, 27, .18) 35%,
    rgba(79, 52, 27, 0)   65%
  );
  pointer-events: none;
}

/* Content aligned with the page container left edge (matches sidebar /
   breadcrumbs indentation below) so the visual rhythm carries through. */
.cat-hero__content {
  position: absolute;
  left: max(var(--container-pad, 24px),
            calc((100vw - var(--container-max, 1212px)) / 2));
  top: 50%;
  transform: translateY(-50%);
  max-width: 420px;
  color: #fff;
  z-index: 1;
  /* Pull content a bit higher so it sits above visual centre, per Figma */
  margin-top: clamp(-40px, -2.5vw, -16px);
}

.cat-hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 4.4vw, 64px);
  color: #fff;
  margin: 0 0 14px 0;
  line-height: 1;
}

.cat-hero__desc {
  font-family: var(--font-body);
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 500;
  line-height: 1.55;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  max-width: 340px;
}

/* CTA bottom-right of hero — small uppercase text + down arrow icon */
.cat-hero__cta {
  position: absolute;
  right: max(var(--container-pad, 24px),
             calc((100vw - var(--container-max, 1212px)) / 2));
  bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  transition: opacity .2s ease;
  z-index: 1;
}

.cat-hero__cta:hover { opacity: 0.75; }

.cat-hero__cta-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.cat-hero__cta-arrow svg { display: block; }

@media (max-width: 768px) {
  .cat-hero__inner    { height: 320px; }
  .cat-hero__content  {
    left: var(--container-pad, 24px);
    right: var(--container-pad, 24px);
    max-width: none;
    top: auto;
    bottom: 70px;
    transform: none;
    margin-top: 0;
  }
  .cat-hero__cta      {
    right: var(--container-pad, 24px);
    bottom: 20px;
  }
}

/* -----------------------------------------------
   BREADCRUMBS — Figma: sit just below the hero, left-aligned with the
   container, comma-thin and quiet (rgba brown).
   `.shop-breadcrumbs` already has the `container` class on the element,
   so max-width + padding-inline come from the global container rule.
   ----------------------------------------------- */
.shop-breadcrumbs {
  padding-top: 0;
  padding-bottom: 24px;
  font-family: var(--font-body);
  font-size: 15px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: rgba(110, 84, 70, 0.63);
}

.shop-breadcrumbs__crumb {
  color: rgba(110, 84, 70, 0.63);
  text-decoration: none;
}
.shop-breadcrumbs__crumb:hover { color: var(--color-brown); }
.shop-breadcrumbs__crumb--current {
  color: var(--color-brown);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.shop-breadcrumbs__sep { color: rgba(110, 84, 70, 0.45); }

/* -----------------------------------------------
   BODY  (filters sidebar + products grid)
   ----------------------------------------------- */
.shop-archive__body {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 48px;
  padding-bottom: 64px;
}

@media (max-width: 900px) {
  .shop-archive__body { grid-template-columns: 1fr; }
}

/* -----------------------------------------------
   FILTERS SIDEBAR
   ----------------------------------------------- */
.shop-filters {
  position: sticky;
  top: 120px;
  align-self: start;
}

.shop-filters__title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  color: var(--color-brown);
  margin: 0 0 24px 0;
  line-height: 1;
}

.shop-filters__form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.shop-filters__group {
  border: none;
  padding: 0;
  margin: 0;
}

.shop-filters__group-title {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-brown);
  margin-bottom: 12px;
  padding: 0;
}

.shop-filters__options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Custom checkbox — small square outline */
.shop-filters__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-brown);
  cursor: pointer;
  user-select: none;
}

.shop-filters__opt input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(110, 84, 70, 0.5);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background .15s ease, border-color .15s ease;
}

.shop-filters__opt input[type="checkbox"]:checked {
  background: var(--color-brown);
  border-color: var(--color-brown);
}

.shop-filters__opt input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.shop-filters__opt:hover input[type="checkbox"] {
  border-color: var(--color-brown);
}

/* AROMA swatches — small coloured pills */
.shop-filters__swatches {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shop-filters__swatch {
  position: relative;
  width: 32px;
  height: 24px;
  border-radius: 4px;
  background: rgba(209, 186, 158, 0.55);
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s ease, background .15s ease;
}

.shop-filters__swatch.is-active {
  background: rgba(209, 186, 158, 0.78);
  border-color: var(--color-brown);
}

.shop-filters__swatch input[type="checkbox"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  margin: 0;
}

.shop-filters__swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-brown);
}

/* TAMANHO variant — text label visible inside the pill (e.g. "50ml") */
.shop-filters__swatch--size {
  width: auto;
  min-width: 38px;
  padding: 0 8px;
  height: 22px;
}

.shop-filters__swatch--size .shop-filters__swatch-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-brown);
  white-space: nowrap;
}

.shop-filters__swatch--size.is-active .shop-filters__swatch-label {
  font-weight: 700;
}

.shop-filters__apply {
  margin-top: 16px;
  padding: 10px 18px;
  background: var(--color-brown);
  color: var(--color-bg);
  border: none;
  border-radius: 7px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  cursor: pointer;
}

/* Accessibility helper */
.screen-reader-text {
  border: 0;
  clip: rect(1px,1px,1px,1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}

/* -----------------------------------------------
   PRODUCTS GRID — 3 columns × N rows
   ----------------------------------------------- */
.shop-products {
  position: relative;
}

.shop-products.is-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity .2s ease;
}

.shop-products__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1100px) {
  .shop-products__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .shop-products__grid { grid-template-columns: 1fr; }
}

.shop-products__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 0;
  color: var(--color-brown);
  font-size: 18px;
}

/* -----------------------------------------------
   PAGINATION  — centred row of brown chips
   ----------------------------------------------- */
.shop-products__pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
}

.shop-products__pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-brown);
  text-decoration: none;
  border-radius: 50%;
  transition: background .15s ease, color .15s ease;
}

.shop-products__pagination .page-numbers.current {
  background: var(--color-brown);
  color: var(--color-bg);
}

.shop-products__pagination .page-numbers:not(.current):hover {
  background: rgba(110, 84, 70, 0.12);
}

.shop-products__pagination .page-numbers.dots {
  background: transparent;
}
