/* =========================
   VARIABLES
========================= */

:root {
    --border: #e5e7eb;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent: linear-gradient(135deg, #6a11cb, #2575fc);
    --accent-solid: #2575fc;
    --accent-soft: #ede9fe;
    --bg-soft: #f8fafc;
  }
  
  /* =========================
     LAYOUT GENERAL
  ========================= */
  
  .gadgets-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    max-width: 1240px;
    margin: 40px auto;
    padding: 0 16px;
  }
  
 /* Contenedor del formulario */
/* --- CONTENEDOR DE FILTROS --- */
.filters {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    /* Una sombra suave para que flote un poco */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
    border: 1px solid #eee;
    margin-top: 40px;
    height: fit-content;
  }
  
  .filter-group {
    margin-bottom: 25px;
    /* Esto es clave: Flexbox para separar los botones */
    display: flex;
    flex-direction: column;
    gap: 10px; 
  }
  
  .filter-group h3 {
    margin-top: 0;
    font-size: 0.95rem;
    text-transform: uppercase;
    margin-bottom: 12px;
    font-weight: 700;
  }
  
  /* --- ESTILO DE LOS BOTONES (LABELS) --- */
  .filter-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 15px; /* Un poco menos de alto */
    
    background: #fff; /* Fondo blanco es más limpio */
    border: 1px solid #e0e0e0; /* Borde gris suave */
    border-radius: 8px;
    
    cursor: pointer;
    transition: all 0.2s ease;
    
    font-size: 0.95rem;
    color: #555;
  }
  
  /* Hover suave */
  .filter-btn:hover {
    border-color: #b0b0b0;
    transform: translateY(-2px); /* Pequeño movimiento hacia arriba */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  }
  
  /* Input oculto */
  .filter-btn input {
    display: none; 
  }
  
  /* --- ESTADO SELECCIONADO (CHECKED) --- */
  /* Cuando está marcado, borde azul y fondo azul muy suave */
  .filter-btn:has(input:checked) {
    background: #f0f4ff; 
    border-color: #4f46e5; 
    color: #4f46e5;
    font-weight: 600;
    box-shadow: 0 0 0 1px #4f46e5; /* Doble borde sutil */
  }
  
  /* Icono de check o X al seleccionar */
  .filter-btn:has(input:checked)::after {
    content: '✓'; /* O usa '✕' si prefieres la idea de cerrar */
    font-size: 14px;
    font-weight: bold;
  }
  
  /* --- BOTÓN APLICAR (EL GRIS FEO DE ABAJO) --- */
  .filters button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: #111; /* Negro sólido */
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
  }
  
  .filters button[type="submit"]:hover {
    background: #333; /* Un gris muy oscuro al pasar el mouse */
  }
  /* =========================
     PRODUCT CARD
  ========================= */
  
  /* =========================
   PRODUCT CARD (Grid actualizado)
========================= */
.product-card {
    position: relative;
    display: grid;
    /* 3 Columnas: Imagen (180px), Info (flexible), Acciones (220px) */
    grid-template-columns: auto 2fr 1fr 1fr; 
    gap: 25px;
    background: #fff;
    overflow: hidden;
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 20px;
    margin-bottom: 24px;
    transition: all .3s ease;
    align-items: center; /* Centra todo verticalmente */
}
  
.product-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,.08);
    transform: translateY(-3px);
    border-color: #ddd;
}

.product-image-container {
    width: 8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.product-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-left: 1px solid #f1f5f9;
    padding-left: 20px;
}
  
  /* =========================
     RANK
  ========================= */
  
  /* =========================
   RANK (Flotante en esquina)
========================= */

.rank {
    /* Lo sacamos del flujo normal para que no ocupe espacio */
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    display: flex;
    align-items: flex-start;
  }
  
  /* El estilo del cuadradito con el número */
  .rank .number {
    background: #f1f5f9; /* Gris muy suave */
    color: #fff; /* Texto oscuro */
    font-size: 16px;
    font-weight: 800;
    background: var(--accent);
    /* Tamaño fijo cuadrado */
    width: 40px;
    height: 40px;
    
    /* Centrar el texto */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Bordes: Curva solo abajo a la derecha */
    border-bottom-right-radius: 12px;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    
    margin: 0; /* Quitamos margen antiguo */
  }
  /* =========================
     PRODUCT MAIN
  ========================= */
  
  .product-main {
    display: flex;
    align-items: center;
    gap: 18px;
  }
  
  
  .product-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-info h2 {
    font-size: 15px;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}
  
  .type {
    font-size: 13px;
    color: var(--text-muted);
  }
  
  /* =========================
     PROS
  ========================= */
  
  .pros {
    margin: 0 0;
    display: flex;
    flex-direction: column;
}

.pros li {
    font-size: .875rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
}
  
  /* =========================
     RATING + STARS
  ========================= */
  
  .rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
  }
  
  .stars {
    --percent: calc(var(--rating) / 5 * 100%);
    font-size: 16px;
    font-family: Times;
  }
  
  .stars::before {
    content: "★★★★★";
    background: linear-gradient(
      90deg,
      #c05621 var(--percent),
      #e5e7eb var(--percent)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  
  /* =========================
     PRICE BOX
  ========================= */
  
  .price-box {
    border: none;
    text-align: center;
    padding: 0;
    background: transparent;
}
  
  .price-box .label {
    font-size: 12px;
    color: var(--text-muted);
  }
  
  .price-box .price {
    font-size: 24px;
    font-weight: 800;
    margin: 10px 0;
  }
  
  .price-box .cta {
    display: block;
    background: #000;
    color: #fff;
    padding: 11px;
    border-radius: 12px;
    font-weight: 800;
    text-decoration: none;
  }
  
/* =========================
   RESPONSIVE & TOGGLE
========================= */

/* Por defecto (Escritorio), el botón toggle está oculto */
.toggle-btn {
    display: none;
  }
  
  /* --- TABLETS Y MÓVILES (Menos de 960px) --- */
  @media (max-width: 790px) {
    
    .filter-group {
        margin-bottom: 0;
    }
    /* Layout principal a una sola columna */
    .gadgets-layout {
      grid-template-columns: 1fr;
      gap: 20px;
    }
  
  
    /* ESTILO DEL BOTÓN TOGGLE */
    .toggle-btn {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      background: #fff;
      border: 1px solid #ddd;
      padding: 10px;
      font-size: 1rem;
      font-weight: 700;
      color: #333;
      border-radius: 8px;
      cursor: pointer;
      transition: background 0.2s;
    }
  
    .toggle-btn:hover {
      background: #f9f9f9;
    }
    
    /* Cuando está abierto, cambiamos el color un poco */
    .toggle-btn.active {
      background: #f0f4ff;
      border-color: #4f46e5;
      color: #4f46e5;
      border-bottom-left-radius: 0; /* Para pegarlo al formulario */
      border-bottom-right-radius: 0;
      border-bottom: none;
    }
  
    /* EL FORMULARIO (OCULTO POR DEFECTO) */
    
  
    /* EL FORMULARIO (VISIBLE) */
    
  
    .filters .apply-btn {
      grid-column: span 2; /* Botón aplicar ancho completo */
    }
  }
  
  /* --- MÓVILES PEQUEÑOS (Menos de 650px) --- */
  @media (max-width: 700px) {
  
    /* En móvil muy chico, los filtros a 1 sola columna */
    #filterForm.is-open {
      grid-template-columns: 1fr;
    }
  
    .filters .apply-btn {
      grid-column: auto;
    }
    
    /* Ajustes de tarjeta (los mismos de antes) */
    .product-card {
      display: flex;
      flex-direction: column;
      padding: 18px;
      gap: 5px;
    }
    .product-main { flex-direction: column; gap: 12px; }
    .product-main img { margin: 0 auto; display: block; }
    .product-main .info { text-align: center; }
    
    /* Caja precio móvil */
    .price-box {
      width: 100%;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: center;
      padding: 12px 16px;
    }
    .price-box .label { display: none; }
    .price-box .price { margin: 0; font-size: 20px; }
   
  }
  
  /* Animación suave al abrir */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  /* =========================
   ORDER SELECT
========================= */

.order-select {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
  }
  
  .order-select select {
    appearance: none;
    background:
      var(--bg-soft)
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath d='M5.5 7.5L10 12l4.5-4.5'/%3E%3C/svg%3E")
      no-repeat right 12px center;
    background-size: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 34px 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
  }
  
  .order-select select:hover {
    border-color: var(--accent-solid);
  }
  
  .order-select select:focus {
    outline: none;
    border-color: var(--accent-solid);
    box-shadow: 0 0 0 2px rgba(37, 117, 252, 0.15);
  }
  
  .load-more {
    margin: 30px auto 0;
    display: block;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-size: 14px;
    width: fit-content;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
        text-decoration: none; /* Quitar subrayado */
        display: block; /* Comportamiento de bloque/botón */
        text-align: center;
  }
  

  /* Esto hace que el título se estire sobre el sidebar y los productos */
.page-intro {
    grid-column: 1 / -1; /* Ocupa todo el ancho del grid */
    margin-bottom: 10px;
    max-width: calc(100% - 120px);
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
  }
  
  .page-intro h1 {
    margin: 0 0 10px 0;
    color: #111;
  }
  
  .page-intro p {
    color: #666;
    font-size: 1.1rem;
    max-width: 800px;
  }
  
  /* En móvil centramos el texto */
  @media (max-width: 650px) {
    .page-intro {
      text-align: center;
      width: 100%;
      max-width: 100%;
    }
  }

.products{
    max-width: 800px;
}
  
/* Contenedor principal del rango y premio */
.rank-award {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    height: 30px;
    align-items: center;
    background: linear-gradient(135deg, #6a11cb, #2575fc); /* Tu degradado indigo-blue */
    border-bottom-right-radius: 12px;
    border-top-left-radius: 20px; /* Ajusta este valor al radio de tu .product-card */
    overflow: hidden;
    z-index: 10;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
}

/* Estilo para el número */
.rank-award .number {
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    width: 40px;
    height: 40px;
    border-right: 1px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilo para el texto que se une al número */
.rank-award .award-text {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 0 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}



/* Small helper (screen-reader only) */
.sr-only { position: absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Order controls layout */
.order-select { display:flex; justify-content:flex-end; align-items:center; gap:10px; margin-bottom:12px; }
.order-controls { display:flex; align-items:center; gap:8px; }

/* Mobile filter button (hidden desktop) */
.mobile-filter-btn{
  display:none;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  cursor:pointer;
}
.mobile-filter-btn svg{ display:block; color: #cbd5e1; }

/* Mobile behavior: show icon + transform filter form into a panel */
@media (max-width: 700px) {
  /* show button */
  
  /* make order-select occupy full width and left-align the select */
  .order-select { justify-content:space-between; }

  /* hide the aside filterForm by default (on mobile) */

  /* when is-open (toggle desde JS), mostrar como panel full-height desde la derecha */


  /* evitar que el resto de la página este scrollable (podés activar esto en JS si prefieres) */
  body.filters-open { overflow: hidden; }
}


@media (max-width:1000px) {
  .filter-group h3 {
    margin-top: 10px;
  }
  .gadgets-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    place-items: center;
  }
  body.filters-open::after{
    content:"";
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    z-index:1100;
    pointer-events:auto;
  }
  #filterForm.mobile-hidden {
    display: none; /* Magia: Se oculta */
  }
/* Ocultar completamente el aside en mobile */
aside.filters {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  visibility: hidden !important;
  height: 0 !important;
}
.mobile-filter-btn { display:inline-flex; }
#filterForm.is-open {
  display:block !important;
  position:fixed;
  top:0;
  right:0;
  height:100vh;
  width:92%;
  max-width:420px;
  z-index:1200;
  padding:20px;
  box-shadow: -20px 0 60px rgba(2,6,23,0.6);
  overflow:auto;
  border-left: 1px solid rgba(255,255,255,0.04);
  transform: translateX(0);
  transition: transform .28s cubic-bezier(.2,.9,.3,1);
}
#filterForm.is-open {
  display:block !important;
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  height: 100vh !important;
  width: 92% !important;
  max-width: 420px !important;
  z-index: 1200 !important;
  padding: 20px !important;
  background: #fff;
  box-shadow: -20px 0 60px rgba(2,6,23,0.6) !important;
  overflow:auto !important;
  border-left: 1px solid rgba(255,255,255,0.04) !important;
}
/* añadir un botón de cerrar dentro del panel (si quieres colocarlo vía CSS) */
#filterForm.is-open .close-filter {
  display:inline-flex;
  margin-left:auto;
  background:transparent;
  border:0;
  color:#e2e8f0;
  font-size:1.1rem;
  cursor:pointer;
}

#filterForm.is-open {
  display: grid; /* Usamos grid para organizar */
  grid-template-columns: 1fr 1fr; /* Dos columnas en tablet */
  gap: 20px;
  animation: fadeIn 0.3s ease;
  
  /* Estilo para pegarlo al botón */
  border-top: 1px solid #eee;
  padding-top: 20px;
}
}

/* -------------------------
   Mobile: forzar 1 columna y ocultar aside
   ------------------------- */
   @media (max-width:700px) {
    /* Forzar contenedor a 1 columna */
    
  
    
    aside.filters .apply-btn,
    #filterForm .apply-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      margin-top: 18px;
      padding: 12px 16px;
      border-radius: 10px;
      border: none;
      cursor: pointer;
    
      /* Estilo principal */
      background-color: #000;
      color: #ffffff;
      font-weight: 700;
      font-size: 0.95rem;
      letter-spacing: .3px;
    
      box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
      transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
    }
    /* Asegurar que main ocupa todo el ancho */
    main.products {
      grid-column: 1 / -1 !important;
      width: 100% !important;
    }
  
    /* El panel flotante #filterForm aparece cuando tiene .is-open (ya lo definiste) */
   
  
    /* Opcional overlay cuando están los filtros abiertos */
    
  }
  

  /* Estilos del Slider de Rango Dual */
.price-slider-wrapper {
    width: 100%;
    padding: 10px 0 20px 0;
}
.slider-container {
    position: relative;
    height: 6px;
    background: #e2e8f0;  
    border-radius: 5px;
    margin-top: 15px;
}
.slider-track {
    position: absolute;
    height: 100%; 
    background: #4a5568; /* Color de la barra activa */
    border-radius: 5px;
}
.range-input {
    position: relative;
}
.range-input input {
    position: absolute;
    width: 100%;
    height: 5px;
    top: -7px;
    background: none;
    pointer-events: none; /* Permite clic a través */
    -webkit-appearance: none;
    -moz-appearance: none;
}
/* Estilo del "Thumb" (la bolita) para Chrome/Safari */
.range-input input::-webkit-slider-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #4a5568;
    pointer-events: auto; /* Reactiva eventos en la bolita */
    -webkit-appearance: none;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
/* Estilo del "Thumb" para Firefox */
.range-input input::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border: 2px solid #4a5568;
    border-radius: 50%;
    background: #fff;
    pointer-events: auto;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.price-inputs {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 10px;
}
.price-field {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #4a5568;
}
.price-field input {
    width: 70px;
    padding: 5px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    margin-left: 5px;
    font-size: 14px;
}

.btn-primary {
    background: black;
    color: white;
    /* tus estilos actuales */
  }

  .btn-secondary {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #555; /* Gris oscuro, no negro */
    text-decoration: underline;
    cursor: pointer;
  }
  
  .btn-secondary:hover {
    color: #000;
  }

  .icon-options {
    display: flex;
    gap: 15px; /* Espacio entre botones */
}

/* Estilo Base del Botón */
.icon-btn {
    width: 60px;  /* Ancho fijo */
    height: 60px; /* Alto fijo para que sea cuadrado */
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px; /* Bordes redondeados modernos */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.5rem; /* Tamaño del icono */
    color: #9ca3af; /* Color gris apagado por defecto */
}

.icon-btn input {
    display: none; /* Ocultamos el radio real */
}

/* Efecto Hover */
.icon-btn:hover {
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Efecto Click */
.icon-btn:active {
    transform: scale(0.95);
}

/* --- ESTADOS ACTIVOS --- */

/* Cuando activas el SÍ (Azul Agua) */
.yes-btn:has(input:checked) {
    background-color: #eff6ff;
    border-color: #3b82f6;
    color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* Cuando activas el NO (Rojo/Gris oscuro) */
.no-btn:has(input:checked) {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}



.bandera {
  position: relative;
  width: 100px;
  background: #000;
  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 {
  padding: 6px 0;
  font-size: 22px;
  color: #fff;
}

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

.bandera .puntaje span {
  font-size: 14px;
  color: #fff;
}
/* =========================================
   1. TABLET LAYOUT (701px - 1100px)
   Diseño horizontal ancho: Imagen | Info+Pros | Precio+Score
   ========================================= */
   @media (max-width: 1100px) {
    .bandera {
      width: 80px;
    }
    .gadgets-layout {
      margin-top: 10px;
      padding: 0 10px;
    }
    .product-card {
        display: grid;
        /* 3 Columnas: Imagen - Info - Acciones */
        grid-template-areas: "image info actions";
        align-items: center;
        text-align: left;
    }

    /* Imagen */
    .product-image-container {
        grid-area: image;
        display: flex;
        width: 6rem;
        align-items: center;
        justify-content: center;
    }

    /* Info Central (Mantenemos los Pros aquí porque caben) */
   
    .product-info h2 { font-size: 18px; margin: 0; }
    .type { display: none; } /* Ocultamos el tipo para limpiar */

    /* Acciones Derecha (Score + Precio + Botón apilados) */
    .product-actions {
        border-left: 1px solid #f1f5f9;
        padding-left: 15px;
        border-top: none;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }

    .price-box {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0;
    }
    .price-box .cta {
      padding: 5px;
    }
}

@media (max-width:600px) {
  .product-info {
    grid-area: 2;
    grid-column: 1/5;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.product-card {
  grid-template-columns: 3fr;
}

.product-actions {
  grid-area: actions;

}
}
@media (max-width: 400px) {
  .price-box {
    flex-direction: column;
  }
}

/* Por defecto oculto en escritorio */
.close-filter-btn {
  display: none;
}

/* Solo visible en Mobile (ajusta el pixelaje a tu breakpoint, ej: 1000px o 700px) */
@media (max-width: 1000px) {
  .close-filter-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      position: absolute;
      top: 15px;
      right: 15px;
      background: transparent;
      border: none;
      cursor: pointer;
      padding: 5px;
      z-index: 20;
      color: #4a5568; /* Color gris oscuro */
      border-radius: 50%;
      transition: background 0.2s;
  }

  .close-filter-btn:hover {
      background-color: #f1f5f9;
      color: #000;
  }

  .close-filter-btn svg {
      width: 24px;
      height: 24px;
  }
  
  /* Aseguramos que el formulario tenga posición relativa para que el absolute funcione dentro */
  #filterForm.is-open {
      position: fixed; /* O fixed según tu CSS actual */
  }
}




/* Estilos para estado vacío */
.no-results-wrapper {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: 12px;
  grid-column: 1 / -1; /* Esto asegura que ocupe todo el ancho si usas grid */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  border: 1px dashed #cbd5e0;
  margin-top: 20px;
}

.no-results-icon {
  margin-bottom: 20px;
  opacity: 0.7;
}

.no-results-wrapper h3 {
  font-size: 1.5rem;
  color: #2d3748;
  margin-bottom: 10px;
  margin-top: 0;
}

.no-results-wrapper p {
  color: #718096;
  margin-bottom: 25px;
  font-size: 1rem;
}

.reset-filters-btn {
  background-color: #4a5568;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.reset-filters-btn:hover {
  background-color: #2d3748;
}

/* --- CARD PRINCIPAL --- */
.review-card {
  border: 1px solid #ddd;
  background: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 700px;
  margin: 40px auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  overflow: hidden;
}

/* --- HEADER --- */
.card-header {
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #f5f3ff, #eef2ff);
  border-bottom: 1px solid #ddd;
}

.rank-badge {
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: white;
  font-weight: 900;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.product-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.2;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- CUERPO --- */
.card-main {
  display: flex;
  padding: 32px;
  gap: 40px;
}

.product-figure {
  margin: 0;
}

.product-figure img {
  max-width: 200px;
  border-radius: 14px;
  background: var(--bg-light);
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.product-content {
  flex: 1.6;
  display: flex;
  flex-direction: column;
  color: var(--text-gray);
  font-size: 1rem;
  line-height: 1.6;
}

/* --- PRECIO --- */
.pricing-block {
  margin-top: auto;
  background: var(--bg-light);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.current-price {
  font-size: 1.9rem;
  font-weight: 900;
  margin-bottom: 10px;
  display: block;
}

/* --- BOTÓN AMAZON --- */
.btn-amazon {
  display: inline-block;
  background-color: #000;
  color: #fff;
  font-weight: 800;
  padding: 14px;
  text-decoration: none;
}

/* --- ACORDEONES --- */
.tech-specs {
  border-top: 1px solid #ddd;
}

details {
  background: #fff;
}

summary {
  padding: 20px 32px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dark);
  background: #fff;
}

summary:hover {
  background: #f8fafc;
}

summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--text-gray);
  transition: transform 0.4s ease;
}

details[open].is-expanded summary::after {
  transform: rotate(45deg);
}

/* --- ANIMACIÓN --- */
.accordion-content-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease;
}

details[open].is-expanded .accordion-content-wrapper {
  grid-template-rows: 1fr;
}

.accordion-body {
  min-height: 0;
  opacity: 0;
  padding: 0 32px;
  transition: opacity 0.3s ease, padding 0.3s ease;
  overflow: hidden;
  color: var(--text-gray);
}

details[open].is-expanded .accordion-body {
  opacity: 1;
  padding: 16px 32px 28px;
}

/* --- GRID SPECS --- */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.spec-grid span {
  background: #f1f5f9;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
  .card-main {
      flex-direction: column;
      padding: 24px;
  }
  .review-card {
    margin: 5px;
  }
  .product-title {
      font-size: 1.2rem;
  }
  .product-figure img {
    display: block;
    margin: auto;
  }
}

@media (max-width: 480px) {

  /* --- CARD GENERAL --- */
  .review-card {
      border-radius: 14px;
      box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  }

  /* --- HEADER --- */
  .card-header {
      padding: 16px 18px;
      gap: 12px;
  }

  .rank-badge {
      width: 36px;
      height: 36px;
      font-size: 1rem;
  }

  .product-title {
      font-size: 1rem;
      line-height: 1.25;
  }

  /* --- CUERPO --- */
  .card-main {
      padding: 18px;
      gap: 18px;
  }

  .product-figure img {
      max-width: 220px;
      padding: 12px;
      border-radius: 12px;
  }

  .product-content {
      font-size: 0.95rem;
  }

  .product-content p {
      margin: 0 0 12px;
  }

  /* --- PRECIO + CTA (HYPER FOCO) --- */
  .pricing-block {
      padding: 14px;
      border-radius: 10px;
  }

  .current-price {
      font-size: 1.6rem;
      margin-bottom: 8px;
  }

  .btn-amazon {
      padding: 12px;
      font-size: 0.95rem;
      border-radius: 6px;
  }

  /* --- ACORDEONES --- */
  summary {
      padding: 14px 18px;
      font-size: 0.95rem;
  }

  .accordion-body {
      padding: 0 18px;
      font-size: 0.9rem;
  }

  details[open].is-expanded .accordion-body {
      padding: 10px 18px 18px;
  }

  /* --- GRID SPECS → UNA COLUMNA --- */
  .spec-grid {
      grid-template-columns: 1fr;
      gap: 8px;
  }

  .spec-grid span {
      font-size: 0.9rem;
      padding: 8px 10px;
  }
}
@media (max-width:360px) {

  .price-box .cta {
    font-size: .875rem;
  }
  .price-box .price {
    font-size: 1rem;
  }
  .product-image-container {
    width: 4rem;
  }
}

.tech-specs details {
  border-bottom: 1px solid #000;
}
.tech-specs details:first-child {
  border-top: 1px solid #000;
}
.tech-specs details:last-child {
  border: none;
}









:root{
  --spec-border: rgba(17,17,17,0.06);
  --spec-bg: #ffffff;
  --spec-accent: #111827; /* título */
  --spec-text: #374151;
  --spec-muted: #6b7280;
  }
  
  
  .specs-card{
  border-radius: 10px;
  padding: 18px;
  color: var(--spec-text);
  max-width: 520px; /* adapta a la caja donde lo pongas */
  }
  
  
  .specs-title{
  margin: 0 0 10px 0;
  font-size: 15px;
  color: var(--spec-accent);
  letter-spacing: -0.2px;
  font-weight: 600;
  }
  
  
  .product-specs{
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
  }
  
  
  .product-specs th,
  .product-specs td{
  padding: 10px 8px;
  vertical-align: top;
  }
  
  
  .product-specs th{
  width: 38%;
  text-align: left;
  color: var(--spec-muted);
  font-weight: 600;
  font-size: 13px;
  padding-right: 14px;
  }
  
  
  .product-specs td{
  color: var(--spec-text);
  font-weight: 500;
  word-wrap: break-word;
  }
  
  
  /* Líneas separadoras sutiles */
  .product-specs tbody tr + tr td{
  border-top: 1px solid var(--spec-border);
  }
  
  
  /* Responsive: en pantallas muy pequeñas, convertir a diseño vertical */
  table {
    min-width: auto!important;
  }

  td {
    min-width: auto!important;
  }