/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Raleway', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.7;
}

/* ── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

a { color: inherit; }

/* ── Animated background canvas ─────────────────────────────────────────── */
#fondo-animado {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.88;
}

/* Lift all content above the canvas */
.nav, main, .site-footer, .lightbox { position: relative; z-index: 1; }

/* ── Navigation ─────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  gap: 2rem;
}

.nav-logo img {
  height: 44px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1a1a1a;
  transition: opacity 0.2s ease;
}

.nav-links a:hover { opacity: 0.45; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lang-toggle a {
  text-decoration: none;
  color: #1a1a1a;
  transition: opacity 0.2s;
}

.lang-toggle a.active { font-weight: 600; }
.lang-toggle a:not(.active) { opacity: 0.38; }
.lang-toggle span { opacity: 0.25; }

/* ── Main offset ────────────────────────────────────────────────────────── */
main { padding-top: 74px; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  text-align: center;
}


.hero-subtitle {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: #888;
  font-weight: 300;
}

/* ── Section ────────────────────────────────────────────────────────────── */
.section {
  padding: 3rem 3rem 5rem;
}

.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 3rem;
}

.collection-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  margin-bottom: 3rem;
}

/* ── Grid ───────────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 3px;
}

.grid-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: block;
  text-decoration: none;
  color: inherit;
  background: #f0ebe5;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s ease;
}

.grid-item:hover img { transform: scale(1.04); }

.grid-item-placeholder {
  width: 100%;
  height: 100%;
  background: #e8e3dd;
}

.grid-item-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 3rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.48), transparent);
  color: #fff;
  transition: opacity 0.3s;
}

.grid-item-caption h3 {
  font-size: 1.15rem;
  font-weight: 300;
  letter-spacing: 0.04em;
}

.grid-item-link {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 0.4rem;
  opacity: 0.8;
}

/* ── Item detail ────────────────────────────────────────────────────────── */
.pieza-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 74px);
}

.pieza-gallery {
  position: sticky;
  top: 74px;
  height: calc(100vh - 74px);
  display: flex;
  flex-direction: column;
  background: #f5f0eb;
}

.pieza-main-img {
  flex: 1;
  overflow: hidden;
  cursor: zoom-in;
}

.pieza-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.pieza-no-img {
  width: 100%;
  height: 100%;
  background: #e8e3dd;
}

.pieza-thumbs {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: #fff;
  height: 88px;
  overflow-x: auto;
}

.pieza-thumb {
  flex: 0 0 82px;
  cursor: pointer;
  overflow: hidden;
  background: none;
  border: 2px solid transparent;
  padding: 0;
  transition: border-color 0.2s, opacity 0.2s;
  opacity: 0.55;
}

.pieza-thumb.active {
  border-color: #1a1a1a;
  opacity: 1;
}

.pieza-thumb:hover { opacity: 1; }

.pieza-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pieza-info {
  padding: 4rem 3.5rem;
  overflow-y: auto;
}

.pieza-breadcrumb {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 2.5rem;
}

.pieza-breadcrumb a {
  text-decoration: none;
  color: #999;
  transition: color 0.2s;
}

.pieza-breadcrumb a:hover { color: #1a1a1a; }

.pieza-nombre {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  margin-bottom: 2rem;
}

.pieza-tallas { margin-bottom: 1.5rem; }

.pieza-tallas-label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 0.6rem;
}

.pieza-tallas-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.pieza-talla-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border: 1px solid #d0d0d0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #444;
}

.pieza-precio {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
}

.pieza-desc {
  font-size: 0.88rem;
  line-height: 1.9;
  color: #555;
  max-width: 400px;
}

/* ── Breadcrumb (collection page) ───────────────────────────────────────── */
.breadcrumb {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 2rem;
}

.breadcrumb a {
  text-decoration: none;
  color: #999;
  transition: color 0.2s;
}

.breadcrumb a:hover { color: #1a1a1a; }

/* ── Empty state ────────────────────────────────────────────────────────── */
.empty-msg {
  color: #aaa;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  padding: 3rem 0;
}

/* ── 404 ────────────────────────────────────────────────────────────────── */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 60vh;
  padding-top: 6rem;
}

.not-found-title {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.not-found-link {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.not-found-link:hover { opacity: 0.5; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  padding: 2rem 3rem;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aaa;
}

/* ── Lightbox ───────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-close:hover { color: #fff; }

/* ── Fade-in on scroll ──────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 1.5rem; }
  .section { padding: 2rem 1.5rem 3rem; }

  .pieza-layout { grid-template-columns: 1fr; }
  .pieza-gallery { position: static; height: auto; }
  .pieza-main-img { height: 60vw; }
  .pieza-info { padding: 2rem 1.5rem; }
  .site-footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .grid { grid-template-columns: 1fr 1fr; }
}
