
/* =========================
   FILTER SIDEBAR
========================= */

.nx-filter {
  background: var(--nx-color-bg-w);
  border: 1px solid var(--nx-surface-3);
  border-radius: 8px;
  padding: 16px;
}

.nx-filter__title {
  font-size: var(--nx-font-m);
  margin-bottom: 16px;
  font-weight: 600;
}

.nx-filter__group {
  margin-bottom: 20px;
}

.nx-filter__group-title {
  font-size: var(--nx-font-sm);
  margin-bottom: 8px;
  font-weight: 600;
}

.nx-filter__item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: var(--nx-font-sm);
  cursor: pointer;
}

/* ===============================
   CONTENEDOR GENERAL DE FILTROS
=================================*/

.nx-filter {
    background: var(--nx-surface-1);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.05);
}

/* ===============================
   FILTROS RÁPIDOS SUPERIORES
=================================*/

.nx-quick-top-filters {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--nx-border-light);
}

/* ===============================
   TOGGLE ESTILO MODERNO
=================================*/

.nx-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--nx-font-m);
    font-weight: 500;
    cursor: pointer;
    gap: 10px;
}

.nx-toggle input {
    display: none;
}

.nx-toggle-slider {
    position: relative;
    width: 40px;
    height: 22px;
    background: var(--nx-surface-2);
    border-radius: 10px;
    transition: 0.3s ease;
}

.nx-toggle-slider::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    background:var(--nx-surface-1);
    border-radius: 10px;
    top: 3px;
    left: 3px;
    transition: 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.nx-toggle input:checked + .nx-toggle-slider {
    background: var(--nx-color-bg-soft);
}

.nx-toggle input:checked + .nx-toggle-slider::before {
    transform: translateX(18px);
}

/* ===============================
   SOLO ESCRITORIO
=================================*/

@media (max-width: 768px) {
    .nx-quick-top-filters {
        display: none;
    }
}

/* ==============================
   ORDENAR POR - ESTILO PREMIUM
================================*/

.nx-filter__group--sort {
    margin-bottom: 24px;
}

.nx-sort-select-wrapper {
    position: relative;
    margin-top: 10px;
}

.nx-sort-select {
    width: 100%;
    padding: 12px 40px 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--nx-border-light);
    background: var(--nx-surface-1);
    font-size: var(--nx-font-m);
    font-weight: 500;
    color: var(--nx-color-text-dark);
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Flecha personalizada */
.nx-sort-select-wrapper::after {
    content: "▾";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--nx-font-m);
    color: var(--nx-color-text-textcomment);
    pointer-events: none;
}

/* Hover */
.nx-sort-select:hover {
    border-color:  var(--nx-border-light);
}

/* Focus */
.nx-sort-select:focus {
    outline: none;
    border-color: var(--nx-border-light);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

/* =======================================
   CHECKBOX PERSONALIZADO
======================================= */

.nx-filter__item input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid var(--nx-border-light);
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nx-filter__item input[type="checkbox"]:checked {
    background: var(--nx-active-color);
    border-color: var(--nx-active-color);
}

.nx-filter__item input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    color: var(--nx-color-text);
    font-size: var(--nx-font-sm);
    left: 50%;
    top: 48%;
    transform: translate(-50%, -50%);
}

/* =======================================
   RADIO PERSONALIZADO
======================================= */

.nx-filter__item input[type="radio"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid var(--nx-border-light);
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nx-filter__item input[type="radio"]:checked {
    border-color: var(--nx-active-color);
}

.nx-filter__item input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--nx-active-color);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* =======================================
   TOGGLE (RETIRAR YA / ENVÍO / DESCUENTO)
======================================= */

.nx-toggle input:checked + .nx-toggle-slider {
    background: var(--nx-active-color);
}

/* =======================================
   SELECT FOCUS
======================================= */

.nx-sort-select:focus {
    border-color: var(--nx-active-color);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}
/* =======================================
   ITEM FILTRO COMO BOTÓN EN HOVER
======================================= */

.nx-filter__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hover */
.nx-filter__item:hover {
    border-color: var(--nx-color-button-bd);
    background: color-mix(in srgb, var(--nx-color-button-bd) 8%, transparent);
}

/* Cuando está seleccionado */
.nx-filter__item input:checked ~ span,
.nx-filter__item input:checked + span {
    font-weight: 600;
}

.nx-filter__item input:checked {
    accent-color: var(--nx-color-button-bd);
}

/* Si querés que el botón activo quede marcado */
.nx-filter__item:has(input:checked) {
    border-color: var(--nx-color-button-bd);
    background: color-mix(in srgb, var(--nx-color-button-bd) 12%, transparent);
}

/* =======================================
   QUICK FILTERS COMO CHIPS INTERACTIVOS
======================================= */

.nx-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid transparent;

    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hover */
.nx-toggle:hover {
    border-color: var(--nx-color-button-bd);
    background: color-mix(in srgb, var(--nx-color-button-bd) 8%, transparent);
}

/* Estado ACTIVO (cuando está checked) */
.nx-toggle:has(input:checked) {
    border-color: var(--nx-color-button-bd);
    background: color-mix(in srgb, var(--nx-color-button-bd) 14%, transparent);
}

/* Animación suave */
.nx-toggle span {
    transition: color 0.2s ease;
}

.nx-category-sub {
    margin-left: 14px;
    margin-top: 6px;
}

.nx-category-subsub {
    margin-left: 18px;
    margin-top: 4px;
}

.nx-filter__item--sub span {
    font-size: var(--nx-font-m);
    opacity: 0.9;
}

.nx-filter__item--subsub span {
    font-size: var(--nx-font-m);
    opacity: 0.75;
}

.nx-product-grid__title{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 40px 40px 0px 40px;
  font-size: var( --nx-font-g);
  padding: 0px;
}

/* Estilo para filtros activos */
.nx-quick-top-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.nx-active-filter {
    background: var(--nx-surface-2);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: var(--nx-font-sm);
    display: flex;
    align-items: center;
}
.nx-active-filter .nx-remove-filter {
    margin-left: 6px;
    font-weight: bold;
    color: var(--nx-color-text-darks);
}
@media (min-width: 768px) and (max-width: 1500px) {
    .nx-product-grid-layout {
        padding: 0;
    }
}

/* Layout principal */
.nx-product-page {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 40px 60px; /* margen lateral real */
    box-sizing: border-box;
}


/* TITULO alineado con inicio de filtro */
.nx-product-grid__title {
    font-size: var(--nx-font-g);
    font-weight: 600;
    margin-bottom: 32px;
}

/* Layout filtro + grilla */
.nx-product-grid-layout {
    justify-content: flex-start; 
    align-items: flex-start;
}

.nx-product-grid-layout {
    display: flex;
    gap: 32px;
    width: 100%;
    max-width: 1800px; /* o directamente eliminá el max-width */
    margin: 0 auto;
}



/* =====================================================
   PRODUCT PAGE LAYOUT
===================================================== */

.nx-product-page {
    width: 100%;
    max-width: 1800px;          /* controla ancho total */
    margin: 0 auto;             /* centra el bloque */
    padding: 40px 60px;         /* mismo margen izquierda/derecha */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.nx-product-title {
    width: 100%;
    max-width: 1800px;          /* controla ancho total */
    margin: 0 auto;     
    padding: 40px 60px 0px 60px; /* margen lateral real */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}


/* =====================================================
   TITULO
===================================================== */

.nx-product-grid__title {
    font-size: var(--nx-font-g);
    font-weight: 600;
    margin-bottom: 32px;
}

/* =====================================================
   LAYOUT FILTRO + GRILLA
===================================================== */

.nx-product-grid-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    width: 100%;
}

/* Sidebar */
.nx-product-filter-desktop {
    flex: 0 0 280px;
    position: sticky;
    top: 120px;
}

/* Contenido productos */
.nx-product-grid-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* =====================================================
   GRID PRODUCTOS
===================================================== */

.nx-product-grid__wrapper {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 columnas reales */
    gap: 20px;
    width: 100%;
}

.nx-product-grid__wrapper .nx-card {
    width: 100%;
    min-width: 0;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1500px) {
    .nx-product-grid__wrapper {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .nx-product-grid__wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    .nx-product-page {
        padding: 20px;
    }
    .nx-product-title {
        padding: 20px 20px 0px 20px;
    }

    .nx-product-grid-layout {
        flex-direction: column;
        gap: 24px;
    }

    .nx-product-filter-desktop {
        position: relative;
        top: auto;
        width: 100%;
    }

    .nx-product-grid__wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .nx-product-grid__wrapper {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   NOTEBOOK - sacar padding lateral
========================================= */

@media (min-width: 1024px) and (max-width: 1500px) {
    .nx-product-page {
        padding-left: 5px;
        padding-right: 5px;
    }
    .nx-product-title{
        padding-left: 5px;
        padding-right: 5px;
    }
    
    /* Reduce separación filtro ↔ grilla */
    .nx-product-grid-layout {
        gap: 16px; /* antes 32px */
    }

    /* Reduce separación entre productos */
    .nx-product-grid__wrapper {
        gap: 10px; /* antes 20px */
    }
}


/* ===============================
   PAGINACIÓN
=================================*/
.nx-pagination {
    display: flex;
    justify-content: center;
    padding: 32px 0;
    font-size: var(--nx-font-m);
}

.nx-pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 8px;
}

.nx-pagination li {
    display: inline-flex;
}

.nx-pagination a,
.nx-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(-nx-color-text-dark);
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Estado hover */
.nx-pagination a:hover {
    background: var( --nx-surface-1);
    border-color: var(--nx-color-button-bd);
}

/* Página activa */
.nx-pagination li.active span {
    background: var(--nx-color-accent);
    color: var(--nx-color-text);
    border-color: var(--nx-color-accent);
}

/* Botones deshabilitados */
.nx-pagination li.disabled span {
    color: var(--nx-color-muted);
    cursor: default;
}

/* Flechas anteriores/siguientes */
.nx-pagination-next,
.nx-pagination-prev {
    font-weight: bold;
}

.nx-pagination a{
    color: var(--nx-color-text-dark);
}

/* ===============================
   BLOQUE EXTRA OCULTO
=================================*/
.nx-filter__extra {
    display: none;
    margin-top: 6px;
    transition: all 0.3s ease;
}

/* ===============================
   BOTÓN VER MÁS / VER MENOS
=================================*/
.nx-filter__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    margin-top: 6px;
    border-radius: 10px;
    border: 1px solid var(--nx-border-light);
    background: var(--nx-surface-1);
    font-size: var(--nx-font-sm);
    font-weight: 500;
    color: var(--nx-color-text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.nx-filter__toggle:hover {
    border-color: var(--nx-color-button-bd);
    background: color-mix(in srgb, var(--nx-color-button-bd) 8%, transparent);
}

.nx-filter__toggle:active {
    transform: scale(0.98);
}

/* ===============================
   OPCIONAL: animación al mostrar el extra
=================================*/
.nx-filter__extra.show {
    display: block;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px);}
    to { opacity: 1; transform: translateY(0);}
}

.nx-filter__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between; /* texto a la izquierda, flecha a la derecha */
    padding: 8px 12px;
    margin-top: 6px;
    border-radius: 10px;
    border: 1px solid var(--nx-border-light);
    background: var(--nx-surface-1);
    font-size: var(--nx-font-sm);
    font-weight: 500;
    color: var(--nx-color-text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.nx-filter__toggle:hover {
    border-color: var(--nx-color-button-bd);
    background: color-mix(in srgb, var(--nx-color-button-bd) 8%, transparent);
}

/* =============================
   PAGINACIÓN MOBILE AJUSTES
============================= */
@media (max-width: 768px) {
  .nx-pagination {
    margin: 16px 0 80px 0; /* más espacio inferior para no tapar sticky filter */
    padding: 0 8px;
  }

  .nx-pagination ul {
    gap: 8px; /* reduce el espacio entre botones en mobile */
  }

  .nx-pagination a,
  .nx-pagination span {
    min-width: 36px;
    height: 36px;
    font-size: var(--nx-font-s); /* ligeramente más pequeño */
  }

  .nx-pagination-prev,
  .nx-pagination-next {
    font-size: var(--nx-font-m); /* íconos más legibles */
  }

  .nx-pagination li.active span {
    background: var(--nx-color-bg);
    color: var(--nx-color-text);
    border-color: var(--nx-border-light);
    transform: scale(1.05); /* resalta la página activa */
  }

  .nx-pagination li.disabled span {
    opacity: 0.3;
  }
}

#loadingOverlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    cursor: wait; /* <--- esto cambia el cursor */
}

/* =====================================================
   EMPTY STATE - DISEÑO ANCHO Y CORTO (TIPO BANNER)
===================================================== */

.nx-empty-state {
    display: flex;
    flex-direction: row; /* Elementos lado a lado */
    align-items: center; /* Centrado vertical */
    justify-content: space-between; 
    padding: 24px 40px; /* Poco alto, más espacio a los lados */
    width: 100%;
    background: var(--nx-surface-1);
    border-radius: var(--nx-radius-md);
    border: 1px solid var(--nx-border-light);
    box-shadow: 0 4px 18px rgba(0,0,0,0.03);
    box-sizing: border-box;
    gap: 30px;
    margin: 0;
}

/* Agrupamos ícono y textos de la izquierda */
.nx-empty-main {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Ícono compacto */
.nx-empty-icon {
    font-size: 32px;
    background: var(--nx-surface-2);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--nx-color-text-darks);
    flex-shrink: 0;
}

.nx-empty-text {
    text-align: left;
}

.nx-empty-text h2 {
    font-size: var(--nx-font-g);
    font-weight: 600;
    margin: 0 0 6px 0;
    color: var(--nx-text-dark);
}

.nx-empty-text p {
    color: var(--nx-color-text-textcomment);
    font-size: var(--nx-font-m);
    margin: 0;
}

.nx-empty-text strong {
    color: var(--nx-color-text-dark);
}

/* Sugerencias a la derecha, sin fondo invasivo */
.nx-empty-suggestions {
    background: transparent;
    padding: 0 0 0 30px; /* Espacio a la izquierda de la línea */
    margin: 0;
    text-align: left;
    border-left: 1px solid var(--nx-border-light); /* Línea separadora */
    flex-shrink: 0;
}

.nx-empty-suggestions > p {
    color: var(--nx-color-text-darks);
    font-weight: 600;
    margin: 0 0 10px 0;
    font-size: var(--nx-font-sm);
}

.nx-empty-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nx-empty-suggestions li {
    color: var(--nx-color-text-darks2);
    font-size: var(--nx-font-sm);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Usamos un check amigable en vez de puntos */
.nx-empty-suggestions li::before {
    content: "✓";
    color: var(--nx-color-button-bd);
    font-weight: bold;
}

/* En celulares vuelve a ser una columna para que no se rompa */
@media (max-width: 768px) {
    .nx-empty-state {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 20px;
    }
    .nx-empty-suggestions {
        border-left: none;
        border-top: 1px solid var(--nx-border-light);
        padding-left: 0;
        padding-top: 20px;
        width: 100%;
    }
}

/* =========================================
   NOTA DE CATEGORÍA (BANNER INFORMATIVO)
========================================= */

.nx-category-nota {

     width: 100%;
    max-width: 1800px;          /* controla ancho total */
    margin: 0 auto;     
    padding: 40px 60px 0px 60px; /* margen lateral real */
    box-sizing: border-box;
    display: flex;
    flex-direction: column; 


    background: var(--nx-surface-1);
    border: 1px solid var(--nx-border-light);
    border-radius: 12px; /* Coincide con la tarjeta de filtros */
    padding: 24px;
    margin-bottom: 32px; /* Separación con la grilla o título */
    box-shadow: 0 4px 18px rgba(0,0,0,0.05); /* Sombra suave de la marca */
}

.nx-category-nota .nota-preview h3 {
    font-size: var(--nx-font-g);
    font-weight: 600;
    color: var(--nx-text-dark);
    margin: 0 0 12px 0;
}

.nx-category-nota .nota-preview p {
    font-size: var(--nx-font-m);
    color: var(--nx-color-text-darks2);
    line-height: 1.5;
    margin: 0 0 16px 0;
}

/* Estilo del enlace usando el color principal de la tienda */
.nx-category-nota .nota-preview .ver-mas {
    display: inline-flex;
    align-items: center;
    font-size: var(--nx-font-m);
    font-weight: 600;
    color: var(--nx-active-color); 
    text-decoration: none;
    transition: all 0.2s ease;
}

.nx-category-nota .nota-preview .ver-mas:hover {
    color: var(--nx-color-accent); /* Azul más oscuro al pasar el mouse */
    text-decoration: underline;
}

/* =========================================
   RESPONSIVE PARA MOBILE
========================================= */
@media (max-width: 768px) {
    .nx-category-nota {
        padding: 20px;
        margin-bottom: 24px;
        border-radius: var(--nx-radius-md);
    }
    
    .nx-category-nota .nota-preview h3 {
        font-size: 1.25rem; /* Ajuste para pantallas chicas */
    }
}

/* =========================================
   NOTAS (BLOG) - ESCRITORIO / BASE
========================================= */

.nx-nota-container {
    width: 100%;
    max-width: 1800px;          /* controla ancho total */
    margin: 0 auto;     
    padding: 40px 60px 0px 60px; /* margen lateral real */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background-color: var(--nx-color-bg-w);
    font-family: var(--nx-font-base);
}

.nx-nota-header h1 {
    font-size: 2rem; 
    color: var(--nx-color-text-dark);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

/* Caja de Destacado / Respuesta Rápida */
.nx-nota-highlight {
    background-color: var(--nx-color-bg-s); 
    border-left: 4px solid var(--nx-active-color); 
    padding: var(--nx-space-md) 24px;
    border-radius: 0 var(--nx-radius-md) var(--nx-radius-md) 0;
    margin-bottom: 32px;
    color: var(--nx-color-text-darks);
    font-size: var(--nx-font-m);
    line-height: 1.6;
}

.nx-nota-highlight strong {
    color: var(--nx-active-color);
}

/* Imagen Principal */
.nx-nota-image {
    margin: 0 0 32px 0;
    width: 100%;
}

.nx-nota-image img {
    width: 100%;
    height: auto;
    border-radius: var(--nx-radius-md);
    display: block;
    object-fit: cover;
    box-shadow: 0 4px 18px rgba(0,0,0,0.05);
}

.nx-nota-image figcaption {
    font-size: var(--nx-font-sm);
    color: var(--nx-color-text-textcomment);
    text-align: center;
    margin-top: 12px;
    font-style: italic;
}

/* Contenido y Textos */
.nx-nota-content p {
    font-size: var(--nx-font-m);
    color: var(--nx-color-text-darks2);
    line-height: 1.7; 
    margin-top: 0;
    margin-bottom: 24px;
}

.nx-nota-content strong {
    color: var(--nx-color-text-darks); 
    font-weight: 600;
}

.nx-nota-content h2 {
    font-size: var(--nx-font-g);
    color: var(--nx-color-text-dark);
    font-weight: 600;
    margin-top: 48px;
    margin-bottom: 16px;
    line-height: 1.3;
}

/* Listas */
.nx-nota-content ul {
    margin-top: 0;
    margin-bottom: 32px;
    padding-left: 24px;
}

.nx-nota-content li {
    font-size: var(--nx-font-m);
    color: var(--nx-color-text-darks2);
    line-height: 1.7;
    margin-bottom: 12px;
    position: relative;
    list-style-type: none; 
}

.nx-nota-content li::before {
    content: "•";
    color: var(--nx-active-color);
    font-size: 1.5em;
    position: absolute;
    left: -24px;
    top: -5px; 
}