﻿/* Reset básico y estilos generales del cuerpo (coherente con product_styles.css) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Línea roja divisoria (coherente) */
.linea-roja {
    background-color: #e74c3c; /* Rojo vibrante */
    height: 5px;
    width: 100%;
}


/* Main Category Content */
.category-main {
    padding: 40px 0;
}

.category-header {
    text-align: center;
    margin-bottom: 50px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 40px 30px;
}

.category-title {
    font-size: 3.2em;
    color: #2c3e50;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.category-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 5px;
    background-color: #e74c3c; /* Rojo vibrante */
    margin: 15px auto 0;
    border-radius: 2px;
}

.category-description {
    font-size: 1.15em;
    color: #555;
    max-width: 800px;
    margin: 20px auto 0;
    line-height: 1.8;
}

/* Sección de la cuadrícula de productos (galería) */
.product-grid-section {
    text-align: center;
    margin-bottom: 50px;
}

.product-grid-section h2 {
    font-size: 2.2em;
    color: #2c3e50;
    margin-bottom: 30px;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 15px;
    display: inline-block;
}

.product-cards-container {
    display: grid;
    /* Por defecto, una columna en móviles, centrado */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px; /* Espacio entre las tarjetas */
    justify-content: center; /* Centra las tarjetas cuando no llenan el ancho */
    padding: 0 10px; /* Pequeño padding en los bordes para móviles */
}

.product-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    display: flex; /* Para controlar el layout interno de la tarjeta */
    flex-direction: column;
    justify-content: space-between; /* Empuja el botón al final */
    max-width: 350px; /* Limita el ancho de la tarjeta en móviles si la columna es muy ancha */
    margin: 0 auto; /* Centra cada tarjeta individualmente en la cuadrícula */
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-card a {
    text-decoration: none;
    color: inherit; /* Hereda el color para mantener la coherencia */
    display: flex;
    flex-direction: column;
    height: 100%; /* Asegura que el enlace ocupe toda la tarjeta */
}

.product-card img {
    width: 100%;
    height: 200px; /* Altura fija para las imágenes */
    object-fit: cover; /* Recorta la imagen para que cubra el espacio */
    border-bottom: 1px solid #eee;
}

.product-card h3 {
    font-size: 1.5em;
    color: #2c3e50;
    margin: 15px 10px 10px;
    flex-grow: 1; /* Permite que el título ocupe espacio si la descripción es corta */
}

.product-card p {
    font-size: 0.95em;
    color: #666;
    margin: 0 15px 15px;
    line-height: 1.6;
}

/* Botón dentro de la tarjeta (coherente con btn-product-card de product_styles.css) */
.btn-product-card {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    text-align: center;
    cursor: pointer;
    background-color: #e74c3c; /* Azul similar al btn-secondary */
    color: #ffffff;
    border: none;
    box-shadow: 0 3px 6px rgba(52, 152, 219, 0.2);
    margin-bottom: 15px; /* Espacio debajo del botón */
    align-self: center; /* Centra el botón horizontalmente en la tarjeta */
    width: fit-content; /* Ajusta el ancho al contenido */
}

.btn-product-card:hover {
    background-color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(52, 152, 219, 0.3);
}


/* Sección de Llamada a la Acción (coherente con content-block y buttons) */
.content-block {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
}

.content-block h2 {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
    display: inline-block; /* Para que la línea se ajuste al texto */
}

.content-block p {
    font-size: 1.1em;
    line-height: 1.8;
    color: #555;
    margin-bottom: 25px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Permite que los botones se envuelvan en pantallas pequeñas */
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    text-align: center;
    cursor: pointer;
}

.btn-primary {
    background-color: #27ae60; /* Verde */
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.btn-primary:hover {
    background-color: #229a56;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(39, 174, 96, 0.4);
}

.btn-secondary {
    background-color: #e74c3c; /* Azul */
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-secondary:hover {
    background-color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.4);
}

/* Footer (coherente) */
footer {
    background-color: #2c3e50;
    color: #ffffff;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

footer .social-links a {
    color: #ffffff;
    font-size: 1.5em;
    margin: 0 10px;
    transition: color 0.3s ease;
}

footer .social-links a:hover {
    color: #e74c3c;
}


/* Responsive Design */
@media (min-width: 768px) {
    .product-cards-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 2 o 3 columnas en tablets */
        gap: 30px;
        padding: 0;
    }

    .category-title {
        font-size: 3.5em;
    }

    .category-header {
        padding: 50px 40px;
    }

    .product-grid-section h2 {
        font-size: 2.5em;
    }

    .content-block {
        padding: 50px;
    }
}

@media (min-width: 1024px) {
    .product-cards-container {
        grid-template-columns: repeat(5, 1fr); /* 5 columnas en desktop */
    }

    .category-title {
        font-size: 3.8em;
    }

    .category-description {
        font-size: 1.2em;
    }
}

/* Ajustes específicos para móviles (max-width: 767px) */
@media (max-width: 767px) {
    .category-title {
        font-size: 2.5em;
    }

    .category-description {
        font-size: 1em;
        margin: 15px auto 0;
    }

    .category-header {
        padding: 30px 20px;
        margin-bottom: 30px;
    }

    .product-grid-section h2 {
        font-size: 1.8em;
        margin-bottom: 25px;
    }

    .product-card {
        max-width: 300px; /* Un poco más flexible para móvil */
        margin: 0 auto;
    }
    .product-card img {
        height: 180px; /* Ajuste de altura de imagen en móvil */
    }

    .action-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .action-buttons .btn {
        width: 80%; /* Botones de acción ocupan más ancho */
        margin: 0 auto;
    }

    .content-block {
        padding: 30px 20px;
    }

    footer p {
        font-size: 0.8em;
    }
}