/* =========================================
   COMPONENTES: Navbar, Footer, Cards, UI Elements
   Casa Yangoe — Refinado
   ========================================= */

/* -------------------------
   NAVBAR
-------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  height: 70px;
  display: flex;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.navbar-logo img {
  height: 45px;
  width: auto;
  transition: transform 0.3s ease;
}

.navbar-logo img:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 400;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: var(--color-secondary);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--color-primary);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-secondary);
}

/* -------------------------
   CARDS (Productos/Eventos)
-------------------------- */
.card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* Cards normales (eventos, grid) - altura fija */
.card-image {
  overflow: hidden;
  border-radius: 14px 14px 0 0;
}

#productos-grid .card-image img,
#eventos .card-image img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center;
  border-radius: 14px 14px 0 0;
  transition: transform 0.3s ease;
}

/* FIX SAFARI iOS: Solo para carrusel */
.carousel-slide .card-image {
  position: relative;
  width: 100%;
  padding-top: 75%;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
  background-color: #f0f0f0;
}

.carousel-slide .card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 14px 14px 0 0;
  transition: transform 0.3s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.card p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: var(--color-text-light);
  flex-grow: 1;
}

/* -------------------------
   BOTÓN FLOTANTE (FAB)
-------------------------- */
.fab-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 15px;
}

.fab-main {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(177, 135, 0, 0.4);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: #fff;
  overflow: hidden;
  border: 2px solid var(--color-primary);
}

.fab-main:hover {
  transform: scale(1.1);
}

.fab-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.fab-container.active .fab-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.fab-container.active .fab-main {
  transform: rotate(360deg);
  border-color: var(--color-secondary);
}

.fab-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: white;
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  text-decoration: none;
}

.fab-btn:hover {
  transform: scale(1.1);
}

.fab-whatsapp {
  color: #25D366;
}

.fab-instagram {
  color: #E1306C;
}

.fab-facebook {
  color: #1877F2;
}

/* -------------------------
   MODALES
-------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--color-white);
  width: 90%;
  max-width: 500px;
  padding: 3rem 2rem;
  border-radius: 12px;
  text-align: center;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border-top: 6px solid var(--color-primary);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #aaa;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--color-secondary);
}

.modal-logo {
  height: 60px;
  margin-bottom: 1.5rem;
}

/* Modales Legales */
.modal-legal {
  text-align: left;
  max-width: 600px;
}

.modal-legal h3 {
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

.legal-text h4 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  color: var(--color-secondary);
}

.legal-text p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-light);
}

/* -------------------------
   FOOTER (Rediseñado Minimalista)
-------------------------- */
.footer {
  background: #F4F1EB;
  color: var(--color-secondary);
  padding: 2rem 0 1.5rem;
  text-align: center;
  border-top: 1px solid rgba(177, 135, 0, 0.15);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-logo img {
  height: 45px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--color-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 400;
  transition: color 0.3s ease;
  position: relative;
}

.footer-nav a:hover {
  color: var(--color-primary);
}

.footer-legal {
  font-size: 0.85rem;
  color: #666;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.footer-legal a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s;
  font-weight: 400;
}

.footer-legal a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.footer-legal .separator {
  color: #ccc;
}

.copyright {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: #888;
  font-weight: 300;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    height: 60px;
  }

  .nav-links {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    align-items: center;
    gap: 0;
    display: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid #f9f9f9;
  }

  .menu-toggle {
    display: block;
  }

  .footer {
    padding: 1.5rem 0 1rem;
  }
}/* -------------------------
   LIGHTBOX GALERÍA
--------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.gallery-item {
  position: relative;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.gallery-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover img {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item p {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
}

/* Overlay de zoom al hover */
.gallery-item::after {
  content: '\f00e';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 2rem;
  color: white;
  background: rgba(177, 135, 0, 0.9);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.gallery-item:hover::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Lightbox Overlay */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

.lightbox-overlay.active .lightbox-image {
  transform: scale(1);
}

.lightbox-image.zoomed {
  cursor: zoom-out;
  transform: scale(1.8);
}

/* Botones de navegación del lightbox */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-secondary);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3001;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lightbox-nav:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
  left: 20px;
}

.lightbox-nav.next {
  right: 20px;
}

/* Botón cerrar lightbox */
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-secondary);
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3001;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lightbox-close:hover {
  background: #e74c3c;
  color: white;
  transform: rotate(90deg) scale(1.1);
}

/* Caption del lightbox */
.lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-size: 1rem;
  text-align: center;
  max-width: 80%;
  backdrop-filter: blur(10px);
}

/* Contador de imágenes */
.lightbox-counter {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

/* Responsive Lightbox */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .lightbox-nav.prev {
    left: 10px;
  }

  .lightbox-nav.next {
    right: 10px;
  }

  .lightbox-close {
    width: 40px;
    height: 40px;
    top: 10px;
    right: 10px;
  }

  .lightbox-caption {
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
    bottom: 10px;
  }

  .lightbox-counter {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    top: 10px;
  }

  .lightbox-image.zoomed {
    transform: scale(1.5);
  }
}
