/* ==========================================================================
   NH PRODUCT CARD — tarjeta de producto del listado
   Réplica de la tarjeta de Stiletto con la piel de Norma Hana.
   ========================================================================== */

.nh-pc {
    /* Rojo de oferta: 6.2:1 sobre #F8F7F3 (el token de marca #C0392B se queda en 5.07). */
    --nh-pc-red: #A8321E;
    /* #515151 fijo: el token --nh-text-muted llega pisado por el kit (#888, 3.4:1). */
    --nh-pc-muted: #515151;
    --nh-pc-border: #8C8A84; /* 3.2:1 sobre la página: el #AAAAAA de Stiletto se queda en 2.17 */
    --nh-pc-surface: #F8F7F3;
    --nh-pc-fg: var(--nh-gray-950);
    --nh-pc-dot: rgba(15, 15, 15, .4);
    --nh-pc-dot-active: #0F0F0F;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ─── Media ─── */

.nh-pc__media-wrap {
    position: relative;
    flex: none;
}

.nh-pc__media {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: var(--nh-gray-100);
}

.nh-pc__track {
    display: flex;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.nh-pc__track::-webkit-scrollbar { display: none; }

.nh-pc .nh-pc__slide {
    position: relative;
    flex: 0 0 100%;
    height: 100%;
    scroll-snap-align: start;
}

/* Posicionado absoluto y selectores anidados: `.elementor img` y
   `.woocommerce-page img` (0,1,1) imponen `height: auto` y dejaban una banda
   gris bajo las fotos de proporción distinta. */
.nh-pc .nh-pc__slide .nh-pc__img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Flechas: solo con puntero fino, al pasar el ratón o con foco de teclado dentro. */
.nh-pc__nav {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #FFFFFF;
    color: #000000;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity .15s ease;
}

.nh-pc__nav--prev { left: 8px; }
.nh-pc__nav--next { right: 8px; }

.nh-pc__nav:disabled { opacity: 0; pointer-events: none; }

.nh-pc__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 6px;
    display: flex;
    justify-content: center;
    opacity: 0;
    transition: opacity .15s ease;
}

/* Táctil: puntos debajo de la imagen, no encima (Stiletto móvil). */
@media (hover: none) {
    .nh-pc__dots {
        position: static;
        margin-top: 4px;
        opacity: 1;
    }
}

/* Área táctil de 24px con punto visual de 5px: el punto era imposible de pulsar. */
.nh-pc__dot {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.nh-pc__dot::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--nh-pc-dot);
}

.nh-pc__dot[aria-current="true"]::before {
    width: 15px;
    border-radius: 3px;
    background: var(--nh-pc-dot-active);
}

@media (hover: hover) and (pointer: fine) {
    .nh-pc:hover .nh-pc__nav:not(:disabled),
    .nh-pc:hover .nh-pc__dots,
    .nh-pc:focus-within .nh-pc__nav:not(:disabled),
    .nh-pc:focus-within .nh-pc__dots {
        opacity: 1;
    }

    .nh-pc:hover .nh-pc__nav:not(:disabled):hover {
        opacity: .9;
    }
}

.nh-pc__nav:focus-visible,
.nh-pc__dot:focus-visible {
    outline: 2px solid var(--nh-gray-950);
    outline-offset: 2px;
    opacity: 1;
}

/* ─── Badges ─── */

.nh-pc__badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}

.nh-pc__badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 6px;
    background: #FFFFFF;
    font-size: 12.3px;
    font-weight: 500;
    line-height: 1.3;
}

.nh-pc__badge--sale {
    border: 1px solid var(--nh-pc-red);
    color: var(--nh-pc-red);
}

.nh-pc__badge--out {
    border: 1px solid var(--nh-gray-950);
    color: var(--nh-gray-950);
}

/* ─── Añadir al carrito (hover) ─── */

.nh-pc__quick {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 34px; /* deja los puntos de la galería a la vista, como en Stiletto */
}

.nh-pc__cta {
    display: block;
    padding: 8px 14px;
    border: 1px solid var(--nh-gray-950);
    border-radius: 8px;
    background: rgba(248, 247, 243, .9);
    color: var(--nh-gray-950);
    font-family: var(--font-body);
    font-size: 12.6px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .045em;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color .15s ease;
}

.nh-pc__cta:hover,
.nh-pc__cta:focus-visible {
    background: #FFFFFF;
}

.nh-pc__cta:focus-visible {
    outline: 2px solid var(--nh-gray-950);
    outline-offset: 2px;
}

.nh-pc__cta.added_to_cart {
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

@media (hover: hover) and (pointer: fine) {
    .nh-pc__quick {
        opacity: 0;
        transition: opacity .15s ease;
    }

    .nh-pc:hover .nh-pc__quick,
    .nh-pc:focus-within .nh-pc__quick {
        opacity: 1;
    }
}

/* ─── Texto ─── */

.nh-pc__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 17px 0 14px;
}

.nh-pc__title {
    margin: 0;
    font-family: var(--font-headings, 'Fraunces', Georgia, serif);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.45;
    text-align: center;
    color: var(--nh-pc-fg);
}

.nh-pc__title a {
    color: inherit;
    text-decoration: none;
}

.nh-pc__title a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nh-pc__title a:focus-visible,
.nh-pc__swatch:focus-visible,
.nh-pc__size:focus-visible {
    outline: 2px solid var(--nh-pc-fg);
    outline-offset: 2px;
}

.nh-pc__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: -.25px;
    color: var(--nh-pc-fg);
}

.nh-pc__price-was {
    color: var(--nh-pc-muted);
    font-weight: 400;
}

.nh-pc__price-sale {
    color: var(--nh-pc-red);
}

.nh-pc__price-off {
    color: var(--nh-pc-red);
    font-size: 13.2px;
    font-weight: 500;
    letter-spacing: -.2px;
}

.nh-pc__meta {
    margin: 0;
    font-family: var(--font-body);
    font-size: 13.2px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--nh-pc-muted);
    text-align: center;
}

/* ─── Swatches de color ─── */

.nh-pc__swatches {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    margin-top: 6px;
}

/* 24×24 con la muestra de color dentro: el cuadrado suelto de 16px no llega
   al mínimo táctil de 24px. */
.nh-pc__swatch {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    text-decoration: none;
}

.nh-pc__swatch::before {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: var(--nh-pc-swatch);
    box-shadow: 0 0 0 1px var(--nh-pc-border) inset; /* el swatch blanco necesita borde visible */
    transition: transform .15s ease;
}

.nh-pc__swatch:hover::before {
    transform: scale(1.12);
}

/* ─── Chips de talla ─── */

.nh-pc__sizes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.nh-pc__size {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 2px 8px;
    border: 1px solid var(--nh-pc-border);
    border-radius: 4.8px;
    background: var(--nh-pc-surface);
    color: var(--nh-gray-950);
    font-family: var(--font-body);
    font-size: 13.2px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
}

a.nh-pc__size:hover {
    border-color: var(--nh-gray-950);
}

.nh-pc__size--out {
    position: relative;
    border-color: var(--nh-gray-300);
    color: var(--nh-pc-muted);
    cursor: not-allowed;
}

.nh-pc__size--out::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    top: 50%;
    border-top: 1px solid var(--nh-pc-muted);
    transform: rotate(-12deg);
}

/* Swatches y tallas: Stiletto los reserva y los revela al pasar el ratón o con
   foco de teclado dentro (medido: la tarjeta mide lo mismo, 575px). */
@media (hover: hover) and (pointer: fine) {
    .nh-pc__swatches,
    .nh-pc__sizes {
        opacity: 0;
        transition: opacity .15s ease;
    }

    .nh-pc:hover .nh-pc__swatches,
    .nh-pc:hover .nh-pc__sizes,
    .nh-pc:focus-within .nh-pc__swatches,
    .nh-pc:focus-within .nh-pc__sizes {
        opacity: 1;
    }
}

/* ─── Botón redondo táctil ─── */

.nh-pc__fab-wrap {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: none;
}

.nh-pc__fab {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--nh-gray-950);
    border-radius: 50%;
    background: rgba(248, 247, 243, .92);
    color: var(--nh-gray-950);
    text-decoration: none;
}

.nh-pc__fab:focus-visible {
    outline: 2px solid var(--nh-gray-950);
    outline-offset: 2px;
}

@media (hover: none) {
    .nh-pc__quick { display: none; }
    .nh-pc__fab-wrap { display: block; } /* solo se pinta si hay stock y es comprable */
}

/* ─── Estados ───
   Cada control fija su propio hover/foco/pulsado: sin esto el reset de Hello
   (`button:hover, button:focus` → #c36) pintaba de rosa flechas y puntos.
   Como la referencia: cambios discretos, sin color de acento. */
.nh-pc .nh-pc__nav:hover,
.nh-pc .nh-pc__nav:focus,
.nh-pc .nh-pc__nav:active {
    background: #FFFFFF;
    color: #000000;
}

.nh-pc .nh-pc__nav:hover {
    box-shadow: 0 1px 6px rgba(15, 15, 15, .18);
}

.nh-pc .nh-pc__nav:active {
    transform: translateY(-50%) scale(.92);
}

.nh-pc .nh-pc__dot,
.nh-pc .nh-pc__dot:hover,
.nh-pc .nh-pc__dot:focus,
.nh-pc .nh-pc__dot:active {
    background: none;
    color: var(--nh-gray-950);
}

.nh-pc .nh-pc__dot:hover::before {
    background: rgba(15, 15, 15, .75);
}

.nh-pc .nh-pc__dot[aria-current="true"]:hover::before {
    background: #0F0F0F;
}

.nh-pc .nh-pc__cta:hover,
.nh-pc .nh-pc__cta:focus,
.nh-pc .nh-pc__cta:active {
    color: var(--nh-gray-950);
    text-decoration: none;
}

.nh-pc .nh-pc__cta:active {
    background: #ECEBE5;
}

.nh-pc .nh-pc__fab:hover,
.nh-pc .nh-pc__fab:focus,
.nh-pc .nh-pc__fab:active {
    background: #FFFFFF;
    color: var(--nh-gray-950);
}

.nh-pc .nh-pc__fab:active {
    transform: scale(.92);
}

/* Color: anillo oscuro al señalarlo (la muestra blanca no se distingue solo con escala). */
.nh-pc .nh-pc__swatch:hover::before,
.nh-pc .nh-pc__swatch:focus-visible::before {
    box-shadow: 0 0 0 1px #FFFFFF inset, 0 0 0 2px var(--nh-gray-950);
}

.nh-pc a.nh-pc__size:hover,
.nh-pc a.nh-pc__size:focus-visible {
    border-color: var(--nh-gray-950);
    color: var(--nh-gray-950);
}

.nh-pc a.nh-pc__size:active {
    background: #ECEBE5;
}

.nh-pc .nh-pc__nav,
.nh-pc .nh-pc__fab {
    transition: opacity .15s ease, box-shadow .15s ease, transform .1s ease;
}

/* Corazón de favoritos (JetCompareWishlist, sobre la foto): el enlace heredaba
   el rosa del tema como color y contorno de foco. */
.nh-pc-wishlist .jet-wishlist-button__link,
.nh-pc-wishlist .jet-wishlist-button__link:hover,
.nh-pc-wishlist .jet-wishlist-button__link:focus {
    color: var(--nh-gray-950, #0F0F0F);
}

.nh-pc-wishlist .jet-wishlist-button__link:focus-visible {
    outline: 2px solid var(--nh-gray-950, #0F0F0F);
    outline-offset: 2px;
}

/* ─── Utilidad ─── */

.nh-pc__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Móvil: solo imagen con puntos debajo, botón redondo, título y precio
   (Stiletto móvil). Sin barra de ancho completo ni conteos. */
@media (max-width: 767px) {
    .nh-pc__nav,
    .nh-pc__quick,
    .nh-pc__meta,
    .nh-pc__swatches,
    .nh-pc__sizes { display: none; }

    .nh-pc__fab-wrap { display: block; }
    .nh-pc__badge { font-size: 11.1px; }
    .nh-pc__title { font-size: 16.2px; }
    .nh-pc__price { font-size: 15.3px; }
    .nh-pc__body { padding-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .nh-pc__track { scroll-behavior: auto; }
    .nh-pc *,
    .nh-pc *::before,
    .nh-pc *::after { transition: none !important; }
}

/* ─── Especificidad de los <span> ───
   El tema hijo fija color y tamaño con `span:not([class*="elementor"])` (0,1,1),
   que ganaba a las clases sueltas: badge, precio de oferta y "-NN%" salían
   negros a 14px en vez de rojos. Con el prefijo .nh-pc ganan las de la tarjeta. */
.nh-pc .nh-pc__badge {
    font-size: 12.3px;
}

.nh-pc .nh-pc__badge--sale,
.nh-pc .nh-pc__price-sale {
    color: var(--nh-pc-red);
}

.nh-pc .nh-pc__badge--out {
    color: var(--nh-gray-950);
}

.nh-pc .nh-pc__price-off {
    color: var(--nh-pc-red);
    font-size: 13.2px;
}

.nh-pc .nh-pc__price-sale,
.nh-pc .nh-pc__price-now {
    font-size: inherit; /* 17px (15.3px móvil) como el tachado, no los 14px del span */
}

.nh-pc .nh-pc__price-now {
    color: var(--nh-pc-fg);
}

.nh-pc .nh-pc__price :is(.woocommerce-Price-amount, .woocommerce-Price-currencySymbol) {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

/* ─── Adaptación al fondo de la sección (como Stiletto) ───
   Sin caja de fondo en el contenedor del loop (8961): evita esquinas cuadradas
   tras la foto redondeada y bloques vacíos bajo el precio. */
.elementor-8961 .elementor-element.elementor-element-68b1265 {
    background-color: transparent !important;
}

/* Sección oliva oscura de la home (#7B723E): texto e indicadores claros (>= 4.5:1). */
.elementor-element-6a64398 .nh-pc {
    --nh-pc-fg: #FFFFFF;
    --nh-pc-muted: #FAF9F6;
    --nh-pc-border: rgba(255, 255, 255, .7);
    --nh-pc-dot: rgba(255, 255, 255, .45);
    --nh-pc-dot-active: #FFFFFF;
}

.elementor-element-6a64398 .nh-pc .nh-pc__price-sale {
    color: #FFFFFF;
}

.elementor-element-6a64398 .nh-pc .nh-pc__price-off {
    padding: 1px 6px;
    border-radius: 4px;
    background: #FFFFFF;
    color: var(--nh-pc-red);
}

.elementor-element-6a64398 .nh-pc .nh-pc__size {
    background: transparent;
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, .7);
}

.elementor-element-6a64398 .nh-pc a.nh-pc__size:hover,
.elementor-element-6a64398 .nh-pc a.nh-pc__size:focus-visible {
    border-color: #FFFFFF;
    color: #FFFFFF;
}

.elementor-element-6a64398 .nh-pc .nh-pc__size--out {
    color: rgba(255, 255, 255, .7);
    border-color: rgba(255, 255, 255, .4);
}

.elementor-element-6a64398 .nh-pc .nh-pc__size--out::after {
    border-top-color: rgba(255, 255, 255, .7);
}

.elementor-element-6a64398 .nh-pc .nh-pc__swatch:hover::before,
.elementor-element-6a64398 .nh-pc .nh-pc__swatch:focus-visible::before {
    box-shadow: 0 0 0 1px #7B723E inset, 0 0 0 2px #FFFFFF;
}

.elementor-element-6a64398 .nh-pc .nh-pc__dot:hover::before {
    background: rgba(255, 255, 255, .8);
}

.elementor-element-6a64398 .nh-pc .nh-pc__dot[aria-current="true"]:hover::before {
    background: #FFFFFF;
}

/* Mega-menú: limita la caja multimedia a 400px en vez de solo el <img>
   (c0dfb61 fijaba max-height:400px en img dejando una banda beige debajo)
   y oculta swatches/tallas en la vista previa del menú. */
.e-n-menu-content .nh-pc__media {
    aspect-ratio: auto;
    height: 400px;
}

.e-n-menu-content .nh-pc .nh-pc__slide .nh-pc__img {
    max-height: none;
}

.e-n-menu-content .nh-pc__swatches,
.e-n-menu-content .nh-pc__sizes {
    display: none;
}
