/* ========================================
   FOOTER.CSS - MenuX.cl
   Estilos centralizados del footer
   Común para todos los estilos de diseño
   Mobile-first
   ======================================== */

/* ========================================
   FOOTER BASE
   ======================================== */
footer {
  background: #2a2a2a;
  color: #e0e0e0;
  padding: 4rem 1.5rem 2.5rem;
  overflow-x: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--color1);
}

/* ========================================
   FOOTER GRID - AMPLIADO
   ======================================== */
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.2fr 1.5fr 1fr;
  max-width: 1400px;
  margin: 0 auto;
  align-items: flex-start;
}

/* El cart-bar no debe participar en el grid */
.footer-grid .cart-bar {
  display: none;
  grid-column: 1 / -1;
}

/* ========================================
   FOOTER CARDS GENÉRICAS
   ======================================== */
.footer-card {
  background: none;
  border-radius: 8px;
  padding: 0 2rem;
}

/* Excepción para el mapa: sin padding */
.footer-card.footer-mapa {
  padding: 0 !important;
  overflow: visible !important;
}

/* ========================================
   RESUMEN DE PEDIDO (DESKTOP)
   ======================================== */
.pedido-card {
  background: #ffffff !important;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  margin: 0;
}

/* Ocultar pedido-card en móvil y tablet */
@media (max-width: 899px) {
  .pedido-card {
    display: none !important;
  }
}

#pedido-resumen h4,
#pedido-resumen-desktop h4 { 
  font-family: 'Montserrat', sans-serif; 
  margin-bottom: 1rem; 
  font-size: 1.15rem; 
  color: #212121;
  font-weight: 700;
}

#pedido-resumen ul,
#pedido-resumen-desktop ul { 
  list-style: none; 
  padding: 0; 
  margin: 0.5rem 0;
  width: 100%;
}

#pedido-resumen li,
#pedido-resumen-desktop li { 
  display: grid; 
  grid-template-columns: 1fr auto; 
  gap: 1rem; 
  margin-bottom: 0.5rem; 
  font-size: 0.95rem;
  color: #212121 !important;
  align-items: flex-start;
}

#pedido-resumen li span,
#pedido-resumen-desktop li span {
  color: #212121 !important;
}

#pedido-resumen .total-row,
#pedido-resumen-desktop .total-row { 
  font-weight: 700; 
  border-top: 2px solid rgba(0,0,0,0.15); 
  padding-top: 0.75rem; 
  margin-top: 0.75rem; 
  display: grid; 
  grid-template-columns: 1fr auto;
  color: #212121 !important;
  font-size: 1.1rem;
}

#pedido-resumen .total-row span,
#pedido-resumen-desktop .total-row span {
  color: #212121 !important;
}

/* ========================================
   BOTONES DE ACCIÓN DEL PEDIDO
   ======================================== */
#pedido-resumen-desktop .pedido-actions,
#pedido-resumen .pedido-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.pedido-actions .pedido-action-btn,
.pedido-actions .btn-compartir-whatsapp,
.pedido-actions .btn-limpiar,
.pedido-actions #close-bottom-sheet,
.pedido-actions .close-btn {
  flex: 1;
  border: none;
  border-radius: 6px;
  padding: 0.5em 0.75em;
  font-size: var(--pedido-btn-font, 0.78rem);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Montserrat', Arial, sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  box-shadow: none;
  height: var(--pedido-btn-height, 38px);
  min-height: var(--pedido-btn-height, 38px);
  max-height: var(--pedido-btn-height, 38px);
  line-height: 1;
  vertical-align: middle;
  background: var(--surface-strong, #f0f0f0);
  color: var(--text-main, #212121);
}

.pedido-actions .btn-compartir-whatsapp {
  background: var(--pedido-color-whatsapp, var(--color-primary, #25d366)) !important;
  color: #fff !important;
}

.pedido-actions .btn-limpiar {
  background: var(--pedido-color-limpiar, #e0e0e0) !important;
  color: var(--pedido-color-text-dark, #212121) !important;
}

.pedido-actions #close-bottom-sheet,
.pedido-actions .close-btn {
  background: var(--pedido-color-esconder, #d0cfcf) !important;
  color: var(--pedido-color-text-dark, #212121) !important;
}

.pedido-actions .pedido-action-btn:hover,
.pedido-actions .btn-compartir-whatsapp:hover,
.pedido-actions .btn-limpiar:hover,
.pedido-actions #close-bottom-sheet:hover,
.pedido-actions .close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ========================================
   INFORMACIÓN DEL RESTAURANTE - AMPLIADO
   ======================================== */
.footer-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  padding: 0 2rem;
  gap: 0.75rem;
}

.info-logo {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  object-fit: cover;
  margin: 0 auto 1rem;

}

.footer-info h4 {
  font-family: 'Montserrat', 'Poppins', sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0.5rem 0;
  color: #ffffff;
  line-height: 1.3;
}

.footer-info .slogan {
  font-size: 1.05rem;
  font-style: italic;
  opacity: 0.9;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.footer-info p {
  margin: 0.4rem 0 -0.8rem;
  font-size: 1.05rem;
  color: #ffffff;
  line-height: 1.6;
}

.info-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.info-social svg {
  width: 32px;
  height: 32px;
  fill: #ffffff;
  opacity: 0.8;
  transition: all 0.25s ease;
}

.info-social svg:hover {
  opacity: 1;
  fill: var(--color1);
  transform: translateY(-3px);
}

/* ========================================
   MAPA DEL RESTAURANTE
   ======================================== */
.footer-mapa {
  max-width: 350px;
  width: 100%;
  margin: 0 auto;
}

.map-responsive-container {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #3a3a3a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.map-responsive-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ========================================
   FOOTER CRÉDITOS
   ======================================== */
.footer-html-extra {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-credits {
  text-align: center;
  color: #ffffff !important;
  margin-top: 2.5rem;
  padding-top: 5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px!important;
  line-height: 1.5;
  opacity: 0.85;
  font-weight: 700;
  transition: color 0.2s ease;
}

.footer-credits a {
  color: #ffffff !important;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-credits:hover,
.footer-credits:focus,
.footer-credits:active,
.footer-credits:visited,
.footer-credits a:hover,
.footer-credits a:focus,
.footer-credits a:active,
.footer-credits a:visited {
  color: #e6e6e6 !important;
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 1.5rem;
  }
  
  .footer-card {
    padding: 0 1.5rem;
  }
  
  .footer-info {
    padding: 0 1.5rem;
  }
}

@media (max-width: 899px) {
  footer {
    padding: 3rem 1.5rem 5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .footer-card {
    padding: 0 1rem;
  }
  
  .footer-info {
    padding: 0 1rem;
  }

  .footer-html-extra {
    padding-bottom: 180px; /* Espacio para la barra fija "Ver pedido" */
  }

  .footer-credits {
    font-size: 18px !important;
  }
  
  .footer-info h4 {
    font-size: 1.5rem;
  }
  
  .footer-mapa {
    max-width: 100%;
  }
}

/* ========================================
   RESPONSIVE - MÓVIL
   ======================================== */
@media (max-width: 600px) {
  footer {
    padding: 3rem 1.25rem 1.5rem;
  }
  
  .footer-grid {
    gap: 2rem;
  }
  
  /* En móvil: ocultar pedido-card del footer */
  .footer-grid > .pedido-card,
  .footer-grid .footer-card.pedido-card {
    display: none !important;
  }
  
  .info-logo {
    width: 120px;
    height: 120px;
  }
  
  .footer-info h4 {
    font-size: 1.4rem;
  }
  
  .footer-info p {
    font-size: 1rem;
  }
  
  .info-social svg {
    width: 28px;
    height: 28px;
  }
}

/* ========================================
   FIX: ALINEACIÓN PERFECTA DE BOTONES
   ======================================== */
.pedido-actions .pedido-action-btn,
.pedido-actions .btn-compartir-whatsapp,
.pedido-actions .btn-limpiar,
.pedido-actions #close-bottom-sheet,
.pedido-actions .close-btn {
  margin: 0 !important;
  padding: 0.5em 0.75em !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
