/* ==========================================================================
   Merch — letrero "Closed" (tienda cerrada) o, con SITE.merch.open = true,
   lista de productos tipo catálogo + ficha del seleccionado
   ========================================================================== */

/* ---------- Tienda cerrada: letrero inclinado con subrayado azul ---------- */
.closed {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px 0 12px;
}
.closed .label { margin-bottom: 0; }

.closed__sign {
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 0;
}
.closed__word {
  width: 78%;
  margin: 0 auto;
  font-size: inherit;
  text-align: center;
}
.closed__text {
  position: relative;
  display: inline-block;
  font-size: 64px; /* PK.fitText lo ajusta al ancho */
  line-height: 0.9;
  transform: rotate(-8deg);
}
/* el subrayado se inclina junto con el letrero */
.closed__text::after {
  content: '';
  position: absolute;
  left: -0.03em;
  right: -0.03em;
  bottom: -0.13em;
  height: 0.1em;
  background: var(--accent);
}

.closed__foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

@media (min-width: 768px) {
  .closed__foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
@media (orientation: landscape) and (max-height: 480px) {
  .closed { padding: 4px 0 6px; }
  .closed__foot { gap: 6px; }
  .closed__foot .btn { height: 36px; }
}

.merch {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  height: 100%;
}

.merch__list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px 0 8px;
}
.merch__list .label { margin-bottom: 4px; }
.merch__note { margin-bottom: 12px; color: var(--muted); }

/* ---------- Renglones ---------- */
.merch__rows .row { --row-cols: minmax(0, 1fr) auto 6.2em; }
.row__status { text-align: right; }
.row__status--soon { color: var(--accent); }
.row.is-selected .row__status--soon { color: var(--white); }
.row.is-soldout .row__price { text-decoration: line-through; }

/* ---------- Ficha ---------- */
.product {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
}
.product__main {
  display: grid;
  grid-template-columns: 40% minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.product__img {
  aspect-ratio: 1;
  border: 2px solid var(--black);
  background: var(--white);
}
.product__img img { width: 100%; height: 100%; object-fit: contain; animation: pk-in 420ms var(--ease) both; }
.product__info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.product__name {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 900;
  font-size: 22px;
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.product__price { font-size: 14px; }
.product__desc { font-size: 13px; }

.product__sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.product__hint { color: var(--accent); min-height: 0; }
.product__hint:empty { display: none; }
.product__alt { align-self: flex-start; min-height: 32px; display: inline-flex; align-items: center; }

.merch__ideas {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 32px;
  margin-top: 6px;
  color: var(--muted);
  transition: color var(--dur) var(--ease);
}
@media (hover: hover) {
  .merch__ideas:hover,
  .product__alt:hover { color: var(--accent); }
}

@media (max-height: 700px) and (max-width: 1023px) {
  .merch__note { display: none; }
  .product { gap: 8px; padding-top: 10px; }
  .product__main { grid-template-columns: 32% minmax(0, 1fr); }
  .product__desc { display: none; }
}
@media (max-height: 600px) and (max-width: 1023px) {
  .merch__ideas { display: none; }
}

/* ---------- Panel de producto (escritorio) ---------- */
.merch__media { display: none; }

@media (min-width: 1024px), (orientation: landscape) and (max-height: 480px) {
  .merch {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--gutter);
  }
  .merch__media {
    display: block;
    margin: 6px 0 10px;
    background: var(--white);
    border: 2px solid var(--black);
  }
  .merch__media::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6px;
    background: var(--accent);
  }
  .merch__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: clamp(24px, 8%, 80px);
    object-fit: contain;
    opacity: 0;
    transition: opacity 400ms var(--ease);
  }
  .merch__img.is-active { opacity: 1; }
  .merch__caption { position: absolute; left: 12px; top: 10px; }

  .product__main { grid-template-columns: minmax(0, 1fr); }
  .product__img { display: none; }
  .product__name { font-size: clamp(28px, 3.2vw, 52px); }
  .product__desc { font-size: 14px; }
  .product__cta { align-self: flex-start; min-width: 220px; }
}

@media (orientation: landscape) and (max-height: 480px) {
  .merch__list { padding: 4px 0 6px; }
  .merch__note,
  .product__desc,
  .merch__ideas { display: none; }
  .merch__rows .row { min-height: 26px; }
  .product { padding-top: 6px; gap: 6px; }
  .product__name { font-size: 20px; }
  .product .chip { height: 30px; min-width: 34px; }
  .product .btn { height: 34px; }
}
