/* Tienda NEMUPY (página principal y /tienda-nemupy). Todo con prefijo nshop- para no chocar con otros estilos. */
:root {
  --ns-navy: #081427;
  --ns-navy-2: #0f1f3b;
  --ns-blue: #2d6cff;
  --ns-blue-2: #5a88ff;
  --ns-accent: #ffb020;
  --ns-red: #ff4d5e;
  --ns-green: #18a957;
  --ns-text: #10192f;
  --ns-muted: #5b6b86;
  --ns-line: #e3e9f3;
  --ns-card: #ffffff;
  --ns-bg: #eef3f9;
  --ns-radius: 22px;
  --ns-shadow: 0 18px 44px rgba(16, 32, 64, .10);
}

.nshop * { box-sizing: border-box; }
.nshop { color: var(--ns-text); font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.nshop a { color: inherit; text-decoration: none; }
.nshop img { max-width: 100%; display: block; }
.nshop-wrap { width: min(calc(100% - 32px), 1200px); margin: 0 auto; }

/* ---------- Botones ---------- */
.nshop-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 18px; font-weight: 800; font-size: .95rem;
  cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; font-family: inherit;
  white-space: nowrap;
}
.nshop-btn:hover { transform: translateY(-1px); }
.nshop-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.nshop-btn-primary { background: linear-gradient(135deg, var(--ns-blue), var(--ns-blue-2)); color: #fff !important; box-shadow: 0 12px 28px rgba(45,108,255,.32); }
.nshop-btn-accent { background: var(--ns-accent); color: #1a1300 !important; box-shadow: 0 12px 28px rgba(255,176,32,.35); }
.nshop-btn-ghost { background: #fff; color: var(--ns-text) !important; border: 1px solid var(--ns-line); }
.nshop-btn-dark { background: var(--ns-navy); color: #fff !important; }
.nshop-btn-wa { background: #25d366; color: #fff !important; box-shadow: 0 12px 28px rgba(37,211,102,.35); }
.nshop-btn-block { width: 100%; }
.nshop-btn-sm { padding: 9px 14px; font-size: .88rem; }

/* ---------- Encabezado de sección ---------- */
.nshop-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 22px; flex-wrap: wrap; }
.nshop-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); line-height: 1.1; margin: 0 0 8px; color: var(--ns-text); }
.nshop-head p { margin: 0; color: var(--ns-muted); max-width: 640px; line-height: 1.6; }
.nshop-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ns-blue); margin-bottom: 8px; }
.nshop-sub { font-size: 1.25rem; margin: 34px 0 14px; display: flex; align-items: center; gap: 10px; }
.nshop-sub small { font-size: .85rem; color: var(--ns-muted); font-weight: 600; }

/* ---------- Banners ---------- */
.nshop-banners { position: relative; border-radius: 28px; overflow: hidden; box-shadow: var(--ns-shadow); background: var(--ns-navy); margin-bottom: 28px; }
.nshop-slides { display: flex; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.nshop-slide {
  position: relative; flex: 0 0 100%; min-height: 340px; display: flex; align-items: center;
  color: #fff; padding: 44px clamp(22px, 5vw, 64px); overflow: hidden;
}
.nshop-slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.nshop-slide-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,12,26,.82) 0%, rgba(5,12,26,.45) 55%, rgba(5,12,26,.05) 100%); }
.nshop-slide.is-plain .nshop-slide-bg::after { display: none; }
.nshop-slide.is-image-only .nshop-slide-bg::after { display: none; }
.nshop-slide-deco { position: absolute; right: -80px; top: -80px; width: 360px; height: 360px; border-radius: 50%; background: rgba(255,255,255,.08); }
.nshop-slide-deco.b { right: 120px; top: auto; bottom: -140px; width: 260px; height: 260px; background: rgba(255,255,255,.06); }
.nshop-slide-body { position: relative; max-width: 560px; }
.nshop-slide-body h3 { font-size: clamp(1.7rem, 4.2vw, 3rem); line-height: 1.05; margin: 0 0 12px; }
.nshop-slide-body p { font-size: 1.05rem; line-height: 1.6; margin: 0 0 22px; color: rgba(255,255,255,.88); }
.nshop-slide.is-image-only { padding: 0; min-height: 0; aspect-ratio: 16 / 6; }
.nshop-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 8px; }
.nshop-dots button { width: 10px; height: 10px; border-radius: 99px; border: 0; background: rgba(255,255,255,.45); padding: 0; cursor: pointer; transition: width .3s; }
.nshop-dots button.is-on { width: 28px; background: #fff; }
.nshop-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 1.3rem; cursor: pointer; backdrop-filter: blur(6px); }
.nshop-arrow:hover { background: rgba(255,255,255,.3); }
.nshop-arrow.prev { left: 14px; }
.nshop-arrow.next { right: 14px; }

/* ---------- Filtros ---------- */
.nshop-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 18px; }
.nshop-search { flex: 1 1 240px; position: relative; }
.nshop-search input { width: 100%; padding: 13px 16px 13px 42px; border-radius: 999px; border: 1px solid var(--ns-line); background: #fff; font: inherit; color: var(--ns-text); }
.nshop-search input:focus { outline: 2px solid rgba(45,108,255,.35); border-color: var(--ns-blue); }
.nshop-search::before { content: "🔍"; position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-size: .95rem; opacity: .6; }
.nshop-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.nshop-chips::-webkit-scrollbar { display: none; }
.nshop-chip { border: 1px solid var(--ns-line); background: #fff; color: var(--ns-text); border-radius: 999px; padding: 10px 15px; font-weight: 700; font-size: .9rem; cursor: pointer; white-space: nowrap; font-family: inherit; }
.nshop-chip.is-on { background: var(--ns-navy); color: #fff; border-color: var(--ns-navy); }

/* ---------- Tarjetas ---------- */
.nshop-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.nshop-card {
  position: relative; display: flex; flex-direction: column; background: var(--ns-card); border: 1px solid var(--ns-line);
  border-radius: var(--ns-radius); overflow: hidden; transition: transform .25s ease, box-shadow .25s ease;
}
.nshop-card:hover { transform: translateY(-4px); box-shadow: var(--ns-shadow); }
.nshop-card-media { position: relative; aspect-ratio: 1 / 1; background: linear-gradient(135deg, #f3f6fb, #e6edf8); cursor: pointer; overflow: hidden; }
.nshop-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.nshop-card:hover .nshop-card-media img { transform: scale(1.04); }
.nshop-noimg { width: 100%; height: 100%; display: grid; place-items: center; font-size: 3rem; opacity: .5; }
.nshop-badges { position: absolute; left: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.nshop-badge { display: inline-block; padding: 6px 10px; border-radius: 999px; font-size: .75rem; font-weight: 900; letter-spacing: .02em; color: #fff; background: var(--ns-red); box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.nshop-badge.combo { background: var(--ns-navy); }
.nshop-badge.new { background: var(--ns-blue); }
.nshop-badge.out { background: #6b7891; }
.nshop-card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.nshop-card-cat { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ns-muted); }
.nshop-card-title { font-size: 1.02rem; font-weight: 800; line-height: 1.3; margin: 0; cursor: pointer; }
.nshop-card-desc { font-size: .88rem; color: var(--ns-muted); line-height: 1.45; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nshop-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.nshop-price strong { font-size: 1.25rem; color: var(--ns-text); }
.nshop-price s { color: #8a97ad; font-size: .9rem; }
.nshop-save { font-size: .8rem; font-weight: 800; color: var(--ns-green); }
.nshop-ends { font-size: .78rem; font-weight: 700; color: var(--ns-red); }
.nshop-card-actions { display: flex; gap: 8px; margin-top: 6px; }
.nshop-card-actions .nshop-btn { flex: 1; }
.nshop-stock-low { font-size: .78rem; color: #b45309; font-weight: 700; }

.nshop-card.is-combo { border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, var(--ns-accent), var(--ns-blue)) border-box; }
.nshop-combo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .86rem; color: var(--ns-muted); }
.nshop-combo-list li::before { content: "✓ "; color: var(--ns-green); font-weight: 900; }

.nshop-empty { text-align: center; padding: 40px 16px; color: var(--ns-muted); background: #fff; border: 1px dashed var(--ns-line); border-radius: var(--ns-radius); }
.nshop-more { display: flex; justify-content: center; margin-top: 26px; }

/* ---------- Carrito flotante y panel ---------- */
.nshop-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 900; display: inline-flex; align-items: center; gap: 10px;
  background: var(--ns-navy); color: #fff; border: 0; border-radius: 999px; padding: 14px 18px; font-weight: 800; font-family: inherit;
  box-shadow: 0 16px 36px rgba(8,20,39,.35); cursor: pointer; transition: transform .2s ease;
}
.nshop-fab:hover { transform: translateY(-2px); }
.nshop-fab[hidden] { display: none; }
.nshop-fab .nshop-count, .nshop-cart-link .nshop-count {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; background: var(--ns-accent); color: #1a1300; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 900;
}
.nshop-fab.bump { animation: nshop-bump .45s ease; }
@keyframes nshop-bump { 30% { transform: scale(1.12); } 60% { transform: scale(.96); } }

.nshop-overlay { position: fixed; inset: 0; background: rgba(5,12,26,.5); z-index: 990; opacity: 0; pointer-events: none; transition: opacity .25s; }
.nshop-overlay.is-open { opacity: 1; pointer-events: auto; }
.nshop-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; z-index: 1000; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.7,.2,1); color: var(--ns-text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.nshop-drawer.is-open { transform: none; box-shadow: -20px 0 50px rgba(0,0,0,.18); }
.nshop-drawer header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--ns-line); }
.nshop-drawer header h3 { margin: 0; font-size: 1.2rem; }
.nshop-x { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--ns-line); background: #fff; font-size: 1.1rem; cursor: pointer; color: var(--ns-text); }
.nshop-lines { flex: 1; overflow-y: auto; padding: 8px 20px; }
.nshop-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--ns-line); align-items: center; }
.nshop-line-img { width: 64px; height: 64px; border-radius: 14px; overflow: hidden; background: #f1f5fb; display: grid; place-items: center; font-size: 1.5rem; }
.nshop-line-img img { width: 100%; height: 100%; object-fit: cover; }
.nshop-line-name { font-weight: 800; font-size: .95rem; line-height: 1.3; }
.nshop-line-sub { font-size: .8rem; color: var(--ns-muted); margin-top: 2px; }
.nshop-line-price { font-weight: 800; text-align: right; white-space: nowrap; }
.nshop-qty { display: inline-flex; align-items: center; border: 1px solid var(--ns-line); border-radius: 999px; margin-top: 8px; }
.nshop-qty button { width: 30px; height: 30px; border: 0; background: none; font-size: 1rem; cursor: pointer; color: var(--ns-text); }
.nshop-qty span { min-width: 26px; text-align: center; font-weight: 800; font-size: .9rem; }
.nshop-del { border: 0; background: none; color: var(--ns-muted); font-size: .8rem; cursor: pointer; text-decoration: underline; margin-left: 8px; font-family: inherit; }
.nshop-drawer footer { padding: 18px 20px 22px; border-top: 1px solid var(--ns-line); display: grid; gap: 10px; background: #fafcff; }
.nshop-row { display: flex; justify-content: space-between; gap: 10px; font-size: .95rem; }
.nshop-row.total { font-size: 1.2rem; font-weight: 900; }
.nshop-row.saving { color: var(--ns-green); font-weight: 700; }
.nshop-cart-empty { text-align: center; padding: 50px 10px; color: var(--ns-muted); }
.nshop-cart-empty div { font-size: 3rem; margin-bottom: 10px; }

/* ---------- Modal de detalle ---------- */
.nshop-modal { position: fixed; inset: 0; z-index: 1010; display: none; align-items: center; justify-content: center; padding: 16px; }
.nshop-modal.is-open { display: flex; }
.nshop-modal-box { position: relative; width: min(860px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 26px; display: grid; grid-template-columns: 1fr 1fr; color: var(--ns-text); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.nshop-modal .nshop-overlay { z-index: 0; }
.nshop-modal .nshop-modal-box { z-index: 1; }
.nshop-modal-media { background: #f1f5fb; min-height: 320px; }
.nshop-modal-media img { width: 100%; height: 100%; object-fit: cover; }
.nshop-modal-body { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.nshop-modal-body h3 { margin: 0; font-size: 1.6rem; line-height: 1.15; }
.nshop-modal-body .nshop-desc { white-space: pre-line; color: var(--ns-muted); line-height: 1.6; margin: 0; }
.nshop-modal .nshop-x { position: absolute; top: 12px; right: 12px; z-index: 2; }
.nshop-modal-media { position: relative; }
.nshop-modal-media.has-thumbs img[data-nshop-main] { min-height: 320px; }
.nshop-thumbs { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; gap: 6px; overflow-x: auto; padding: 4px; border-radius: 14px; background: rgba(15, 23, 42, .35); }
.nshop-thumb { flex: 0 0 auto; width: 54px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #fff; cursor: pointer; }
.nshop-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nshop-thumb.is-on { border-color: #fff; box-shadow: 0 0 0 2px var(--ns-blue); }
.nshop-sku { font-size: .82rem; color: var(--ns-muted); font-family: ui-monospace, Menlo, Consolas, monospace; }
.nshop-photos { position: absolute; right: 10px; bottom: 10px; background: rgba(15, 23, 42, .7); color: #fff; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; }

/* ---------- Aviso ---------- */
.nshop-toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); background: var(--ns-navy); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 700; z-index: 1100; opacity: 0; transition: .3s; pointer-events: none; font-family: Inter, system-ui, sans-serif; box-shadow: 0 12px 30px rgba(0,0,0,.25); max-width: calc(100% - 32px); text-align: center; }
.nshop-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Checkout y pedido ---------- */
.nshop-panel { background: #fff; border: 1px solid var(--ns-line); border-radius: var(--ns-radius); padding: 24px; }
.nshop-checkout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: start; }
.nshop-field { display: grid; gap: 6px; margin-bottom: 14px; }
.nshop-field label { font-weight: 700; font-size: .9rem; }
.nshop-field input, .nshop-field textarea, .nshop-field select { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--ns-line); font: inherit; color: var(--ns-text); background: #fff; }
.nshop-field input:focus, .nshop-field textarea:focus { outline: 2px solid rgba(45,108,255,.3); border-color: var(--ns-blue); }
.nshop-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nshop-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.nshop-option { position: relative; display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--ns-line); border-radius: 16px; padding: 14px; cursor: pointer; }
.nshop-option input { margin-top: 3px; accent-color: var(--ns-blue); }
.nshop-option strong { display: block; font-size: .95rem; }
.nshop-option small { color: var(--ns-muted); }
.nshop-option:has(input:checked) { border-color: var(--ns-blue); background: #f3f7ff; }
.nshop-alert { padding: 14px 16px; border-radius: 16px; background: #fff1f2; color: #9f1239; margin-bottom: 16px; font-weight: 600; }
.nshop-alert.ok { background: #ecfdf3; color: #065f46; }
.nshop-alert.info { background: #eff6ff; color: #1e3a8a; }
.nshop-sum-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ns-line); font-size: .93rem; }
.nshop-sum-line > strong, .nshop-sum-line > span:last-child { white-space: nowrap; }
.nshop-sum-line small { display: block; color: var(--ns-muted); }
.nshop-hidden { display: none !important; }
.nshop-status { display: inline-block; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: .85rem; background: #fff7e6; color: #92400e; }
.nshop-status.confirmado, .nshop-status.enviado { background: #eff6ff; color: #1e40af; }
.nshop-status.entregado { background: #ecfdf3; color: #065f46; }
.nshop-status.cancelado { background: #fff1f2; color: #9f1239; }
.nshop-pre { white-space: pre-line; }

/* ---------- Página de la tienda ---------- */
.nshop-page { background: var(--ns-bg); min-height: 100vh; margin: 0; }
.nshop-top { position: sticky; top: 0; z-index: 50; background: rgba(8,20,39,.92); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.08); }
.nshop-top .nshop-wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; }
.nshop-brand { display: flex; align-items: center; gap: 10px; color: #fff !important; font-weight: 900; letter-spacing: .03em; }
.nshop-brand img { width: 42px; height: 42px; border-radius: 12px; background: #fff; padding: 3px; }
.nshop-brand small { display: block; font-weight: 600; color: #b7c6e4; font-size: .75rem; letter-spacing: 0; }
.nshop-top nav { display: flex; align-items: center; gap: 8px; }
.nshop-top nav a.link { color: rgba(255,255,255,.85); padding: 10px 12px; border-radius: 12px; font-weight: 600; }
.nshop-top nav a.link:hover { background: rgba(255,255,255,.08); }
.nshop-cart-link { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.14); padding: 10px 14px; border-radius: 999px; font-weight: 800; cursor: pointer; font-family: inherit; font-size: .95rem; }
.nshop a.nshop-cart-link, .nshop a.nshop-brand { color: #fff; }
.nshop-hero { padding: 26px 0 8px; }
.nshop-main { padding: 10px 0 70px; }
.nshop-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 34px 0 0; }
.nshop-trust div { background: #fff; border: 1px solid var(--ns-line); border-radius: 18px; padding: 16px; font-size: .9rem; color: var(--ns-muted); }
.nshop-trust strong { display: block; color: var(--ns-text); margin-bottom: 4px; }
.nshop-foot { background: var(--ns-navy); color: #b7c6e4; padding: 26px 0; font-size: .9rem; text-align: center; }

/* Sección dentro del index */
.nshop-home { padding: 80px 0; background: linear-gradient(180deg, #eef3f9 0%, #ffffff 100%); }

@media (max-width: 1080px) {
  .nshop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .nshop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .nshop-checkout { grid-template-columns: 1fr; }
  .nshop-modal-box { grid-template-columns: 1fr; }
  .nshop-modal-media { min-height: 0; aspect-ratio: 1 / 1; }
  .nshop-trust { grid-template-columns: 1fr 1fr; }
  .nshop-slide { min-height: 280px; padding: 30px 22px 46px; }
  .nshop-arrow { display: none; }
  .nshop-top nav a.link { display: none; }
}
@media (max-width: 520px) {
  .nshop-card-body { padding: 12px; }
  .nshop-card-title { font-size: .95rem; }
  .nshop-price strong { font-size: 1.08rem; }
  .nshop-card-actions .nshop-btn { padding: 10px 8px; font-size: .85rem; }
  .nshop-two, .nshop-options { grid-template-columns: 1fr; }
  .nshop-panel { padding: 18px; }
  .nshop-home { padding: 56px 0; }
  .nshop-brand small { display: none; }
}
