/* NEXTLINK componentes de inicio */

.nl-hero {
  padding-top: var(--wp--preset--spacing--40);
  padding-bottom: var(--wp--preset--spacing--40);
}

/* Globo del selector: tarjeta blanca con colita, remate del logo */
.nl-globo {
  position: relative;
  background: #fff;
  border: 2px solid var(--wp--preset--color--bosque);
  border-radius: 20px 20px 20px 4px;
  padding: var(--wp--preset--spacing--24) var(--wp--preset--spacing--16);
  margin-top: var(--wp--preset--spacing--24);
  margin-bottom: 24px;
}
.nl-globo::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: -14px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 14px solid var(--wp--preset--color--bosque);
}

.nl-paso {
  border: 0;
  padding: 0;
  margin: 0 0 var(--wp--preset--spacing--16);
}
.nl-paso legend {
  font-weight: 700;
  margin-bottom: var(--wp--preset--spacing--8);
  padding: 0;
}
.nl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.nl-chip {
  background: #fff;
  color: var(--wp--preset--color--selva);
  border: 2px solid var(--wp--preset--color--bosque);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: "Figtree", system-ui, sans-serif;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
}
.nl-chip[aria-pressed="true"] {
  background: var(--wp--preset--color--chispa);
  color: var(--wp--preset--color--bosque);
  font-weight: 700;
}
.nl-cta {
  display: block;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

/* Bloque protagonista: un solo Chispa por pantalla */
.nl-destacado {
  padding: var(--wp--preset--spacing--16) 0 var(--wp--preset--spacing--40);
}
.nl-destacado-caja {
  background: var(--wp--preset--color--chispa);
  color: var(--wp--preset--color--bosque);
  border: 2px solid var(--wp--preset--color--bosque);
  border-radius: 20px 20px 20px 4px;
  padding: var(--wp--preset--spacing--24) var(--wp--preset--spacing--16);
  display: grid;
  gap: var(--wp--preset--spacing--16);
}
.nl-destacado-foto img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 2px solid var(--wp--preset--color--bosque);
  display: block;
  background: #fff;
}
.nl-destacado-caja h2 {
  color: var(--wp--preset--color--bosque);
}
.nl-destacado-caja h2 a {
  color: inherit;
  text-decoration: none;
}
.nl-destacado-caja .nl-comp {
  font-weight: 700;
}
.nl-acciones {
  display: grid;
  gap: 8px;
  position: relative;
}
/* Tira horizontal de categorias: compacta, con scroll en movil */
.nl-categorias {
  padding: var(--wp--preset--spacing--40) 0 var(--wp--preset--spacing--64);
}
.nl-cats-h {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px var(--wp--preset--spacing--16) 12px;
  scrollbar-width: thin;
}
.nl-cat-h {
  flex: 0 0 44vw;
  max-width: 190px;
  scroll-snap-align: start;
  background: #fff;
  border: 2px solid var(--wp--preset--color--bosque);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--wp--preset--color--selva);
  display: grid;
  align-content: start;
}
.nl-cat-h img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: contain;
  background: #fff;
  border-bottom: 2px solid var(--wp--preset--color--bosque);
  display: block;
}
.nl-cat-h-n {
  font-family: "Archivo", "Arial Black", sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.2;
  padding: 12px 12px 0;
}
.nl-cat-h-c {
  font-size: var(--wp--preset--font-size--cuerpo-chico);
  line-height: 1.5;
  padding: 0 12px 12px;
}
.nl-cat-h--primero {
  background: var(--wp--preset--color--bosque);
  color: #fff;
}
.nl-cat-h--primero .nl-cat-h-n {
  color: #fff;
}
.nl-mini {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
  border: 2px solid var(--wp--preset--color--bosque);
  background: #fff;
  flex: none;
}

/* Selva: lo mas llevado en filas compactas */
.nl-llevados {
  background: var(--wp--preset--color--selva);
  color: #fff;
  padding: var(--wp--preset--spacing--64) 0;
}
.nl-fila {
  display: flex;
  gap: var(--wp--preset--spacing--16);
  background: #fff;
  color: var(--wp--preset--color--selva);
  border-radius: 16px;
  padding: var(--wp--preset--spacing--16);
  margin-top: var(--wp--preset--spacing--16);
}
.nl-fila-txt {
  display: grid;
  gap: 4px;
  align-content: start;
  min-width: 0;
}
.nl-fila-txt h3 {
  font-size: var(--wp--preset--font-size--cuerpo);
}
.nl-comp {
  font-size: var(--wp--preset--font-size--cuerpo-chico);
  margin: 0;
}
.nl-fila .nl-precio {
  color: var(--wp--preset--color--selva);
}

/* Aviso con colita: confirma la accion del usuario */
.nl-aviso {
  position: relative;
  display: inline-block;
  background: #fff;
  color: var(--wp--preset--color--bosque);
  border: 2px solid var(--wp--preset--color--bosque);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: var(--wp--preset--font-size--cuerpo-chico);
  margin-top: 12px;
  justify-self: start;
}
.nl-aviso::after {
  content: "";
  position: absolute;
  left: 16px;
  top: -9px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 8px solid var(--wp--preset--color--bosque);
}

/* Icono de carrito con contador */
.nl-carrito {
  position: relative;
  color: #fff;
  line-height: 0;
  display: inline-block;
}
.nl-cuenta {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--wp--preset--color--chispa);
  color: var(--wp--preset--color--bosque);
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 999px;
  font-family: "Figtree", system-ui, sans-serif;
}

/* Tienda: filtro visible + filas + paginacion compacta */
.nl-tienda {
  padding: var(--wp--preset--spacing--40) 0 var(--wp--preset--spacing--64);
}
.nl-filtro {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: var(--wp--preset--spacing--16) 0;
}
.nl-filtro .nl-chip {
  text-decoration: none;
  display: inline-block;
}
.nl-nota {
  font-size: var(--wp--preset--font-size--cuerpo-chico);
}
.nl-fila h3 a {
  color: inherit;
  text-decoration: none;
}
.nl-pag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--wp--preset--spacing--24) 0;
}
.nl-pag a {
  color: var(--wp--preset--color--bosque);
  font-weight: 700;
}

/* Ficha de producto */
.single-product h1 {
  font-size: var(--wp--preset--font-size--producto);
  line-height: 1.3;
}
.single-product .price,
.single-product .wc-block-components-product-price {
  font-family: "Archivo", "Arial Black", sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: var(--wp--preset--font-size--producto);
  font-variant-numeric: tabular-nums;
}
.single-product .price del,
.single-product .wc-block-components-product-price del {
  font-family: "Figtree", system-ui, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: var(--wp--preset--font-size--cuerpo);
}
.single_add_to_cart_button {
  background: var(--wp--preset--color--chispa);
  color: var(--wp--preset--color--bosque);
  font-family: "Archivo", "Arial Black", sans-serif;
  font-style: italic;
  font-weight: 800;
  border: 2px solid var(--wp--preset--color--bosque);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--wp--preset--color--bosque);
  padding: 12px 24px;
  cursor: pointer;
}
.single_add_to_cart_button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--wp--preset--color--bosque);
}
.quantity .qty {
  border: 2px solid var(--wp--preset--color--bosque);
  border-radius: 12px;
  padding: 10px;
  font-variant-numeric: tabular-nums;
}
.nl-acordeones details {
  border-top: 2px solid var(--wp--preset--color--bosque);
}
.nl-acordeones details:last-child {
  border-bottom: 2px solid var(--wp--preset--color--bosque);
}
.nl-acordeones summary {
  font-weight: 700;
  padding: var(--wp--preset--spacing--16) 0;
  cursor: pointer;
}
.nl-acordeones summary::marker {
  color: var(--wp--preset--color--bosque);
}
.nl-rel {
  margin-top: var(--wp--preset--spacing--40);
}

/* Galeria: miniaturas en tira con scroll, sin huerfanas */
.single-product ol.flex-control-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: var(--wp--preset--spacing--16) 0 0;
  padding: 0 0 4px;
}
.single-product ol.flex-control-thumbs li {
  flex: 0 0 72px;
  scroll-snap-align: start;
  float: none;
  margin: 0;
  list-style: none;
}

/* Miga de pan con voz de marca */
.woocommerce-breadcrumb {
  font-size: var(--wp--preset--font-size--cuerpo-chico);
  margin-bottom: var(--wp--preset--spacing--16);
}
.woocommerce-breadcrumb a {
  color: var(--wp--preset--color--bosque);
  text-decoration: none;
}

@media (max-width: 781px) {
  .nl-sticky-add {
    position: sticky;
    top: calc(100vh - 140px);
    top: calc(100dvh - 140px);
    background: var(--wp--preset--color--cascara);
    border-top: 2px solid var(--wp--preset--color--bosque);
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    z-index: 20;
  }
}

/* Drawer del carrito: responde a la accion del usuario */
.nl-velo {
  position: fixed;
  inset: 0;
  background: rgba(9, 63, 32, 0.55);
  opacity: 0;
  transition: opacity 0.25s;
  z-index: 60;
}
.nl-velo.abierto {
  opacity: 1;
}
.nl-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 92vw);
  background: #fff;
  border-left: 3px solid var(--wp--preset--color--bosque);
  z-index: 61;
  transform: translateX(105%);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--wp--preset--spacing--24) var(--wp--preset--spacing--16) calc(var(--wp--preset--spacing--16) + env(safe-area-inset-bottom));
  overflow-y: auto;
}
.nl-drawer.abierto {
  transform: none;
}
.nl-drawer[hidden],
.nl-velo[hidden] {
  display: none;
}
.nl-drawer-cabeza {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nl-drawer-cabeza h2 {
  font-size: var(--wp--preset--font-size--producto);
}
.nl-cerrar {
  background: #fff;
  border: 2px solid var(--wp--preset--color--bosque);
  border-radius: 10px;
  padding: 6px 12px;
  font-weight: 700;
  color: var(--wp--preset--color--selva);
  cursor: pointer;
}
.nl-ditem {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-top: 2px solid var(--wp--preset--color--cascara);
  align-items: start;
}
.nl-ditem img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: var(--wp--preset--color--cascara);
  border-radius: 10px;
}
.nl-ditem h3 {
  font-family: "Figtree", system-ui, sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: var(--wp--preset--font-size--cuerpo-chico);
  line-height: 1.4;
}
.nl-dcant {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.nl-dcant button {
  width: 32px;
  height: 32px;
  background: #fff;
  border: 2px solid var(--wp--preset--color--bosque);
  border-radius: 10px;
  font-weight: 700;
  color: var(--wp--preset--color--selva);
  cursor: pointer;
  line-height: 1;
}
.nl-dder {
  text-align: right;
  display: grid;
  gap: 4px;
  align-content: start;
  font-variant-numeric: tabular-nums;
}
.nl-dder button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--wp--preset--color--bosque);
  text-decoration: underline;
  cursor: pointer;
  font-size: var(--wp--preset--font-size--cuerpo-chico);
}
.nl-drawer-vacio a {
  color: var(--wp--preset--color--bosque);
  font-weight: 700;
}
.nl-drawer-pie {
  border-top: 2px solid var(--wp--preset--color--bosque);
  padding-top: var(--wp--preset--spacing--16);
  display: grid;
  gap: 8px;
}
.nl-drawer-sub {
  display: flex;
  justify-content: space-between;
  font-variant-numeric: tabular-nums;
}
.nl-drawer-pie .wp-element-button {
  text-align: center;
}
.nl-seguir {
  background: none;
  border: 0;
  color: var(--wp--preset--color--bosque);
  font-weight: 700;
  cursor: pointer;
  padding: 8px;
}
@media (prefers-reduced-motion: reduce) {
  .nl-velo,
  .nl-drawer {
    transition: none;
  }
}

/* Checkout clasico en una pagina: pasos numerados (es secuencia) */
body.woocommerce-checkout main.wp-block-group,
body.woocommerce-cart main.wp-block-group {
  padding-left: var(--wp--preset--spacing--16);
  padding-right: var(--wp--preset--spacing--16);
  padding-bottom: var(--wp--preset--spacing--64);
}
body.woocommerce-checkout {
  counter-reset: nl-paso;
}
body.woocommerce-checkout h3 {
  font-family: "Archivo", "Arial Black", sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.3;
}
body.woocommerce-checkout .woocommerce-billing-fields h3::before,
body.woocommerce-checkout #order_review_heading::before,
body.woocommerce-checkout .nl-pago-titulo::before {
  counter-increment: nl-paso;
  content: counter(nl-paso);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--wp--preset--color--chispa);
  color: var(--wp--preset--color--bosque);
  border: 2px solid var(--wp--preset--color--bosque);
  border-radius: 50%;
  font-size: 1rem;
  font-style: normal;
  margin-right: 8px;
}
body.woocommerce-checkout .input-text,
body.woocommerce-checkout select,
body.woocommerce-cart .input-text {
  border: 2px solid var(--wp--preset--color--bosque);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
body.woocommerce-checkout #order_review {
  background: #fff;
  border: 2px solid var(--wp--preset--color--bosque);
  border-radius: 16px;
  padding: var(--wp--preset--spacing--16);
  margin-top: var(--wp--preset--spacing--16);
}
body.woocommerce-checkout #order_review_heading {
  margin-top: var(--wp--preset--spacing--40);
}
body.woocommerce-checkout .nl-pago-titulo {
  margin-top: var(--wp--preset--spacing--24);
}
#place_order,
body.woocommerce-cart .checkout-button.button {
  background: var(--wp--preset--color--chispa);
  color: var(--wp--preset--color--bosque);
  font-family: "Archivo", "Arial Black", sans-serif;
  font-style: italic;
  font-weight: 800;
  border: 2px solid var(--wp--preset--color--bosque);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--wp--preset--color--bosque);
  padding: 12px 24px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
#place_order:active,
body.woocommerce-cart .checkout-button.button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--wp--preset--color--bosque);
}
body.woocommerce-cart table.shop_table {
  background: #fff;
  border: 2px solid var(--wp--preset--color--bosque);
  border-radius: 16px;
  border-collapse: separate;
}

@media (min-width: 782px) {
  .nl-destacado-caja {
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
  }
  .nl-acciones {
    grid-template-columns: auto auto;
    justify-content: start;
  }
  .nl-llevados .nl-marco {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--wp--preset--spacing--16);
    align-items: start;
  }
  .nl-llevados h2 {
    grid-column: 1 / -1;
  }
  .nl-fila {
    margin-top: 0;
  }
  .nl-cats-h {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    overflow: visible;
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--wp--preset--spacing--16);
    padding-right: var(--wp--preset--spacing--16);
  }
  .nl-cat-h {
    flex: none;
    max-width: none;
  }
}
