/* ==============================================
   ESTANDARIZACIÓN DE BOTONES - URBANIZA2
   ============================================== */

/* Variables CSS para consistencia */
:root {
  --btn-padding-standard: 12px 24px;
  --btn-padding-large: 15px 30px;
  --btn-padding-small: 8px 16px;
  --btn-border-radius: 8px;
  --btn-font-size: 1rem;
  --btn-font-weight: 600;
  --btn-transition: all 0.3s ease;
  --btn-min-width: 120px;
  --btn-height-standard: 44px;
}

/* ESTILOS BASE PARA TODOS LOS BOTONES */
.btn,
.btn-primary,
.btn-secondary,
.btn-read,
.btn-contact,
.btn-comprar,
.btn-calcular,
.btn-buscar,
.btn-whatsapp-compra,
.btn-calculadora-compra,
.btn-contactar,
.btn-favorito-modal,
.btn-ver-mas,
.btn-favorito,
.btn-comparar-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--btn-padding-standard);
  border-radius: var(--btn-border-radius);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--btn-transition);
  min-width: var(--btn-min-width);
  height: var(--btn-height-standard);
  box-sizing: border-box;
  text-align: center;
  gap: 8px;
}

/* Accesibilidad: foco visible para botones */
.btn:focus-visible,
[class^="btn-"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(249, 145, 9, 0.45);
}
.btn:focus { outline: none; }

/* BOTONES PRINCIPALES */
.btn-primary {
  background: rgba(249, 145, 9, 0.9);
  color: white;
  border-color: rgba(249, 145, 9, 0.9);
}

.btn-primary:hover {
  background: rgba(249, 145, 9, 1);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(249, 145, 9, 0.4);
}

/* BOTONES SECUNDARIOS (WhatsApp) */
.btn-secondary,
.btn-contact,
.btn-whatsapp-compra {
  background: #25D366;
  color: white;
  border-color: #25D366;
}

.btn-secondary:hover,
.btn-contact:hover,
.btn-whatsapp-compra:hover {
  background: #20b358;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

/* BOTONES DE LECTURA */
.btn-read {
  background-color: #0066cc;
  color: white;
  border-color: #0066cc;
}

.btn-read:hover {
  background-color: #004999;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 102, 204, 0.4);
}

/* BOTONES DE COMPRA */
.btn-comprar {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
  border-color: #27ae60;
}

.btn-comprar:hover {
  background: linear-gradient(135deg, #219a52, #27ae60);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

/* BOTONES DE CALCULADORA */
.btn-calcular,
.btn-calculadora-compra {
  background: #3498db;
  color: white;
  border-color: #3498db;
}

.btn-calcular:hover,
.btn-calculadora-compra:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* BOTÓN DE BÚSQUEDA */
.btn-buscar {
  background: #e74c3c;
  color: white;
  border-color: #e74c3c;
}

.btn-buscar:hover {
  background: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

/* BOTONES DE CONTACTO */
.btn-contactar {
  background: #25d366;
  color: white;
  border-color: #25d366;
}

.btn-contactar:hover {
  background: #20b954;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

/* BOTONES DE VER MÁS */
.btn-ver-mas {
  background: #f99109;
  color: white;
  border-color: #f99109;
}

.btn-ver-mas:hover {
  background: #d87e07;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(249, 145, 9, 0.4);
}

/* BOTONES DE FAVORITOS */
.btn-favorito,
.btn-favorito-modal {
  background: #f8f9fa;
  color: #e74c3c;
  border-color: #e74c3c;
}

.btn-favorito:hover,
.btn-favorito-modal:hover {
  background: #e74c3c;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.btn-favorito.active,
.btn-favorito-modal.active {
  background: #e74c3c;
  color: white;
}

/* BOTONES DE COMPARAR */
.btn-comparar-item {
  background: #f8f9fa;
  color: #3498db;
  border-color: #3498db;
}

.btn-comparar-item:hover {
  background: #3498db;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-comparar-item.active {
  background: #3498db;
  color: white;
}

/* BOTONES PEQUEÑOS (para iconos) */
.btn-favorito,
.btn-comparar-item {
  min-width: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 8px;
}

/* BOTONES GRANDES (para acciones principales) */
.btn-large,
.btn-comprar,
.btn-whatsapp-compra,
.btn-calculadora-compra {
  padding: var(--btn-padding-large);
  font-size: 1.1rem;
  min-width: 150px;
  height: 50px;
}

/* BOTONES PEQUEÑOS (para acciones secundarias) */
.btn-small {
  padding: var(--btn-padding-small);
  font-size: 0.9rem;
  min-width: 100px;
  height: 36px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-read,
  .btn-contact,
  .btn-comprar,
  .btn-calcular,
  .btn-buscar,
  .btn-whatsapp-compra,
  .btn-calculadora-compra,
  .btn-contactar,
  .btn-favorito-modal,
  .btn-ver-mas {
    padding: 10px 20px;
    font-size: 0.9rem;
    min-width: 100px;
    height: 40px;
  }
  
  .btn-large,
  .btn-comprar,
  .btn-whatsapp-compra,
  .btn-calculadora-compra {
    padding: 12px 24px;
    font-size: 1rem;
    min-width: 120px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-read,
  .btn-contact,
  .btn-comprar,
  .btn-calcular,
  .btn-buscar,
  .btn-whatsapp-compra,
  .btn-calculadora-compra,
  .btn-contactar,
  .btn-favorito-modal,
  .btn-ver-mas {
    padding: 8px 16px;
    font-size: 0.85rem;
    min-width: 90px;
    height: 36px;
  }
  
  .btn-large,
  .btn-comprar,
  .btn-whatsapp-compra,
  .btn-calculadora-compra {
    padding: 10px 20px;
    font-size: 0.9rem;
    min-width: 100px;
    height: 40px;
  }
}

/* ESTADOS ESPECIALES */
.btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-comprar:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn:disabled:hover,
.btn-primary:disabled:hover,
.btn-secondary:disabled:hover,
.btn-comprar:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* ANIMACIONES ADICIONALES */
.btn:active,
.btn-primary:active,
.btn-secondary:active,
.btn-comprar:active {
  transform: translateY(0);
  transition: transform 0.1s ease;
}

/* GRUPOS DE BOTONES */
.btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.btn-group .btn {
  flex: 1;
  min-width: 120px;
}

@media (max-width: 768px) {
  .btn-group {
    flex-direction: column;
    gap: 8px;
  }
  
  .btn-group .btn {
    width: 100%;
    flex: none;
  }
}