
:root {
  --bg: #eef2f6;
  --card: #ffffff;
  --line: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --brand: #b91c1c;
  --brand-soft: #fff5f5;
  --brand-dark: #991b1b;
  --green: #16a34a;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }
.store-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.store-header__inner {
  width: min(1200px, calc(100% - 24px));
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.store-logo-link {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:8px 10px;
  box-shadow:0 6px 16px rgba(15,23,42,.06);
}
.store-logo { height: 52px; width: auto; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.04)); mix-blend-mode:multiply; }
.header-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.header-wa {
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(22,163,74,.18);
  white-space: nowrap;
}
.header-cart {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.header-cart__count {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.header-cart__count.is-bump { animation: bump .28s ease; }
@keyframes bump { 0%{transform:scale(1)} 50%{transform:scale(1.2)} 100%{transform:scale(1)} }
.store-shell {
  width: min(1200px, calc(100% - 24px));
  margin: 18px auto 38px;
}
.store-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto;
  gap: 20px;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #fff7f7 100%);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 10px;
  margin-bottom: 16px;
}
.eyebrow {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.store-hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}
.store-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 640px;
}
.store-hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  border: 1px solid var(--brand);
  cursor:pointer;
}
.hero-link--light {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.store-searchbar {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(220px, .8fr);
  gap: 16px;
  padding: 18px;
  position: sticky;
  top: 92px;
  z-index: 20;
}
.search-col { display: flex; flex-direction: column; gap: 8px; }
.search-col label { font-size: 13px; font-weight: 700; color: var(--muted); }
.search-col input,
.search-col select {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 16px;
  font-size: 15px;
  outline: none;
  background: #fff;
}
.search-col input:focus,
.search-col select:focus { border-color: #cbd5e1; box-shadow: 0 0 0 4px rgba(59,130,246,.08); }
.chip-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 6px;
}
.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
}
.chip.is-active,
.chip:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.section-block { margin-top: 20px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-head h2 { margin: 0; font-size: 26px; line-height: 1.08; letter-spacing: -.02em; }
.section-head span { color: var(--muted); font-size: 14px; }
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.product-card {
  background: #fff;
  border: 1px solid #e6eaf0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.10);
}
.product-media-wrap { position: relative; }
.product-media {
  aspect-ratio: 1 / 1;
  background: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background:#fff;
}
.product-cart-fab {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: rgba(17,24,39,.92);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(17,24,39,.24);
}
.product-body { padding: 14px; }
.product-category {
  font-size: 12px;
  font-weight: 800;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.product-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}
.product-code { margin-top: 6px; color: var(--muted); font-size: 13px; }
.product-price { margin-top: 12px; font-size: 22px; font-weight: 800; }
.product-actions { display: flex; gap: 10px; margin-top: 12px; }
.btn {
  border: 1px solid var(--line);
  border-radius: 14px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
}
.btn-add { flex:1; }
.btn-whatsapp {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  min-width: 116px;
}
.empty-state {
  padding: 24px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
}
.store-footer {
  margin: 30px 10px 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, #0f172a, #1e3a8a);
  color: #fff;
  text-align: center;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.cart-drawer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.cart-backdrop {
  position: absolute; inset: 0; background: rgba(15,23,42,.38); opacity:0; transition: opacity .2s ease;
}
.cart-panel {
  position: absolute; top:0; right:0; width:min(420px, 100%); height:100%; background:#fff; box-shadow:-18px 0 36px rgba(15,23,42,.18);
  transform: translateX(100%); transition: transform .22s ease; display:flex; flex-direction:column;
}
.cart-drawer.is-open { pointer-events:auto; }
.cart-drawer.is-open .cart-backdrop { opacity:1; }
.cart-drawer.is-open .cart-panel { transform: translateX(0); }
.cart-panel__head, .cart-panel__foot { padding:18px; border-bottom:1px solid var(--line); }
.cart-panel__foot { border-bottom:none; border-top:1px solid var(--line); margin-top:auto; }
.cart-panel__eyebrow { color:var(--brand); font-weight:800; font-size:12px; text-transform:uppercase; }
.cart-panel__head h3 { margin:6px 0 0; font-size:24px; }
.cart-close { border:none; background:#f3f4f6; width:38px; height:38px; border-radius:999px; font-size:28px; line-height:1; cursor:pointer; }
.cart-panel__head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.cart-list { padding: 14px 18px; overflow:auto; display:flex; flex-direction:column; gap:12px; }
.cart-empty { color:var(--muted); padding:18px 0; }
.cart-item { display:grid; grid-template-columns:72px 1fr; gap:12px; border:1px solid var(--line); border-radius:16px; padding:10px; }
.cart-item img { width:72px; height:72px; object-fit:contain; background:#fff; border-radius:12px; }
.cart-item__name { font-weight:800; line-height:1.25; }
.cart-item__meta { color:var(--muted); font-size:12px; margin-top:4px; }
.cart-item__price { margin-top:6px; font-weight:700; }
.cart-item__controls { display:flex; align-items:center; gap:8px; margin-top:10px; flex-wrap:wrap; }
.cart-item__controls button { border:1px solid var(--line); background:#fff; border-radius:10px; min-width:32px; height:32px; cursor:pointer; }
.cart-item__remove { padding:0 10px; }
.cart-total-row { display:flex; align-items:center; justify-content:space-between; font-size:16px; margin-bottom:12px; }
.cart-total-row strong { font-size:22px; }
.cart-actions { display:flex; gap:10px; }
.btn-cart-secondary, .btn-cart-primary { flex:1; height:46px; border:none; border-radius:14px; font-weight:800; cursor:pointer; }
.btn-cart-secondary { background:#f3f4f6; color:var(--text); }
.btn-cart-primary { background:var(--green); color:#fff; }
@media (max-width: 860px){
  .store-hero { grid-template-columns:1fr; }
  .store-hero__actions { justify-content:flex-start; }
}
@media (max-width: 720px){
  .store-searchbar { grid-template-columns:1fr; top:82px; }
  .store-header__inner { min-height:72px; }
  .store-logo { height:44px; }
  .header-cart strong { display:none; }
}
@media (max-width: 520px){
  .store-header__inner { gap:10px; width:min(100%, calc(100% - 16px)); }
  .header-actions { width:auto; flex-wrap:nowrap; }
  .header-wa { padding:8px 12px; font-size:13px; }
  .hero-link { width:100%; }
  .product-actions { flex-direction:column; }
  .btn-whatsapp, .btn-add { width:100%; min-width:0; }
}


/* ===== Banner único estable dentro del layout ===== */
.store-hero--banner{
  display:block;
  padding:0;
  background:transparent;
  border:none;
  box-shadow:none;
  margin: 6px 0 12px;
}

.nf-banner{
  width:100%;
  max-width:100%;
  margin:0;
  padding:0;
  overflow:hidden;
  background:transparent;
  border-radius:18px;
  box-shadow:none;
  position:static;
  left:auto;
  right:auto;
}

.nf-banner img{
  width:100%;
  max-width:100%;
  height:auto;
  display:block;
  object-fit:contain;
  margin:0;
}

@media (max-width: 768px){
  .store-hero--banner{ margin: 4px 0 10px; }
  .nf-banner{ border-radius:14px; }
}

.nf-banner{
  width: 100%;
  margin: 0;
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}
.nf-banner img{
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 768px){
  .store-hero{ padding: 8px; border-radius: 18px; }
  .nf-banner{ border-radius: 14px; }
}

/* ===== FIX PRO BUSCADOR MÓVIL (NIDFRAN) ===== */
@media (max-width: 768px){

  .store-searchbar{
    padding: 8px !important;
    gap: 6px !important;
    top: 76px !important; /* menos espacio pegado arriba */
  }

  .search-col{
    gap: 4px !important;
  }

  .search-col label{
    display: none !important; /* quitar textos grandes */
  }

  .search-col input{
    height: 36px !important;
    font-size: 14px !important;
    padding: 6px 10px !important;
    border-radius: 12px !important;
  }

  .search-col select{
    height: 32px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
  }

/* ===== OCULTAR BOTONES DE CATEGORÍA (CHIPS) ===== */
.chip-strip{
  display: none !important;
}

/* ===== AJUSTE ESPACIO ARRIBA DE PRODUCTOS ===== */
.section-block{
  margin-top: 10px !important;
}

}


/* ===== FIX destacados + precio anterior tienda ===== */
.product-badges{
  position:absolute;
  top:12px;
  left:12px;
  display:flex;
  flex-direction:column;
  gap:6px;
  z-index:2;
  max-width:calc(100% - 64px);
}
.product-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  box-shadow:0 8px 18px rgba(15,23,42,.12);
}
.product-badge--featured{
  background:#fff7d6;
  color:#9a6700;
  border:1px solid #f3d27a;
}
.product-badge--offer{
  background:#fff2f2;
  color:#b42318;
  border:1px solid #f7b4b1;
}
.product-price-wrap{
  margin-top:12px;
}
.product-old-price{
  font-size:13px;
  font-weight:700;
  color:var(--muted);
  text-decoration:line-through;
  margin-bottom:2px;
}
@media (max-width: 520px){
  .product-badges{
    top:10px;
    left:10px;
  }
  .product-badge{
    font-size:11px;
    min-height:26px;
    padding:0 9px;
  }
}
