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

.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
}

/************************************************************
SLIDE Cartzilla v2 - Abril 2026 
Última modificación: 2026-04-21
************************************************************/

/* 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;
    top: 1rem;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    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 {
    font-size: 48px;
    margin-bottom: 0.5rem;
}

/* Bajada del slide */
.ns-slide .ns-slide-item p {
    font-size: 36px;
    margin-bottom: 0.5rem;
}

/* Botones */
.ns-slide .btn {
    margin-right: 1rem;
    font-size: 20px;
    padding: 0.5rem 1.5rem;
    line-height: 1.2;
}

/* Zócalo HTML del slide */

/* 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 - Mayo 2026
  Última modificación: 2026-04-29
************************************************************/

#ns-nav-item-cta {
    background: #FF6D2D;
    border-color: #FF6D2D;
    color: #fff;
    margin-top: 10px;
    font-weight: 600;
}

#ns-nav-item-cta:hover {
    color: #fff !important;
    background: #E6551A;
    border-color: #E6551A;
}

.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
************************************************************/

/* CARRITO Y CHECKOUT */

.steps-dark .step-item.active .step-count,
.steps-dark .step-item.active .step-progress {
    background-color: #198754
}

.is-payment .btn-outline-primary {
    color: #198754;
    border-color: #198754;
    background-color: #fff;
    font-weight: 500;
}

.is-payment .btn-outline-primary.active,
.is-payment .btn-outline-primary:hover,
.is-payment .btn-outline-primary:focus {
    color: #fff;
    border-color: #198754;
    background-color: #198754;
}

.ns-checkout-trust-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #198754;
    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 v4.3 – 2026-03-30
Autor: Agent UX/UI
Shimmer horizontal sweep + blur-up al cargar imágenes diferidas.
Clases: .ns-lazy → .ns-lazy-loaded | .ns-lazy-error
Modificadores: .ns-lazy-xs | .ns-lazy-sm | .ns-lazy-md | .ns-lazy-lg
************************************************************/

/* Shimmer horizontal sweep (v4.3: skeleton screen moderno, fondo blanco) */
@keyframes ns-lazy-shimmer {
    0% {
        background-position: -400px center;
    }

    100% {
        background-position: 400px center;
    }
}

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

/* Reservar altura mínima en la imagen para evitar CLS */
img.ns-lazy[data-src] {
    min-height: 250px;
    width: auto;
}

/* Shimmer en el PADRE de la imagen:
   opacity:0 en img.ns-lazy oculta backgrounds del propio img,
   pero el fondo del padre sí es visible. El selector :has() se
   deja de aplicar automáticamente cuando JS remueve data-src. */
:has(> img.ns-lazy[data-src]) {
    background: linear-gradient(90deg, #ffffff 25%, #ebebeb 50%, #ffffff 75%);
    background-size: 800px 100%;
    animation: ns-lazy-shimmer 1.4s linear infinite;
    min-height: 60px;
}

/* 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: 250px;
    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;
    }
}

.is-mobile img.ns-lazy-error,
.is-mobile img.ns-lazy[data-src] {
    min-height: 150px;
}

/* ---- Modificadores de tamaño de placeholder -------------------
   Uso: <img class="ns-lazy ns-lazy-xs" data-src="...">
   Sobrescriben el min-height en estado shimmer y error.
   xs  →  60px  (mini_list, thumbnails de sidebar)
   sm  → 120px  (grillas pequeñas, widgets)
   md  → 180px  (intermedio)
   default → 250px / mobile 150px (sin modificador)
   lg  → 350px  (banners, imágenes destacadas)
---------------------------------------------------------------- */
img.ns-lazy-xs[data-src],
img.ns-lazy-xs.ns-lazy-error {
    min-height: 60px;
}

img.ns-lazy-sm[data-src],
img.ns-lazy-sm.ns-lazy-error {
    min-height: 120px;
}

img.ns-lazy-md[data-src],
img.ns-lazy-md.ns-lazy-error {
    min-height: 180px;
}

img.ns-lazy-lg[data-src],
img.ns-lazy-lg.ns-lazy-error {
    min-height: 350px;
}

.is-mobile img.ns-lazy-xs[data-src],
.is-mobile img.ns-lazy-xs.ns-lazy-error {
    min-height: 40px;
}

.is-mobile img.ns-lazy-sm[data-src],
.is-mobile img.ns-lazy-sm.ns-lazy-error {
    min-height: 80px;
}

.is-mobile img.ns-lazy-md[data-src],
.is-mobile img.ns-lazy-md.ns-lazy-error {
    min-height: 120px;
}

.is-mobile img.ns-lazy-lg[data-src],
.is-mobile img.ns-lazy-lg.ns-lazy-error {
    min-height: 220px;
}

/* ================================================================
   PAGO MOBILE SUMMARY v1 - 2026-04-09
   Resumen colapsable de pedido en la etapa de pago (mobile only).
   Visible solo en <lg via d-lg-none en el template.
================================================================ */
.ns-mobile-order-bar {
    cursor: pointer;
    user-select: none;
}

.ns-mobile-order-bar[aria-expanded="true"] .ns-mobile-order-chevron {
    transform: rotate(180deg);
}

.ns-mobile-order-chevron {
    transition: transform 0.25s ease;
    display: inline-block;
}

.ns-mobile-order-detail-item {
    font-size: 0.82rem;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ns-mobile-order-detail-item:last-child {
    border-bottom: none;
}

.ns-mobile-order-total {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 2px solid #dee2e6;
}

/* ================================================================
   PAGO VISUAL v2 - 2026-04-09
   Logos de pasarelas, trust signals desktop y footer datos.
================================================================ */

#step-3.active .step-count,
#step-3.active .step-progress {
    background-color: #198754 !important
}

/* Logos de pasarelas en headers de accordion */
.ns-pay-logo {
    height: 20px;
    width: auto;
    flex-shrink: 0;
    vertical-align: middle;
    margin-right: 8px;
}

/* Mini logos de tarjetas en header SPS */
.ns-pay-card-logo {
    height: 18px;
    width: auto;
    flex-shrink: 0;
    vertical-align: middle;
    opacity: 0.75;
    margin-right: 3px;
}

/* Label pequeño de sección (reemplaza h2 de accordion) */
.ns-section-label {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 0.375rem;
    margin-top: 0.25rem;
}

/* CTA de pago — azul marino, confianza y conversión */
.btn-cta {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
    font-weight: 500;
}

.btn-cta:hover,
.btn-cta:focus {
    background-color: #157347;
    border-color: #146c43;
    color: #fff;
}

.btn-cta:active {
    background-color: #0f5132;
    border-color: #0f5132;
    color: #fff;
}

/* PAGO accordion header — ocultar subtexto (<small>) en mobile */
@media (max-width: 991.98px) {
    .accordion-header .accordion-button small {
        display: none;
    }
}

/* Resumen del pedido — siempre visible en desktop, colapsable en mobile */
@media (min-width: 992px) {
    .ns-lg-always-show.collapse {
        display: block !important;
    }
}

/* === CHK-016 Payment Method Text Standardization — v1.0 — 2026-04-09 === */
#payment-method .accordion-body {
    font-size: .875rem;
}

/* === CHK-016 Payment Active State — v1.0 — 2026-04-09 === */
/* Refuerzo visual del método de pago seleccionado en el accordion */
#payment-method .accordion-item {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

#payment-method .accordion-item:has(.accordion-button:not(.collapsed)) {
    border-color: rgba(25, 135, 84, 0.6) !important;
    box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.12);
}

#payment-method .accordion-button:not(.collapsed) {
    background-color: rgba(25, 135, 84, 0.05);
}

/* Barra de acento izquierda sobre el item activo */
#payment-method .accordion-item:has(.accordion-button:not(.collapsed))::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #198754;
    border-radius: 3px 0 0 3px;
}

/* Check icon: oculto por defecto, visible cuando el método está activo */
#payment-method .ns-pay-active-check {
    display: none;
    color: #198754;
    font-size: 1rem;
    line-height: 1;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

#payment-method .accordion-button:not(.collapsed) .ns-pay-active-check {
    display: inline-flex;
    align-items: center;
}

/************************************************************
TOPBAR ROTATOR v1.0.2 – 2026-04-30
Autor: Agent UX/UI
Reemplazo CSS-only del tns-carousel del topbar (Tiny Slider).
Clases: .ns-topbar-rotator, .ns-topbar-rotator-item
Variantes: .ns-topbar-rotator--static (1 solo mensaje)
Doc completa: .claude/walkthrough/2026-04-29_agent-ux-ui-topbar-rotator-v1.0.1.md
************************************************************/

/* Rotador como flex item con altura fija. Items absolutos adentro.
   La altura fija evita que el topbar crezca por contenido apilado y
   garantiza el mismo box centrado para todos los mensajes. */
.ns-topbar-rotator {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    align-self: center;
    height: 1.25rem;
    margin: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Cada mensaje ocupa el mismo box del rotador, centrado h/v.
   !important defiende contra .topbar .topbar-text (inline-block).
   Se usa display:block + text-align + line-height para centrar
   sin convertir los hijos (texto, <b>, etc.) en flex items —
   eso colapsaba los espacios alrededor de los tags inline. */
.ns-topbar-rotator .ns-topbar-rotator-item {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    display: block !important;
    width: auto !important;
    height: 1.25rem !important;
    margin: 0 !important;
    padding: 0 .5rem !important;
    opacity: 0;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.25rem;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    pointer-events: none;
    will-change: opacity, transform;
    color: var(--bs-white) !important;
}

/* Variante estática: un único mensaje, siempre visible. */
.ns-topbar-rotator--static .ns-topbar-rotator-item {
    opacity: 1;
}

/* Accesibilidad: si el usuario pidió menos animación, mostramos
   solo el primer mensaje sin transición. */
@media (prefers-reduced-motion: reduce) {
    .ns-topbar-rotator .ns-topbar-rotator-item {
        animation: none !important;
        opacity: 0;
        transform: none !important;
    }

    .ns-topbar-rotator .ns-topbar-rotator-item:first-child {
        opacity: 1;
    }
}

/* === fin TOPBAR ROTATOR v1.0.2 === */

.ns-mobile-logo-store {
    max-height: 40px;
    padding:0!important;
    margin:0!important;
    width: auto!important;
}

/* === Sticky header en mobile/tablet (<992px) — 2026-06-01 ===
   El theme Cartzilla solo fija el header en desktop (min-width:992px).
   El JS de Cartzilla agrega .navbar-stuck en todos los anchos y compensa
   el salto con body.paddingTop, pero faltaba el position:fixed para
   viewports chicos. Esto lo agrega sin tocar el vendor (theme.min.css). */
@media (max-width: 991.98px) {
    .navbar-sticky.navbar-stuck {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1030;
        animation: navbar-show .25s;
        box-shadow: 0 .125rem .9375rem -0.0625rem rgba(0, 0, 0, .03),
                    0 .275rem 1.25rem -0.0625rem rgba(0, 0, 0, .05);
    }

    /* Header mobile mas bajo: quita el padding vertical (.75rem por defecto)
       de la fila principal del navbar (logo + toolbar/carrito). */
    .navbar-sticky > .navbar:first-child {
        padding-top: 0;
        padding-bottom: 0;
    }

    /* Layout mobile del header: [Menu] [Logo] ....... [Login] [Carrito].
       El boton de menu se reubico en el HTML como primer hijo del contenedor;
       empujamos el toolbar (login+carrito) al extremo derecho. */
    .navbar-sticky > .navbar:first-child > .container {
        justify-content: flex-start;   /* anula el space-between de Bootstrap */
    }
    .navbar-sticky > .navbar:first-child .navbar-toolbar {
        margin-left: auto;             /* login + carrito a la derecha */
    }
    .navbar-sticky > .navbar:first-child .navbar-toggler {
        margin-right: .5rem;           /* separa el menu del logo */
        padding-left: 0;               /* acerca menu+logo al borde izquierdo (~mitad del hueco) */
    }
}
/* === fin Sticky header mobile === */