/* Fuente moderna */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Estilos modernos y minimalistas para el buscador de baterías */
.battery-finder-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem;
    font-family: 'Inter', system-ui, sans-serif;
    color: #2c2c2c;
}

.battery-finder-title {
    color: #111827;
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.25rem;
}

.battery-finder-subtitle {
    color: #6b7280;
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 400;
}

.vehicle-types {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    gap: 0.5rem;
}

.vehicle-type {
    flex: 1;
    padding: 0.75rem 1rem;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    border-radius: 0.5rem 0.5rem 0 0;
    transition: all 0.2s;
    color: #6b7280;
    background: #f9fafb;
}

.vehicle-type:hover {
    background: #f3f4f6;
}

.vehicle-type.active {
    border-bottom-color: #3b82f6;
    background: #fff;
    color: #111827;
    font-weight: 600;
}

.field-group {
    display: none;
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.5rem;
}

.field-group.active {
    display: block;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #374151;
}

.form-group select {
    width: 100%;
    padding: 0.65rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    background-color: #fff;
    transition: border-color 0.2s;
}

.form-group select:focus {
    border-color: #3b82f6;
    outline: none;
}

.search-button {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 0.9rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.search-button:hover {
    background-color: #2563eb;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

.search-button:disabled {
    background-color: #cbd5e1;
    cursor: not-allowed;
}

.results-container {
    margin-top: 2rem;
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.battery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.battery-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInCard 0.4s ease forwards;
}

@keyframes fadeInCard {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.battery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.battery-image {
    height: 180px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.battery-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.no-image {
    color: #9ca3af;
    font-size: 0.9rem;
    text-align: center;
}

.battery-info {
    padding: 1rem;
}

.battery-info h4 {
    margin: 0 0 0.5rem;
    color: #1e40af;
    font-size: 1.1rem;
    font-weight: 600;
}

.battery-info p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
    color: #4b5563;
}

.stock {
    font-weight: 600;
    margin-top: 0.75rem;
    padding: 0.4rem;
    border-radius: 0.4rem;
    text-align: center;
    font-size: 0.85rem;
}

.in-stock {
    background-color: #dcfce7;
    color: #166534;
}

.out-of-stock {
    background-color: #fee2e2;
    color: #b91c1c;
}

.view-details {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 0.6rem;
    border-radius: 0.5rem;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.view-details:hover {
    background-color: #2563eb;
}

.full-compatibility {
    text-align: center;
    padding: 2rem 1rem;
    background: #f9fafb;
    border: 1px dashed #cbd5e1;
    border-radius: 0.75rem;
}

.full-compatibility span {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    color: #10b981;
}

/* Indicador de carga */
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Responsividad */
@media (max-width: 640px) {
    .battery-finder-container {
        padding: 1rem;
    }

    .vehicle-types {
        flex-direction: column;
    }

    .battery-grid {
        grid-template-columns: 1fr;
    }

    .search-button {
        font-size: 0.95rem;
        padding: 0.75rem;
    }
}
.battery-info .spec {
  font-size: 0.9rem;
  margin: 0.2rem 0;
  color: #374151;
  line-height: 1.3;
  display: flex;
  gap: 0.5rem;
}

.battery-info .spec strong {
  color: #1f2937;
  font-weight: 600;
  min-width: 100px;
  flex-shrink: 0;
}

.battery-info .spec span {
  flex: 1;
}

/* Estilo para disponibilidad */
.battery-info .stock {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 20px;
  font-weight: 600;
}

.battery-info .in-stock {
  background-color: #dcfce7;
  color: #15803d;
}

.battery-info .out-of-stock {
  background-color: #fee2e2;
  color: #b91c1c;
}

.battery-info .by-order {
  background-color: #fef3c7;
  color: #92400e;
}

/* Botón WhatsApp */
.battery-info .whatsapp-btn {
  display: inline-block;
  margin-top: 1rem;
  background-color: #25D366;
  color: #fff;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s;
  text-align: center;
}

.battery-info .whatsapp-btn:hover {
  background-color: #1ebe5d;
}
