/* ==========================================================================
   Actual — Catálogo (/catalogo) + Producto (/producto)
   Builds on the tokens and components in site.css. Mobile-first.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared pieces
   -------------------------------------------------------------------------- */

/* Photo placeholder (missing or broken image): brand badge on sand */
.media-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 247, 236, 0.9) 0 30%, rgba(255, 247, 236, 0) 62%),
    var(--sand);
}
.media-ph .icon-badge { width: 40%; max-width: 120px; height: auto; aspect-ratio: 1; }
.media-ph__text {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Search field */
.search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.search__icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  color: var(--ink-soft);
  pointer-events: none;
}
.search__input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 46px 10px 46px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--cream);
  color: var(--ink);
  font-size: 1rem; /* ≥16px: no zoom-on-focus on iOS */
  line-height: 1.3;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.search__input::placeholder { color: var(--ink-soft); opacity: 1; }
.search__input:hover { border-color: var(--ink-soft); }
.search__input:focus {
  outline: none;
  border-color: var(--berry);
  box-shadow: 0 0 0 3px rgba(148, 4, 53, 0.18);
}
.search__input::-webkit-search-decoration,
.search__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.search__clear {
  position: absolute;
  right: 1px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
}
.search__clear[hidden] { display: none; }
.search__clear svg { width: 18px; height: 18px; }
.search__clear:hover { color: var(--berry); }

/* Native select dressed as a pill */
.select {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.select select {
  field-sizing: content;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 38px 8px 40px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.select select:hover { border-color: var(--ink); }
.select__icon,
.select__chevron {
  position: absolute;
  width: 18px;
  height: 18px;
  color: var(--ink-soft);
  pointer-events: none;
}
.select__icon { left: 14px; }
.select__chevron { right: 14px; }

/* Comfortable tap targets for the text links on these pages */
.results-empty .link-arrow,
.pdp-related .link-arrow,
.pdp-missing .link-arrow { min-height: 44px; }
.filters__scroller .chip:focus-visible { outline-offset: 1px; }

/* Skeletons */
.card--skeleton { display: grid; gap: 10px; }
.skel-media { aspect-ratio: 4 / 5; }
.skel-line { height: 12px; width: 78%; border-radius: 6px; }
.skel-line--short { width: 42%; height: 16px; }

/* --------------------------------------------------------------------------
   Catálogo — hero
   -------------------------------------------------------------------------- */
.catalog-hero { padding-block: clamp(24px, 6vw, 64px) clamp(16px, 3.5vw, 36px); }
.catalog-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "eyebrow eyebrow"
    "title art"
    "lead lead"
    "meta meta";
  align-items: end;
  gap: 10px 16px;
}
.catalog-hero__head { display: contents; }
.catalog-hero__head .eyebrow { grid-area: eyebrow; }
.catalog-hero__head .display-2 { grid-area: title; min-width: 0; overflow-wrap: break-word; }
.catalog-hero__lead { grid-area: lead; max-width: 58ch; }
.catalog-hero__meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.catalog-hero__meta::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--olive) 0 50%, var(--berry) 50% 100%);
}
.catalog-hero__meta span + span::before { content: "·"; margin-right: 12px; color: var(--olive); }
.catalog-hero__meta:not(:has(span))::before { opacity: 0; } /* loading / error: no stray rule */

/* Catalog failed to load: only the error message remains */
.catalog.is-error .filters,
.catalog.is-error .results__bar { display: none; }
.catalog.is-error .catalog-layout { display: block; }

.catalog-hero__art {
  grid-area: art;
  display: flex;
  align-items: center;
  padding-bottom: 6px;
}
.catalog-hero__art .icon-badge {
  --size: 40px;
  box-shadow: 0 0 0 3px var(--ivory);
}
.catalog-hero__art .icon-badge + .icon-badge { margin-left: -9px; }
.catalog-hero__art .icon-badge:nth-child(2) { transform: translateY(-8px); }
.catalog-hero__art .icon-badge:nth-child(4) { transform: translateY(-5px); }
.catalog-hero__art.is-single .icon-badge { --size: 60px; transform: none; }
.catalog-hero__art.is-single .icon-badge--ivory { box-shadow: 0 0 0 3px var(--ivory), inset 0 0 0 1px var(--line-strong); }
.catalog-hero__spark { width: 46%; height: 46%; }

@media (min-width: 640px) {
  .catalog-hero__art .icon-badge { --size: 64px; }
  .catalog-hero__art .icon-badge + .icon-badge { margin-left: -14px; }
  .catalog-hero__art .icon-badge:nth-child(2) { transform: translateY(-14px); }
  .catalog-hero__art .icon-badge:nth-child(4) { transform: translateY(-8px); }
  .catalog-hero__art.is-single .icon-badge { --size: 92px; }
}
@media (min-width: 960px) {
  .catalog-hero__inner {
    grid-template-areas:
      "eyebrow art"
      "title art"
      "lead art"
      "meta art";
    column-gap: 48px;
    row-gap: 12px;
  }
  .catalog-hero__art { align-self: center; padding: 0 8px 0 0; }
  /* Large badges: switch to the grainy brand icons */
  .catalog-hero__art .icon {
    -webkit-mask-image: var(--icon-lg, var(--icon));
    mask-image: var(--icon-lg, var(--icon));
  }
  .catalog-hero__art .icon-badge { --size: 96px; box-shadow: 0 0 0 5px var(--ivory); }
  .catalog-hero__art .icon-badge + .icon-badge { margin-left: -20px; }
  .catalog-hero__art .icon-badge:nth-child(2) { transform: translateY(-22px); }
  .catalog-hero__art .icon-badge:nth-child(4) { transform: translateY(-12px); }
  .catalog-hero__art.is-single .icon-badge { --size: 132px; }
}

/* --------------------------------------------------------------------------
   Catálogo — filters (sticky bar on mobile/tablet, sticky sidebar on desktop)
   -------------------------------------------------------------------------- */
.filters {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  display: grid;
  gap: 8px;
  margin-inline: calc(var(--gutter) * -1);
  padding: 8px var(--gutter) 6px;
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 22px -22px rgba(54, 52, 31, 0.7);
}

.filters__scroller {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline: calc(var(--gutter) * -1);
  padding: 2px var(--gutter) 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 28px), transparent 100%);
}
.filters__scroller::-webkit-scrollbar { display: none; }
.filters__group { display: flex; align-items: center; gap: 8px; flex: none; }
.filters__group--cats { padding-inline: 2px; }
.filters__group--feature::after,
.filters__group--cats::after {
  content: "";
  flex: none;
  width: 1px;
  height: 26px;
  margin-left: 2px;
  background: var(--line-strong);
}
.filters__label { display: none; }

/* Filter chips */
.fchip {
  flex: none;
  min-height: 44px;
  gap: 8px;
  padding: 6px 14px;
  font-size: 0.9rem;
  line-height: 1.1;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.fchip:has(.fchip__badge) { padding-left: 6px; }
.fchip__badge.icon-badge { --size: 30px; }
.fchip__badge--ivory,
.fchip__badge.icon-badge--ivory { box-shadow: inset 0 0 0 1px var(--line-strong); }
.fchip__badge--all {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: conic-gradient(var(--berry) 0 25%, var(--ochre) 0 50%, var(--sage) 0 75%, var(--olive) 0 100%);
}
.fchip__count {
  min-width: 1.6em;
  margin-left: -2px;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  text-align: left;
}
.fchip[aria-pressed="true"] .fchip__count { color: rgba(253, 236, 214, 0.78); }
.fchip.is-empty:not([aria-pressed="true"]) .fchip__label { color: var(--ink-soft); }
.fchip--skeleton {
  display: inline-block;
  width: 118px;
  height: 44px;
  border-radius: var(--radius-pill);
  border: 0;
}
.fchip--skeleton:first-child { width: 84px; }

.fchip--new {
  border-color: var(--berry);
  color: var(--berry);
  font-weight: 600;
}
.fchip--new:hover { border-color: var(--berry-deep); color: var(--berry-deep); }
.fchip--new[aria-pressed="true"] { background: var(--berry); border-color: var(--berry); color: var(--ivory); }
.fchip__spark { width: 16px; height: 16px; flex: none; }

.fchip__check {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid currentColor;
  border-radius: 5px;
}
.fchip--toggle[aria-pressed="true"] .fchip__check { background: var(--ivory); border-color: var(--ivory); }
.fchip--toggle[aria-pressed="true"] .fchip__check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid var(--ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* --------------------------------------------------------------------------
   Catálogo — results
   -------------------------------------------------------------------------- */
.results { min-width: 0; }
.results__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-block: 14px 18px;
}
.results__summary {
  flex: 1 1 10rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  min-width: 0;
}
.results__clear-long { display: none; }
@media (min-width: 480px) { .results__clear-long { display: inline; } }
.results__count {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.results__clear {
  min-height: 44px;
  margin-block: -12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--berry);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}
.results__clear[hidden] { display: none; }
.results__clear:hover { color: var(--berry-deep); }
.sort { display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: 0; }
.sort__label {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.results__grid .card__name { overflow-wrap: break-word; }
.results__sentinel { height: 1px; }
.results__more {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding-block: 40px 16px;
}
.results__more[hidden],
.results__state[hidden],
.results__end[hidden] { display: none; }
.results__progress { font-size: 0.85rem; color: var(--ink-soft); }

.results-empty { padding-block: 40px 56px; }
.results-empty h2 { color: var(--ink); max-width: 20ch; overflow-wrap: anywhere; }
.results-empty p { max-width: 42ch; }
.results-empty__badge { --size: 64px; }
.results-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-block: 4px 6px; }

.results__end {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: clamp(40px, 8vw, 72px);
  padding: 32px 20px;
  border-radius: var(--radius-l);
  background: var(--cream);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: center;
  color: var(--ink-soft);
}
.results__end-title { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.1; color: var(--ink); }
.results__end .btn { margin-top: 10px; }

.catalog { padding-bottom: clamp(56px, 10vw, 96px); }

@media (min-width: 640px) {
  .results__bar { padding-block: 20px 24px; }
}

/* Desktop: sidebar layout */
@media (min-width: 1024px) {
  .catalog-layout {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
  }
  .filters {
    top: calc(var(--header-h) + 16px);
    gap: 18px;
    max-height: calc(100vh - var(--header-h) - 32px);
    margin: 0;
    padding: 4px 4px 24px;
    overflow-y: auto;
    scrollbar-width: thin;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .filters__scroller {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin: 0;
    padding: 0;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .filters__group { flex-direction: column; align-items: stretch; gap: 2px; }
  .filters__group--cats { padding: 0; }
  .filters__group--feature::after,
  .filters__group--cats::after { display: none; }
  .filters__label {
    display: block;
    margin: 14px 0 4px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--olive-ink);
  }
  .fchip {
    justify-content: flex-start;
    width: 100%;
    padding: 6px 12px 6px 6px;
    border-color: transparent;
    border-radius: 14px;
    font-size: 0.92rem;
    text-align: left;
    white-space: normal;
  }
  .fchip:hover { border-color: transparent; background: rgba(95, 92, 61, 0.09); }
  .fchip__label { flex: 1; }
  .fchip__count { margin-left: auto; text-align: right; }
  .fchip--new { padding-left: 14px; border-color: var(--berry); }
  .fchip--new:hover { background: rgba(148, 4, 53, 0.07); border-color: var(--berry); }
  .fchip--new[aria-pressed="true"]:hover { background: var(--berry-deep); }
  .fchip--toggle { padding-left: 14px; }
  .fchip[aria-pressed="true"]:hover { background: var(--ink); }
  .fchip--new[aria-pressed="true"]:hover { background: var(--berry-deep); }
  .fchip--skeleton { width: 100%; }
  .fchip--skeleton:first-child { width: 100%; }

  .results__bar { padding-block: 4px 24px; }
  .sort__label {
    position: static !important;
    width: auto; height: auto;
    overflow: visible; clip: auto;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-soft);
  }
  .results__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
}
@media (min-width: 1200px) {
  .catalog-layout { grid-template-columns: 248px minmax(0, 1fr); gap: 56px; }
}

/* --------------------------------------------------------------------------
   Producto
   -------------------------------------------------------------------------- */
.pdp-page .wa-fab,
.page-producto .wa-fab { display: none; }

.pdp-nav { padding-block: 8px 6px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-left: -4px;
  padding: 0 4px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.back-link svg { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
.back-link:hover { color: var(--berry); }
.back-link:hover svg { transform: translateX(-3px); }

.pdp {
  display: grid;
  gap: 22px;
  align-items: start;
}
.pdp__media-col { min-width: 0; }
/* The source photos are small (≈320px long side), so the detail view shows the whole photo,
   uncropped, on a cream mat, and never wider than ~470px. The photo is fitted by height
   (most are slightly narrower than 4:5); product.js adds .is-wide for wider photos. */
.pdp__media {
  --mat: clamp(10px, 3vw, 18px);
  position: relative;
  display: grid;
  place-items: center;
  margin: 0;
  aspect-ratio: 4 / 5;
  padding: var(--mat);
  overflow: hidden;
  border-radius: var(--radius-l);
  background: var(--cream);
  box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px -30px rgba(54, 52, 31, 0.55);
}
.pdp__media img {
  width: auto;
  height: 100%;
  max-width: 100%;
  border-radius: calc(var(--radius-l) - var(--mat) + 2px);
  box-shadow: 0 1px 3px rgba(54, 52, 31, 0.14);
  object-fit: contain;
}
/* Wider-than-4:5 photos: the frame hugs the photo so the mat stays even */
.pdp__media.is-wide { aspect-ratio: auto; }
.pdp__media.is-wide img { width: 100%; height: auto; }
.pdp__media .media-ph { border-radius: inherit; }
.pdp--sold .pdp__media img { filter: saturate(0.7); }
.pdp__badges {
  position: absolute;
  top: calc(var(--mat) + 10px);
  left: calc(var(--mat) + 10px);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pdp__badges .badge { position: static; padding: 7px 12px; font-size: 0.7rem; }

.pdp__info { display: grid; gap: 14px; min-width: 0; }

.pdp__crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pdp__crumbs li { display: inline-flex; align-items: center; }
.pdp__crumbs li + li::before {
  content: "›";
  margin-inline: 8px;
  color: var(--olive);
  font-size: 1rem;
  letter-spacing: 0;
}
.pdp__crumbs { margin-block: -10px -6px; }
.pdp__crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--olive-ink);
  text-decoration: none;
}
.pdp__crumbs a:hover { color: var(--berry); text-decoration: underline; }

.pdp__name {
  font-family: var(--font-display);
  font-weight: 300; /* matches .display-* */
  font-size: clamp(2.1rem, 9vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
  overflow-wrap: break-word;
}
.pdp__pricing { display: grid; gap: 2px; }
.pdp__price {
  font-family: var(--font-sans);
  font-size: clamp(1.6rem, 6vw, 2rem);
  font-weight: 300;
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: var(--ink);
}
.pdp__price--ask {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--berry);
}
.pdp__price-note { font-size: 0.95rem; color: var(--ink-soft); }

.pdp__status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink);
}
.pdp__status svg { width: 16px; height: 16px; margin-top: 2px; color: var(--berry); flex: none; }
.pdp__status--new { font-weight: 600; color: var(--berry); }
.pdp__status--sold {
  padding: 12px 14px;
  border-radius: var(--radius-s);
  background: var(--cream);
  box-shadow: inset 0 0 0 1.5px rgba(148, 4, 53, 0.35);
}
.pdp__dot {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--berry);
}

.pdp__actions { display: grid; gap: 10px; margin-top: 4px; }
.pdp__cta { box-shadow: 0 12px 26px -16px rgba(117, 2, 42, 0.9); }
.pdp__secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pdp__secondary .btn { min-width: 0; padding-inline: 12px; }
.pdp__long { display: none; }
@media (min-width: 420px) { .pdp__long { display: inline; } }

.pdp__subtitle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--olive-ink);
}
.pdp__subtitle-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding-inline: 6px;
  border-radius: var(--radius-pill);
  background: var(--sand);
  color: var(--ink);
  letter-spacing: 0;
}

/* Variants: horizontal swatch row on mobile, wrapping grid on desktop */
.pdp__variants { display: grid; gap: 12px; margin-top: 10px; min-width: 0; }
ul.swatches {
  display: flex;
  gap: 10px;
  margin: 0 calc(var(--gutter) * -1);
  padding: 4px var(--gutter) 6px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-padding-inline: var(--gutter);
}
.swatches::-webkit-scrollbar { display: none; }
.swatches li { flex: none; width: 84px; }
.swatch {
  display: grid;
  gap: 6px;
  color: var(--ink);
  text-decoration: none;
}
.swatch__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 12px;
  background: var(--sand);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.2s var(--ease);
}
.swatch__media img { width: 100%; height: 100%; object-fit: cover; }
.swatch__media .media-ph .icon-badge { width: 52%; }
.swatch:hover .swatch__media { box-shadow: 0 0 0 2px var(--ivory), 0 0 0 3.5px var(--line-strong); }
.swatch.is-current .swatch__media { box-shadow: 0 0 0 2px var(--ivory), 0 0 0 4px var(--berry); }
.swatch.is-sold .swatch__media img { opacity: 0.6; filter: saturate(0.5); }
.swatch__label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.swatch.is-current .swatch__label { color: var(--berry); }
.swatch__meta { margin-top: -4px; font-size: 0.72rem; color: var(--ink-soft); }

ul.pdp__assure {
  display: grid;
  gap: 12px;
  margin: 10px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--ink);
}
.pdp__assure li { display: flex; align-items: center; gap: 12px; }
.pdp__assure-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--berry);
}
.pdp__assure-icon svg { width: 18px; height: 18px; }
.pdp__assure-icon--text { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; line-height: 1; }

/* Loading skeleton */
.pdp--loading .pdp__media { box-shadow: none; }
.pdp--loading .pdp__info { gap: 12px; }
.skel-line--eyebrow { width: 40%; height: 12px; }
.skel-line--title { width: 88%; height: 34px; border-radius: 10px; }
.skel-line--price { width: 34%; height: 30px; margin-top: 4px; border-radius: 10px; }
.skel-line--cta { width: 100%; height: 56px; margin-top: 8px; border-radius: var(--radius-pill); }

/* Related */
.pdp-related { padding-block: clamp(48px, 9vw, 96px) clamp(40px, 8vw, 88px); }
.pdp-related .section-head { margin-bottom: clamp(20px, 4vw, 32px); }
@media (max-width: 1023.98px) {
  .pdp-related__grid .card:nth-child(n + 7) { display: none; }
}

/* Not found / error */
.pdp-missing {
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 560px;
  margin-inline: auto;
  padding-block: 24px 16px;
  text-align: center;
}
.pdp-missing__badge { --size: 72px; margin-bottom: 4px; }
.pdp-missing .lead { font-size: 1.02rem; }
.pdp-missing__form {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
}
.pdp-missing__form .search { flex: 1; }
.pdp-missing__form .search__input { padding-right: 16px; }
.pdp-missing__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }

/* Mobile sticky CTA bar */
.pdp-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 85;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--ivory);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 28px -22px rgba(54, 52, 31, 0.7);
  transform: translateY(105%);
  visibility: hidden;
  transition: transform 0.3s var(--ease), visibility 0s linear 0.3s;
}
.pdp-bar.is-visible {
  transform: none;
  visibility: visible;
  transition: transform 0.3s var(--ease), visibility 0s;
}
.pdp-bar[hidden] { display: none; }
.nav-open .pdp-bar { visibility: hidden; }
.pdp-bar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: var(--container);
  margin-inline: auto;
}
.pdp-bar__text { flex: 1; min-width: 0; }
.pdp-bar__name {
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--olive-ink);
}
.pdp-bar__price { font-family: var(--font-sans); font-size: 1.1rem; font-weight: 400; letter-spacing: 0.03em; line-height: 1.2; color: var(--ink); }
.pdp-bar__price.is-ask { font-family: var(--font-sans); font-size: 0.9rem; font-weight: 600; color: var(--berry); }
.pdp-bar__cta { flex: none; min-height: 48px; padding-inline: 18px; }

/* Space so the bar never hides the end of the page */
@media (max-width: 959.98px) {
  .page-producto .site-footer { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 120;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--ivory);
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast:empty { display: none; }

/* Tablet+ */
@media (min-width: 640px) {
  .pdp__secondary { grid-template-columns: repeat(2, max-content); }
  .pdp__actions { max-width: 440px; }
  .swatches li { width: 92px; }
}

/* Single column (phones, small tablets): never wider than ~480px — the photos are small */
@media (max-width: 719.98px) {
  .pdp { max-width: 480px; margin-inline: auto; }
}

/* Two columns from 720px */
@media (min-width: 720px) {
  .pdp {
    grid-template-columns: minmax(0, 470px) minmax(0, 560px);
    justify-content: center;
    gap: clamp(32px, 5.5vw, 88px);
  }
  .pdp__name { font-size: clamp(2.3rem, 4.4vw, 3.75rem); }
}

/* Desktop */
@media (min-width: 960px) {
  .pdp-nav { padding-block: 16px 12px; }
  .pdp__media-col { position: sticky; top: calc(var(--header-h) + 20px); }
  .pdp__media {
    /* Keep the whole frame in view next to the details on short screens */
    max-width: min(100%, calc((100vh - var(--header-h) - 48px) * 0.8));
    margin-inline: auto;
  }
  .pdp__info { gap: 16px; padding-top: 8px; }
  ul.swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 14px 12px;
    margin: 0;
    padding: 4px 4px 0;
    overflow: visible;
  }
  .swatches li { width: auto; }
  .pdp-bar { display: none; }
  .toast { bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .pdp-bar, .toast { transition: none; }
}
