/* Nutrivital · carro lateral, botón de la cabecera y compra en la ficha (10-nov-2026).
   Usa los tokens de nutrivital.css (--verde, --tinta, --linea, --foto…). */

/* ---------- Botón del carro en la cabecera ---------- */
.cab__carro {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--tinta);
  cursor: pointer; transition: background var(--t);
}
.cab__carro:hover { background: rgba(35, 48, 42, .06); }
.cab__carro svg { width: 24px; height: 24px; }
.cab__carro-num {
  position: absolute; top: 3px; right: 1px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--verde); color: #fff; font-size: .7rem; font-weight: 700; line-height: 19px; text-align: center;
}
.nc-salto { animation: nc-salto .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes nc-salto { 0% { transform: scale(.6); } 100% { transform: scale(1); } }

/* ---------- Panel ---------- */
.nc { position: fixed; inset: 0; z-index: 200; }
.nc[hidden] { display: none; }
html.nc-bloqueo { overflow: hidden; }
.nc__fondo { position: absolute; inset: 0; background: rgba(22, 30, 26, .42); opacity: 0; transition: opacity .3s ease; }
.nc__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%);
  display: flex; flex-direction: column; background: var(--sup);
  box-shadow: -12px 0 40px rgba(22, 30, 26, .14);
  transform: translateX(100%); transition: transform .32s cubic-bezier(.2, .7, .2, 1);
}
.nc--abierto .nc__fondo { opacity: 1; }
.nc--abierto .nc__panel { transform: none; }

.nc__cab { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 14px 22px; border-bottom: 1px solid var(--linea); }
.nc__cab h2 { margin: 0; font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.nc__cuenta { color: var(--tinta-2); font-weight: 500; }
.nc__x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--tinta); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.nc__x:hover { background: rgba(35, 48, 42, .06); }
.nc__x svg { width: 22px; height: 22px; }

/* Metas: descuento, regalo y envío gratis */
/* Una sola meta a la vez (la próxima) + las ganadas en una línea con ✓ */
.nc__metas { padding: 12px 22px; display: grid; gap: 8px; border-bottom: 1px solid var(--linea); }
.nc__metas[hidden] { display: none; }
.nc-meta p { margin: 0 0 8px; font-size: .88rem; line-height: 1.4; color: var(--tinta-2); }
.nc-meta b { color: var(--tinta); font-weight: 650; }
.nc-meta__barra { height: 5px; border-radius: 3px; background: var(--linea); overflow: hidden; }
.nc-meta__barra span { display: block; height: 100%; border-radius: 3px; background: var(--verde-marca); transition: width .5s cubic-bezier(.2, .7, .2, 1); }
.nc-meta--desc .nc-meta__barra span { background: #D99100; }
.nc-meta--regalo .nc-meta__barra span { background: #C23A6B; }
.nc-logros { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; font-weight: 600; color: var(--verde); }
.nc-logros li { display: inline-flex; align-items: center; gap: 4px; }
.nc-logros svg { width: 14px; height: 14px; flex: none; }

.nc__aviso { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.nc__aviso p { overflow: hidden; margin: 0; padding: 0 22px; font-size: .88rem; color: var(--agotado); }
.nc__aviso.visible { grid-template-rows: 1fr; }
.nc__aviso.visible p { padding: 10px 22px; background: #FBF1EC; }

.nc__cuerpo { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 22px; }
.nc--cargando .nc__cuerpo { opacity: .5; transition: opacity .2s; }
.nc__lineas { list-style: none; margin: 0; padding: 0; }
.nc-linea { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--linea); align-items: start; }
.nc-linea--nueva { animation: nc-nueva 1.2s ease; }
@keyframes nc-nueva { 0% { background: #EEF6EA; } 100% { background: transparent; } }
.nc-linea__img { display: block; width: 72px; height: 72px; border-radius: 4px; background: var(--foto); overflow: hidden; }
.nc-linea__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.nc-linea__info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.nc-linea__nom { font-weight: 600; font-size: .95rem; line-height: 1.3; text-decoration: none; color: var(--tinta); }
.nc-linea__nom:hover { text-decoration: underline; }
.nc-linea__var, .nc-linea__unit { font-size: .82rem; color: var(--tinta-2); }
.nc-linea__der { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.nc-linea__der s { font-size: .8rem; color: var(--tinta-2); }
.nc-linea__der strong { font-size: .98rem; font-weight: 700; }
.nc-linea__quitar { margin-top: 6px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--tinta-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.nc-linea__quitar:hover { color: var(--agotado); background: #FBF1EC; }
.nc-linea__quitar svg { width: 18px; height: 18px; }

.nc-qty { display: inline-flex; align-items: center; margin-top: 8px; border: 1px solid #CFD2C7; border-radius: 6px; width: max-content; }
.nc-qty button { width: 36px; height: 36px; border: 0; background: transparent; color: var(--tinta); font: inherit; font-size: 1.1rem; cursor: pointer; }
.nc-qty button:disabled { color: #B9BDB2; cursor: default; }
.nc-qty span { min-width: 28px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.nc-cambio { animation: nc-cambio .6s ease; }
@keyframes nc-cambio { 0% { color: var(--verde); } 100% { color: inherit; } }

.nc__regalo { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--linea); animation: nc-nueva 1.2s ease; }
.nc__regalo[hidden] { display: none; }
.nc-regalo__img { width: 56px; height: 56px; border-radius: 4px; background: #FBEFF4; overflow: hidden; }
.nc-regalo__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.nc-regalo__txt { font-size: .88rem; line-height: 1.35; color: var(--tinta-2); }
.nc-regalo__txt b { display: flex; align-items: center; gap: 6px; color: #C23A6B; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.nc-regalo__txt svg { width: 15px; height: 15px; }

.nc__vacio { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 40px 10px 24px; color: var(--tinta-2); }
.nc__vacio[hidden] { display: none; }
.nc__vacio svg { width: 44px; height: 44px; color: var(--tinta-2); margin-bottom: 6px; }
.nc__vacio strong { color: var(--tinta); font-size: 1.05rem; }
.nc__vacio .btn { margin-top: 10px; }

/* Completa tu rutina */
.nc__rutina { padding: 18px 0 22px; }
.nc__rutina[hidden] { display: none; }
.nc__rutina h3 { margin: 0 0 10px; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tinta-2); }
.nc__rutina ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nc-sug { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; }
.nc-sug__img { width: 52px; height: 52px; border-radius: 4px; background: var(--foto); overflow: hidden; }
.nc-sug__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.nc-sug__txt { display: flex; flex-direction: column; font-size: .88rem; line-height: 1.3; min-width: 0; }
.nc-sug__txt a { color: var(--tinta); font-weight: 600; text-decoration: none; }
.nc-sug__txt a:hover { text-decoration: underline; }
.nc-sug__txt span { color: var(--tinta-2); }
.nc-sug__btn {
  min-height: 38px; padding: 0 14px; border: 1px solid var(--verde); border-radius: 6px; background: transparent; color: var(--verde);
  font: inherit; font-size: .84rem; font-weight: 650; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap;
  transition: background var(--t), color var(--t);
}
.nc-sug__btn:hover { background: var(--verde); color: #fff; }
.nc-sug__btn.cargando { opacity: .6; pointer-events: none; }
.nc-sug__btn.listo { background: var(--verde); color: #fff; }

/* Pie */
.nc__pie { border-top: 1px solid var(--linea); padding: 14px 22px calc(16px + env(safe-area-inset-bottom)); background: var(--sup); }
.nc__pie[hidden] { display: none; }
.nc__fila { display: flex; justify-content: space-between; font-size: .92rem; color: var(--tinta-2); padding: 2px 0; }
.nc__fila[hidden] { display: none; }
.nc__fila--desc { color: var(--verde); font-weight: 600; }
.nc__fila--total { color: var(--tinta); font-size: 1.05rem; padding-top: 6px; }
.nc__fila--total strong { font-size: 1.2rem; }
.nc__nota { margin: 2px 0 12px; font-size: .8rem; color: var(--tinta-2); }
.nc__pagar { width: 100%; justify-content: center; gap: 8px; min-height: 52px; border-radius: 6px; font-size: 1.02rem; }
.nc__pagar svg { width: 18px; height: 18px; }
.nc__pagar.cargando { opacity: .75; pointer-events: none; }
.nc__seguir { display: block; width: 100%; margin-top: 4px; min-height: 44px; border: 0; background: transparent; color: var(--tinta-2); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; }
.nc__seguir:hover { color: var(--tinta); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Ficha: comprar ---------- */
.comprar { display: grid; gap: 12px; margin: 6px 0 10px; }
.comprar__sabores { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.comprar__lbl { width: 100%; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-2); }
.comprar__fila { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.nc-qty--ficha { margin: 0; border-radius: 6px; height: 52px; }
.nc-qty--ficha button { width: 42px; height: 50px; }
.nc-qty--ficha input {
  width: 40px; border: 0; background: transparent; text-align: center; font: inherit; font-size: 16px; font-weight: 600; color: var(--tinta);
  -moz-appearance: textfield; appearance: textfield;
}
.nc-qty--ficha input::-webkit-outer-spin-button, .nc-qty--ficha input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.comprar .btn--grande { min-height: 52px; border-radius: 6px; gap: 8px; justify-content: center; }
.comprar .btn--grande:disabled { background: #C9CCC2; border-color: #C9CCC2; color: #fff; cursor: not-allowed; }
.comprar .btn.cargando { opacity: .75; }
.comprar .btn.listo { background: var(--verde-hover); }
.incentivo { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: .86rem; color: var(--tinta-2); }
.incentivo li { display: flex; align-items: center; gap: 7px; }
.incentivo li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--verde-marca); flex: none; }

/* Packs: botón de agregar bajo la tarjeta */
.pack { display: flex; flex-direction: column; }
.pack form { margin-top: 10px; }
.pack .btn { width: 100%; justify-content: center; border-radius: 6px; }

@media (min-width: 960px) {
  .nc__panel { width: 440px; }
}
@media (prefers-reduced-motion: reduce) {
  .nc__fondo, .nc__panel, .nc-meta__barra span { transition: none; }
  .nc-salto, .nc-cambio, .nc-linea--nueva, .nc__regalo { animation: none; }
}
