/* Estilos Base (Sin cambios) */
body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
}

/* Encabezado Principal (Hero) - Altura 50vh */
.hero-section {
    position: relative; /* CLAVE: Posicionamiento relativo para contener el fondo absoluto */
    background: transparent; /* Quitamos el gradiente azulino para que la imagen se vea */
    color: #357ae8;
    text-align: center;
    padding: 80px 20px;
    height: 80vh; 
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Evita que el fondo escalado cause barras de scroll */
}

/* NUEVOS ESTILOS: Fondo con Imagen Borrosa para el Hero */
.hero-background-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Reemplaza 'url_de_tu_local.jpg' con la ruta de tu imagen */
    background-image: url('/src/assets/LoneStar.jpg'); 
    background-size: cover; /* Asegura que la imagen cubra todo el espacio */
    background-position: center;
    
    /* Efecto Borroso y Opacidad */
    filter: blur(5px); 
    opacity: 0.3; /* Ajusta la intensidad del fondo */
    transform: scale(1.05); /* Evita bordes blancos al aplicar blur */
    z-index: 1; /* Detrás del texto */
}

/* Ajustes para el texto del Hero (para que esté por encima del fondo) */
.page-title {
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    font-size: 65px;
    position: relative; /* Eleva el texto */
    z-index: 2; /* Encima del fondo borroso */
    color: rgb(255, 255, 255); 
    text-shadow: 0px 0px 15px rgba(0, 0, 0, 2); /* Mejora la legibilidad */
}
.subtitle {
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    font-size: 20px;
    position: relative; /* Eleva el texto */
    z-index: 2; /* Encima del fondo borroso */
    color: rgb(255, 255, 255); 
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 2); /* Mejora la legibilidad */
}
.spacer { height: 10px; background-color: #f4f4f9; }


/* Barra de Navegación Fija (Sin cambios) */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    background-color: #333; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translateY(-100%); opacity: 0;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.navbar.visible { transform: translateY(0); opacity: 1; }
.nav-links { display: flex; justify-content: center; padding: 15px 0; }
.nav-links a { color: white; text-decoration: none; margin: 0 20px; font-weight: bold; padding: 5px 10px; border-radius: 5px; }
.nav-links a:hover { background-color: #555; }


/* Barra de Navegación Fija en Acerca de Nosotros */
/* .navbar-about {
    position: fixed; top: 0; left: 0; width: 100%;
    background-color: #333; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;

    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
} */

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 50px 0;
    flex-wrap: wrap; /* Para que en celulares se acomoden bien */
}

.pagination-controls button {
    background-color: white;
    border: 1px solid #ddd;
    color: #333;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination-controls button:hover:not(:disabled) {
    background-color: #f8f8f8;
    border-color: #bbb;
}

.pagination-controls button.active {
    background-color: #2ecc71;
    color: white;
    border-color: #2ecc71;
}

.pagination-controls button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.goto-page {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 15px;
}

.goto-page input {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
}

/* ==================================== */
/* 1. DISEÑO DE FILTROS Y CONTENEDOR */
/* ==================================== */

.catalogo-container {
    max-width: 1300px;
    margin: 50px auto;
    padding: 20px;
    display: flex;
    gap: 30px; /* Espacio entre la barra lateral y los resultados */
    align-items: flex-start; /* Alinea los elementos al inicio */
}

.filter-sidebar {
    width: 300px; /* Ancho fijo para la barra lateral en escritorio */
    flex-shrink: 0; /* Evita que la sidebar se comprima */
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.product-results-grid {
    flex-grow: 1;
    display: grid;
    /* Crea exactamente 3 columnas de igual tamaño */
    grid-template-columns: repeat(3, 1fr); 
    gap: 40px 60px
}

/* Estilos para las tarjetas */
.product-results-grid .product-card {
    /* Eliminamos el width manual y el min-width que causaba el salto a 2 columnas */
    width: 100%; 
    padding: 20px;
    min-width: 0; 
}

/* ==================================== */
/* 2. ESTILOS DE LOS ELEMENTOS DEL FILTRO */
/* ==================================== */

.clear-filters-button {
    width: 100%;
    padding: 12px;
    background-color: #f4f4f9;
    color: #555;
    font-weight: bold;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}
.clear-filters-button:hover { background-color: #eee; }

.filter-title {
    color: #4a90e2; 
    border-bottom: 2px solid #f4f4f9;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.filter-group {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.filter-group h4 { color: #333; font-size: 1.1em; margin-bottom: 10px; }

.text-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.price-inputs { display: flex; gap: 10px; }
.price-text-input {
    width: calc(50% - 5px);
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
}

.checkbox-label { display: block; margin: 8px 0; font-size: 0.95em; cursor: pointer; }
.checkbox-label input[type="checkbox"] { margin-right: 8px; accent-color: #4a90e2; }

.apply-filters-button {
    width: 100%;
    padding: 12px;
    background-color: #50e3c2;
    color: #333;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.apply-filters-button:hover { background-color: #45c4a7; }

.range-slider {
    width: 100%;
    margin-top: 15px;
    height: 6px;
    background: #ddd;
    border-radius: 5px;
    -webkit-appearance: none;
    appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%; background: #4a90e2;
    cursor: pointer; box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

.range-slider::-moz-range-thumb {
    width: 18px; height: 18px;
    border: none; border-radius: 50%; 
    background: #4a90e2; cursor: pointer;
}

/* Tarjetas de Producto Estilo Index */
.product-card {
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    width: 280px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(0,0,0,0.03);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(74, 144, 226, 0.15);
    border-color: #4a90e2;
}

.product-id { font-size: 0.75em; color: #999; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; display: block; }
.product-name { font-size: 1.2em; color: #333; margin: 10px 0; font-weight: 600; line-height: 1.3; min-height: 3em; }
.product-price { font-size: 1.5em; color: #4a90e2; font-weight: 700; margin: 15px 0; }

.btn-detalle {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}
.btn-detalle:hover { background-color: #357ae8; }

.original-price { text-decoration: line-through; color: #999; font-size: 0.8em; font-weight: normal; }

.site-footer {
    background-color: #2c2c2c; 
    color: #cccccc; 
    padding: 20px 0; 
    text-align: center;
    width: 100%;
    margin-top: 60px;
}

.footer-content { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.site-footer p { margin: 5px 0; font-size: 0.9em; }
.site-footer .small-text { font-size: 0.75em; color: #999999; }

/* --------------------------------- */
/* ESTILOS CHATBOT */
/* --------------------------------- */
#chatbot-container { position: fixed; bottom: 30px; right: 30px; z-index: 2000; font-family: sans-serif; }
#chatbot-toggle {
    background-color: #4a90e2; color: white; border: none; padding: 15px 20px;
    border-radius: 50px; cursor: pointer; font-size: 1em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); transition: background-color 0.3s;
}
#chatbot-window {
    width: 300px; height: 400px; background-color: white; border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); overflow: hidden; display: flex; flex-direction: column;
}
.hidden { display: none !important; }
.chat-header { background-color: #333; color: white; padding: 10px; text-align: center; font-weight: bold; }
#chat-box { flex-grow: 1; padding: 15px; overflow-y: auto; border-bottom: 1px solid #eee; }
.message { margin-bottom: 10px; padding: 8px 12px; border-radius: 15px; max-width: 80%; }
.bot-message { background-color: #f1f1f1; color: #333; align-self: flex-start; margin-right: auto; }
.user-message { background-color: #4a90e2; color: white; align-self: flex-end; margin-left: auto; }
#chat-options { padding: 10px; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 5px; border-top: 1px solid #eee; }
.option-button { background-color: #e0e0e0; color: #333; border: 1px solid #ccc; padding: 8px 12px; border-radius: 20px; cursor: pointer; font-size: 0.9em; transition: background-color 0.2s; }

/* IMAGEN DEL PRODUCTO */

.product-img-main {
    width: 100%;
    height: 180px; /* Ajusta según tu diseño */
    object-fit: cover; /* Esto evita que la imagen se estire feo */
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.watermark-logo {
    position: fixed;         /* Se queda fijo en la pantalla */
    bottom: 20px;            /* Distancia desde abajo */
    left: 20px;              /* Distancia desde la izquierda */
    width: 80px;             /* Tamaño pequeño del logo */
    height: auto;            /* Mantiene la proporción */
    opacity: 0.3;            /* 60% de visibilidad (transparencia) */
    z-index: 9999;           /* Asegura que esté por encima de todo */
    pointer-events: none;    /* Para que no interfiera si hay un botón debajo */
    user-select: none;       /* Evita que se pueda seleccionar o resaltar */
    filter: grayscale(30%);  /* Opcional: le da un toque más sutil */
    transition: opacity 0.3s;
}

/* Opcional: Que se vea un poco más al pasar el mouse */
.watermark-logo:hover {
    opacity: 0.8;
}

/* ============================================================ */
/* NUEVA SECCIÓN: RESPONSIVIDAD (AÑADIDO SIN TOCAR LO ANTERIOR) */
/* ============================================================ */

@media (max-width: 1024px) {
    .catalogo-container {
        flex-direction: column;
        align-items: center;
    }
    .filter-sidebar {
        width: 100%;
        max-width: 600px;
        margin-bottom: 30px;
    }
    .product-results-grid .product-card {
        width: calc(50% - 15px); /* 2 columnas en tablets */
    }

    .product-results-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
    }
}

@media (max-width: 768px) {
    .nav-links {
        flex-wrap: wrap; /* Permite que los links de la navbar bajen si no caben */
    }
    .nav-links a {
        margin: 5px 10px;
        font-size: 14px;
        padding: 8px;
    }
    .hero-section {
        margin: 0;
        height: auto;
        padding: 80px 20px;
    }
    .page-title {
        font-size: 40px;
    }
    .nav-links {
        flex-wrap: wrap;
    }
    .nav-links a {
        margin: 5px 10px;
        font-size: 14px;
    }
    .product-results-grid .product-card {
        width: 100%; /* 1 columna en móviles */
        max-width: 350px;
    }
}

@media (max-width: 600px) {
    .product-results-grid {
        grid-template-columns: 1fr; /* 1 columna en móviles */
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 32px;
    }
    .subtitle {
        font-size: 16px;
    }
    .price-inputs {
        flex-direction: column;
    }
    .price-text-input {
        width: 100%;
    }
    #chatbot-window {
        width: 280px;
        right: 10px;
        bottom: 80px;
    }
    .footer-content {
        padding: 0 20px;
    }
}