* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f3f4f6;
    color: #111827;
}

/* Header */

.header {
    background: linear-gradient(90deg, #1d4ed8, #1e40af); /* Azul fuerte */
    color: white;
    padding: 16px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    flex-direction: column;
    font-weight: bold;
}

.logo-main {
    font-size: 22px;
    letter-spacing: 1px;
}

.logo-sub {
    font-size: 13px;
    opacity: 0.9;
}

.header-contact {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    text-align: right;
}

.header-contact span {
    margin: 1px 0;
}

/* Main layout */

.main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 40px 16px;
}

.hero {
    background-color: #e5edff; /* Fondo azul muy claro */
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 24px;
}

.hero h1 {
    margin: 0 0 6px 0;
    font-size: 22px;
    color: #1e3a8a; /* Azul oscuro */
}

.hero p {
    margin: 0;
    font-size: 14px;
    color: #1f2937;
}

/* Products */

.products-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.product-card {
    background-color: white;
    border-radius: 10px;
    padding: 14px 14px 16px 14px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.10);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* --- ESTILOS DE IMAGEN --- */

.product-image-container {
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    padding: 0;
    /* Define la altura mínima para que todas las tarjetas sean iguales */
    height: 180px; 
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff; /* Fondo blanco por defecto */
}

.product-image-container.placeholder {
    /* Fondo gris claro para las imágenes que aún no están */
    background-color: #f0f0f5; 
    border: 1px solid #e0e0e0;
}

.product-image {
    width: 100%;
    height: 100%;
    display: block;
    /* Ajusta la imagen para que se vea completa, sin cortar */
    object-fit: contain; 
}

/* FIN ESTILOS DE IMAGEN */


.product-card h2 {
    margin: 0 0 6px 0;
    font-size: 16px;
    color: #111827;
}

.product-tag {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #2563eb;
    font-weight: 600;
}

.product-desc {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #4b5563;
    /* Para que las descripciones largas no desordenen el layout */
    flex-grow: 1; 
}

.product-price {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: bold;
    color: #15803d; /* Verde de precio */
}

/* Botón de WhatsApp (Verde) */
.product-whatsapp {
    text-decoration: none;
    display: inline-block;
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 6px;
    background-color: #16a34a; /* Verde WhatsApp */
    color: white;
    text-align: center;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.product-whatsapp:hover {
    background-color: #15803d;
    transform: translateY(-1px);
}

/* Botón de Detalle de Producto (Azul) */
.product-detail-btn {
    text-decoration: none;
    display: inline-block;
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 6px;
    background-color: #1d4ed8; /* Azul Tecnológico (diferente a WhatsApp) */
    color: white;
    text-align: center;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.product-detail-btn:hover {
    background-color: #1e40af;
    transform: translateY(-1px);
}


/* Footer */

.footer {
    background-color: #e5e7eb;
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: #374151;
}

/* WhatsApp floating button */

.whatsapp-float {
    position: fixed;
    right: 16px;
    bottom: 16px;
    background-color: #22c55e;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.whatsapp-float:hover {
    background-color: #16a34a;
    transform: translateY(-2px);
}

/* Responsive */

@media (max-width: 640px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-contact {
        text-align: left;
        font-size: 12px;
    }

    .hero h1 {
        font-size: 20px;
    }
}