
/* ============================================================
   JR Soluciones Informáticas — Catálogo Web
   https://jr93-arg.github.io/WEB-JR-SOLUCIONES-INFORMATICAS/
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, sans-serif; background: #f0f0f0; color: #111; }

/* ── Header ── */
header {
  background: #111; color: #fff;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.header-top {
  padding: 12px 20px;
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.logo img { height: 60px; width: auto; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); flex-shrink: 0; }

/* Info del negocio (solo desktop) */
.header-info { display: none; flex-direction: column; gap: 3px; }
@media (min-width: 768px) { .header-info { display: flex; } }
.header-slogan { font-size: 13px; font-weight: 700; color: #fff; }
.header-contacto { font-size: 11px; color: #aaa; display: flex; gap: 14px; flex-wrap: wrap; }
.header-contacto a { color: #aaa; text-decoration: none; }
.header-contacto a:hover { color: #f59e0b; }

/* Búsqueda en header (desktop) */
.header-search { flex: 1; max-width: 420px; display: none; }
@media (min-width: 768px) { .header-search { display: block; } }
.header-search input {
  width: 100%; padding: 9px 16px; border-radius: 8px; border: none;
  font-size: 13px; background: #2a2a2a; color: #fff; outline: none;
}
.header-search input::placeholder { color: #555; }
.header-search input:focus { background: #333; }

/* Stats */
.header-stats { display: flex; align-items: center; gap: 14px; font-size: 11px; color: #aaa; margin-left: auto; flex-shrink: 0; }
.stat-item { display: flex; align-items: center; gap: 5px; }
.stat-dot { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; display: inline-block; animation: pulse 2s infinite; }
.stat-num { font-weight: 700; color: #fff; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ── Banner rotativo de promociones ── */
.promo-banner {
  background: linear-gradient(90deg, #1a1a1a, #0f2015, #1a1a1a);
  border-top: 1px solid #222; overflow: hidden; height: 32px;
  display: flex; align-items: center;
}
.promo-track {
  display: flex; gap: 60px; white-space: nowrap;
  animation: scrollPromo 30s linear infinite;
}
.promo-track:hover { animation-play-state: paused; }
.promo-item { font-size: 12px; color: #ccc; flex-shrink: 0; }
.promo-item strong { color: #f59e0b; }
@keyframes scrollPromo {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Barra inferior del header: dropdown + búsqueda mobile ── */
.header-bar {
  background: #1a1a1a; padding: 6px 20px;
  display: flex; align-items: center; gap: 10px;
}

/* Dropdown de categorías */
.cat-dropdown { position: relative; flex-shrink: 0; }
.cat-dropdown-btn {
  background: #f59e0b; color: #111; border: none;
  padding: 7px 16px; border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px;
  transition: background .15s; white-space: nowrap;
}
.cat-dropdown-btn:hover { background: #fbbf24; }
.cat-dropdown-btn .arrow { font-size: 10px; transition: transform .2s; }
.cat-dropdown-btn.open .arrow { transform: rotate(180deg); }
.cat-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  background: #1e1e1e; border: 1px solid #333; border-radius: 12px;
  min-width: 220px; z-index: 500; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.cat-dropdown-menu.open { display: block; }
.cat-dropdown-item {
  padding: 10px 16px; font-size: 13px; color: #ccc; cursor: pointer;
  transition: background .1s, color .1s; border-bottom: 1px solid #2a2a2a;
  display: flex; align-items: center; gap: 10px;
}
.cat-dropdown-item:last-child { border-bottom: none; }
.cat-dropdown-item:hover, .cat-dropdown-item.active { background: #2a2a2a; color: #f59e0b; }
.cat-dropdown-item .cat-icon { font-size: 16px; width: 22px; text-align: center; }

/* Búsqueda mobile (oculta en desktop) */
.search-mobile { flex: 1; display: block; }
@media (min-width: 768px) { .search-mobile { display: none; } }
.search-mobile input {
  width: 100%; padding: 7px 14px; border-radius: 8px; border: none;
  font-size: 13px; background: #2a2a2a; color: #fff; outline: none;
}

/* ── Main ── */
main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 100px; }

/* ── Barra de búsqueda (fallback, oculta en desktop) ── */
.search-bar { background: #1a1a1a; padding: 8px 20px; display: block; }
@media (min-width: 768px) { .search-bar { display: none; } }
.search-bar input {
  width: 100%; max-width: 520px; display: block; margin: 0 auto;
  padding: 9px 16px; border-radius: 8px; border: none;
  font-size: 14px; background: #2a2a2a; color: #fff; outline: none;
}
.search-bar input::placeholder { color: #555; }

/* ── Main ── */
main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 100px; }

/* ── Categoría ── */
.cat-title {
  font-size: 15px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: #444;
  border-left: 4px solid #f59e0b; padding-left: 10px; margin: 28px 0 12px;
}
.cat-title span { font-weight: 400; color: #aaa; font-size: 12px; text-transform: none; letter-spacing: 0; }

/* ── Grid ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; }

/* ── Tarjeta ── */
.card {
  background: #fff; border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.13); }
.card.hidden { display: none; }
.card-img {
  aspect-ratio: 1; overflow: hidden; background: #fff;
  display: flex; align-items: center; justify-content: center;
  position: relative; padding: 8px; border-bottom: 1px solid #f0f0f0;
}
.card-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.no-img { font-size: 36px; color: #ccc; }
.badge-nuevo {
  position: absolute; top: 8px; left: 8px;
  background: #f59e0b; color: #111;
  font-size: 9px; font-weight: 800; letter-spacing: .6px;
  padding: 2px 7px; border-radius: 4px; text-transform: uppercase;
}
.badge-minimo {
  position: absolute; top: 8px; right: 8px;
  background: rgba(17,17,17,.75); color: #f59e0b;
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
  backdrop-filter: blur(4px);
}
.sug-card {
  display: flex; align-items: center; gap: 10px;
  background: #f9f9f9; border: 1px solid #e0e0e0; border-radius: 10px; padding: 10px;
  transition: background .15s;
}
.sug-card:hover { background: #fffbeb; border-color: #f59e0b; }
.sug-card img { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; background: #fff; }
.sug-card-info { flex: 1; min-width: 0; }
.sug-card-name { font-size: 12px; font-weight: 600; color: #222; line-height: 1.3; }
.sug-card-precio { font-size: 13px; font-weight: 700; color: #16a34a; margin-top: 2px; }
.sug-card-tag { font-size: 10px; color: #888; }
.sug-add { background: #111; color: #fff; border: none; padding: 6px 12px; border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer; flex-shrink: 0; }
.card-actions { display: flex; gap: 6px; margin-top: 8px; }
.card-body { padding: 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-name {
  font-size: 12px; font-weight: 600; color: #222; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-price-mp { font-size: 10px; color: #bbb; margin-bottom: -2px; }
.card-price-mp s { text-decoration: line-through; color: #ccc; }
.card-price { font-size: 17px; font-weight: 800; color: #16a34a; }
.card-price-label { font-size: 10px; color: #16a34a; font-weight: 600; margin-top: -4px; }
.card-badge-desc { display:inline-block; font-size:10px; font-weight:700; color:#166534; background:#dcfce7; border-radius:4px; padding:2px 6px; margin:2px 0 6px; }
.badge-mundial { position:absolute; top:6px; left:6px; background:#F7B731; color:#5A3A00; font-size:9px; font-weight:800; padding:2px 7px; border-radius:4px; z-index:2; }
.share-btn {
  background: #25D366; color: #fff; border: none;
  padding: 8px 9px; border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; flex-shrink: 0; transition: background .15s;
}
.share-btn:hover { background: #1ebe5d; }
.add-btn {
  flex: 1; background: #111; color: #fff; border: none;
  padding: 8px 6px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600;
  transition: background .15s;
}
.add-btn:hover { background: #333; }

/* ── Navegación por categorías ── */
.cat-nav {
  background: #1a1a1a; padding: 8px 20px;
  overflow-x: auto; white-space: nowrap;
  scrollbar-width: none; -ms-overflow-style: none;
  display: flex; gap: 6px; align-items: center;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-pill {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 600; cursor: pointer; flex-shrink: 0;
  background: #2a2a2a; color: #aaa; border: 1px solid #333; transition: all .15s;
}
.cat-pill:hover { background: #333; color: #fff; }
.cat-pill.active { background: #f59e0b; color: #111; border-color: #f59e0b; }

/* ── Sección destacados ── */
/* ── Carrusel de novedades ── */
.novedades-wrap {
  background: linear-gradient(135deg, #0f2015 0%, #1a1a2e 100%);
  padding: 16px 0 16px 20px; margin-bottom: 12px; border-radius: 16px; overflow: hidden;
}
.novedades-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-right: 20px; }
.novedades-titulo { color: #f59e0b; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.novedades-nav { display: flex; gap: 6px; }
.nov-btn {
  background: rgba(255,255,255,.1); border: none; color: #fff;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.nov-btn:active { background: rgba(255,255,255,.3); }
.novedades-slider-outer {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, black 85%, transparent);
  mask-image: linear-gradient(to right, black 85%, transparent);
}
.novedades-slider {
  display: flex; gap: 12px;
  width: max-content;
  animation: novScroll 50s linear infinite;
  touch-action: pan-y;
}
.novedades-slider:hover { animation-play-state: paused; }
.novedades-slider .card { flex: 0 0 155px; min-width: 155px; }
@keyframes novScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (max-width: 480px) {
  .novedades-wrap { padding: 14px 0 14px 16px; }
  .novedades-slider .card { flex: 0 0 140px; min-width: 140px; }
}

.destacados-wrap {
  background: #003087;
  padding: 0; margin-bottom: 8px;
  border-radius: 16px; overflow: hidden;
  position: relative;
}
.destacados-wrap::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,.03) 0px, rgba(255,255,255,.03) 20%,
    transparent 20%, transparent 40%
  );
  pointer-events: none;
}
.destacados-header {
  background: #75AADB;
  padding: 10px 16px 9px;
  display: flex; align-items: center; justify-content: space-between;
}
.destacados-titulo {
  color: #003087; font-size: 12px; font-weight: 800;
  letter-spacing: .5px; text-transform: uppercase;
  display: flex; align-items: center; gap: 6px;
}
.destacados-titulo .dest-stars { color: #F7B731; font-size: 12px; letter-spacing: 2px; }
.destacados-sub { color: #003087; font-size: 10px; opacity: .7; }
.destacados-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 10px; padding: 14px;
}
.destacados-grid .card { box-shadow: 0 4px 16px rgba(0,0,0,.3); }

/* ── Sin resultados ── */
.no-results { text-align: center; color: #aaa; padding: 40px; font-size: 14px; display: none; }

/* ── Botón flotante carrito ── */
#cartFab {
  position: fixed; right: 18px; bottom: 18px; z-index: 200;
  background: #111; color: #fff; border: none; border-radius: 999px;
  padding: 14px 20px; cursor: pointer; font-size: 15px; font-weight: 700;
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
  display: flex; align-items: center; gap: 8px;
  transition: transform .15s, background .15s;
}
#cartFab:hover { background: #222; transform: scale(1.04); }
#cartFab .fab-icon { font-size: 18px; }
#cartCount {
  background: #f59e0b; color: #111; font-size: 11px; font-weight: 800;
  border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center;
}

/* ── Panel del carrito ── */
#cartPanel {
  position: fixed; right: 18px; bottom: 80px;
  width: 370px; max-width: calc(100vw - 20px);
  background: #fff; border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  z-index: 201; display: none; flex-direction: column; overflow: hidden;
  animation: slideUp .2s ease;
}
@keyframes slideUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
.cart-header { background: #111; color: #fff; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.cart-header h3 { font-size: 15px; font-weight: 700; }
.cart-close { background: none; border: none; color: #aaa; font-size: 22px; cursor: pointer; line-height: 1; padding: 0 4px; }
.cart-close:hover { color: #fff; }
#cartItems { max-height: 340px; overflow-y: auto; padding: 12px 16px; }
.cart-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.cart-item:last-child { border-bottom: none; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 12px; font-weight: 600; color: #222; line-height: 1.3; word-break: break-word; }
.cart-item-unit { font-size: 11px; color: #999; margin-top: 2px; }
.cart-item-subtotal { font-size: 13px; font-weight: 700; color: #16a34a; margin-top: 3px; }
.cart-qty { display: flex; align-items: center; gap: 4px; flex-shrink: 0; margin-top: 2px; }
.qty-btn {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid #e0e0e0;
  background: #f5f5f5; cursor: pointer; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; color: #444; transition: background .1s;
}
.qty-btn:hover { background: #e0e0e0; }
.qty-num { font-size: 13px; font-weight: 700; min-width: 18px; text-align: center; }
.qty-del { font-size: 13px; color: #e44; cursor: pointer; padding: 2px 4px; background: none; border: none; }
.qty-del:hover { color: #c00; }
.cart-empty { text-align: center; color: #aaa; padding: 32px 16px; font-size: 14px; }
.cart-footer { padding: 12px 16px; border-top: 1px solid #f0f0f0; background: #fafafa; }
.cart-total-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cart-total-label { font-size: 13px; color: #666; }
#cartTotal { font-size: 20px; font-weight: 800; color: #16a34a; }
.cart-actions { display: flex; gap: 8px; }
#btnCheckout {
  flex: 1; background: #111; color: #fff; border: none;
  padding: 11px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s;
}
#btnCheckout:hover { background: #333; }
#clearCart { background: #f0f0f0; color: #666; border: none; padding: 11px 14px; border-radius: 10px; cursor: pointer; font-size: 13px; transition: background .15s; }
#clearCart:hover { background: #e0e0e0; }

/* ── Footer ── */
footer { text-align: center; font-size: 12px; color: #aaa; padding: 24px; }

/* ── Modal checkout ── */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 20px; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,.35); animation: popIn .2s ease; }
@keyframes popIn { from { opacity:0; transform:scale(.95); } to { opacity:1; transform:scale(1); } }
.modal-header { background: #111; color: #fff; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; border-radius: 20px 20px 0 0; position: sticky; top: 0; z-index: 1; }
.modal-header h3 { font-size: 15px; font-weight: 700; }
.modal-close { background: none; border: none; color: #aaa; font-size: 24px; cursor: pointer; line-height: 1; padding: 0 4px; }
.modal-close:hover { color: #fff; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 4px; }
.step { flex: 1; text-align: center; font-size: 11px; font-weight: 700; color: #bbb; padding: 6px 4px; border-bottom: 3px solid #eee; transition: color .2s, border-color .2s; }
.step.active { color: #111; border-color: #f59e0b; }
.step.done { color: #16a34a; border-color: #16a34a; }
.checkout-section { display: none; flex-direction: column; gap: 16px; }
.checkout-section.visible { display: flex; }
.order-summary { background: #f9f9f9; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.order-summary-title { font-size: 12px; font-weight: 700; color: #555; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .5px; }
.order-line { display: flex; justify-content: space-between; font-size: 13px; color: #333; }
.order-total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 800; color: #111; border-top: 1px solid #e0e0e0; padding-top: 8px; margin-top: 4px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12px; font-weight: 600; color: #444; }
.form-input, .form-select, .form-textarea { border: 1.5px solid #e0e0e0; border-radius: 10px; padding: 10px 13px; font-size: 14px; color: #111; background: #fff; outline: none; transition: border-color .15s; font-family: inherit; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: #f59e0b; }
.form-input.error, .form-select.error { border-color: #e44; }
.form-error { font-size: 11px; color: #e44; display: none; }
.form-error.visible { display: block; }
.form-textarea { resize: vertical; min-height: 70px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.delivery-toggle { display: flex; gap: 8px; }
.toggle-btn { flex: 1; padding: 10px; border-radius: 10px; border: 1.5px solid #e0e0e0; background: #fff; cursor: pointer; font-size: 13px; font-weight: 600; color: #666; transition: all .15s; text-align: center; }
.toggle-btn.selected { border-color: #f59e0b; background: #fffbeb; color: #111; }
.bank-card { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); border-radius: 16px; padding: 20px; color: #fff; }
.bank-card-title { font-size: 11px; color: #aaa; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
.bank-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.bank-label { font-size: 11px; color: #aaa; }
.bank-value { font-size: 15px; font-weight: 700; letter-spacing: .5px; }
.copy-btn { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; border-radius: 6px; padding: 3px 10px; font-size: 11px; cursor: pointer; transition: background .15s; }
.copy-btn:hover { background: rgba(255,255,255,.2); }
.total-destacado { background: #f59e0b; color: #111; border-radius: 10px; padding: 12px 16px; text-align: center; margin-top: 4px; }
.total-destacado .label { font-size: 11px; font-weight: 600; }
.total-destacado .monto { font-size: 24px; font-weight: 800; }
.btn-next { background: #111; color: #fff; border: none; padding: 13px; border-radius: 12px; cursor: pointer; font-size: 15px; font-weight: 700; width: 100%; transition: background .15s; }
.btn-next:hover { background: #333; }
.btn-next:disabled { background: #ccc; cursor: default; }
.btn-back { background: transparent; color: #666; border: none; padding: 8px; cursor: pointer; font-size: 13px; text-align: center; width: 100%; }
.btn-back:hover { color: #111; }
.confirm-box { text-align: center; padding: 20px 10px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.confirm-icon { font-size: 56px; }
.confirm-title { font-size: 20px; font-weight: 800; color: #111; }
.confirm-sub { font-size: 14px; color: #666; line-height: 1.5; }
.confirm-wa { background: #25D366; color: #fff; border: none; padding: 13px 24px; border-radius: 12px; cursor: pointer; font-size: 15px; font-weight: 700; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s; }
.confirm-wa:hover { background: #1ebe5d; }

/* ── Stats del header ── */
.header-stats {
  display: flex; align-items: center; gap: 16px;
  font-size: 11px; color: #aaa; flex-wrap: wrap;
}
.stat-item { display: flex; align-items: center; gap: 5px; }
.stat-dot { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; display: inline-block; animation: pulse 2s infinite; }
.stat-num { font-weight: 700; color: #fff; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ── Simulador de crédito en modal ── */
.credito-toggle {
  width: 100%; background: #fffbeb; border: 1px solid #f59e0b;
  border-radius: 10px; padding: 11px 14px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; font-size: 13px; font-weight: 700; color: #854F0B;
  margin-top: 8px; transition: background .15s;
}
.credito-toggle:hover { background: #fef3c7; }
.credito-toggle .arrow { transition: transform .2s; }
.credito-toggle.open .arrow { transform: rotate(180deg); }
.credito-body {
  display: none; border: 1px solid #f0e0b0; border-top: none;
  border-radius: 0 0 10px 10px; padding: 14px; background: #fff;
  margin-top: -6px;
}
.credito-body.open { display: block; }
.credito-nota { font-size: 11px; color: #aaa; margin-bottom: 10px; line-height: 1.5; }
.credito-anticipo-wrap { margin-bottom: 12px; }
.credito-anticipo-label { font-size: 12px; color: #555; margin-bottom: 4px; display: flex; justify-content: space-between; }
.credito-anticipo-label span { font-weight: 700; color: #111; }
.credito-cuotas { display: flex; gap: 8px; margin-bottom: 12px; }
.credito-cuota-btn {
  flex: 1; border: 1px solid #ddd; border-radius: 10px;
  padding: 10px 6px; background: #fff; cursor: pointer;
  font-size: 12px; text-align: center; transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.credito-cuota-btn.active { border: 2px solid #f59e0b; background: #fffbeb; }
.credito-cuota-monto { font-size: 15px; font-weight: 800; color: #111; }
.credito-cuota-label { font-size: 11px; color: #888; margin-top: 2px; }
.credito-resumen {
  background: #f9f9f9; border-radius: 10px; padding: 10px 12px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px;
}
.credito-metrica-label { font-size: 10px; color: #888; }
.credito-metrica-valor { font-size: 13px; font-weight: 700; color: #111; }
.credito-cuadro { font-size: 11px; margin-bottom: 10px; overflow-x: auto; }
.credito-cuadro table { width: 100%; border-collapse: collapse; }
.credito-cuadro th { color: #aaa; padding: 3px 6px; text-align: right; font-weight: 500; }
.credito-cuadro th:first-child { text-align: left; }
.credito-cuadro td { padding: 4px 6px; text-align: right; border-top: 1px solid #f0f0f0; }
.credito-cuadro td:first-child { text-align: left; color: #888; }
.credito-wa {
  width: 100%; background: #25D366; color: #fff; border: none;
  padding: 13px; border-radius: 10px; font-size: 14px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  -webkit-tap-highlight-color: transparent;
}
#btnAyuda {
  position: fixed; right: 18px; bottom: 80px; z-index: 198;
  background: #f59e0b; color: #111; border: none;
  border-radius: 999px; padding: 10px 16px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  display: flex; align-items: center; gap: 6px;
  transition: background .15s, transform .15s;
}
#btnAyuda:hover { background: #fbbf24; transform: scale(1.04); }

.ayuda-overlay {
  display: none; position: fixed; inset: 0; z-index: 450;
  background: rgba(0,0,0,.65); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 16px;
}
.ayuda-overlay.open { display: flex; }
.ayuda-modal {
  background: #fff; border-radius: 20px;
  width: 100%; max-width: 480px; max-height: 90vh;
  overflow-y: auto; padding: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  animation: popIn .2s ease;
}
.ayuda-modal h2 {
  font-size: 18px; font-weight: 800; color: #111;
  margin: 0 0 20px; text-align: center;
}
.ayuda-pasos { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.ayuda-paso {
  display: flex; align-items: flex-start; gap: 14px;
  background: #f9f9f9; border-radius: 12px; padding: 14px;
}
.ayuda-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: #111; color: #fff; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ayuda-paso-txt { flex: 1; }
.ayuda-paso-titulo { font-size: 14px; font-weight: 700; color: #111; margin-bottom: 2px; }
.ayuda-paso-desc  { font-size: 12px; color: #666; line-height: 1.5; }
.ayuda-desc-box {
  background: #fffbeb; border: 1px solid #f59e0b;
  border-radius: 10px; padding: 12px; font-size: 12px;
  color: #555; line-height: 1.6; margin-bottom: 16px;
}
.ayuda-close-btn {
  width: 100%; background: #111; color: #fff; border: none;
  padding: 14px; border-radius: 12px; font-size: 15px;
  font-weight: 700; cursor: pointer; transition: background .15s;
}
.ayuda-close-btn:hover { background: #333; }


#ultimaCompra {
  position: fixed; bottom: 90px; left: 18px; z-index: 199;
  background: #fff; border-radius: 12px; padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
  max-width: 280px; display: none;
  animation: slideInLeft .4s ease;
  border-left: 4px solid #16a34a;
}
@keyframes slideInLeft { from{opacity:0;transform:translateX(-20px)} to{opacity:1;transform:translateX(0)} }
.uc-title { font-size: 12px; font-weight: 700; color: #111; }
.uc-sub   { font-size: 11px; color: #888; margin-top: 2px; }
.uc-close { position: absolute; top: 6px; right: 8px; background: none; border: none; color: #ccc; cursor: pointer; font-size: 16px; }

/* ── Badge stock bajo en card ── */
.badge-stock-alto  { position:absolute;bottom:8px;left:8px;background:rgba(22,163,74,.85);color:#fff;font-size:9px;font-weight:700;padding:2px 6px;border-radius:4px;backdrop-filter:blur(4px); }
.badge-stock-medio { position:absolute;bottom:8px;left:8px;background:rgba(245,158,11,.9);color:#111;font-size:9px;font-weight:700;padding:2px 6px;border-radius:4px;backdrop-filter:blur(4px); }
.badge-stock-bajo  { position:absolute;bottom:8px;left:8px;background:rgba(228,68,68,.9);color:#fff;font-size:9px;font-weight:700;padding:2px 6px;border-radius:4px;backdrop-filter:blur(4px); }
.badge-stock-agotado { position:absolute;bottom:8px;left:8px;background:rgba(80,80,80,.9);color:#fff;font-size:9px;font-weight:700;padding:2px 6px;border-radius:4px;backdrop-filter:blur(4px); }

/* ── Badge vistas en card ── */
.badge-vistas {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 9px; padding: 2px 6px; border-radius: 4px;
  backdrop-filter: blur(4px);
}
.prod-overlay {
  display: none; position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,.65); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 16px;
}
.prod-overlay.open { display: flex; }
.prod-modal {
  background: #fff; border-radius: 20px; width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  animation: popIn .2s ease; display: flex; flex-direction: column;
}
.prod-img-wrap {
  width: 100%; aspect-ratio: 1; background: #f5f5f5;
  display: flex; align-items: center; justify-content: center;
  border-radius: 20px 20px 0 0; overflow: hidden; flex-shrink: 0;
  position: relative;
}
.prod-img-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.prod-img-placeholder { font-size: 56px; color: #ccc; }
.prod-close {
  position: absolute; top: 12px; right: 12px;
  background: rgba(0,0,0,.45); color: #fff; border: none;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  font-size: 18px; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.prod-close:hover { background: rgba(0,0,0,.7); }
.prod-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.prod-nombre { font-size: 17px; font-weight: 800; color: #111; line-height: 1.3; }
.prod-precios { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.prod-precio-transf { font-size: 26px; font-weight: 800; color: #16a34a; }
.prod-precio-mp { font-size: 13px; color: #bbb; }
.prod-precio-mp s { text-decoration: line-through; }
.prod-precio-label { font-size: 11px; color: #16a34a; font-weight: 600; }
.prod-desc {
  font-size: 13px; color: #555; line-height: 1.6;
  max-height: 160px; overflow-y: auto;
}
.prod-desc-loading { color: #aaa; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.prod-desc-loading::before { content: ""; width: 14px; height: 14px; border: 2px solid #ddd; border-top-color: #f59e0b; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.prod-actions { display: flex; gap: 10px; margin-top: 4px; }
.prod-add { flex: 1; background: #111; color: #fff; border: none; padding: 13px; border-radius: 12px; cursor: pointer; font-size: 15px; font-weight: 700; transition: background .15s; }
.prod-add:hover { background: #333; }
.prod-share { background: #25D366; color: #fff; border: none; padding: 13px 16px; border-radius: 12px; cursor: pointer; font-size: 18px; transition: background .15s; text-decoration: none; display: flex; align-items: center; }
.prod-share:hover { background: #1ebe5d; }

/* ── Botón volver arriba ── */
#btnTop {
  position: fixed; left: 18px; bottom: 18px; z-index: 200;
  background: #111; color: #fff; border: none; border-radius: 999px;
  width: 44px; height: 44px; cursor: pointer; font-size: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  display: none; align-items: center; justify-content: center;
  transition: background .15s, opacity .2s;
}
#btnTop:hover { background: #333; }
#btnTop.visible { display: flex; }

/* ── Sticky nav al hacer scroll ── */
.sticky-nav {
  position: sticky; top: 0; z-index: 99;
  background: #1a1a1a; padding: 8px 20px;
  overflow-x: auto; white-space: nowrap;
  scrollbar-width: none; display: flex; gap: 6px; align-items: center;
}
.sticky-search {
  position: sticky; top: 0; z-index: 98;
  background: #1a1a1a; padding: 8px 20px;
}
.sticky-search input {
  width: 100%; max-width: 520px; display: block; margin: 0 auto;
  padding: 9px 16px; border-radius: 8px; border: none;
  font-size: 14px; background: #2a2a2a; color: #fff; outline: none;
}
.sticky-search input::placeholder { color: #555; }

/* ── Sección más vistos ── */
.masvistos-wrap {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f2015 100%);
  padding: 20px; margin-bottom: 8px;
}
.masvistos-titulo {
  color: #f59e0b; font-size: 11px; font-weight: 800;
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.masvistos-titulo::after { content: ""; flex: 1; height: 1px; background: rgba(245,158,11,.3); }
.geo-btn {
  width: 100%; padding: 11px; border-radius: 10px;
  border: 1.5px dashed #f59e0b; background: #fffbeb; color: #111;
  font-size: 13px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s;
}
.geo-btn:hover { background: #fef3c7; }
.geo-btn:disabled { opacity: .5; cursor: default; }
.zona-detected {
  background: #f0fdf4; border: 1.5px solid #16a34a; border-radius: 10px;
  padding: 12px 14px; display: flex; align-items: center; gap: 10px;
}
.zona-detected .zona-icon { font-size: 20px; }
.zona-detected .zona-info { flex: 1; }
.zona-detected .zona-nombre { font-size: 13px; font-weight: 700; color: #16a34a; }
.zona-detected .zona-costo { font-size: 12px; color: #555; margin-top: 2px; }
.zona-detected .zona-reset { background: none; border: none; color: #aaa; cursor: pointer; font-size: 18px; }
.envio-costo-box {
  background: #f9f9f9; border-radius: 10px; padding: 12px 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.envio-costo-label { font-size: 13px; color: #555; }
.envio-costo-valor { font-size: 16px; font-weight: 800; color: #16a34a; }
.envio-costo-valor.pago { color: #e44; }
.envio-free-badge {
  background: #16a34a; color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 4px; margin-left: 8px;
}

/* ── Pago — métodos ── */
.pago-opciones { display: flex; flex-direction: column; gap: 10px; }
.pago-opcion {
  border: 1.5px solid #e0e0e0; border-radius: 12px; padding: 14px;
  cursor: pointer; transition: all .15s; display: flex; align-items: flex-start; gap: 12px;
}
.pago-opcion:hover { border-color: #f59e0b; background: #fffbeb; }
.pago-opcion.selected { border-color: #f59e0b; background: #fffbeb; }
.pago-opcion input[type=radio] { margin-top: 3px; accent-color: #f59e0b; flex-shrink: 0; }
.pago-opcion-body { flex: 1; }
.pago-opcion-title { font-size: 14px; font-weight: 700; color: #111; }
.pago-opcion-desc { font-size: 12px; color: #666; margin-top: 3px; line-height: 1.4; }
.pago-opcion-precio {
  font-size: 18px; font-weight: 800; color: #16a34a;
  margin-top: 6px;
}
.pago-opcion-ahorro {
  font-size: 11px; color: #16a34a; font-weight: 600;
  background: #f0fdf4; padding: 2px 8px; border-radius: 4px;
  display: inline-block; margin-top: 4px;
}
.pago-opcion-recargo {
  font-size: 11px; color: #888; margin-top: 4px;
}
.btn-mp {
  background: #009ee3; color: #fff; border: none;
  padding: 13px; border-radius: 12px; cursor: pointer;
  font-size: 15px; font-weight: 700; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s; text-decoration: none;
}
.btn-mp:hover { background: #0080c0; }
.resumen-final {
  background: #f9f9f9; border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.resumen-linea { display: flex; justify-content: space-between; font-size: 13px; color: #555; }
.resumen-linea.descuento { color: #16a34a; font-weight: 600; }
.resumen-linea.envio { color: #555; }
.resumen-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; color: #111; border-top: 1px solid #e0e0e0; padding-top: 10px; margin-top: 4px; }

/* ── Print ── */
@media print {
  header, .search-bar, #cartFab, #cartPanel, .modal-overlay { display: none !important; }
  .card-actions .add-btn { display: none; }
  main { padding-bottom: 0; }
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 8px; }
  #cartPanel { right: 8px; bottom: 78px; width: calc(100vw - 16px); }
  .form-row { grid-template-columns: 1fr; }
}
