/* =========================================================
   0. VARIABLES Y RESET
   ========================================================= */
:root {
  --gold: #c08a3e;
  --gold-dark: #a6732d;
  --dark: #1a1a1a;
  --dark-2: #222;
  --text: #2b2b2b;
  --muted: #666;
  --light: #f7f5f2;
  --white: #fff;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .08);
  --font: 'Montserrat', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--font); color: var(--text); background: var(--white); line-height: 1.5; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { width: min(1140px, 100% - 80px); margin-inline: auto; }
.text-gold { color: var(--gold); }

/* =========================================================
   1. BOTONES Y ELEMENTOS COMUNES
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 6px; font-weight: 600; font-size: .95rem;
  border: 2px solid transparent; cursor: pointer; transition: .25s; font-family: inherit;
}
.btn--gold { background: var(--gold); color: var(--white); }
.btn--gold:hover { background: var(--gold-dark); }
.btn--outline { background: var(--white); border-color: var(--dark); color: var(--dark); }
.btn--outline:hover { background: var(--dark); color: var(--white); }
.btn--full { width: 100%; }

.circle-btn {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold); color: var(--white);
  display: grid; place-items: center; font-size: .8rem; transition: .25s;
}
.circle-btn:hover { background: var(--gold-dark); transform: translateX(3px); }

.icon-circle {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%;
  background: var(--gold); color: var(--white); display: grid; place-items: center;
}

/* Encabezados de sección */
.section { padding: 80px 0; }
.section--marble {
  background:
    linear-gradient(rgba(255,255,255,.92), rgba(255,255,255,.92)),
    url('../img/material-marmol.jpg') center/cover;
}
.section--dark { background: var(--dark); color: var(--white); }
.section__header { text-align: center; margin-bottom: 48px; }
.section__tag {
  display: inline-block; color: var(--gold); font-size: .78rem;
  font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px;
}
.section__title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 12px; }
.section__subtitle { color: var(--muted); max-width: 640px; margin-inline: auto; }
.section--dark .section__subtitle { color: #bbb; }

/* =========================================================
   2. HEADER / NAVEGACIÓN
   ========================================================= */
.header {
  position: sticky; top: 0; z-index: 100; background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,.05); transition: .3s;
}
.header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.12); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 80px; }

.logo { display: flex; align-items: center; }
.logo img { height: 62px; width: auto; }
.footer .logo img { height: 70px; }
.footer .logo { justify-content: center; align-self: center; }

.nav__list { display: flex; gap: 32px; }
.nav__link { font-size: .9rem; font-weight: 500; padding: 6px 0; position: relative; transition: .2s; }
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--gold); transition: .25s;
}
.nav__link:hover, .nav__link.active { color: var(--gold); }
.nav__link.active::after, .nav__link:hover::after { width: 100%; }

/* Selector de idioma EN / ES */
.lang-switch { display: flex; border: 1px solid #ddd; border-radius: 20px; overflow: hidden; flex-shrink: 0; }
.lang-btn {
  padding: 6px 12px; border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: .78rem; font-weight: 700; color: var(--muted); transition: .2s;
}
.lang-btn:hover { color: var(--gold); }
.lang-btn.active { background: var(--gold); color: var(--white); }

.nav__toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--dark); }

/* =========================================================
   3. HERO
   ========================================================= */
.hero {
  position: relative; min-height: 600px; display: flex; align-items: center;
  background: var(--white); overflow: hidden;
}
/* Foto de fondo con difuminado suave hacia el blanco */
.hero::before {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 28%;
  background: url('../img/hero.jpg') center/cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.35) 18%, rgba(0,0,0,.8) 35%, #000 50%);
          mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.35) 18%, rgba(0,0,0,.8) 35%, #000 50%);
}
.hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 22%;
  background: linear-gradient(to bottom, rgba(255,255,255,0), var(--white));
}
.hero > * { position: relative; z-index: 1; }
.hero__content { padding: 80px 0 120px; }
.hero__title { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; line-height: 1.15; margin-bottom: 20px; }
.hero__text { max-width: 460px; color: #444; margin-bottom: 32px; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 16px; }

.hero > .hero__features {
  position: absolute; right: calc((100% - min(1140px, 100% - 80px)) / 2); bottom: 24px; display: flex; gap: 28px;
  background: rgba(20,20,20,.85); color: var(--white); padding: 16px 28px;
  border-radius: var(--radius);
}
.feature { display: flex; align-items: center; gap: 10px; font-size: .75rem; font-weight: 500; }
.feature i { color: var(--gold); font-size: 1.4rem; }

/* =========================================================
   4. SERVICIOS
   ========================================================= */
.services { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.service-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); text-align: center; transition: .3s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(0,0,0,.14); }
.service-card img { height: 150px; width: 100%; object-fit: cover; background: #ddd; }
.service-card__body { padding: 20px 16px 24px; }
.service-card__icon { font-size: 1.8rem; color: var(--dark); margin-bottom: 10px; }
.service-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.service-card p { font-size: .85rem; color: var(--muted); }

/* =========================================================
   5. CÓMO COTIZAR
   ========================================================= */
.steps { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.step { flex: 1; text-align: center; }
.step__top { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 16px; }
.step__num {
  width: 42px; height: 42px; border-radius: 50%; background: var(--gold); color: var(--white);
  display: grid; place-items: center; font-weight: 700; font-size: 1.1rem;
}
.step__icon { font-size: 2.4rem; color: var(--dark); }
.step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: .88rem; color: var(--muted); max-width: 240px; margin-inline: auto; }
.step__arrow { color: var(--gold); font-size: 1.3rem; margin-top: 12px; }

/* =========================================================
   6. MATERIALES
   ========================================================= */
.materials { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.material-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: .3s;
}
.material-card:hover { transform: translateY(-6px); }
.material-card img { height: 170px; width: 100%; object-fit: cover; background: #ddd; }
.material-card__body { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; }
.material-card h3 { font-size: 1.05rem; font-weight: 700; }
.material-card p { font-size: .85rem; color: var(--muted); }

/* =========================================================
   7. GALERÍA
   ========================================================= */

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery__item { overflow: hidden; border-radius: 6px; transition: opacity .3s, transform .3s; }
.gallery__item img { height: 200px; width: 100%; object-fit: cover; background: #333; transition: transform .5s; }
.gallery__item:hover img { transform: scale(1.07); }
.gallery--featured { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery--featured .gallery__item img { height: 300px; }
.gallery__more { text-align: center; margin-top: 40px; }
.gallery-page .gallery__item img { height: 240px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; font-size: .88rem; font-weight: 600; color: #ccc; transition: .2s; }
.back-link:hover { color: var(--gold); }

/* =========================================================
   8. CONTACTO
   ========================================================= */
.contact {
  padding: 80px 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(255,255,255,.95) 40%, rgba(255,255,255,.4) 100%),
    url('../img/contacto.jpg') 62% center/auto 100% no-repeat, var(--white);
}
.contact__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: stretch; }
.contact__title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.2; margin-bottom: 14px; }
.contact__info > p { color: #444; max-width: 460px; margin-bottom: 28px; }
.contact__list {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.10); position: relative;
}
.contact__list::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gold); }
.contact__block {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 22px 28px; border-bottom: 1px solid #eee;
}
.contact__block--inline { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.contact__label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .76rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted);
}
.contact__label i { color: var(--gold); font-size: .95rem; }
.contact__value { font-size: 1.45rem; font-weight: 800; color: var(--dark); line-height: 1.2; overflow-wrap: anywhere; }
.btn--sm { padding: 10px 20px; font-size: .85rem; border-radius: 6px; }
/* Botones con borde del panel de contacto: al tocar/pasar el mouse se ponen negros */
.contact__list .btn--outline:hover,
.contact__list .btn--outline:active,
.contact__list .btn--outline:focus-visible { background: var(--dark); border-color: var(--dark); color: var(--white); }
.contact__meta { gap: 14px; border-bottom: 0; background: var(--light); }
.contact__meta-item { display: flex; align-items: center; gap: 14px; min-width: 0; }
a.contact__meta-item:hover strong { color: var(--gold); }
.contact__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.contact__text small { color: var(--muted); font-size: .74rem; font-weight: 500; }
.contact__text strong { font-size: .92rem; font-weight: 700; color: var(--dark); overflow-wrap: anywhere; transition: color .2s; }

.contact__form {
  background: var(--white); padding: 30px; align-self: stretch; border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,.12); display: flex; flex-direction: column; gap: 14px;
}
.contact__form h3 { font-size: 1.15rem; font-weight: 700; }
.form__hint { font-size: .8rem; color: var(--muted); margin-top: -8px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact__form label { display: flex; flex-direction: column; gap: 6px; font-size: .78rem; font-weight: 600; }
.contact__form input, .contact__form textarea {
  padding: 12px; border: 1px solid #ddd; border-radius: 6px;
  font-family: inherit; font-size: .9rem; resize: vertical; transition: .2s;
}
.contact__form label:has(textarea) { flex: 1; }
.contact__form textarea { flex: 1; min-height: 110px; }
.contact__form input:focus, .contact__form textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(192,138,62,.15);
}
.form__status { font-size: .85rem; text-align: center; color: green; min-height: 1em; }

/* =========================================================
   9. FOOTER
   ========================================================= */
.footer { background: var(--dark); color: #ccc; padding-top: 50px; }
.footer__inner { display: grid; grid-template-columns: 1fr 1.2fr .8fr; gap: 32px; padding-bottom: 36px; }
.footer__col { border-left: 1px solid #333; padding-left: 28px; }
.footer h4 { color: var(--white); font-size: .9rem; margin-bottom: 14px; }
.footer__info li { display: flex; gap: 10px; font-size: .85rem; margin-bottom: 10px; }
.footer__info i { color: var(--gold); margin-top: 3px; }
.footer__social { display: flex; gap: 16px; font-size: 1.4rem; }
.footer__social a { color: var(--white); transition: .2s; }
.footer__social a:hover { color: var(--gold); }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  border-top: 1px solid #333; padding: 18px 0; font-size: .78rem; color: #888;
}

/* =========================================================
   10. RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .services { grid-template-columns: repeat(3, 1fr); }
  .materials { grid-template-columns: repeat(3, 1fr); }
  .gallery, .gallery--featured { grid-template-columns: repeat(2, 1fr); }
  .gallery--featured .gallery__item:nth-child(3) { grid-column: 1 / -1; }
  .header__cta { display: none; }
}

@media (max-width: 900px) {
  /* Menú móvil */
  .nav__toggle { display: block; }
  .lang-switch { margin-left: auto; }
  .header__inner { gap: 14px; }
  .nav {
    position: absolute; top: 80px; left: 0; right: 0; background: var(--white);
    max-height: 0; overflow: hidden; transition: max-height .35s; box-shadow: 0 8px 20px rgba(0,0,0,.1);
  }
  .nav.open { max-height: 400px; }
  .nav__list { flex-direction: column; gap: 0; padding: 12px 16px; }
  .nav__link { display: block; padding: 12px 0; }

  .hero::before { left: 0; opacity: .2; -webkit-mask-image: none; mask-image: none; }
  .hero > .hero__features { position: static; border-radius: 0; justify-content: center; flex-wrap: wrap; }
  .hero { flex-direction: column; align-items: stretch; }
  .hero__content { padding: 60px 0 40px; }

  .steps { flex-direction: column; align-items: center; gap: 32px; }
  .step__arrow { transform: rotate(90deg); margin: 0; }

  .contact__inner { grid-template-columns: 1fr; gap: 36px; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__col { border-left: 0; padding-left: 0; }
}

@media (max-width: 600px) {
  .contact__block { padding: 20px 20px; }
  .contact__value { font-size: 1.2rem; }
  .contact__text strong { font-size: .85rem; overflow-wrap: break-word; }
  .container { width: min(1140px, 100% - 40px); }
  .section { padding: 60px 0; }
  .gallery--featured .gallery__item img, .gallery-page .gallery__item img { height: 220px; }
  .services, .materials, .gallery, .gallery--featured, .form__row { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__bottom { justify-content: center; text-align: center; }

  /* Footer en móvil: títulos y contenido centrados */
  .footer__col { text-align: center; }
        .footer__info li { justify-content: center; }
  .footer__social { justify-content: center; }
}

/* Foto vertical de "Professional Installation": enfoca la camiseta y las manos */
.service-card img[src*="servicio-instalacion"] { object-position: center 30%; }

/* Separador entre la galería oscura y el footer */
.gallery-page + .footer { border-top: 1px solid #333; }

/* Puntitos de los carruseles y visor de fotos: ocultos fuera de móvil */
.carousel-dots { display: none; }
.no-scroll { overflow: hidden; }

/* =========================================================
   VISTA MÓVIL: carruseles y galería estilo Instagram
   ========================================================= */
@media (max-width: 600px) {
  /* Carruseles horizontales con deslizamiento */
  .materials, .gallery--featured {
    display: flex; gap: 14px; overflow-x: auto;
    scroll-snap-type: x mandatory; scroll-padding-inline: 20px;
    margin-inline: -20px; padding: 6px 20px 8px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .materials::-webkit-scrollbar, .gallery--featured::-webkit-scrollbar { display: none; }
  .material-card { flex: 0 0 78%; scroll-snap-align: start; }
  .material-card:hover { transform: none; }
  .material-card img { height: 190px; }

  /* Fotos de la galería: todas del mismo tamaño, cuadradas como Instagram */
  .gallery--featured .gallery__item { flex: 0 0 84%; scroll-snap-align: start; aspect-ratio: 1 / 1; border-radius: 8px; }
  .gallery--featured .gallery__item:nth-child(3) { grid-column: auto; }
  .gallery .gallery__item img { height: 100%; aspect-ratio: 1 / 1; cursor: zoom-in; }
  .gallery .gallery__item:hover img { transform: none; }

  /* Puntitos */
  .carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
  .carousel-dots button {
    width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(128,128,128,.45); cursor: pointer; transition: .25s;
  }
  .carousel-dots button.active { width: 22px; border-radius: 8px; background: var(--gold); }
  .gallery--featured + .carousel-dots { margin-top: 12px; }

  /* Página "todas las fotos": cuadrícula de 3 columnas como el perfil de Instagram */
  .gallery-page .container { width: 100%; }
  .gallery-page .back-link, .gallery-page .section__header { margin-inline: 20px; }
  .gallery-page .gallery { grid-template-columns: repeat(3, 1fr); gap: 2px; }
  .gallery-page .gallery__item { aspect-ratio: 1 / 1; border-radius: 0; }
  .gallery-page .gallery__item img { height: 100%; }

  /* Visor de foto a pantalla completa */
  .lightbox {
    position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.97);
    display: flex; align-items: center; justify-content: center;
  }
  .lightbox[hidden] { display: none; }
  .lightbox__img { max-width: 100vw; max-height: 100vh; width: auto; height: auto; object-fit: contain; }
  .lightbox__close, .lightbox__nav {
    position: absolute; border: 0; cursor: pointer; color: var(--white);
    background: rgba(0,0,0,.45); width: 42px; height: 42px; border-radius: 50%; font-size: 1rem;
  }
  .lightbox__close { top: 14px; right: 14px; }
  .lightbox__nav { top: 50%; transform: translateY(-50%); }
  .lightbox__prev { left: 10px; }
  .lightbox__next { right: 10px; }
  .lightbox.single .lightbox__nav { display: none; }
}

/* Crédito al final del footer */
.footer__powered { text-align: center; padding: 0 0 20px; font-size: .78rem; color: #888; }
.footer__powered a { color: #bbb; font-weight: 600; transition: color .2s; }
.footer__powered a:hover { color: var(--gold); }

/* =========================================================
   EFECTOS: aparición suave al hacer scroll (lo activa script.js)
   ========================================================= */
.reveal { opacity: 0; }
.reveal.is-visible {
  opacity: 1;
  animation: reveal-up .8s cubic-bezier(.22,.61,.36,1) var(--d, 0s) backwards;
}
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; }
  .reveal.is-visible { animation: none; }
}

/* =========================================================
   GALERÍA AUTOMÁTICA (fotos de img/galeria/)
   Inicio: 6 fotos en cuadrícula · gallery.html: todas
   ========================================================= */
.gallery--home { grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery--home .gallery__item { aspect-ratio: 4 / 3; }
.gallery--all .gallery__item { aspect-ratio: 1 / 1; }
.gallery--home .gallery__item img,
.gallery--all .gallery__item img { height: 100%; aspect-ratio: auto; cursor: zoom-in; }

.gallery__item {
  position: relative;
  border-radius: 8px;
  background: #2a2a2a;
  animation: gallery-in .7s cubic-bezier(.22,.61,.36,1) both;
}
/* Velo y lupa al pasar el mouse */
.gallery__item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 60%);
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.gallery__item::after {
  content: "\f00e";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.05rem;
  color: #fff;
  background: rgba(192,138,62,.92);
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
  transform: translate(-50%, -50%) scale(.7);
  opacity: 0;
  transition: opacity .35s, transform .35s cubic-bezier(.22,.61,.36,1);
  pointer-events: none;
}
.gallery__item:hover::before { opacity: 1; }
.gallery__item:hover::after { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Mientras carga: brillo gris animado */
.gallery__item.is-loading {
  background: linear-gradient(100deg, #2a2a2a 30%, #3a3a3a 50%, #2a2a2a 70%) 0 0 / 200% 100%;
  animation: gallery-shimmer 1.2s linear infinite;
}
.gallery__item.is-loading img { opacity: 0; }
.gallery__item img { transition: transform .5s, opacity .5s; }

.gallery__empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #aaa;
  padding: 40px 0;
}

@keyframes gallery-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes gallery-shimmer { to { background-position: -200% 0; } }

@media (max-width: 1100px) {
  .gallery--home { grid-template-columns: repeat(3, 1fr); }
  .gallery--all { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .gallery--home { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery--home .gallery__item { aspect-ratio: 1 / 1; border-radius: 10px; border: 1px solid rgba(217,171,98,.45); }
  /* En teléfono la lupa se ve siempre, pequeña en la esquina */
  .gallery--home .gallery__item::after,
  .gallery--all .gallery__item::after {
    left: auto; top: auto; right: 8px; bottom: 8px;
    width: 30px; height: 30px; font-size: .72rem;
    opacity: 1;
    transform: none;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .gallery--all .gallery__item::after { width: 24px; height: 24px; font-size: .6rem; right: 5px; bottom: 5px; }
  .gallery__item:hover::before { opacity: 0; }
}
@media (max-width: 600px) {
  .gallery--home { grid-template-columns: repeat(2, 1fr); }
  .gallery--all { grid-template-columns: repeat(3, 1fr); gap: 2px; }
  .gallery--all .gallery__item { border-radius: 0; border: 0; }
}

/* =========================================================
   VISOR DE FOTOS — computadora y teléfono
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 8, .94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: lb-fade .3s ease both;
}
.lightbox[hidden] { display: none; }
.lightbox__frame { margin: 0; max-width: 92vw; max-height: 86vh; display: flex; }
.lightbox__img {
  max-width: 92vw;
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.lightbox__img.is-in { animation: lb-zoom .4s cubic-bezier(.22,.61,.36,1) both; }

.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background .25s, border-color .25s, transform .2s;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: var(--gold); border-color: var(--gold); }
.lightbox__close { top: 22px; right: 22px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav:active { transform: translateY(-50%) scale(.94); }
.lightbox__prev { left: 24px; }
.lightbox__next { right: 24px; }
.lightbox__count {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .08);
  color: #ddd;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
}
.lightbox.single .lightbox__nav,
.lightbox.single .lightbox__count { display: none; }

@media (max-width: 600px) {
  .lightbox { background: rgba(0, 0, 0, .97); }
  .lightbox__frame, .lightbox__img { max-width: 100vw; max-height: 80vh; }
  .lightbox__img { border-radius: 0; }
  .lightbox__close, .lightbox__nav { width: 42px; height: 42px; font-size: .95rem; }
  .lightbox__close { top: 14px; right: 14px; }
  .lightbox__prev { left: 10px; }
  .lightbox__next { right: 10px; }
  .lightbox__count { bottom: 18px; }
}

@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lb-zoom { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }

/* Fotos de materiales también se pueden ampliar */
.material-card img { cursor: zoom-in; }
