/* ══════════════════════════════════════════
   Light Box SV — Responsive / Mobile fixes
   ══════════════════════════════════════════ */

/* ── Featured card con imagen: elimina altura fija y espacio vacío ── */
.product-card.featured {
  height: auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Imagen featured: altura natural sin recorte */
.product-card.featured .card-img,
.product-card.featured .card-img.img-edit-wrap {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex-shrink: 0;
  aspect-ratio: unset !important;
  overflow: hidden;
  position: relative;
}

/* La img ocupa el ancho completo, altura automática */
.product-card.featured .card-img img {
  width: 100%;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  display: block;
}

/* card-body ocupa el resto sin crecer demasiado */
.product-card.featured .card-body {
  flex: 0 0 auto !important;
}

/* Cards normales con imagen: ratio cuadrado */
.product-card:not(.featured) .card-img.img-edit-wrap {
  aspect-ratio: 1 / 1;
  height: auto !important;
  overflow: hidden;
}

.product-card:not(.featured) .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Tablet (≤ 900px) ── */
@media (max-width: 900px) {

  /* Pricing: 3 col → 1 col */
  .pricing-cards-grid {
    grid-template-columns: 1fr !important;
    max-width: 480px;
    margin: 0 auto;
  }

  /* Quitar el margin-top negativo del card popular en mobile */
  .pricing-cards-grid .product-card[style*="margin-top:14px"],
  .pricing-cards-grid .product-card[style*="margin-top: 14px"] {
    margin-top: 0 !important;
  }

  /* Sizes: 4 col → 2 col */
  .sizes-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Pricing section padding */
  .pricing-section-wrap {
    padding: 64px 24px !important;
  }
}

/* ── Mobile (≤ 600px) ── */
@media (max-width: 600px) {

  /* Pricing section padding aún más pequeño */
  .pricing-section-wrap {
    padding: 48px 16px !important;
  }

  /* Sizes: 2 col en mobile pequeño */
  .sizes-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  /* Products grid: 1 col en mobile */
  .products-grid {
    grid-template-columns: 1fr !important;
  }

  /* About section: columna en mobile */
  .about {
    flex-direction: column !important;
    gap: 32px !important;
  }

  /* Stats bar: 2x2 en mobile */
  .stats-bar {
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px 16px;
  }

  .stat {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  /* Process steps: 1 col */
  .steps {
    grid-template-columns: 1fr !important;
  }

  /* Contact cards: columna */
  .contact-cards {
    flex-direction: column !important;
  }

  /* Contact section */
  .contact {
    flex-direction: column !important;
    gap: 40px !important;
  }

  /* Nav: ocultar links extras si se salen */
  nav ul {
    gap: 12px !important;
  }

  /* Hero padding */
  .hero {
    padding: 80px 20px 60px !important;
  }

  /* Section padding general */
  section {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Products header: columna */
  .products-header {
    flex-direction: column !important;
    gap: 16px !important;
    align-items: flex-start !important;
  }

  /* Process section */
  .process {
    flex-direction: column !important;
    gap: 40px !important;
  }

  /* CMS bar en mobile */
  .cms-bar {
    font-size: 11px;
    padding: 0 12px;
    height: 44px;
  }

  .cms-bar-left span:not(.cms-badge) {
    display: none;
  }

  /* Testimonial */
  .testimonial-section {
    padding: 48px 20px !important;
  }

  .quote-text {
    font-size: 16px !important;
  }
}

/* ══════════════════════════════════════════
   Logo nav menu — solo mobile
   ══════════════════════════════════════════ */

/* Siempre oculto en desktop */
.nav-logo-menu,
.nav-logo-overlay {
  display: none;
}

@media (max-width: 900px) {

  /* El logo es clickeable */
  #navLogoWrap {
    cursor: pointer;
    position: relative;
  }

  #navLogoWrap::after {
    content: '≡';
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: rgba(245,200,66,0.7);
  }

  #navLogoWrap.active .logo-svg {
    filter: drop-shadow(0 0 8px rgba(245,200,66,0.8));
  }

  /* Overlay — visible solo cuando está abierto */
  .nav-logo-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }

  .nav-logo-overlay.open {
    opacity: 1;
    pointer-events: all;
  }

  /* Menú lateral — siempre en DOM pero fuera de pantalla */
  .nav-logo-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 72vw;
    max-width: 280px;
    height: 100dvh;
    background: #0d0d0d;
    border-right: 1px solid rgba(245,200,66,0.2);
    z-index: 999;
    padding: 80px 0 40px;
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
    pointer-events: none;
  }

  .nav-logo-menu.open {
    transform: translateX(0);
    pointer-events: all;
  }

  /* Links del menú */
  .nav-logo-menu a {
    display: flex !important;
    align-items: center;
    gap: 14px;
    padding: 16px 28px;
    color: rgba(255,255,255,0.75) !important;
    text-decoration: none !important;
    font-size: 15px !important;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    list-style: none;
  }

  .nav-logo-menu a:hover,
  .nav-logo-menu a:active {
    background: rgba(245,200,66,0.08);
    color: #f5c842 !important;
    border-left-color: #f5c842;
  }

  /* WhatsApp al fondo */
  .nav-logo-menu a:last-child {
    margin-top: auto;
    color: #25d366 !important;
    border-top: 1px solid rgba(255,255,255,0.06);
  }

  .nav-logo-menu a:last-child:hover {
    background: rgba(37,211,102,0.08);
    border-left-color: #25d366;
  }
}

/* ══════════════════════════════════════════
   Galería — Tu Historia, nuestra colección
   ══════════════════════════════════════════ */
.gallery-section {
  padding: 100px 48px;
  background: var(--bg);
  overflow: hidden;
}

.gallery-wrap {
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 56px;
  flex-wrap: wrap;
  gap: 20px;
}

/* Masonry grid — 3 columnas flexbox */
.masonry-grid {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.masonry-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Columna del medio baja un poco para efecto Pinterest */
.masonry-col--offset {
  margin-top: 48px;
}

.masonry-item {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.35s ease;
}

.masonry-item:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.75),
              0 8px 20px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Botón eliminar (solo admin) */
.gallery-delete-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(220, 30, 30, 0.88);
  color: #fff;
  border: none;
  font-size: 13px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: background 0.2s, transform 0.15s;
}

.masonry-item:hover .gallery-delete-btn {
  display: flex;
}

.gallery-delete-btn:hover {
  background: rgba(200, 0, 0, 1);
  transform: scale(1.1);
}

/* Placeholder vacío */
.masonry-empty {
  text-align: center;
  padding: 80px 40px;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: 20px;
  width: 100%;
}

/* Responsive */
@media (max-width: 900px) {
  .gallery-section { padding: 64px 24px; }
  .masonry-grid { gap: 12px; }
  .masonry-col { gap: 12px; }
  .masonry-col--offset { margin-top: 32px; }
}

@media (max-width: 600px) {
  .gallery-section { padding: 48px 16px; }
  /* En mobile: solo 2 columnas más grandes */
  .masonry-grid {
    gap: 8px;
    flex-wrap: nowrap;
  }
  .masonry-col {
    gap: 8px;
    flex: 1;
    min-width: 0;
  }
  /* Ocultar la tercera columna en mobile — solo 2 */
  .masonry-col:nth-child(3) {
    display: none;
  }
  .masonry-col--offset { margin-top: 20px; }
  .masonry-item { border-radius: 10px; }
  .gallery-header { flex-direction: column; align-items: flex-start; }
}

/* Lightbox zoom */
#galleryLightbox img {
  -webkit-user-drag: none;
}
