﻿/* Reset básico y estilos generales del cuerpo */
* {
    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 Overview Content */
.category-overview-main {
    padding: 40px 0;
}

.overview-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;
}

.overview-title {
    font-size: 3.2em;
    color: #2c3e50;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.overview-title::after {
    content: '';
    display: block;
    width: 120px;
    height: 5px;
    background-color: #e74c3c; /* Rojo vibrante */
    margin: 15px auto 0;
    border-radius: 2px;
}

.overview-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 categorías */
.category-grid-section {
    text-align: center;
    margin-bottom: 50px;
}

.category-cards-container {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Reducido a 200px para más columnas */
    gap: 30px;
    justify-content: center;
    padding: 0 10px;
}

.category-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;
    flex-direction: column;
    justify-content: space-between;
    /* max-width: 380px;  Eliminado para que se ajuste mejor a la nueva cuadrícula */
    margin: 0 auto; /* Centra cada tarjeta individualmente en la cuadrícula */
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.category-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-card img {
    width: 100%;
    /* height: 200px;  Altura fija para las imágenes */
    height: 150px; /* Reducida a 150px */
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.category-card h3 {
    font-size: 1.4em; /* Ligeramente reducido */
    color: #2c3e50;
    /* margin: 15px 10px 10px; */
    margin: 10px 10px 5px; /* Ajuste de margen */
    flex-grow: 1;
}

.category-card p {
    /* Eliminado el párrafo para hacer la tarjeta más compacta */
    /* display: none; */
    font-size: 1em;
    color: #666;
    margin: 0 15px 15px;
    line-height: 1.6;
    display: none; /* Ocultar el párrafo de descripción */
}

/* Botón dentro de la tarjeta (coherente) */
.btn-category-card {
    display: inline-block;
    /* padding: 10px 20px; */
    padding: 8px 15px; /* Reducido el padding del botón */
    font-size: 1em; /* Ligeramente reducido */
    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 */
    color: #ffffff;
    border: none;
    box-shadow: 0 3px 6px rgba(52, 152, 219, 0.2);
    margin-bottom: 10px; /* Reducido a 10px */
    align-self: center;
    width: fit-content;
}

.btn-category-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) */
.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;
}

.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;
}

.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) {
    .category-cards-container {
        /* grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); */
        grid-template-columns: repeat(4, 1fr); /* 4 columnas en tablets (mejor densidad) */
        gap: 20px; /* Reducido el gap */
        padding: 0;
    }

    .overview-title {
        font-size: 3.5em;
    }

    .overview-header {
        padding: 50px 40px;
    }

    .category-grid-section h2 {
        font-size: 2.5em;
    }

    .content-block {
        padding: 50px;
    }
}

@media (min-width: 1024px) {
    .category-cards-container {
        /* grid-template-columns: repeat(3, 1fr); */
        grid-template-columns: repeat(5, 1fr); /* 5 columnas en desktop (máxima densidad) */
        gap: 20px;
    }

    .overview-title {
        font-size: 3.8em;
    }

    .overview-description {
        font-size: 1.2em;
    }
}

/* Ajustes específicos para móviles (max-width: 767px) */
@media (max-width: 767px) {
    .overview-title {
        font-size: 2.5em;
    }

    .overview-description {
        font-size: 1em;
        margin: 15px auto 0;
    }

    .overview-header {
        padding: 30px 20px;
        margin-bottom: 30px;
    }

    .search-box input {
        padding: 12px 15px;
        font-size: 1em;
    }
    .search-icon {
        right: 15px;
        font-size: 1.1em;
    }

    .category-cards-container {
        grid-template-columns: repeat(2, 1fr); /* Dos columnas en móvil */
        padding: 10px;
        gap: 15px;
    }
    .category-card {
        max-width: 100%; /* Permite que ocupe la columna completa */
        margin: 0;
    }
    .category-card img {
        height: 120px; /* Altura de imagen más pequeña en móvil */
    }
    .category-card h3 {
        font-size: 1.2em; /* Título más pequeño en móvil */
        margin: 10px 5px 5px;
    }
    .btn-category-card {
        padding: 6px 10px;
        font-size: 0.9em;
    }

    .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;
    }
}
.category-card {
    /* Manten el estilo que ya tienes, solo añade lo siguiente */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px); /* Eleva la tarjeta 5px */
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15); /* Añade una sombra más notable */
}


/* Estilos para el formulario de presupuesto */
.quote-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.quote-form input[type="text"],
.quote-form input[type="email"],
.quote-form input[type="tel"],
.quote-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.quote-form input[type="text"]:focus,
.quote-form input[type="email"]:focus,
.quote-form input[type="tel"]:focus,
.quote-form textarea:focus {
    border-color: #27ae60;
    box-shadow: 0 0 5px rgba(39, 174, 96, 0.5);
    outline: none;
}

.quote-form textarea {
    resize: vertical;
    min-height: 120px;
}

.quote-form .btn-primary {
    align-self: center;
    width: 100%;
    max-width: 250px;
}

/* Adaptación para móviles */
@media (max-width: 767px) {
    .quote-form {
        max-width: 100%;
    }

    .quote-form input,
    .quote-form textarea {
        font-size: 0.9em;
        padding: 10px;
    }
}

/* ========================================= */
/* ESTILOS PARA LAS SUGERENCIAS DE BÚSQUEDA */
/* ========================================= */
.search-box {
    position: relative;
}

.search-suggestions {
    display: none; /* Se muestra con JavaScript */
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background-color: #ffffff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 10;
    overflow: hidden;
    margin-top: 5px;
}

.suggestion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: #444;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #e74c3c;
    color: #ffffff;
}

.suggestion-item strong {
    font-weight: 600;
}

.suggestion-item small {
    color: #999;
    font-size: 0.85em;
    transition: color 0.2s ease;
}

.suggestion-item:hover small {
    color: #ffffff;
}

/* Ocultar el mensaje de no resultados si hay sugerencias */
.search-suggestions:not(:empty) + .search-results .no-results {
    display: none;
}

/* ========================================= */
/* ESTILOS PARA SECCIÓN DE NOVEDADES/DESTACADOS */
/* ========================================= */
.featured-section {
    padding: 50px 0;
    text-align: center;
}

.featured-section h2 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 40px;
}

.featured-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.featured-product-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.featured-product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.featured-product-card .card-content {
    padding: 20px;
    text-align: left;
}

.featured-product-card h4 {
    font-size: 1.3em;
    color: #e74c3c;
    margin-bottom: 10px;
}

.featured-product-card p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

/* Estilo para el botón dentro de la tarjeta */
.btn-primary-small {
    display: inline-block;
    padding: 8px 15px;
    background-color: #e74c3c;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-primary-small:hover {
    background-color: #c0392b;
}

/* ========================================= */
/* ESTILOS PARA LA SECCIÓN "POR QUÉ ELEGIRNOS" */
/* ========================================= */
.why-choose-us-section {
    padding: 50px 0;
    text-align: center;
    background-color: #f7f7f7;
}

.why-choose-us-section h2 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 40px;
}

.why-choose-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.why-choose-us-item {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 30px 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.why-choose-us-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.why-choose-us-item i {
    font-size: 3em;
    color: #e74c3c;
    margin-bottom: 15px;
}

.why-choose-us-item h3 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
}

.why-choose-us-item p {
    font-size: 0.9em;
    color: #666;
}

/* Ajuste 2026: tarjetas uniformes en la cuadrícula principal de productos */
.category-cards-container {
    align-items: stretch;
}

.category-card {
    width: 100%;
    max-width: none;
    min-height: 260px;
    margin: 0;
}

.category-card a {
    height: 100%;
}

.category-card h3 {
    min-height: 3.2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card img {
    height: 170px;
}
/* Ajuste 2026-04: buscador centrado y tarjetas uniformes */
.search-section {
    max-width: 760px;
    margin: 0 auto 42px;
    padding: 26px;
    background: linear-gradient(135deg, #ffffff, #f7f9fb);
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    box-shadow: 0 14px 35px rgba(44, 62, 80, 0.12);
    position: relative;
    text-align: center;
}
.search-section .search-box {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    border: 2px solid #dfe6ee;
    border-radius: 999px;
    background: #fff;
    padding: 0 18px;
}
.search-section input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 15px 42px 15px 4px;
    font-size: 1.05rem;
    background: transparent;
}
.search-section .search-icon {
    color: #e74c3c;
    font-size: 1.15rem;
    margin-left: -28px;
    pointer-events: none;
}
.search-section .search-suggestions {
    position: absolute;
    top: calc(100% - 18px);
    left: 50%;
    transform: translateX(-50%);
    width: min(620px, calc(100% - 40px));
    z-index: 30;
    border-radius: 10px;
    border: 1px solid #e3e8ef;
    box-shadow: 0 18px 38px rgba(0,0,0,0.14);
}
.suggestion-empty {
    padding: 14px 18px;
    color: #666;
    background: #fff;
    text-align: left;
}
.category-cards-container {
    align-items: stretch;
}
.category-card {
    min-height: 310px;
    height: 100%;
}
.category-card a {
    min-height: 310px;
}
.category-card img {
    height: 180px;
}
.category-card h3 {
    min-height: 3.4em;
}
@media (max-width: 767px) {
    .search-section {
        padding: 18px;
        margin-bottom: 28px;
    }
    .search-section .search-box {
        max-width: none;
    }
    .category-cards-container {
        grid-template-columns: 1fr;
    }
    .category-card,
    .category-card a {
        min-height: 0;
    }
}