/*
Theme Name: AutoGlass Pro
Theme URI: https://example.com/autoglass-pro
Author: AutoGlass Pro
Description: Tema WordPress profesional para empresas de parabrisas y vidrios automotrices. Totalmente personalizable desde el Personalizador de WordPress. Incluye secciones de servicios, galería, testimonios y formulario de contacto.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: business, one-page, responsive, custom-colors, custom-logo
Text Domain: autoglass-pro
*/

/* ============================================
   ESTILOS PERSONALIZADOS
   ============================================ */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8fafc;
  color: #0f172a;
}


/* ── Logo personalizado: tamaño controlado ── */
.custom-logo-link {
  display: flex;
  align-items: center;
}
.custom-logo-link img,
img.custom-logo {
  max-height: 48px !important;
  width: auto !important;
  display: block;
  object-fit: contain;
}

/* ── Galería: portrait-friendly ── */
.gallery-portrait {
  aspect-ratio: 3 / 4;
}

/* ── LIGHTBOX ── */
#ag-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
}
#ag-lightbox.open {
  display: flex;
}
#ag-lightbox-inner {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
#ag-lb-img {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  display: block;
  transition: opacity 0.2s ease;
}
#ag-lb-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 100000;
}
#ag-lb-close:hover { background: rgba(255,255,255,0.3); }
.ag-lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 100000;
}
.ag-lb-nav:hover { background: rgba(255,255,255,0.3); }
#ag-lb-prev { left: 1rem; }
#ag-lb-next { right: 1rem; }
#ag-lb-counter {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-family: 'Montserrat', sans-serif;
}
.lightbox-trigger {
  cursor: zoom-in;
}

/* ── Galería de screenshots (testimonios) ── */
.screenshot-item {
  aspect-ratio: 9 / 16;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: #e2e8f0;
}
.screenshot-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.2);
}
.screenshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.screenshot-item:hover img {
  transform: scale(1.04);
}

/* Animación ping para el badge del hero */
@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}
.animate-ping {
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Animación pulse para el contador */
@keyframes count-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Menú móvil */
#mobile-menu {
  display: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
#mobile-menu.open {
  display: block;
  max-height: 600px;
}

/* Navbar fija */
#main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #f1f5f9;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Efecto hover en links de galería */
.gallery-item img {
  transition: transform 0.5s ease;
}
.gallery-item:hover img {
  transform: scale(1.07);
}

/* Overlay galería */
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(30,58,138,0);
  transition: background 0.3s ease;
  pointer-events: none;
}
.gallery-item:hover::after {
  background: rgba(30,58,138,0.15);
}

/* Botón activo en móvil */
.mobile-cta-btn:active {
  transform: scale(0.97);
}

/* Blur decorativo */
.blur-blob {
  filter: blur(80px);
  border-radius: 50%;
}

/* Formulario de contacto */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.95rem;
  color: #0f172a;
  transition: all 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
  background: #fff;
}

/* Botón WhatsApp flotante */
.wa-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  cursor: pointer;
}
.wa-tooltip {
  background: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.wa-float:hover .wa-tooltip {
  opacity: 1;
  transform: translateX(0);
}
.wa-btn {
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(37,211,102,0.45);
  transition: transform 0.2s ease;
  text-decoration: none;
}
.wa-btn:hover {
  transform: scale(1.08);
}
.wa-btn svg {
  width: 32px;
  height: 32px;
  fill: white;
  color: white;
}

/* Stats section */
.stat-item {
  text-align: center;
  padding: 2rem 1.5rem;
}

/* Responsive utility */
@media (max-width: 768px) {
  .wa-float {
    bottom: 1.25rem;
    right: 1.25rem;
  }
  .wa-btn {
    width: 54px;
    height: 54px;
  }
}

/* Gradiente de sección */
.section-gradient {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
}

/* Tarjeta de servicio */
.service-card {
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.service-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

/* Tarjeta de testimonio */
.testimonial-card {
  transition: box-shadow 0.25s ease;
}
.testimonial-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

/* Banner inferior de contacto rápido */
.quick-contact-bar {
  background: linear-gradient(90deg, #1e3a8a, #2563eb);
}

/* ── DIAGRAMA DEL AUTO ── */
.glass-zone {
  cursor: pointer;
  transition: opacity 0.15s;
}
.glass-zone:hover .glass-path {
  fill: #93c5fd;
  stroke: #1d4ed8;
  stroke-width: 2;
}
.glass-zone:focus {
  outline: none;
}
.glass-zone:focus .glass-path {
  stroke: #1d4ed8;
  stroke-width: 2.5;
  stroke-dasharray: 4 2;
}
.glass-zone.selected .glass-path {
  fill: #2563eb !important;
  stroke: #1e40af !important;
  stroke-width: 2 !important;
}
.glass-zone.selected text,
.glass-zone.selected .glass-label {
  fill: #fff !important;
}

/* ── Contador de selecciones múltiples ── */
#glass-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1d4ed8;
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  padding: 0 6px;
  margin-left: 4px;
}
/* Chips de vidrios seleccionados */
.glass-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #2563eb;
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin: 2px;
  white-space: nowrap;
}
.glass-chip-remove {
  cursor: pointer;
  opacity: 0.7;
  font-size: 14px;
  line-height: 1;
  margin-left: 2px;
}
.glass-chip-remove:hover { opacity: 1; }
#glass-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  padding: 8px 0 4px;
}
