/* Tema Nova · NovaShop */
:root { --primary: #111; --accent: #e4572e; --bg: #fff; --text: #1a1a1a; --muted: #6b6b6b; --line: #e8e8e8; --soft: #f6f5f3; --radius: 10px; --font: system-ui, sans-serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.ns-lock { overflow: hidden; }
body { margin: 0; font: 15px/1.6 var(--font); color: var(--text); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: clamp(22px, 3vw, 28px); }
[hidden] { display: none !important; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.strong { font-weight: 600; text-decoration: none; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--primary); background: var(--primary); color: #fff; font: 600 14.5px var(--font); text-decoration: none; cursor: pointer; transition: transform .15s, opacity .15s, background .15s; position: relative; }
.btn:hover { opacity: .9; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-lg { height: 52px; font-size: 15.5px; padding: 0 28px; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-outline { background: transparent; color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; opacity: 1; }
.btn-link { background: none; border: 0; color: var(--muted); text-decoration: underline; height: auto; padding: 10px 0; }
.btn.is-loading, [data-ns-quick-add].is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after, [data-ns-quick-add].is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid currentColor; border-color: #fff #fff transparent transparent; border-radius: 50%; animation: spin .6s linear infinite; }
.btn-outline.is-loading::after { border-color: var(--primary) var(--primary) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; }

/* Cabecera */
.preview-bar { background: #fff1c2; color: #5e4200; text-align: center; font-size: 13px; padding: 6px; }
.announcement { background: var(--primary); color: #fff; text-align: center; font-size: 13px; padding: 9px 16px; letter-spacing: .01em; }
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.6) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { font-weight: 800; font-size: 21px; text-decoration: none; letter-spacing: -.02em; flex-shrink: 0; }
.logo img { max-height: 40px; max-width: 170px; object-fit: contain; }
.main-nav { display: flex; gap: 22px; flex: 1; }
.main-nav a { text-decoration: none; font-weight: 500; font-size: 14.5px; color: var(--text); opacity: .85; }
.main-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.search-form input { height: 38px; width: 200px; border-radius: 999px; border: 1px solid var(--line); background: var(--soft); padding: 0 16px; font: inherit; font-size: 14px; }
.search-form input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.icon-btn { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: none; border: 0; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--soft); }
.menu-btn, [data-search-link] { display: none; }
.cart-count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

/* Portada */
.hero { background: var(--soft); padding: clamp(60px, 10vw, 120px) 0; background-size: cover; background-position: center; position: relative; }
.hero-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.1)); }
.hero-inner { position: relative; max-width: 1240px; }
.hero h1 { font-size: clamp(34px, 6vw, 64px); max-width: 720px; margin-bottom: 16px; }
.hero p { font-size: clamp(16px, 2vw, 19px); max-width: 560px; color: var(--muted); margin: 0 0 28px; }
.hero-image h1, .hero-image p { color: #fff; }
.hero-image .btn-primary { background: #fff; color: #111; border-color: #fff; }
.benefits { border-bottom: 1px solid var(--line); }
.benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.benefit { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 500; }
.benefit-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.section { padding: clamp(40px, 6vw, 72px) 0; }
.section-tight { padding-top: 24px; }
.section-alt { background: var(--soft); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 24px; gap: 16px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; font-size: 14px; text-decoration: none; }
.page-hero { padding: 36px 0 8px; }
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.lead { color: var(--muted); max-width: 720px; }

/* Rejillas */
.grid-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 20px; }
.grid-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 12px; }
.card-media { position: relative; aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, opacity .35s; }
.card-media-alt { position: absolute; inset: 0; opacity: 0; }
.card:hover .card-media-alt { opacity: 1; }
.card:hover .card-media > img:first-child { transform: scale(1.03); }
.card-badge { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.card-badge-out { background: #444; }
.card-body { display: flex; flex-direction: column; gap: 4px; }
.card-vendor { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.card-title { font-weight: 600; text-decoration: none; line-height: 1.35; }
.card-title:hover { text-decoration: underline; }
.card-add { margin-top: 8px; align-self: flex-start; }
.price { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.price-now { font-weight: 600; }
.price-now.is-sale { color: var(--accent); }
.price-was { color: var(--muted); font-size: .9em; }
.price-lg { font-size: 24px; margin: 8px 0 4px; }
.cat-card { position: relative; display: block; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; background: #ddd; text-decoration: none; }
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cat-card:hover img { transform: scale(1.04); }
.cat-placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; font-weight: 800; color: rgba(0,0,0,.12); background: linear-gradient(135deg, #ece9e4, #dcd7cf); }
.cat-name { position: absolute; left: 12px; bottom: 12px; right: 12px; background: #fff; border-radius: 8px; padding: 10px 14px; font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; }
.cat-name small { color: var(--muted); font-weight: 500; }

/* Listado */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }
.toolbar-form { display: flex; gap: 16px; align-items: center; }
.toolbar select { height: 40px; border-radius: 999px; border: 1px solid var(--line); padding: 0 14px; font: inherit; font-size: 14px; background: #fff; }
.check-inline { display: flex; gap: 6px; align-items: center; font-size: 14px; cursor: pointer; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 40px; }
.pager a { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; text-decoration: none; border: 1px solid var(--line); }
.pager a.is-current { background: var(--primary); color: #fff; border-color: var(--primary); }
.empty { text-align: center; padding: 48px 0; }
.empty p { color: var(--muted); }

/* Producto */
.product { padding-top: 24px; padding-bottom: 40px; }
.product-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.gallery { position: sticky; top: 92px; }
.gallery-main { border-radius: var(--radius); overflow: hidden; background: var(--soft); aspect-ratio: 1; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.gallery-thumbs button { width: 76px; height: 76px; flex-shrink: 0; border: 2px solid transparent; border-radius: 8px; padding: 0; overflow: hidden; cursor: pointer; background: var(--soft); }
.gallery-thumbs button.is-active { border-color: var(--primary); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-vendor { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.product-info h1 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 4px; }
.tax-note { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.product-short { font-size: 16px; }
.product-form { display: flex; flex-direction: column; gap: 14px; margin: 22px 0 28px; }
.option { border: 0; padding: 0; margin: 0; }
.option legend { font-size: 14px; margin-bottom: 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-flex; align-items: center; min-width: 48px; height: 42px; justify-content: center; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 500; transition: .15s; background: #fff; }
.pill:hover span { border-color: var(--primary); }
.pill input:checked + span { background: var(--primary); color: #fff; border-color: var(--primary); }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill.is-unavailable span { color: #aaa; text-decoration: line-through; }
.pill.is-unavailable input:checked + span { background: #888; border-color: #888; color: #fff; }
.stock { margin: 0; font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.stock::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #2e9e5b; }
.stock[data-level=low] { color: #b5491f; }
.stock[data-level=low]::before { background: #e8742b; animation: pulse 1.6s infinite; }
.stock[data-level=out] { color: var(--muted); }
.stock[data-level=out]::before { background: #aaa; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(232,116,43,.15); } }
.buy-row { display: flex; gap: 10px; }
.qty-input { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; height: 52px; flex-shrink: 0; }
.qty-input button { width: 42px; height: 100%; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--text); }
.qty-input input { width: 40px; border: 0; text-align: center; font: inherit; font-weight: 600; -moz-appearance: textfield; background: transparent; }
.qty-input input::-webkit-outer-spin-button, .qty-input input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-sm { height: 38px; margin-top: 8px; }
.qty-sm button { width: 34px; }
.form-error { color: #c0261f; font-size: 14px; margin: 0; }
.rte { line-height: 1.7; }
.rte p { margin: 0 0 1em; }
.rte ul, .rte ol { padding-left: 20px; }
.rte img { border-radius: var(--radius); }
.product-description { border-top: 1px solid var(--line); padding-top: 24px; }

/* Carrito página */
.cart-grid { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; margin-top: 20px; }
.cart-line { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.cart-line img { width: 96px; height: 110px; object-fit: cover; border-radius: 8px; background: var(--soft); }
.cart-line-info { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.cart-summary { background: var(--soft); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 92px; }
.savings { color: var(--accent); font-weight: 600; }
.notice { background: #fff6e0; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.search-big { display: flex; gap: 10px; max-width: 640px; }
.search-big input { flex: 1; height: 52px; border-radius: 999px; border: 1.5px solid var(--line); padding: 0 22px; font: inherit; font-size: 16px; }

/* Pie */
.site-footer { background: #111; color: #d6d6d6; margin-top: 40px; padding-top: 56px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-grid h4 { color: #fff; margin: 0 0 14px; font-size: 14px; }
.footer-grid a { display: block; color: #bdbdbd; text-decoration: none; margin-bottom: 8px; }
.footer-grid a:hover { color: #fff; }
.footer-brand { color: #fff; font-weight: 800; font-size: 20px; margin-bottom: 10px; }
.socials { display: flex; gap: 14px; margin-top: 12px; }
.socials a { display: inline; }
.footer-bottom { display: flex; justify-content: space-between; border-top: 1px solid #2a2a2a; padding-top: 18px; padding-bottom: 24px; color: #8f8f8f; font-size: 13px; gap: 12px; flex-wrap: wrap; }
.whatsapp-float { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.2); z-index: 40; }

/* Carrito lateral (SDK) */
.ns-drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.ns-drawer.is-open { visibility: visible; }
.ns-drawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); opacity: 0; transition: opacity .25s; }
.ns-drawer.is-open .ns-drawer-backdrop { opacity: 1; }
.ns-drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: #fff; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); box-shadow: -10px 0 40px rgba(0,0,0,.12); }
.ns-drawer.is-open .ns-drawer-panel { transform: none; }
.ns-drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); font-size: 17px; }
.ns-drawer-close { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: var(--text); }
.ns-drawer-body { flex: 1; overflow-y: auto; padding: 8px 22px; }
.ns-drawer-foot { padding: 18px 22px 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.ns-drawer-foot:empty { display: none; }
.ns-line { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); transition: opacity .2s; }
.ns-line.is-busy { opacity: .45; pointer-events: none; }
.ns-line-img img { width: 76px; height: 88px; object-fit: cover; border-radius: 8px; background: var(--soft); }
.ns-line-title { font-weight: 600; text-decoration: none; font-size: 14.5px; }
.ns-line-variant { color: var(--muted); font-size: 13px; }
.ns-line-row { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.ns-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; height: 34px; }
.ns-qty button { width: 32px; height: 100%; border: 0; background: none; cursor: pointer; font-size: 16px; }
.ns-qty button:disabled { opacity: .3; }
.ns-qty span { min-width: 22px; text-align: center; font-weight: 600; font-size: 14px; }
.ns-line-remove { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 12.5px; padding: 0; }
.ns-line-price { text-align: right; font-weight: 600; font-size: 14.5px; display: flex; flex-direction: column; }
.ns-line-price s { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.ns-subtotal { display: flex; justify-content: space-between; font-size: 17px; }
.ns-note { color: var(--muted); font-size: 12.5px; margin: 0; }
.ns-savings { color: var(--accent); font-weight: 600; font-size: 14px; }
.ns-btn { height: 52px; border-radius: 999px; border: 1.5px solid var(--primary); font: 600 15px var(--font); cursor: pointer; padding: 0 22px; }
.ns-btn-primary { background: var(--primary); color: #fff; }
.ns-btn-outline { background: #fff; color: var(--primary); }
.ns-empty { text-align: center; padding: 60px 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ns-drawer-msg { background: #fff6e0; border-radius: 8px; padding: 10px 12px; margin: 10px 0; font-size: 13.5px; }
.ns-progress { background: var(--soft); border-radius: 10px; padding: 12px 14px; margin: 10px 0; font-size: 13.5px; }
.ns-progress p { margin: 0 0 8px; }
.ns-progress-bar { height: 6px; background: #e2e0dc; border-radius: 3px; overflow: hidden; }
.ns-progress-bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s; }

/* Responsive */
@media (max-width: 1024px) {
  .grid-products { grid-template-columns: repeat(3, 1fr); }
  .search-form { display: none; }
  [data-search-link] { display: grid; }
}
@media (max-width: 820px) {
  .menu-btn { display: grid; margin-left: -10px; }
  .header-inner { gap: 8px; height: 60px; }
  .logo { margin: 0 auto; }
  .main-nav { position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 85vw); flex-direction: column; background: #fff; padding: 80px 24px 24px; gap: 18px; transform: translateX(-100%); transition: transform .25s; box-shadow: 10px 0 40px rgba(0,0,0,.1); z-index: 60; }
  .main-nav.is-open { transform: none; }
  .main-nav a { font-size: 18px; }
  .header-actions { margin-left: 0; }
  .grid-products { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid, .cart-grid { grid-template-columns: 1fr; }
  .gallery, .cart-summary { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .cart-line { grid-template-columns: 72px 1fr; }
  .cart-line img { width: 72px; height: 84px; }
  .cart-line-price { grid-column: 2; }
  .footer-grid { grid-template-columns: 1fr; }
  .card-add { width: 100%; }
}
.ns-discount { display: flex; justify-content: space-between; font-size: 14px; color: var(--accent); font-weight: 600; }
.lang-switch { position: relative; }
.lang-switch select { height: 34px; border-radius: 999px; border: 1px solid var(--line); background: transparent; padding: 0 10px; font: inherit; font-size: 13px; cursor: pointer; }

/* ---------- Urgencia (datos reales) ---------- */
.ns-urgency { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; padding: 11px 14px; border-radius: var(--radius); background: var(--soft); margin: 10px 0; }
.ns-urgency-icon { font-size: 16px; line-height: 1.3; }
.ns-urgency-sub { color: var(--muted); font-size: 13px; }
.ns-urgency-offer { background: #fff3ec; color: #7a2e10; }
.ns-urgency-offer [data-ns-countdown] { font-variant-numeric: tabular-nums; font-weight: 700; }
.ns-urgency-ship [data-ns-countdown] { font-variant-numeric: tabular-nums; }
.ns-urgency-social { background: transparent; padding: 4px 0; color: var(--muted); font-size: 13.5px; }
.urgency-stack { margin-top: 6px; }
.ns-line-urgency { color: #b5491f; font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.ns-drawer-foot .ns-urgency { margin: 12px 0 0; font-size: 13px; }
.cart-summary .ns-urgency { font-size: 13px; }
