/* ===== VARIABLES ===== */
:root {
  --blue-dark:    #0b1f35;
  --blue-mid:     #185fa5;
  --blue-bright:  #29a9e0;
  --blue-accent:  #4fc3f7;
  --bg-page:      #0d1117;
  --bg-surface:   #111822;
  --bg-card:      #162030;
  --bg-card-hov:  #1c2a3f;
  --border:       rgba(41,169,224,.12);
  --border-hov:   rgba(41,169,224,.38);
  --text-1:       #e8f2ff;
  --text-2:       #7a9cbf;
  --text-3:       #3d5470;
  --green-wa:     #25D366;
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --font-d: 'Barlow Condensed', sans-serif;
  --font-b: 'Barlow', sans-serif;
  --ease: .2s ease;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-page);
  color: var(--text-1);
  font-family: var(--font-b);
  font-size: 15px;
  line-height: 1.6;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(13,17,23,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 24px; height: 66px;
  display: flex; align-items: center; gap: 28px;
}
.logo-img { height: 44px; width: auto; flex-shrink: 0; }
.nav-links { display: flex; gap: 2px; margin-left: 4px; }
.nav-links a {
  color: var(--text-2); text-decoration: none;
  padding: 7px 15px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500;
  transition: color var(--ease), background var(--ease);
}
.nav-links a:hover { color: var(--text-1); background: rgba(41,169,224,.08); }
.wa-header {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  background: var(--green-wa); color: #fff;
  text-decoration: none; padding: 9px 20px;
  border-radius: var(--r-md);
  font-size: 14px; font-weight: 600;
  transition: opacity var(--ease), transform var(--ease);
  white-space: nowrap;
}
.wa-header:hover { opacity: .86; transform: translateY(-1px); }

/* ===== HERO ===== */
.hero {
  position: relative; overflow: hidden;
  max-width: 1280px; margin: 0 auto;
  padding: 80px 24px 64px;
}
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(41,169,224,.05) 48px),
    repeating-linear-gradient(90deg, transparent, transparent 47px, rgba(41,169,224,.05) 48px);
}
.hero-content { position: relative; max-width: 600px; }
.hero-eyebrow {
  display: inline-block;
  background: rgba(41,169,224,.1);
  border: 1px solid rgba(41,169,224,.22);
  color: var(--blue-bright); font-size: 12px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase;
  padding: 5px 15px; border-radius: 40px; margin-bottom: 22px;
}
.hero-title {
  font-family: var(--font-d);
  font-size: clamp(54px, 7.5vw, 90px);
  font-weight: 900; line-height: .97;
  letter-spacing: -1.5px; color: var(--text-1);
  margin-bottom: 22px;
}
.hero-title em {
  font-style: normal; color: var(--blue-bright);
}
.hero-desc {
  font-size: 17px; color: var(--text-2);
  max-width: 440px; margin-bottom: 38px; font-weight: 400;
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  background: var(--blue-mid); color: #fff;
  text-decoration: none; padding: 13px 28px;
  border-radius: var(--r-md); font-size: 15px; font-weight: 600;
  transition: background var(--ease), transform var(--ease);
}
.btn-primary:hover { background: var(--blue-bright); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-hov); color: var(--text-1);
  text-decoration: none; padding: 13px 28px;
  border-radius: var(--r-md); font-size: 15px; font-weight: 500;
  transition: border-color var(--ease), background var(--ease), transform var(--ease);
}
.btn-outline:hover { border-color: var(--blue-bright); background: rgba(41,169,224,.07); transform: translateY(-2px); }

.hero-stats {
  display: flex; align-items: center; gap: 36px;
  margin-top: 60px; padding-top: 32px;
  border-top: 1px solid var(--border);
  position: relative;
}
.stat-item { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-d); font-size: 38px;
  font-weight: 900; color: var(--blue-bright); line-height: 1;
}
.stat-lbl { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.stat-sep { width: 1px; height: 44px; background: var(--border); }

/* ===== CONTROLES ===== */
.controls-bar {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 66px; z-index: 100;
}
.controls-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}

/* Search */
.search-box {
  position: relative; flex: 1; min-width: 220px;
}
.search-box svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}
#search {
  width: 100%; background: var(--bg-card);
  border: 1px solid var(--border); color: var(--text-1);
  font-family: var(--font-b); font-size: 14px;
  padding: 10px 14px 10px 38px;
  border-radius: var(--r-md); outline: none;
  transition: border-color var(--ease);
}
#search::placeholder { color: var(--text-3); }
#search:focus { border-color: var(--blue-bright); }

.controls-right { display: flex; gap: 10px; align-items: center; margin-left: auto; flex-wrap: wrap; }

/* Select */
.select-wrap {
  position: relative; display: flex; align-items: center;
}
#ordenPrecio {
  appearance: none;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-1); font-family: var(--font-b); font-size: 14px;
  padding: 10px 36px 10px 14px;
  border-radius: var(--r-md); outline: none; cursor: pointer;
  transition: border-color var(--ease);
}
#ordenPrecio:focus { border-color: var(--blue-bright); }
.sel-chevron {
  position: absolute; right: 12px; pointer-events: none; color: var(--text-3);
}

/* Filter toggle */
.filter-toggle {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-1); font-family: var(--font-b); font-size: 14px;
  font-weight: 500; padding: 10px 18px; border-radius: var(--r-md);
  cursor: pointer; transition: border-color var(--ease), background var(--ease);
}
.filter-toggle:hover { border-color: var(--blue-bright); background: var(--bg-card-hov); }
.filter-toggle.open { border-color: var(--blue-bright); background: rgba(41,169,224,.08); color: var(--blue-bright); }
.filter-badge {
  background: var(--blue-mid); color: #fff;
  font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

/* Filter panel */
.filter-panel {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, border-top .35s ease;
  border-top: 0px solid var(--border);
}
.filter-panel.open {
  max-height: 400px;
  border-top: 1px solid var(--border);
}
.filter-panel-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 20px 24px 24px;
  display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-start;
}
.filter-group { display: flex; flex-direction: column; gap: 10px; }
.filter-label {
  font-size: 12px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; color: var(--text-3);
}
.range-row { display: flex; align-items: center; gap: 14px; }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 200px; height: 4px;
  background: var(--border); border-radius: 4px; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px;
  border-radius: 50%; background: var(--blue-mid);
  cursor: pointer; border: 2px solid var(--blue-bright);
  transition: background var(--ease);
}
input[type="range"]::-webkit-slider-thumb:hover { background: var(--blue-bright); }
.range-val {
  font-family: var(--font-d); font-size: 18px; font-weight: 700;
  color: var(--blue-bright); min-width: 80px;
}
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-2); font-family: var(--font-b); font-size: 13px;
  padding: 5px 14px; border-radius: 40px; cursor: pointer;
  transition: all var(--ease);
}
.chip:hover { border-color: var(--blue-bright); color: var(--blue-bright); }
.chip.active { background: var(--blue-mid); border-color: var(--blue-mid); color: #fff; }
.btn-reset {
  display: flex; align-items: center; gap: 7px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-3); font-family: var(--font-b); font-size: 13px;
  padding: 8px 16px; border-radius: var(--r-md); cursor: pointer;
  transition: all var(--ease); margin-top: 6px; align-self: flex-end;
}
.btn-reset:hover { border-color: #e55; color: #e55; }

/* ===== CATÁLOGO ===== */
.catalog-main {
  max-width: 1280px; margin: 0 auto;
  padding: 32px 24px 80px;
}
.catalog-meta { margin-bottom: 20px; }
.result-count { font-size: 13px; color: var(--text-3); font-weight: 500; }

/* ===== GRID ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

/* ===== CARD ===== */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
  animation: fadeUp .3s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hov);
  box-shadow: 0 8px 28px rgba(0,0,0,.45);
}
.card-img-wrap {
  position: relative;
  background: #fff;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.watermark {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;

  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 10px;
  padding: 4px 7px;
  border-radius: 6px;

  text-align: right;
  line-height: 1.15;
  max-width: 72%;

  pointer-events: none;
}
.card-body { padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.codigo { font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--text-3); text-transform: uppercase; }
.card-marca { font-size: 12px; color: var(--blue-bright); font-weight: 600; letter-spacing: .3px; }
.card-name { font-size: 14px; font-weight: 500; color: var(--text-1); line-height: 1.35; }
.precio {
  font-family: var(--font-d); font-size: 28px;
  font-weight: 800; color: var(--blue-bright);
  line-height: 1; margin-top: 6px;
}
.card-footer { padding: 0 14px 14px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px; background: var(--green-wa); color: #fff;
  text-decoration: none; border-radius: var(--r-md);
  font-size: 14px; font-weight: 600;
  transition: opacity var(--ease), transform var(--ease);
}
.btn:hover { opacity: .85; transform: translateY(-1px); }
.btn svg { flex-shrink: 0; }

/* Load more */
.load-more-wrap { text-align: center; margin-top: 40px; }
.btn-loadmore {
  background: transparent; border: 1px solid var(--border-hov);
  color: var(--text-1); font-family: var(--font-b);
  font-size: 15px; font-weight: 500; padding: 13px 40px;
  border-radius: var(--r-md); cursor: pointer;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}
.btn-loadmore:hover { background: rgba(41,169,224,.07); border-color: var(--blue-bright); transform: translateY(-2px); }

/* Empty */
.empty-msg {
  text-align: center; padding: 80px 20px;
  color: var(--text-3); font-size: 16px;
}

/* ===== FOOTER ===== */
.site-footer { background: var(--bg-surface); border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 56px 24px 40px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px;
}
.footer-logo { height: 50px; margin-bottom: 16px; }
.footer-brand p { color: var(--text-2); font-size: 14px; max-width: 280px; line-height: 1.7; }
.footer-wa {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-wa); color: #fff;
  text-decoration: none; padding: 9px 18px;
  border-radius: var(--r-md); font-size: 14px; font-weight: 600;
  margin-top: 18px; transition: opacity var(--ease);
}
.footer-wa:hover { opacity: .85; }
.footer-col h4 {
  font-family: var(--font-d); font-size: 14px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--text-1); margin-bottom: 16px;
}
.footer-col p { color: var(--text-2); font-size: 14px; margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 24px; text-align: center;
  font-size: 12px; color: var(--text-3);
  max-width: 1280px; margin: 0 auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 48px 20px 40px; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .controls-inner { gap: 10px; }
  .controls-right { margin-left: 0; width: 100%; }
  #ordenPrecio { flex: 1; }
}
/* ===== CARRITO ===== */
.cart-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 300;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--blue-mid);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  transition: transform var(--ease), background var(--ease), opacity var(--ease);
}

.cart-fab:hover {
  background: var(--blue-bright);
  transform: translateY(-2px);
}

.cart-fab-count {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue-mid);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  padding: 0 6px;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 100%;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  z-index: 350;
  display: flex;
  flex-direction: column;
  transition: right .28s ease;
  box-shadow: -20px 0 40px rgba(0,0,0,.35);
}

.cart-panel.open {
  right: 0;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.48);
  backdrop-filter: blur(2px);
  z-index: 340;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border);
}

.cart-panel-header h3 {
  font-family: var(--font-d);
  font-size: 24px;
  line-height: 1;
}

.cart-close {
  background: transparent;
  border: 0;
  color: var(--text-1);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 6px;
}

.cart-empty {
  text-align: center;
  color: var(--text-3);
  padding: 50px 10px;
}

.cart-item {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 12px;
}

.cart-item-img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-id {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .8px;
}

.cart-item-name {
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-1);
}

.cart-item-price {
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 800;
  color: var(--blue-bright);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

.qty-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}

.qty-box button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: var(--blue-mid);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.qty-box span {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
}

.cart-remove {
  background: transparent;
  border: 0;
  color: #e55;
  font-size: 13px;
  cursor: pointer;
}

.cart-panel-footer {
  border-top: 1px solid var(--border);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
}

.cart-total-row strong {
  font-family: var(--font-d);
  font-size: 28px;
  color: var(--blue-bright);
}

.cart-wa-btn {
  width: 100%;
}

.cart-wa-btn.disabled {
  opacity: .55;
  pointer-events: none;
}

.cart-clear-btn {
  width: 100%;
  justify-content: center;
  align-self: stretch;
}

.btn-cart {
  width: 100%;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-1);
  border: 1px solid var(--border-hov);
  border-radius: var(--r-md);
  padding: 10px;
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}

.btn-cart:hover {
  background: rgba(41,169,224,.07);
  border-color: var(--blue-bright);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .cart-panel {
    width: 100%;
    right: -100%;
  }

  .cart-fab {
    right: 14px;
    bottom: 14px;
    padding: 12px 16px;
  }
}
.map-header {
  display: flex;
  align-items: center;
  gap: 8px;

  background: #e53935; /* rojo tipo maps */
  color: #fff;
  text-decoration: none;

  padding: 9px 20px;
  border-radius: var(--r-md);

  font-size: 14px;
  font-weight: 600;

  transition: opacity var(--ease), transform var(--ease);
  white-space: nowrap;
}

.map-header:hover {
  opacity: .85;
  transform: translateY(-1px);
}