/* galeria.css — galería justified-rows + PhotoSwipe + chips + CTAs */

/* PhotoSwipe core CSS — re-export inline para no agregar otra request */
@import url('/assets/js/vendor/photoswipe/photoswipe.css');

/* ───────── PAGE-AMBIENTE-DETALLE ───────── */
#page-ambiente-detalle { background: var(--cream); }

.amb-d-hero {
  padding: 160px 0 48px;
  background: var(--cream);
  position: relative;
}
.amb-d-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 32px;
  gap: 16px; flex-wrap: wrap;
}
.breadcrumb-top {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--earth);
}
.breadcrumb-top a { color: var(--earth); text-decoration: none; transition: color .2s; }
.breadcrumb-top a:hover { color: var(--dark); }
.breadcrumb-top .sep { opacity: 0.4; }
.breadcrumb-top .actual { color: var(--dark); font-weight: 500; }

.cta-tienda-top {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color .2s, border-color .2s;
}
.cta-tienda-top:hover { color: var(--wheat); border-color: var(--wheat); }

.amb-d-hero .h-display {
  margin: 0 0 16px;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1.05;
  color: var(--dark);
}
.amb-d-hero .lede {
  max-width: 60ch;
  color: rgba(33,28,24,.72);
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 32px;
}

/* ───────── CHIPS ───────── */
.chips {
  display: flex; gap: 8px; flex-wrap: wrap;
  list-style: none; padding: 0; margin: 0 0 8px;
}
.chip {
  display: inline-block;
  padding: 8px 18px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dark);
  background: transparent;
  border: 1px solid rgba(33,28,24,.18);
  border-radius: 100px;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { background: var(--linen); border-color: var(--dark); }
.chip.is-active {
  background: var(--dark); color: var(--cream); border-color: var(--dark);
}

/* ───────── GALERÍA JUSTIFIED ROWS ───────── */
.amb-d-galeria { padding: 32px 0 96px; }

.gal-justified {
  display: flex; flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.gal-item {
  display: block;
  background: var(--linen);
  overflow: hidden;
  position: relative;
  text-decoration: none;
  cursor: zoom-in;
  /* fallback antes de que el JS aplique width/height */
  flex: 1 1 200px;
  aspect-ratio: var(--ar, 1);
}
.gal-item picture, .gal-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.gal-item img {
  transition: transform .5s ease, opacity .3s;
  background-size: cover;
  background-position: center;
}
.gal-item:hover img { transform: scale(1.03); }
.gal-item:focus-visible {
  outline: 2px solid var(--wheat); outline-offset: 4px;
}

/* Ver más */
.gal-mas-wrap {
  text-align: center;
  margin-top: 48px;
}
.gal-mas-btn { min-width: 220px; }
.gal-mas-btn[disabled] { opacity: .6; cursor: wait; }

.gal-vacia {
  text-align: center;
  padding: 80px 20px;
  color: var(--earth);
  font-style: italic;
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: 20px;
}

/* ───────── CTA FINAL ───────── */
.amb-d-cta {
  background: var(--dark);
  color: var(--cream);
  padding: 96px 0;
  text-align: center;
}
.amb-d-cta .h-section { color: var(--cream); margin-bottom: 16px; }
.amb-d-cta .lede { color: rgba(250,248,243,.72); margin-bottom: 32px; }
.amb-d-cta .btn-lg {
  padding: 16px 40px;
  font-size: 14px;
  letter-spacing: 0.18em;
  background: var(--wheat);
  color: var(--dark);
  border-color: var(--wheat);
}
.amb-d-cta .btn-lg:hover { background: var(--cream); border-color: var(--cream); }

/* ───────── MOBILE ───────── */
@media (max-width: 700px) {
  .amb-d-hero { padding-top: 120px; padding-bottom: 32px; }
  .amb-d-top { flex-direction: column; align-items: flex-start; }
  .gal-justified { gap: 4px; }
  .chip { padding: 7px 14px; font-size: 10px; }
}

/* ───────── REDUCED MOTION ───────── */
@media (prefers-reduced-motion: reduce) {
  .gal-item:hover img { transform: none; }
  .gal-item img, .chip, .cta-tienda-top { transition: none; }
}

/* ───────── PHOTOSWIPE TWEAKS ───────── */
/* Color de fondo del viewer alineado con la paleta editorial */
.pswp { --pswp-bg: #0f0c0a; }
.pswp__bg { background: #0f0c0a !important; }
.pswp__icn { fill: var(--cream); }
.pswp__button { color: var(--cream); }
.pswp__counter { color: var(--cream); opacity: .85; font-family: var(--sans); }
