
      
      
      
      
      /* --- VARIABLES --- */
        :root {
            --primary-dark: #0f172a;
            --accent-glow: #6366f1;
            --accent-gradient: linear-gradient(135deg, #6366f1, #3b82f6);
            --deal-gradient: linear-gradient(135deg, #f97316, #ef4444);
            --success-text: #10b981;
            --bg-app: #f1f5f9;
            --bg-card: #ffffff;
            --border-subtle: #e2e8f0;
            --radius-xl: 16px;
            --radius-m: 12px;
            --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
        }

        /* --- CARD CONTAINER --- */
        .product-card {
            max-width: 1000px;
            margin: auto;
            width: 100%;
            display: grid;
            /* IMPORTANTE: minmax(0, 1fr) evita que el slider rompa el ancho */
            grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.5);
        }

        /* --- IZQUIERDA: GALERÍA --- */
        .gallery-container {
            padding: 2rem;
            display: flex;
            position: relative;
            flex-direction: column;
            align-items: center;
            justify-content: center; /* Centrar verticalmente */
            border-right: 1px solid var(--border-subtle);
        }

        /* VIEWPORT: El marco de la imagen */
        .slider-viewport {
            position: relative;
            width: 100%;
            max-width: 450px; /* LIMITA el ancho para que no se vea gigante */
            height: 350px; /* Altura fija */
            overflow: hidden;
            margin-bottom: 1.5rem;
            cursor: grab; 
            /* Para depurar bordes si es necesario, descomenta la siguiente línea: */
            /* border: 1px dashed red; */
        }
        .slider-viewport:active { cursor: grabbing; }

        /* PISTA: Contiene las imágenes */
        .slider-track {
            display: flex;
            height: 100%;
            transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
            will-change: transform;
        }

        /* IMÁGENES INDIVIDUALES */
        .slide-image {
            min-width: 100%;
            height: 100%;
            object-fit: contain; /* Ajusta la imagen sin recortarla */
            user-select: none;
            -webkit-user-drag: none;
            padding: 10px; /* Un poco de aire interno */
        }

        /* --- BOTONES DE NAVEGACIÓN (AHORA DENTRO DEL VIEWPORT) --- */
        /* --- BOTONES DE NAVEGACIÓN (VISIBLES SIEMPRE) --- */
        .slider-nav-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 36px;
            height: 36px;
            background: rgba(255, 255, 255, 0.8); /* Un poco transparente para no tapar */
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            border: 1px solid var(--border-subtle);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 10;
            color: var(--primary-dark);
            transition: all 0.2s ease;
            
            /* CAMBIO AQUÍ: Antes era 0, ahora es 1 */
            opacity: 1; 
        }
        
        /* Esta parte del hover ahora solo cambia el color, ya no la opacidad */
        .slider-nav-btn:hover { 
            background: var(--primary-dark); 
            color: white; 
            transform: translateY(-50%) scale(1.1); 
        }
        
        /* Mostrar botones solo cuando el mouse entra al slider (opcional, muy pro) */
        .slider-viewport:hover .slider-nav-btn { opacity: 1; }
        /* O si prefieres que siempre se vean, borra la línea de opacity: 0 */
        
        
        .slider-prev { left: 10px; }
        .slider-next { right: 10px; }

        /* MINIATURAS */
        .thumbnails { display: flex; gap: 10px; z-index: 5; }
        .thumb {
            width: 60px; height: 60px;
            border-radius: var(--radius-m);
            cursor: pointer;
            object-fit: cover;
            transition: all 0.2s;
            border: 2px solid transparent;
            background: #fff;
            padding: 2px;
            border: 1px solid var(--border-subtle);
        }
        .thumb:hover { transform: translateY(-2px); }
        .thumb.active { border-color: var(--accent-glow); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }

        /* --- DERECHA: INFO (ESTILOS RESUMIDOS) --- */
        .info-container { padding: 2.5rem; display: flex; flex-direction: column; }
        .title {max-width: 1000px;margin: auto;padding: 1rem; font-size: 1.8rem; font-weight: 800; color: var(--primary-dark); line-height: 1.1; }
        
        .score-box { background: var(--accent-gradient); color: white; padding: 10px 14px; border-radius: 10px; text-align: center; min-width: 80px; box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3); }
        .score-val { font-size: 1.3rem; font-weight: 900; display: block; }
        .score-label { font-size: 0.65rem; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }

        .pricing-section h2 {margin-top: 10px;   font-weight: 700; margin-bottom: 1rem; }
        
        .price-row { display: flex; align-items: center; justify-content: space-between; background: white; padding: 1rem; border: 1px solid var(--border-subtle); border-radius: 12px; margin-bottom: 1rem; position: relative; transition: transform 0.2s; }

        .good-price-sticker{    background-color: #cf2c27;
    color: #fff;
    display: inline-flex;
    font-size: .75rem;
    height: 22px;
    line-height: 22px;
    margin-left: 10px;
    left: 0;
    padding: 0 8px 0 5px;
    position: relative;
    white-space: nowrap;
    z-index: 10;
    top: -10px;
    position: absolute;}
    .good-price-sticker:before {
        background-color: #cf2c27;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 1px;
    border-top-left-radius: 1px;
    content: "";
    height: 16px;
    left: -8px;
    position: absolute;
    top: 3px;
    transform: rotate(45deg);
    width: 16px;
    z-index: -1;
    }

    .good-price-sticker:after {
        background-color: #fff;
    border-radius: 5px;
    content: "";
    height: 5px;
    left: -6px;
    position: absolute;
    top: 8px;
    width: 5px;
    }
        .price { font-size: 1.6rem; font-weight: 800; color: var(--primary-dark); }
        .btn-buy { padding: 0.7rem 1.2rem; border-radius: 8px; font-weight: 600; font-size: 0.9rem; text-decoration: none; display: inline-block; background-color: #000;color: white;  transition: 0.2s; }
        .btn-buy:hover { opacity: 0.9; transform: scale(1.02); }
        .btn-secondary { background: white; color: var(--primary-dark); border: 2px solid #e2e8f0; }
        
        .reviews { margin-top: 5px; font-size: 0.9rem; color: #64748b; display:flex; align-items:center; gap:8px; }

.stars { display:inline-block; font-size:1rem; line-height:1; }

/* base de la estrella (gris claro) */
.star {
  display:inline-block;
  position:relative;
  font-size:1rem;
  line-height:1;
  color:#cbd5e1; /* color "vacío" */
  margin-right:2px;
}

/* estrella llena */
.star.full { color:#c05621; }

/* estrella "mitad": fondo gris con overlay de la mitad coloreada */
.star.half::before{
  content: '★';
  position:absolute;
  left:0;
  top:0;
  width:50%;
  overflow:hidden;
  color:#c05621; /* color "lleno" */
}

/* opcional: suavizar el tamaño de texto del número */
.reviews .meta { color: #64748b; font-size:0.9rem; }


        /* RESPONSIVE */
        @media (max-width: 850px) {
            .product-card { grid-template-columns: 1fr; }
            .gallery-container { border-right: none; border-bottom: 1px solid var(--border-subtle); }
            .slider-viewport { height: 280px; }
            .score-box { align-self: flex-start; display: flex; align-items: center; gap: 10px; }
            .info-container {
                padding: 1rem;
            }
        }

        .bandera {
            width: 100px;
            background: #000;
            font-family: sans-serif;
            text-align: center;
            border-radius: 6px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.3);
        }
        .bandera .titulo {
            font-size: 12px;
            padding: 4px 0 2px;
            position: relative;
            color: #fff;
        }

        .bandera .puntaje {
            background: #008744;
    padding: 6px 0;
    font-size: 22px;
    color: #fff;
        }

        .bandera .puntaje span {
            font-size: 14px;
            color: #fff;
        }

        .bandera .texto {
            font-size: 13px;
    padding: 4px 0 6px;
    font-weight: bold;
    color: #fff;
        }

    :root {
        --primary-color: #3b82f6; /* Azul moderno */
        --text-dark: #1f2937;
        --text-light: #6b7280;
        --bg-zebra: #f9fafb;
        --border-color: #e5e7eb;
    }

    /* Contenedor principal */
    .specs-wrapper {
        background: #fff;
        margin: 0 auto;
        position: relative;
    }

    h2.specs-title {
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--text-dark);
        margin-bottom: 1.5rem;
        display: inline-block;
        padding-bottom: 5px;
    }

    /* Caja con scroll/corte */
    .container-tabla-especificaciones {
        max-height: 400px; /* Altura inicial */
        overflow: hidden;
        transition: max-height 0.5s ease-in-out;
        position: relative;
    }

    .container-tabla-especificaciones.expanded {
        max-height: 2500px; /* Altura suficiente para mostrar todo */
    }

    /* Secciones */
    .group-container {
        margin-bottom: 1.5rem;
    }

    .titulo-tabla {
        font-size: 1rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--text-light);
        font-weight: 700;
        margin-bottom: 0.5rem;
        padding-left: 10px;
        border-left: 4px solid #6366f1;
    }

    /* Tablas */
    .tabla-especificaciones {
        width: 100%;
        border-collapse: separate; /* Permite bordes redondeados */
        border-spacing: 0;
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid var(--border-color);
    }

    .tabla-especificaciones tr {
        background: #fff;
    }

    .tabla-especificaciones tr:nth-child(odd) {
        background-color: var(--bg-zebra);
    }

    .tabla-especificaciones td {
        padding: 12px 16px;
        font-size: 0.95rem;
        border-bottom: 1px solid var(--border-color);
    }

    .tabla-especificaciones tr:last-child td {
        border-bottom: none;
    }

    /* Columnas */
    .col-feature {
        width: 40%;
        font-weight: 600;
        color: var(--text-dark);
    }

    .col-value {
        width: 60%; /* Corregido para llenar el espacio */
        color: var(--text-light);
    }

    /* Efecto Fade y Botón */
    .shadow-fade {
        height: 80px;
        background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
        margin-top: -80px;
        position: relative;
        z-index: 10;
        pointer-events: none; /* Permite clicks a través si fuera necesario */
        transition: opacity 0.3s;
    }

    .btn-ver-mas {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: var(--primary-color);
        font-weight: 600;
        padding: 1rem;
        margin-top: 0.5rem;
        transition: transform 0.2s;
        background: #fff;
        position: relative;
        z-index: 20;
    }

    .btn-ver-mas:hover {
        transform: translateY(2px);
    }

    .svg-flecha {
        width: 1.5rem;
        height: 1.5rem;
        transition: transform 0.3s;
    }

    /* Estado expandido */
    .expanded-state .shadow-fade {
        opacity: 0;
        pointer-events: none;
    }
    
    .expanded-state .svg-flecha {
        transform: rotate(180deg);
    }



        h2 {
            margin-top: 10px;
        }

        :root { --primary: #3a8dde; --text: #333; --border: #e0e0e0; --green: #00b848; --orange: #ffc107; --bg-head: #f8f9fa; }

        .intro { padding: 25px; border-bottom: 1px solid var(--border); }
/* TABLA RESPONSIVE CON STICKY */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; position: relative; min-height: 300px;margin: 1rem -1rem;border: 1px solid #ddd; }
table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 800px; }
th, td { border-bottom: 1px solid #eee; border-right: 1px solid #f9f9f9; background: #fff; }
        /* Columna Izquierda Fija */
        .sticky-col { 
            width: 100px;
            background: var(--bg-head); padding: 12px 15px; font-weight: 600; font-size: 14px; color: #555; text-align: left;
            border-right: 2px solid #ddd;
        }

        .prod-col { min-width: 200px;width: 300px; padding: 5px; text-align: center; vertical-align: middle; position: relative; }
        .highlight { background-color: #fff8e1 !important; }

        /* Headers Sección */
        .section-header td { background: #fff; border-bottom: 2px solid #cbd5e0; padding: 0; position: sticky; left: 0; z-index: 20; }
        .section-title { padding: 10px 20px; font-weight: 700; color: #333; display: flex; align-items: center; cursor: pointer; user-select: none; }
        .arrow { margin-right: 10px; transition: 0.3s; font-size: 12px; }
        .collapsed tr:not(.section-header) { display: none; }
        .collapsed .arrow { transform: rotate(-90deg); }

        /* UI Productos */
        .prod-img { width: 130px; height: 130px; object-fit: contain; mix-blend-mode: multiply; margin-bottom: 10px; }
        .prod-name { color: var(--primary); font-weight: 700; font-size: 1.1em; display: block; margin-bottom: 5px; }
        .price { font-weight: 800; font-size: 1.3em; color: #222; }
        .score { color: white; padding: 4px 8px; border-radius: 4px; font-weight: 700; font-size: 0.9em; }
        .bg-green { background: var(--green); } .bg-orange { background: var(--orange); }

        /* Botones */
        .btn-remove { position: absolute; top: 5px; right: 5px; background: white; border: 1px solid #ddd; border-radius: 50%; width: 28px; height: 28px; cursor: pointer; color: #999; font-size: 16px; transition: 0.2s; z-index: 5;}
        .btn-remove:hover { color: red; border-color: red; transform: scale(1.1); }
        
        .add-col { vertical-align: middle; min-width: 140px; background: #fff; }
        .btn-add { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 70px; height: 70px; border-radius: 50%; border: 2px dashed #ccc; cursor: pointer; background: transparent; margin: 0 auto; transition: 0.2s; }
        .btn-add:hover { border-color: var(--primary); color: var(--primary); background: #f0f8ff; }

        /* Loading Spinner */
        #loadingOverlay { display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.8); z-index: 50; justify-content: center; align-items: center; }
        .spinner { border: 4px solid #f3f3f3; border-top: 4px solid var(--primary); border-radius: 50%; width: 40px; height: 40px; animation: spin 0.8s linear infinite; }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

        /* Modal */
        .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 2000; justify-content: center; align-items: flex-start; padding-top: 60px; backdrop-filter: blur(2px); }
        .modal-box { background: white; width: 500px; max-width: 90%; max-height: 80vh; border-radius: 12px; display: flex; flex-direction: column; box-shadow: 0 20px 40px rgba(0,0,0,0.3); overflow: hidden; }
        .modal-head { padding: 20px; border-bottom: 1px solid #eee; display: flex; gap: 10px; background: #fff; }
        .modal-body { overflow-y: auto; padding: 0; }
        .search-input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 16px; outline: none; }
        .search-item { display: flex; align-items: center; padding: 15px 20px; cursor: pointer; border-bottom: 1px solid #f9f9f9; transition: 0.2s; }
        .search-item:hover { background: #f0f8ff; }

        @media(max-width: 768px) {
            .sticky-col { font-size: 12px; padding: 10px; }
            .prod-col { min-width: 140px;width: 200px; padding: 10px 5px; }
            h1 { font-size: 1.2rem; }
        }

        .veredicto{
            padding: 1rem;
            border: 1px dashed #cbd5e0;
            background: #fff;
            box-shadow: 0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);
            max-width: 1000px;
            margin:20px auto;
        }

        .veredicto-img {
            margin-right: 10px;
            max-height:110px
        }
        .veredicto h2 {
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
            color: #2d3748;
        }
        .veredicto p {
            font-size: 1rem;
            line-height: 1.5;
            color: #4a5568;
        }
        @media (max-width:768px) {
            .veredicto-img {
                display: none;
            }
        }

        .container-pros-contras {
            max-width: 1000px;
            margin: auto;
            display: flex;
            order: 5;
        }
        .pros, .contras {
            width: calc(100% / 2);
            padding: 1rem;
            padding-top: 0;
            border: 1px dashed #cbd5e0;
        }
        .pros ul, .contras ul {
            background-color: unset;
            border: none;
            margin: 0;
        }

        .pros ul li, .contras ul li {
            display: flex;
            align-items: baseline;
            line-height: 1;
            margin-top: 8px;
        }
        .pros svg, .contras svg {
            height: 17px;
            min-width: 17px;
            margin-right: 5px;
        }
        .contras {
            margin-left: 10px;
        }
        .pros {
            background-color: #f4f9f5;
            
        }
        .contras {
            background-color: #fcf2f2;
        }

        @media (max-width:500px) {
            .pros, .contras {
                width: 100%;
            }
            .container-pros-contras {
                display: block;
            }
            .contras {
                margin-left: 0;
                margin-top: 10px;
            }
        }