/* =========================================
    PÁGINA DE PRODUCTOS (products.html)
   ========================================= */

.products-page {
    max-width: 1300px;
    margin: 40px auto 100px auto;
    padding: 0 40px;
}

/* --- BARRA SUPERIOR (Título, Buscador, Filtros) --- */
.products-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    gap: 20px;
    flex-wrap: wrap; /* Para que en tablet se apilen si no caben */
}

.products-topbar h1 {
    font-size: 28px;
    color: #ffffff;
    margin: 0;
}

/* Contenedor de buscador y botones de filtro */
.products-controls {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    justify-content: flex-end; /* Empuja todo a la derecha */
}

/* Buscador central estilo LexsHub */
.products-search-form {
    display: flex;
    background-color: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
    width: 100%;
    max-width: 400px; /* Tamaño máximo para que no se estire demasiado */
}

.products-search-form input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 10px 15px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    outline: none;
}

.products-search-form button {
    background-color: #f39c12; /* Tu dorado */
    color: #000;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.products-search-form button:hover {
    background-color: #d68910;
}

/* Zona de botones derechos (All Filters, Relevance) */
.products-filters {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-filter {
    background-color: transparent;
    color: #cccccc;
    border: 1px solid #2a2a2a;
    padding: 10px 15px;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-filter:hover {
    background-color: #1a1a1a;
    border-color: #f39c12;
    color: #ffffff;
}

/* Estilo del Dropdown de Relevance */
.sort-select {
    background-color: transparent;
    color: #cccccc;
    border: 1px solid #2a2a2a;
    padding: 10px 15px;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    appearance: auto;
}

.sort-select:hover {
    border-color: #f39c12;
}

.sort-select option {
    background-color: #111111;
    color: #ffffff;
}


.vat-note { 
    font-size: 12px; 
    color: #888; 
    margin-bottom: 20px; 
}




/* --- RESPONSIVE DE ESTA CABECERA --- */
@media (max-width: 992px) {
    .products-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .products-controls {
        width: 100%;
        justify-content: flex-start;
        flex-direction: column;
        align-items: stretch;
    }
    
    .products-search-form {
        max-width: 100%;
    }
    
    .products-filters {
        width: 100%;
        justify-content: space-between;
    }
}


/* =========================================
    PÁGINA DETALLES DE PRODUCTO (product.html)
   ========================================= */

.product-page {
    max-width: 1200px;
    margin: 40px auto 100px auto;
    padding: 0 20px;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Columna izquierda un poco más estrecha */
    gap: 40px;
}

/* --- COLUMNA IZQUIERDA --- */
.product-main-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    margin-bottom: 20px;
    background-size: cover;
    background-position: center;
    border: 1px solid #2a2a2a;
}

.info-block {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.info-block h3 {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a2a2a;
}

/* Tabla de dependencias */
/* Tabla de dependencias (Ajustado a 4 columnas) */
.dep-table { display: flex; flex-direction: column; gap: 15px; }
.dep-row { 
    display: grid; 
    /* Proporciones: Nombre(2) | Check(0.8) | TextoRequisito(2) | Version(1) */
    grid-template-columns: 2fr 0.8fr 2fr 1.2fr; 
    font-size: 13px; 
    color: #cccccc; 
    align-items: center; 
}
.dep-row.header { font-weight: 700; color: #888; font-size: 11px; text-transform: uppercase; }

/* Colores para los iconos de status */
.text-green { color: #2ecc71; font-size: 16px; }
.text-red { color: #e74c3c; font-size: 16px; }

/* Tags */
.tag-title { font-size: 13px; color: #888; margin-bottom: 10px; font-weight: 600; }
.tags-container { display: flex; gap: 10px; flex-wrap: wrap; }
.tag-pill {
    background-color: #222222;
    border: 1px solid #333333;
    color: #aaaaaa;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
}

/* --- COLUMNA DERECHA --- */
.product-header-info { margin-bottom: 30px; }
.title-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.title-row h1 { font-size: 32px; color: #ffffff; margin: 0; }
.title-row h1 .version { font-size: 18px; color: #888; font-weight: 400; }
.btn-share { background: none; border: none; color: #888; cursor: pointer; font-size: 18px; transition: color 0.2s; }
.btn-share:hover { color: #f39c12; }

.meta-row { display: flex; gap: 15px; align-items: center; font-size: 12px; color: #888; }
.badge-meta { background-color: #1a1a1a; padding: 4px 10px; border-radius: 4px; border: 1px solid #2a2a2a; }

/* Caja de Compra */
.product-purchase-box {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin-bottom: 30px;
}
.price-big { 
    font-size: 36px; 
    font-weight: 700; 
    margin-bottom: 5px; 
}


/* Botones Grandes */
.btn-primary-big, .btn-secondary-big {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border: none;
}
.btn-primary-big { background-color: #f39c12; color: #000; margin-bottom: 10px; }
.btn-primary-big:hover { background-color: #d68910; transform: translateY(-2px); }
.btn-secondary-big { background-color: transparent; border: 1px solid #f39c12; color: #f39c12; }
.btn-secondary-big:hover { background-color: #f39c12; color: #000; transform: translateY(-2px); }

.mt-20 { margin-top: 20px; }

/* =========================================
   Descripción del Producto (Unificado)
   ========================================= */
.product-description h3 { 
    font-size: 22px; 
    color: #ffffff; 
    border-bottom: 1px solid #2a2a2a; 
    padding-bottom: 15px; 
    margin-bottom: 20px; 
}

/* Contenedores multimedia */
.video-container { 
    width: 100%; 
    aspect-ratio: 16 / 9; 
    border-radius: 12px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    margin-bottom: 25px; 
    border: 1px solid #2a2a2a; 
    cursor: pointer; 
}
.img-container { 
    width: 100%; 
    border-radius: 12px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    margin-bottom: 25px; 
    border: 1px solid #2a2a2a; 
    cursor: pointer; 
}
.img-container img {
    width: 100%;
    border-radius: 12px; 
}

/* Textos estándar */
.desc-text p { color: #cccccc; font-size: 15px; line-height: 1.7; margin-bottom: 20px; }
.desc-text h4 { color: #ffffff; font-size: 16px; margin-bottom: 10px; }
.desc-text ul { color: #cccccc; font-size: 14px; line-height: 1.7; padding-left: 20px; margin-bottom: 25px; }

/* --- NUEVAS MEJORAS DE UI/UX --- */

/* Texto introductorio destacado */
.desc-intro {
    background-color: rgba(26, 26, 26, 0.5);
    border-left: 4px solid #f39c12;
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 25px;
}
.desc-intro p {
    color: #e0e0e0;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 0; /* Evita que el margen de desc-text p afecte aquí */
}

/* Contenedor de características (Key Features) */
.features-box {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}
.features-box h4 {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 10px;
}

/* Lista personalizada sin los puntitos por defecto */
.styled-features-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0 !important; 
}

/* Cada elemento de la lista (Cajita Icono + Texto) */
.styled-features-list li {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

/* La cajita dorada del icono */
.feature-icon-box {
    width: 45px;
    height: 45px;
    background-color: #111111;
    color: #f39c12;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 18px;
    border: 1px solid #2a2a2a;
    flex-shrink: 0; /* Evita que el icono se aplaste si hay mucho texto */
}

/* El texto dentro de la característica */
.feature-text strong {
    display: block;
    margin-bottom: 5px;
    font-size: 15px;
}
.feature-text span {
    color: #cccccc;
    font-size: 14px;
    line-height: 1.6;
    display: block;
}



/* =========================================
    CARRUSEL DE IMÁGENES (Product Page)
   ========================================= */
.carousel-container {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden; /* Oculta las imágenes que están fuera del recuadro */
    border: 1px solid #2a2a2a;
    margin-bottom: 25px;
    background-color: #111;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out; /* Transición fluida al cambiar de foto */
}

.carousel-slide {
    min-width: 100%; /* Cada imagen ocupa exactamente el ancho del contenedor */
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-slide img {
    width: 100%;
    display: block;
    border-radius: 12px;
}

/* Botones de navegación del carrusel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(17, 17, 17, 0.8);
    color: #f39c12; /* Dorado corporativo */
    border: 1px solid #f39c12;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    font-size: 16px;
}

.carousel-btn:hover {
    background-color: #f39c12;
    color: #000;
}

.prev-btn { left: 15px; }
.next-btn { right: 15px; }


/* =========================================
    SIDEBAR DE FILTROS AVANZADOS
   ========================================= */

/* Fondo oscuro cuando se abre el menú */
.filter-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 999;
    display: none; /* Oculto por defecto */
    opacity: 0;
    transition: opacity 0.3s ease;
}
.filter-overlay.active { display: block; opacity: 1; }

/* El panel lateral */
.filter-sidebar {
    position: fixed;
    top: 0; right: -400px; /* Escondido fuera de la pantalla a la derecha */
    width: 380px;
    max-width: 100%;
    height: 100vh;
    background-color: #141414;
    border-left: 1px solid #2a2a2a;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}
.filter-sidebar.active { right: 0; /* Se desliza hacia dentro */ }

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid #2a2a2a;
}

.reset-filter-btn {
    background: none; border: none; 
    color: #ffffff; font-weight: 700; 
    font-size: 12px; cursor: pointer; 
    font-family: 'Poppins', sans-serif;
    transition: 0.2s;
}
.reset-filter-btn:hover { color: #f39c12; }

.filter-body { padding: 25px; flex: 1; overflow-y: auto; }

/* Acordeones */
.filter-accordion {
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #1a1a1a;
    overflow: hidden;
}
.accordion-btn {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    background: none; border: none; color: #fff; font-size: 15px; font-weight: 600;
    padding: 15px; cursor: pointer; font-family: 'Poppins', sans-serif;
}
.accordion-content {
    padding: 0 15px; max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    display: flex; flex-direction: column; gap: 12px;
}
.accordion-content.active { padding: 0 15px 15px 15px; max-height: 400px; }

/* Checkboxes personalizados */
.accordion-content label { color: #cccccc; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: 0.2s;}
.accordion-content label:hover { color: #ffffff; }
.filter-cb { accent-color: #f39c12; width: 16px; height: 16px; cursor: pointer;}

/* Slider de Precio */
.filter-price-section { margin-top: 30px; }
.price-title { color: #888888; font-weight: 600; font-size: 14px; margin-bottom: 15px; }
/* Slider de Precio */
.price-slider { width: 100%; appearance: none; height: 6px; background: #f39c12; border-radius: 5px; outline: none; }
.price-slider::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #f39c12; cursor: pointer; border: 2px solid #fff; }
.price-labels { display: flex; justify-content: space-between; color: #cccccc; font-size: 14px; margin-top: 10px; font-weight: 700; }

.filter-footer { padding: 25px; border-top: 1px solid #2a2a2a; background-color: #141414; }
.show-results-btn {
    width: 100%; padding: 15px; background-color: transparent; border: 1px solid #f39c12;
    color: #ffffff; border-radius: 6px; font-weight: 700; font-family: 'Poppins', sans-serif; cursor: pointer; transition: 0.2s;
}
.show-results-btn:hover { background-color: #f39c12; color: #000000; }


.features-grid-custom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 25px;
    background-color: #111;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
}
.feature-grid-item {
    color: #ccc;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.feature-grid-item i {
    color: #f39c12;
    font-size: 10px;
}

/* Grid 2x2 para la sección "What's Included" */
.whats-included-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 15px;
}
.whats-included-item h5 {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.whats-included-item h5 i {
    font-size: 20px;
}
.whats-included-item p {
    color: #cccccc;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

/* =========================================
    TABLA DE ESPECIFICACIONES
   ========================================= */
.specs-table {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.spec-row {
    display: flex;
    align-items: center; /* Alinea los textos con las cajitas */
}
.spec-label {
    width: 165px; /* Ancho fijo para alinear la segunda columna */
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}
.spec-values {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    align-items: center;
}
.spec-text-value {
    color: #cccccc;
    font-size: 14px;
}

/* Responsivo para móviles */
@media (max-width: 576px) {
    .spec-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .product-layout { grid-template-columns: 1fr; }
    .title-row h1 { font-size: 26px; }
    .dep-row { grid-template-columns: 1fr; gap: 5px; border-bottom: 1px solid #222; padding-bottom: 10px; margin-bottom: 10px; }
    .dep-row.header { display: none; } /* Ocultamos cabecera tabla en móvil */
}

@media (max-width: 768px) {
    .features-grid-custom { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .features-grid-custom { grid-template-columns: 1fr; }
}