/************************************************************
ESTANDARIZACION DISEÑO CARTZILLA - Marzo 2026
Autor: Martin Carrillo 
Primera versión: 2026-03-18 
Última modificación: 2026-03-18
************************************************************/

.ns-item h1 {
    /* Estandarizacion de h1 en ficha de producto */
    color: #000;
    font-size: 30px;
}

.product-gallery-thumblist-item {
    /* Thumbs de galeria mas pequeñas */
    width: 3rem;
    height: 3rem;
}

/* Cucardas */

.ns-badges {
    /* Si un articulo tiene varias cucardas como oferta y nuevo suma un padding de separacion */
    display: flex;
    flex-direction: column;
    gap: 2px;
    /* Espacio entre badges */
}


/* Video (iframe YouTube / tag video) en galeria de producto */
.ns-item-video iframe,
.ns-item-video video {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
}



/************************************************************
ELEMENTOS OCULTOS v1
************************************************************/

.ns-item-cft {
    display: none !important;
}

/************************************************************
AVISOS COOKIES v1 - Marzo 2026 
************************************************************/

/* AVISOS COOKIES */

#ns-aviso-cookies {
    font-size: 12px;
    color: #fff;
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 15px;
    box-sizing: border-box;
    text-align: center;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

#ns-aviso-cookies p {
    margin: 0
}

.cartzilla-theme.is-mobile #ns-aviso-cookies {
    bottom: 55px
}

/************************************************************
SLIDE Cartzilla v1 - Agosto 2025 
Última modificación: 2025-07-29
************************************************************/

/* Slide general */
.ns-slide {
    padding: 0 !important;
    margin: 0 !important;
}

.ns-slide-item {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Imagen frontal */
.ns-slide .ns-slide-front-image {
    padding: 5px;
}

/* Contenedor de título, bajada y botones */
.ns-slide-meta {
    position: absolute;
    bottom: 0.5rem;
    /* Pegado al fondo */
    left: 2rem;
    /* Mantiene alineación a la izquierda */
    width: auto;
    /* Se ajusta al contenido */
    gap: 1rem;
    display: flex;
    flex-direction: column;
    /* Mantiene el orden: título -> bajada -> botones */
    pointer-events: none;
}

.ns-slide-meta>div {
    max-width: 42rem;
    pointer-events: all;
    text-align: left;
    /* Mantiene los textos a la izquierda */
}

/* Título del slide */
.ns-slide .ns-slide-item h2 {
    color: #fff !important;
    font-size: 48px !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    /*text-shadow: 0 0 0 rgba(0,0,0,0);*/
    margin-bottom: 0.5rem;
}

/* Bajada del slide */
.ns-slide .ns-slide-item p {
    color: #fff !important;
    font-size: 36px !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    /*text-shadow: 0 0 0 rgba(0,0,0,0);*/
    margin-bottom: 0.5rem;
}

/* Botones */
.ns-slide .btn {
    margin-right: 1rem;
    font-size: 24px !important;
    padding: 0.75rem 2rem;
    line-height: 1.2;
    text-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

/* Botón 1 */
.ns-slide .btn.btn-primary {
    background-color: #000 !important;
    color: #fff !important;
    border: 0 !important;
}

.ns-slide .btn.btn-primary:hover {
    background-color: #fff !important;
    color: #2593D1 !important;
    border-color: #2593D1 !important;
}

/* Botón 2 */
.ns-slide .btn.btn-secondary {
    background-color: #000 !important;
    color: #fff !important;
    border: 0 !important;
}

.ns-slide .btn.btn-secondary:hover {
    background-color: #fff !important;
    color: #2593D1 !important;
    border-color: #2593D1 !important;
}

/* Zócalo HTML del slide */
.ns-slide-html a,
.ns-slide-html i {
    color: #2593D1 !important;
}

/* Mobile scaling */
@media (max-width: 768px) {
    .ns-slide .ns-slide-item h2 {
        font-size: 28px !important;
    }

    .ns-slide .ns-slide-item p {
        font-size: 20px !important;
    }

    .ns-slide .btn {
        font-size: 18px !important;
        padding: 0.5rem 1.5rem;
    }
}

/************** FIN SLIDE CSS ************************/

/**********************************************************
  MENU Cartzilla v1 - Febrero 2026
  Última modificación: 2026-02-05
************************************************************/


.is-desktop .navbar-nav>li.nav-item.dropdown {
    position: relative;
}

/* ===== Mega menu (solo DIV dropdown-menu con p-0) ===== */
.is-desktop .navbar-nav>li.nav-item.dropdown>div.dropdown-menu.p-0 {
    position: absolute !important;
    top: calc(100% + 6px) !important;

    /* ancho controlado */
    width: min(1200px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;

    /* Popper out */
    inset: auto !important;
    transform: none !important;

    max-height: calc(100vh - 140px);
    overflow: auto;
    box-sizing: border-box;

    /* ✅ aplicar shift SOLO al mega */
    margin-left: var(--ns-shift, 0px) !important;
}

/* Grid para 7+ columnas (solo mega) */
.is-desktop .navbar-nav>li.nav-item.dropdown>div.dropdown-menu.p-0>.d-flex {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    column-gap: 18px;
    row-gap: 8px;
    max-width: 100%;
}

.is-desktop .navbar-nav .mega-dropdown-column {
    min-width: 0;
}

/* ===== Dropdowns normales: NO shift ===== */
/* (incluye Marcas, Oportunidades, etc) */
.is-desktop .navbar-nav>li.nav-item.dropdown>ul.dropdown-menu,
.is-desktop .navbar-nav>li.nav-item.dropdown>div.dropdown-menu:not(.p-0) {
    margin-left: 0 !important;
}

/* ===== Shift por rango: lo dejamos en el LI ===== */
.is-desktop .navbar-nav>li {
    --ns-shift: 0px;
}

.is-desktop .navbar-nav>li:nth-child(n + 2) {
    --ns-shift: -4vw;
}

.is-desktop .navbar-nav>li:nth-child(n + 3) {
    --ns-shift: -8vw;
}

.is-desktop .navbar-nav>li:nth-child(n + 4) {
    --ns-shift: -16vw;
}

.is-desktop .navbar-nav>li:nth-child(n + 5) {
    --ns-shift: -24vw;
}

.is-desktop .navbar-nav>li:nth-child(n + 6) {
    --ns-shift: -24vw;
}

.is-desktop .navbar-nav>li:nth-child(n + 7) {
    --ns-shift: -24vw;
}

.is-desktop .navbar-nav>li:nth-child(n + 8) {
    --ns-shift: -24vw;
}

/************************************************************
CHECKOUT TRUST BAR v1 - Marzo 2026
Última modificación: 2026-03-18
************************************************************/

.ns-checkout-trust-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(135deg, #034018 0%, #034018 100%);
    border-radius: 2px;
    padding: 2px;
    text-align: center;
    border-bottom: 1px solid #034018;
}

.ns-checkout-trust-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    flex-wrap: nowrap;
    letter-spacing: 0.02em;
}

.ns-checkout-trust-main {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 0.87rem;
    font-weight: 500;
    white-space: nowrap;
}

.ns-checkout-trust-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    font-weight: 400;
    white-space: nowrap;
}

.ns-checkout-trust-sep {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
    line-height: 1;
}

@media (max-width: 575px) {
    .ns-trust-desktop {
        display: none;
    }
}

.is-mobile .ns-checkout-trust-bar {
    padding: 4px 12px;
}

.is-mobile .ns-checkout-trust-main {
    font-size: 0.75rem;
    gap: 4px;
}

.is-checkout .ns-h1-container {
    margin-top: 10px;
}

/************************************************************
LAZY-LOAD v2 – 2026-03-23
Autor: Agent UX/UI
Animación shimmer + blur-up al cargar imágenes diferidas.
Clases: .ns-lazy → .ns-lazy-loaded | .ns-lazy-error
************************************************************/

/* Shimmer animation keyframes */
@keyframes ns-lazy-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

/* Imagen aún no cargada: oculta con blur */
img.ns-lazy {
    opacity: 0;
    filter: blur(8px);
    -webkit-filter: blur(8px);
    transition: opacity 0.4s ease, filter 0.4s ease, -webkit-filter 0.4s ease;
}

/* Placeholder shimmer animado (reemplaza fondo gris estático) */
img.ns-lazy[data-src] {
    min-height: 60px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 800px 100%;
    animation: ns-lazy-shimmer 1.5s infinite linear;
}

/* Fondo aún no cargado */
.ns-lazy-bg {
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Imagen/fondo ya cargados */
img.ns-lazy-loaded,
.ns-lazy-bg.ns-lazy-loaded {
    opacity: 1;
    filter: none;
    -webkit-filter: none;
    animation: none;
    background: none;
}

/* Estado error: imagen rota con ícono SVG inline */
img.ns-lazy-error {
    opacity: 1;
    filter: none;
    -webkit-filter: none;
    animation: none;
    min-height: 60px;
    background: #f8f8f8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' fill='%23ccc' viewBox='0 0 16 16'%3E%3Cpath d='M6.002 5.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z'/%3E%3Cpath d='M2.002 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2h-12zm12 1a1 1 0 0 1 1 1v6.5l-3.777-1.947a.5.5 0 0 0-.577.093l-3.71 3.71-2.66-1.772a.5.5 0 0 0-.63.062L1.002 12V3a1 1 0 0 1 1-1h12z'/%3E%3C/svg%3E") center / 40px no-repeat;
}

/* Reducir motion para usuarios con preferencias de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    img.ns-lazy,
    .ns-lazy-bg {
        transition: none;
        filter: none;
        -webkit-filter: none;
        animation: none;
    }
}