/* =============================================
   TIENDA — catálogo y ficha de producto
   Fondo neutro (bg crema). Productos en primer plano.
   ============================================= */

body.tienda {
  background: var(--c-bg);
  color: var(--c-grey);
  font-family: var(--f-display);
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* ---------- Hero del listado ---------- */
.t-hero {
  padding: clamp(90px, 12vh, 160px) var(--gutter) clamp(30px, 4vh, 60px);
  display: grid;
  gap: 14px;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
}
.t-hero__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(64px, 12vw, 200px);
  line-height: 0.92;
  letter-spacing: -0.04em;
}
.t-hero__sub {
  font-family: var(--f-serif);
  font-size: clamp(20px, 2.2vw, 32px);
  line-height: 1.3;
  color: var(--c-grey);
  max-width: 36ch;
}

/* ---------- Grid principal ---------- */
.t-grid {
  padding: 0 var(--gutter) clamp(40px, 6vw, 80px);
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
}

/* ---------- Filtro ---------- */
.t-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4em 0.8em;
  padding: clamp(20px, 2.4vw, 36px) 0 clamp(20px, 2.4vw, 32px);
}
.t-filter__label {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.1;
  color: var(--c-grey);
}
.t-filter__chip {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(18px, 1.6vw, 26px);
  padding: 2px 14px;
  border: 1px solid var(--c-grey);
  border-radius: 999px;
  background: transparent;
  color: var(--c-grey);
  cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.t-filter__chip:hover {
  background: var(--c-purple);
  color: var(--c-mint);
  border-color: var(--c-purple);
}
.t-filter__chip.is-active {
  background: var(--c-grey);
  color: var(--c-bg);
  border-color: var(--c-grey);
}

/* ---------- Cards del catálogo ---------- */
.t-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 3vw, 56px) clamp(20px, 2.4vw, 36px);
}

.t-card {
  position: relative;
  display: flex;
  flex-direction: column;
  color: inherit;
}
.t-card__media-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.t-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--c-grey);
  border: 1px solid var(--c-grey);
}
.t-card__media.is-agotado img {
  filter: grayscale(0.7) opacity(0.55);
}
.t-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@media (hover: hover) {
  .t-card:hover .t-card__media img {
    transform: scale(1.03);
  }
}
.t-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--f-serif);
  font-size: clamp(14px, 1vw, 18px);
  background: var(--c-grey);
  color: var(--c-bg);
  padding: 2px 12px;
  border-radius: 999px;
  border: 1px solid var(--c-grey);
}

.t-card__info {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}
.t-card__title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(20px, 1.8vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: inherit;
  transition: color 0.3s;
}
@media (hover: hover) {
  .t-card__title:hover { color: var(--c-pink); }
}
.t-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-family: var(--f-serif);
  font-size: clamp(15px, 1.2vw, 20px);
}
.t-card__cat { color: var(--d-mute); }
.t-card__price {
  font-family: var(--f-serif);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(15px, 1.2vw, 20px);
  line-height: 1.3;
  color: var(--c-grey);
  border: 1px solid var(--c-grey);
  border-radius: 999px;
  padding: 2px 12px;
  background: transparent;
  white-space: nowrap;
}
.t-card__price.is-agotado {
  text-decoration: line-through;
  color: var(--d-mute);
  border-color: var(--d-mute);
}

/* ---------- Ficha de producto ---------- */
.t-prod {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(90px, 12vh, 160px) var(--gutter) clamp(40px, 6vw, 80px);
}
.t-prod__back {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 14px;
  color: var(--c-grey);
  margin-bottom: clamp(20px, 3vh, 40px);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.t-prod__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(30px, 4vw, 80px);
  align-items: start;
}

/* ---------- Slider ---------- */
.t-slider {
  position: relative;
  background: var(--c-grey);
  border: 1px solid var(--c-grey);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.t-slider__stage {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.t-slider__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.t-slider__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.t-slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.t-slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: transparent;
  color: var(--c-bg);
  border: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 2;
  opacity: 0.8;
  text-shadow: 0 1px 8px rgba(72, 72, 72, 0.45);
}
.t-slider__nav:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.15);
}
.t-slider__nav--prev { left: 8px; }
.t-slider__nav--next { right: 8px; }
.t-slider__dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.t-slider__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--c-bg);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, transform 0.25s;
}
.t-slider__dot.is-active {
  background: var(--c-bg);
  transform: scale(1.15);
}
.t-slider__count {
  position: absolute;
  right: 16px;
  bottom: 14px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--c-bg);
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 2;
}

/* ---------- Info aside ---------- */
.t-prod__info {
  display: grid;
  gap: clamp(14px, 1.6vw, 22px);
  position: sticky;
  top: clamp(80px, 10vh, 120px);
  align-self: start;
}
.t-prod__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}
.t-prod__category {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(18px, 1.6vw, 26px);
  color: var(--d-mute);
}

/* Precio fuera del botón — serif, grande */
.t-prod__price {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(48px, 6vw, 96px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--c-grey);
  margin: clamp(10px, 1.6vw, 22px) 0 clamp(4px, 0.6vw, 8px);
}

.t-prod__cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(14px, 2vw, 28px);
}

.t-buy {
  display: inline-block;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1;
  padding: clamp(14px, 1.6vw, 22px) clamp(28px, 2.8vw, 44px);
  background: var(--c-purple);
  color: var(--c-mint);
  border: 1px solid var(--c-grey);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, transform 0.2s;
}
.t-buy:hover {
  background: var(--c-mint);
  color: var(--c-purple);
  transform: translateY(-2px);
}
.t-buy.is-disabled {
  background: transparent;
  color: var(--d-mute);
  border: 1px solid var(--d-mute);
  cursor: not-allowed;
}

/* Notas debajo del botón Comprar — pequeñas, discretas */
.t-prod__buy-note,
.t-prod__buy-stripe {
  font-family: var(--f-serif);
  font-size: clamp(13px, 1.1vw, 16px);
  color: var(--d-mute);
  line-height: 1.4;
  margin: 0;
  max-width: 38ch;
}
.t-prod__buy-note {
  margin-top: -10px;
}
.t-prod__buy-note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.t-prod__buy-note a:hover {
  color: var(--c-grey);
}
.t-prod__buy-stripe {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  margin-bottom: clamp(14px, 2vw, 28px);
}

/* Datos técnicos — un poco más grandes */
.t-prod__data {
  display: grid;
  gap: 10px;
  font-family: var(--f-serif);
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.35;
  margin-top: 6px;
}
.t-prod__data > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
}
.t-prod__data dt {
  color: var(--d-mute);
  font-style: italic;
}
.t-prod__data dd {
  color: var(--c-grey);
  margin: 0;
}

/* Ver historia — como botón pill */
.t-prod__related {
  display: inline-block;
  width: fit-content;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1;
  padding: clamp(12px, 1.2vw, 16px) clamp(20px, 2vw, 28px);
  background: transparent;
  color: var(--c-grey);
  border: 1px solid var(--c-grey);
  border-radius: 999px;
  text-decoration: none;
  margin-top: clamp(8px, 1vw, 14px);
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.2s;
}
.t-prod__related:hover {
  background: var(--c-purple);
  color: var(--c-mint);
  border-color: var(--c-purple);
  transform: translateY(-2px);
}

.t-prod__ship {
  font-family: var(--f-serif);
  font-size: clamp(15px, 1.2vw, 18px);
  color: var(--d-mute);
  line-height: 1.5;
  margin-top: clamp(14px, 2vw, 22px);
  max-width: 38ch;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .t-products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .t-prod__top {
    grid-template-columns: 1fr;
  }
  .t-prod__info {
    position: static;
  }
  .t-slider {
    aspect-ratio: 1 / 1;
  }
  .t-slider__nav {
    width: 26px;
    height: 26px;
    font-size: 22px;
  }
  .t-slider__nav--prev { left: 4px; }
  .t-slider__nav--next { right: 4px; }
}
@media (max-width: 520px) {
  .t-products { grid-template-columns: 1fr; }
  .t-prod__data > div {
    grid-template-columns: 96px 1fr;
  }
}
