@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=Barlow+Condensed:wght@500;600;700&family=IBM+Plex+Mono:wght@400;600&family=Oswald:wght@600;700&family=Anton&family=Bebas+Neue&family=Pacifico&family=Comic+Neue:wght@700&display=swap');

/* Fuentes propias subidas para los carteles de Destacados */
@font-face { font-family: 'WolfsRain'; src: url('fonts/wolfsrain.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'OneWayOfLife'; src: url('fonts/lastinglove.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Mystical'; src: url('fonts/mystical.ttf') format('truetype'); font-display: swap; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #F4F6F9;
  --bg-card:  #FFFFFF;
  --bg-side:  #FFFFFF;
  --navy:     #0F2A4A;
  --blue:     #1A5EA8;
  --blue2:    #2272D4;
  --red:      #C0231D;
  --text:     #1A2332;
  --text2:    #4A5568;
  --text3:    #8A9BB0;
  --border:   #DDE3EC;
  --border2:  #C8D3E0;
  --green:    #1A8F5C;
  --shadow:   0 1px 4px rgba(15,42,74,.08);
  --shadow2:  0 4px 16px rgba(15,42,74,.12);
  --sans:     'DM Sans', sans-serif;
  --cond:     'Barlow Condensed', sans-serif;
  --mono:     'IBM Plex Mono', monospace;
}

body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }

/* -- TOPBAR -- */
.topbar {
  background: var(--navy);
  padding: 7px 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: rgba(255,255,255,.7);
}
.topbar-left { display: flex; gap: 20px; }
.topbar-item { display: flex; align-items: center; gap: 5px; }
.topbar-item i { font-size: 13px; color: rgba(255,255,255,.5); }
.topbar-item a { color: rgba(255,255,255,.85); }

/* -- NAVBAR -- */
.navbar {
  background: var(--bg-card);
  border-bottom: 2px solid var(--border);
  padding: 0 24px;
  display: flex; align-items: stretch; gap: 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.nav-logo {
  display: none; /* oculto en desktop a pedido: gana espacio para el buscador. En mobile vuelve a mostrarse (ver media query) */
  align-items: center;
  padding: 10px 20px 10px 0;
  border-right: 1px solid var(--border);
  margin-right: 16px;
  cursor: pointer; gap: 10px;
}
.nav-logo img { height: 40px; }
.nav-logo-name {
  font-family: var(--cond); font-size: 20px; font-weight: 700;
  color: var(--navy); letter-spacing: .5px; line-height: 1;
}
.nav-logo-sub { font-size: 10px; color: var(--text3); letter-spacing: .5px; }
.nav-links { display: flex; align-items: stretch; gap: 0; }
.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px;
  font-size: 13px; font-weight: 500; color: var(--text2);
  border-bottom: 3px solid transparent; cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.nav-link:hover { color: var(--blue); border-bottom-color: var(--border2); }
.nav-link.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.nav-link i { font-size: 16px; }
.nav-search {
  flex: 1; display: flex; align-items: center;
  padding: 10px 0 10px 16px;
  border-left: 1px solid var(--border);
  margin-left: 16px; gap: 8px;
  min-width: 220px;
}
.nav-search input {
  flex: 1; background: var(--bg);
  border: 1.5px solid var(--border2);
  border-radius: 6px; padding: 8px 14px;
  color: var(--text); font-size: 13px; font-family: var(--sans);
  outline: none; transition: border-color .15s;
  min-width: 0;
}
.nav-search input:focus { border-color: var(--blue); background: #fff; }
.nav-search input::placeholder { color: var(--text3); }
.btn-search {
  background: var(--blue); color: #fff; border: none;
  padding: 8px 18px; border-radius: 6px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: var(--cond); letter-spacing: .5px; font-size: 13px;
  display: flex; align-items: center; gap: 5px;
}
.btn-search:hover { background: var(--blue2); }

/* -- PAGES -- */
.page { display: none; }
.page.active { display: block; }

/* -- BANNER -- */
.banner {
  position: relative; overflow: hidden;
  background: var(--navy);
  height: 200px;
  display: flex; align-items: center;
}
.banner-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, #0F2A4A 0%, #1A4B8C 50%, #0F2A4A 100%);
}
.banner-circuit {
  position: absolute; inset: 0; opacity: .18;
  background-image:
    linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 48px 48px;
}
.banner-dots {
  position: absolute; inset: 0; opacity: .08;
  background-image: radial-gradient(circle, #fff 1.5px, transparent 1.5px);
  background-size: 24px 24px;
}
.banner-glow {
  position: absolute; right: -80px; top: -80px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34,114,212,.35) 0%, transparent 70%);
}
.banner-glow2 {
  position: absolute; left: 30%; bottom: -60px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(192,35,29,.2) 0%, transparent 70%);
}
.banner-content {
  position: relative; z-index: 2;
  padding: 0 32px;
  display: flex; align-items: center; gap: 24px;
}
.banner-logo-wrap {
  background: rgba(255,255,255,.95);
  border-radius: 12px; padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  flex-shrink: 0;
}
.banner-logo-wrap img { height: 52px; }
.banner-logo-text { font-family: var(--cond); font-size: 26px; font-weight: 700; color: var(--navy); }
.banner-text { color: #fff; }
.banner-tag {
  display: inline-block;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.9); font-size: 10px; font-family: var(--mono);
  letter-spacing: 1.5px; padding: 3px 10px; border-radius: 3px;
  margin-bottom: 8px;
}
.banner-title {
  font-family: var(--cond); font-size: 32px; font-weight: 700;
  line-height: 1.1; margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.banner-sub { font-size: 13px; color: rgba(255,255,255,.7); }
.banner-stats {
  margin-left: auto; display: flex; gap: 20px; flex-shrink: 0;
}
.bstat { text-align: center; }
.bstat .n { font-family: var(--cond); font-size: 28px; font-weight: 700; color: #fff; line-height: 1; }
.bstat .l { font-size: 10px; color: rgba(255,255,255,.6); letter-spacing: 1px; margin-top: 2px; }
.bstat-sep { width: 1px; background: rgba(255,255,255,.2); }

/* -- PROMO -- */
.promo-bar {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: flex; justify-content: space-around; flex-wrap: wrap; gap: 8px;
}
.promo-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text2); }
.promo-item i { font-size: 18px; color: var(--blue); }
.promo-item strong { color: var(--text); }

/* -- HOME SECTION -- */
.section { padding: 28px 24px; }
.section-title {
  font-family: var(--cond); font-size: 16px; font-weight: 600;
  color: var(--navy); letter-spacing: .5px; text-transform: uppercase;
  margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}
.section-title::after { content: ''; flex: 1; height: 2px; background: var(--border); }
.section-title span { color: var(--blue); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);  /* 5 tarjetas por fila */
  gap: 10px;
}
@media (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 850px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
.cat-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 8px; padding: 14px 16px;
  cursor: pointer; transition: all .15s;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow);
}
.cat-card:hover { border-color: var(--blue); box-shadow: var(--shadow2); transform: translateY(-1px); }
.cat-icon { font-size: 22px; color: var(--blue); flex-shrink: 0; }
.cat-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  word-break: break-word;
  min-height: 32px;
  display: flex;
  align-items: center;
}
.cat-count { font-size: 10px; color: var(--text3); font-family: var(--mono); margin-top: 2px; }

/* -- CATALOG LAYOUT -- */
.catalog-layout { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 140px); }

.sidebar {
  background: var(--bg-side); border-right: 1px solid var(--border);
  padding: 16px; overflow-y: auto;
  max-height: calc(100vh - 140px);
  position: sticky; top: 58px;
}
.sidebar-title {
  font-size: 10px; font-family: var(--mono); color: var(--text3);
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 8px; padding: 0 4px;
}
.sidebar-list { list-style: none; }
.sidebar-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 4px;
  font-size: 11.5px; color: var(--text2);
  cursor: pointer; transition: all .12s;
  border-bottom: 1px dashed rgba(0,0,0,0.08);
}
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item:hover { background: var(--bg); color: var(--text); }
.sidebar-item.active { background: #EBF2FC; color: var(--blue); font-weight: 600; }
.sidebar-item .cnt { font-family: var(--mono); font-size: 10px; color: var(--text3); }
.sidebar-item.active .cnt { color: var(--blue2); }

/* -- PRODUCTS AREA -- */
.products-area { padding: 16px 20px; background: var(--bg); }
.toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.result-info { font-size: 13px; color: var(--text2); flex: 1; }
.result-info strong { color: var(--text); }

/* -- FAMILY HEADER -- */
.family-header {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 5px; padding: 8px 14px;
  font-family: var(--cond); font-size: 13px; font-weight: 600;
  color: var(--navy); letter-spacing: .5px;
  margin: 16px 0 8px;
}
.family-header:first-child { margin-top: 0; }

/* -- PRODUCT TABLE -- */
.prod-table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); }
.prod-table thead th {
  background: var(--navy);
  color: rgba(255,255,255,.85);
  padding: 10px 14px; text-align: left;
  font-size: 10px; font-weight: 600; letter-spacing: 1px;
  font-family: var(--mono); text-transform: uppercase;
}
.prod-table tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
.prod-table tbody tr:last-child { border-bottom: none; }
.prod-table tbody tr:hover { background: #F0F6FF; }
.prod-table td { padding: 9px 14px; }
.td-code { font-family: var(--mono); font-size: 12px; color: var(--blue); font-weight: 600; white-space: nowrap; }
.td-name { color: var(--text); }
.td-fam { font-size: 11px; color: var(--text3); }
.td-btn {
  background: none; border: 1.5px solid var(--border2);
  color: var(--text2); border-radius: 5px;
  padding: 5px 12px; font-size: 11px; cursor: pointer;
  font-family: var(--sans); font-weight: 500; white-space: nowrap;
  transition: all .15s;
}
.td-btn:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* -- VIEW TOGGLE -- */
.view-toggle { display: flex; gap: 4px; }
.view-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 5px;
  border: 1.5px solid var(--border2); background: #fff;
  color: var(--text3); font-size: 12px; cursor: pointer;
  font-family: var(--sans); transition: all .15s;
}
.view-btn:hover { background: var(--bg); color: var(--text); }
.view-btn.vb-active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* -- PRODUCT GRID VIEW -- */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-bottom: 4px;
}
.prod-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  transition: all .15s; box-shadow: var(--shadow);
  cursor: default;
}
.prod-card:hover { border-color: var(--blue); box-shadow: var(--shadow2); transform: translateY(-2px); }
.pc-code {
  font-family: var(--mono); font-size: 12px;
  color: var(--blue); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.pc-name {
  font-size: 12px; color: var(--text); line-height: 1.5; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.pc-meta {
  font-size: 10px; color: var(--text2);
  margin: 4px 0 2px;
}
.pc-meta-item { display: flex; gap: 6px; align-items: baseline; margin-bottom: 2px; white-space: nowrap; overflow: hidden; }
.pc-meta-lbl { font-size: 9px; color: var(--text3); text-transform: uppercase; font-weight: 700; min-width: 42px; flex-shrink: 0; }
.pc-meta-item span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-cantmin {
  font-size: 11px; color: #B45309;
  background: #FEF3C7; border-radius: 10px;
  padding: 2px 8px; margin: 3px 0;
  display: inline-block; font-weight: 500;
}
.pc-fam {
  font-size: 10px; color: var(--text3); font-family: var(--mono);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-top: 4px; border-top: 1px solid var(--border);
}
.pc-btn {
  background: var(--blue); color: #fff; border: none;
  border-radius: 6px; padding: 8px; font-size: 12px;
  cursor: pointer; font-family: var(--sans); font-weight: 500;
  text-align: center; transition: background .15s;
}
.pc-btn:hover { background: var(--blue2); }

/* -- QUOTE FORM -- */
.contact-wrap { max-width: 780px; margin: 32px auto; padding: 0 24px; }
.contact-header { margin-bottom: 24px; }
.contact-header h2 { font-family: var(--cond); font-size: 26px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.contact-header p { font-size: 13px; color: var(--text2); line-height: 1.7; }

.form-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 24px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.form-card h3 { font-family: var(--cond); font-size: 16px; font-weight: 600; color: var(--navy); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.form-card h3 i { color: var(--blue); font-size: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-row.full { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 11px; color: var(--text2); font-weight: 600; letter-spacing: .3px; }
.form-group input, .form-group select, .form-group textarea {
  background: var(--bg); border: 1.5px solid var(--border2);
  border-radius: 6px; padding: 9px 12px;
  color: var(--text); font-size: 13px; font-family: var(--sans); outline: none;
  transition: border-color .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--blue); background: #fff; }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text3); }
.form-group textarea { resize: vertical; min-height: 80px; }

.quote-items { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.quote-items th {
  background: var(--navy); color: rgba(255,255,255,.8);
  padding: 8px 12px; text-align: left;
  font-size: 10px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .8px;
}
.quote-items td { border: 1px solid var(--border); padding: 0; }
.quote-items td input {
  width: 100%; background: transparent; border: none;
  padding: 8px 12px; color: var(--text); font-size: 12px; font-family: var(--sans); outline: none;
}
.quote-items td input:focus { background: #F0F6FF; }
.btn-add-row {
  background: none; border: 1.5px dashed var(--border2);
  color: var(--text3); padding: 7px 14px; border-radius: 5px;
  font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all .15s;
}
.btn-add-row:hover { border-color: var(--blue); color: var(--blue); }
.btn-remove { background: none; border: none; color: var(--text3); cursor: pointer; padding: 6px 10px; font-size: 14px; }
.btn-remove:hover { color: var(--red); }
.btn-submit {
  width: 100%; background: var(--blue); color: #fff; border: none;
  padding: 14px; border-radius: 8px; font-size: 15px; font-weight: 600;
  cursor: pointer; font-family: var(--cond); letter-spacing: .5px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s;
}
.btn-submit:hover { background: var(--blue2); }
.form-note { font-size: 11px; color: var(--text3); text-align: center; margin-top: 10px; line-height: 1.6; }

/* -- CONTACT -- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.info-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px; box-shadow: var(--shadow); }
.info-card h4 { font-size: 10px; font-family: var(--mono); color: var(--text3); letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 14px; }
.info-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.info-row i { font-size: 18px; color: var(--blue); flex-shrink: 0; margin-top: 1px; }
.info-row .val { font-size: 13px; color: var(--text); line-height: 1.6; }
.info-row .val small { display: block; color: var(--text3); font-size: 11px; }
.wsp-btn {
  display: flex; align-items: center; gap: 8px; background: #25D366; color: #fff;
  border: none; border-radius: 6px; padding: 10px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; margin-top: 8px; width: 100%; justify-content: center;
}

/* -- PAGINATION -- */
.pagination { display: flex; gap: 4px; margin: 16px 0; justify-content: center; flex-wrap: wrap; }
.pg-btn {
  min-width: 32px; height: 32px; border-radius: 5px;
  border: 1.5px solid var(--border2); background: #fff;
  color: var(--text2); font-size: 12px; cursor: pointer;
  font-family: var(--mono); padding: 0 8px;
  transition: all .12s;
}
.pg-btn:hover { background: var(--bg); color: var(--text); border-color: var(--blue); }
.pg-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* -- FOOTER -- */
footer {
  background: var(--navy); color: rgba(255,255,255,.8);
  padding: 32px 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px;
  margin-top: 20px;
}
.foot-brand .logo-txt { font-family: var(--cond); font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.foot-brand p { font-size: 11px; color: rgba(255,255,255,.5); line-height: 1.8; max-width: 240px; }
.foot-col h5 { font-size: 10px; font-family: var(--mono); color: rgba(255,255,255,.4); letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 10px; }
.foot-col a { display: block; font-size: 12px; color: rgba(255,255,255,.6); margin-bottom: 7px; cursor: pointer; }
.foot-col a:hover { color: #fff; }
.foot-bottom {
  background: rgba(0,0,0,.25); border-top: 1px solid rgba(255,255,255,.1);
  padding: 10px 24px; display: flex; justify-content: space-between;
  font-size: 11px; color: rgba(255,255,255,.4);
}

/* -- NOTIFICATION -- */
.notif {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--green); color: #fff; border-radius: 8px; padding: 12px 18px;
  font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  transform: translateY(80px); opacity: 0; transition: all .3s; z-index: 999;
}
.notif.show { transform: translateY(0); opacity: 1; }

/* -- WHATSAPP FLOTANTE -- */
.wsp-float {
  position: fixed; bottom: 90px; right: 22px;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.45);
  cursor: pointer; z-index: 500; border: none;
  text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.wsp-float:hover { transform: scale(1.08); box-shadow: 0 6px 22px rgba(37,211,102,.55); }
.wsp-float i { font-size: 28px; }
@media (max-width: 600px) {
  .wsp-float { width: 50px; height: 50px; right: 16px; bottom: 84px; }
  .wsp-float i { font-size: 24px; }
}

/* -- INFORMACION TECNICA -- */
.infotec-wrap { max-width: 900px; margin: 0 auto; padding: 24px 20px 60px; }
.infotec-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-bottom:6px; }
.infotec-header h2 { font-family: var(--cond); font-size: 26px; font-weight: 700; color: var(--navy); }
.btn-volver-inicio { display:inline-flex; align-items:center; gap:6px; padding:8px 16px; background:var(--bg); border:1.5px solid var(--border2); border-radius:7px; color:var(--text2); font-size:13px; font-weight:600; cursor:pointer; font-family:var(--sans); }
.infotec-sub { color: var(--text2); font-size: 13px; margin-bottom: 32px; }
.infotec-item {
  display:flex; align-items:center; gap:14px; background:#fff; border:1px solid var(--border);
  border-radius:8px; padding:18px 20px; margin-bottom:18px; transition: border-color .15s, box-shadow .15s;
}
.infotec-item:hover { border-color: var(--blue); box-shadow: var(--shadow2); }
.infotec-icon { font-size:24px; color:#C0231D; flex-shrink:0; }
.infotec-info { flex:1; min-width:0; }
.infotec-titulo { font-family: var(--cond); font-size: 20px; font-weight: 700; color:#111; letter-spacing:.2px; }
.infotec-btn {
  display:inline-flex; align-items:center; gap:6px; background:#C0231D; color:#fff; border:none;
  padding:8px 16px; border-radius:6px; font-size:12.5px; font-weight:700; cursor:pointer; text-decoration:none; flex-shrink:0;
}
.infotec-btn:hover { background:#9E1B16; }
.infotec-empty { text-align:center; color:var(--text3); padding:40px 0; font-size:13px; }

/* -- NOVEDADES: grilla de tarjetas -- */
.novedad-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap:18px; }
.novedad-card {
  background:#fff; border:1px solid var(--border); border-radius:10px; overflow:hidden;
  cursor:pointer; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.novedad-card:hover { border-color: var(--blue); box-shadow: var(--shadow2); transform: translateY(-2px); }
.novedad-thumb-wrap { position:relative; width:100%; aspect-ratio: 16/10; background:#F4F6F9; overflow:hidden; }
.novedad-thumb-wrap img { width:100%; height:100%; object-fit:cover; display:block; }
.novedad-video-thumb {
  width:100%; height:100%; display:flex; align-items:center; justify-content:center;
  background: var(--navy); color:#fff; font-size:30px;
}
.novedad-pages-badge {
  position:absolute; bottom:8px; right:8px; background:rgba(15,42,74,.85); color:#fff;
  font-size:11px; font-weight:700; padding:3px 8px; border-radius:5px;
}
.novedad-body { padding:14px 16px; }
.novedad-titulo { font-family: var(--cond); font-size:17px; font-weight:700; color:#111; line-height:1.25; }

/* -- NOVEDADES: visor (lightbox) -- */
.nov-overlay {
  position: fixed; inset: 0; background: rgba(15,42,74,.9); z-index: 9998;
  display: flex; align-items: center; justify-content: center; animation: qtyFadeIn .15s ease-out;
}
.nov-modal { position:relative; max-width:90vw; max-height:90vh; display:flex; flex-direction:column; align-items:center; }
.nov-modal img { max-width:88vw; max-height:72vh; object-fit:contain; border-radius:8px; box-shadow:0 8px 32px rgba(0,0,0,.4); background:#fff; }
.nov-modal video { max-width:88vw; max-height:72vh; border-radius:8px; box-shadow:0 8px 32px rgba(0,0,0,.4); background:#000; }
.nov-close {
  position:absolute; top:-44px; right:0; background:rgba(255,255,255,.12); border:none; color:#fff;
  font-size:18px; width:34px; height:34px; border-radius:50%; cursor:pointer; line-height:1;
}
.nov-close:hover { background:rgba(255,255,255,.25); }
.nov-arrow {
  position:absolute; top:50%; transform:translateY(-50%); background:rgba(255,255,255,.15); border:none;
  color:#fff; font-size:22px; width:44px; height:44px; border-radius:50%; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.nov-arrow:hover { background:rgba(255,255,255,.3); }
.nov-arrow-prev { left:-58px; }
.nov-arrow-next { right:-58px; }
.nov-counter { color:#fff; font-size:12px; margin-top:12px; opacity:.85; }
.nov-pdf-btn {
  display:inline-flex; align-items:center; gap:6px; background:#C0231D; color:#fff; border:none;
  padding:9px 18px; border-radius:6px; font-size:13px; font-weight:700; cursor:pointer; text-decoration:none; margin-top:14px;
}
.nov-pdf-btn:hover { background:#9E1B16; }
@media (max-width: 700px) {
  .nov-arrow-prev { left:6px; }
  .nov-arrow-next { right:6px; }
  .nov-arrow { width:38px; height:38px; font-size:18px; background:rgba(0,0,0,.45); }
  .nov-close { top:6px; right:6px; background:rgba(0,0,0,.45); }
}

/* -- DESTACADOS -- */
.destacados-section {
  background: linear-gradient(135deg, #FFF8F0 0%, #FFF1E6 100%);
  padding: 26px 0 30px;
  border-top: 1px solid #FBE4CC;
  border-bottom: 1px solid #FBE4CC;
}
.destacados-head {
  max-width: 1280px; margin: 0 auto 14px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.destacados-title {
  font-family: var(--cond); font-size: 22px; font-weight: 700; color: var(--navy);
  display: flex; align-items: center; gap: 8px;
}
.destacados-title i { color: #C0231D; font-size: 23px; }
.destacados-arrows { display: flex; gap: 8px; }
.dest-arrow {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #E8D5C0; background: #fff;
  color: var(--navy); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.dest-arrow:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.destacados-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth;
  padding: 4px 24px 8px; max-width: 1280px; margin: 0 auto; scrollbar-width: thin;
  justify-content: flex-start;
  scroll-snap-type: x mandatory; scroll-padding-left: 24px;
}
.destacados-track.centrado { justify-content: center; }
.destacados-track::-webkit-scrollbar { height: 6px; }
.destacados-track::-webkit-scrollbar-thumb { background: #E8D5C0; border-radius: 3px; }
.dest-card {
  flex: 0 0 210px; background: #fff; border-radius: 12px; border: 1px solid var(--border);
  overflow: hidden; cursor: pointer; position: relative; transition: transform .15s, box-shadow .15s;
  scroll-snap-align: start;
}
.dest-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,.13); }
.dest-ribbon {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  background: #C0231D; color: #fff; font-size: 13px; font-weight: 700;
  text-align: center; padding: 7px 10px; line-height: 1.3;
  white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.dest-img-wrap {
  width: 100%; aspect-ratio: 1/1; background: #F4F6F9; display: flex; position: relative;
  align-items: center; justify-content: center; overflow: hidden;
}
.dest-img-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.dest-banner-bottom {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  background: rgba(15,42,74,.9); color: #fff; font-size: 12.5px; font-weight: 700;
  text-align: center; padding: 6px 8px; line-height: 1.3;
  white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.dest-body { padding: 12px 14px 14px; }
.dest-nombre { font-size: 13px; color: var(--navy); font-weight: 600; line-height: 1.3; min-height: 34px; margin-bottom: 6px; text-align: justify; text-justify: inter-word; }
.dest-codigo { font-family: monospace; font-size: 11px; color: var(--text2); margin-bottom: 6px; }
.dest-precios { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dest-precio-ant { font-size: 12px; color: var(--text3); text-decoration: line-through; font-family: monospace; }
.dest-precio-actual { font-size: 17px; font-weight: 700; color: var(--green); font-family: monospace; }
.dest-ahorro { font-size: 10.5px; font-weight: 700; color: #fff; background: var(--green); padding: 2px 7px; border-radius: 4px; }
.dest-btn-cart {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 10px; background: var(--green, #1A8F5C); color: #fff;
  border: none; border-radius: 6px; padding: 8px 10px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: var(--sans); transition: background .15s;
}
.dest-btn-cart:hover { background: #22A86E; }
.dest-btn-cart i { font-size: 14px; }
.dest-titulo-banner { font-size: 13px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.font-oswald   { font-family: 'Oswald', sans-serif; }
.font-anton    { font-family: 'Anton', sans-serif; letter-spacing: .5px; }
.font-bebas    { font-family: 'Bebas Neue', sans-serif; letter-spacing: .5px; }
.font-pacifico { font-family: 'Pacifico', cursive; }
.font-verdana  { font-family: Verdana, sans-serif; }
.font-wolfsrain  { font-family: 'WolfsRain', sans-serif; letter-spacing: .5px; }
.font-onewayoflife { font-family: 'OneWayOfLife', cursive; }
.font-comiccustom  { font-family: 'Comic Neue', sans-serif; font-weight: 700; }
.font-mystical   { font-family: 'Mystical', sans-serif; letter-spacing: .5px; }
@media (max-width: 700px) {
  .dest-card { flex: 0 0 160px; }
  .destacados-title { font-size: 18px; }
  .destacados-head { padding: 0 16px; }
  .destacados-track { padding: 4px 16px 8px; scroll-padding-left: 16px; }
}

/* -- HERO BUTTONS -- */
.btn-primary { background: var(--blue); color: #fff; border: none; padding: 11px 22px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--sans); }
.btn-primary:hover { background: var(--blue2); }
.btn-outline { background: rgba(255,255,255,.1); color: #fff; border: 1.5px solid rgba(255,255,255,.4); padding: 11px 22px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-outline:hover { background: rgba(255,255,255,.2); }
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* -- RESPONSIVE -- */
@media (max-width: 900px) {
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  footer { grid-template-columns: 1fr 1fr; }
  .catalog-layout { grid-template-columns: 1fr; }
  .sidebar { max-height: none; position: static; }
}
@media (max-width: 600px) {
  .prod-grid { grid-template-columns: 1fr; }
  .banner-stats { display: none; }
  .banner-title { font-size: 22px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; }
}

/* Familia as first column */
.td-fam-col { font-size:11px; color:var(--text2); font-weight:500; line-height:1.3; }
.photo-cell { width:54px; text-align:center; padding:6px 8px !important; }

/* -- PRODUCT PHOTO in grid card -- */
.pc-img {
  position: relative;
  height: 110px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.pc-img img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: 4px;
}
.pc-img-empty {
  position: relative;
  height: 110px;
  border-radius: 6px;
  border: 1px dashed var(--border2);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); font-size: 28px;
  margin-bottom: 4px;
}
.pc-img-empty::after { content: '\1F4F7'; }
.pc-pdf-badge {
  position: absolute; bottom: 5px; right: 5px;
  background: #FEF3C7; border: 1px solid #FCD34D; color: #92400E;
  border-radius: 4px; padding: 2px 6px; font-size: 10px;
  font-weight: 700; text-decoration: none; font-family: var(--mono);
  z-index: 2;
}
.pc-pdf-badge:hover { background: #FCD34D; }

.td-thumb { text-align:center; padding:4px 6px !important; width:52px; }
.thumb-img {
  width:42px; height:42px; object-fit:contain;
  border-radius:4px; cursor:pointer;
  border:1px solid var(--border);
  transition:transform .15s;
}
.thumb-img:hover { transform:scale(1.1); }
.thumb-empty {
  width:42px; height:42px;
  border:1px dashed var(--border2);
  border-radius:5px;
  display:flex; align-items:center; justify-content:center;
  color:var(--text3); font-size:16px; margin:auto;
}

/* -- PRECIO AR$ en grilla -- */
.pc-price {
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  color: var(--blue); text-align: center;
  padding: 4px 0; border-top: 1px solid var(--border);
  margin-top: 2px;
}

/* -- SUB-GRUPOS sidebar -- */
.sg-list {
  list-style: none;
  margin: 4px 0 4px 8px;
  border-left: 2px solid var(--blue);
  padding-left: 0;
}
.sg-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 4px;
  font-size: 11px; color: var(--text2);
  cursor: pointer; transition: all .12s;
  line-height: 1.3;
}
.sg-item:hover { background: var(--bg); color: var(--text); }
.sg-item.sg-active {
  background: rgba(26,94,168,.12);
  color: var(--blue); font-weight: 600;
}
.sg-arrow {
  font-size: 9px; color: var(--text3);
  margin-left: 4px; flex-shrink: 0;
  transition: transform .15s;
}

/* Sub-group indicator on home cards */
.cat-sg-hint {
  font-size: 9px; color: var(--blue);
  font-family: var(--mono); letter-spacing: .3px;
  margin-top: 1px;
}

/* Sub-group banner in catalog */
.sg-banner {
  background: rgba(26,94,168,.08);
  border: 1px solid rgba(26,94,168,.2);
  border-left: 4px solid var(--blue);
  border-radius: 5px; padding: 8px 14px;
  margin-bottom: 12px;
  font-size: 12px; color: var(--blue); font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}


/* -- BREADCRUMB -- */
.breadcrumb {
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 12px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  color: var(--text2);
}
.breadcrumb a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .bc-sep {
  color: var(--text3);
  font-size: 11px;
  margin: 0 1px;
}
.breadcrumb .bc-current {
  color: var(--text);
  font-weight: 700;
}

/* -- BRANDS PANEL -- */
.brands-title {
  margin-top: 18px !important;
  padding-top: 14px !important;
  border-top: 1px solid var(--border) !important;
}
.brands-list .sidebar-item {
  font-size: 11px;
  padding: 5px 10px;
  text-transform: none;
  letter-spacing: 0;
}
.brand-empty {
  font-size: 11px; color: var(--text3);
  font-style: italic; padding: 6px 10px;
}


/* -- Family with sub-groups: vertical layout -- */
.sidebar-item.has-subgroups {
  display: block !important;
  padding: 0 !important;
}
.sidebar-item.has-subgroups .si-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .12s;
}
.sidebar-item.has-subgroups.active .si-row,
.sidebar-item.has-subgroups .si-row:hover {
  background: rgba(26,94,168,.08);
}
.sidebar-item.has-subgroups.active .si-row .si-name {
  color: var(--blue);
  font-weight: 700;
}
.si-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-item.has-subgroups .sg-list {
  width: 100%;
}


/* -- SIDEBAR v2.9: ancho, font chico, separadores -- */
.sidebar {
  width: 230px !important;
  min-width: 230px;
}
.sidebar-list {
  font-size: 11.5px;
}
.sidebar-item {
  padding: 6px 8px;
  font-size: 11.5px;
  border-bottom: 1px dashed rgba(0,0,0,0.08);
  border-radius: 0;
}
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item.has-subgroups {
  border-bottom: 1px dashed rgba(0,0,0,0.08);
}
.sidebar-item.has-subgroups .si-row {
  padding: 6px 8px;
  border-radius: 0;
}
.sg-arrow {
  font-size: 8px;
  color: var(--text3);
  margin-right: 4px;
  flex-shrink: 0;
  transition: transform .15s;
  display: inline-block;
  width: 10px;
}
.sg-list {
  margin: 2px 0 4px 16px !important;
  padding-left: 4px !important;
  border-left: 2px solid var(--blue);
}
.sg-item {
  padding: 5px 8px !important;
  font-size: 10.5px !important;
  line-height: 1.25 !important;
  border-bottom: 1px dotted rgba(0,0,0,0.05);
}
.sg-item:last-child { border-bottom: none; }
.sg-item span {
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* -- SIDEBAR SUB-GRUPOS (v2.10 - clean) -- */
/* Family with sub-groups: must be display:block so children stack vertically */
.sidebar-item.has-subgroups {
  display: block;
  padding: 0;
  border-bottom: 1px dashed rgba(0,0,0,0.08);
  border-radius: 0;
}
/* The family row inside has-subgroups (where arrow + name go) */
.sidebar-item.has-subgroups > .si-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .12s;
}
.sidebar-item.has-subgroups > .si-row:hover {
  background: rgba(26,94,168,.06);
}
.sidebar-item.has-subgroups.active > .si-row {
  background: rgba(26,94,168,.10);
}
.sidebar-item.has-subgroups.active > .si-row .si-name {
  color: var(--blue);
  font-weight: 700;
}
/* Family name */
.si-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Accordion arrow */
.sg-arrow {
  font-size: 8px;
  color: var(--text3);
  width: 10px;
  flex-shrink: 0;
  display: inline-block;
}
/* The sub-group ul - MUST be display:block and full width */
.sg-list {
  display: block;
  list-style: none;
  margin: 2px 0 4px 18px;
  padding: 0;
  border-left: 2px solid var(--blue);
}
/* Each sub-group item */
.sg-item {
  display: flex;
  align-items: center;
  padding: 5px 8px;
  font-size: 10.5px;
  line-height: 1.2;
  color: var(--text2);
  cursor: pointer;
  border-radius: 0;
  transition: background .12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sg-item:hover { background: rgba(26,94,168,.06); }
.sg-item.sg-active {
  background: rgba(26,94,168,.12);
  color: var(--blue);
  font-weight: 700;
}
/* Brand panel title */
.brands-title {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
/* Brand items */
.brands-list .sidebar-item {
  font-size: 11px;
  padding: 5px 8px;
}
.brand-empty {
  font-size: 11px; color: var(--text3);
  font-style: italic; padding: 6px 10px;
}
/* Home page sub-group hint */
.cat-sg-hint {
  font-size: 9px; color: var(--blue);
  font-family: var(--mono); letter-spacing: .3px;
  margin-top: 1px;
}
/* Breadcrumb */
.breadcrumb {
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 12px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  color: var(--text2);
}
.breadcrumb a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .bc-sep { color: var(--text3); font-size: 11px; }
.breadcrumb .bc-current { color: var(--text); font-weight: 700; }

/* -- CARRITO -- */
.td-btn-cart {
  background: var(--green, #1A8F5C);
  border: 1.5px solid var(--green, #1A8F5C);
  color: #fff;
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 13px;
  cursor: pointer;
  margin-left: 4px;
  vertical-align: middle;
}
.td-btn-cart:hover { background: #22A86E; border-color: #22A86E; }
.td-btn-cart i { font-size: 14px; }

.pc-btn-cart {
  background: var(--green, #1A8F5C);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: background .15s;
}
.pc-btn-cart:hover { background: #22A86E; }
.pc-btn-cart i { vertical-align: middle; }

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.cart-badge {
  position: absolute;
  top: -4px; right: -8px;
  background: #C0231D;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 14px;
  text-align: center;
  display: none;
  align-items: center;
  justify-content: center;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 16px;
}
.cart-table th {
  background: #F4F6F9;
  padding: 10px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  color: #4A5568;
  border-bottom: 1px solid #DDE3EC;
}
.cart-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #F0F3F7;
  vertical-align: middle;
}
.cart-table tfoot td {
  border-top: 2px solid #1A5EA8;
  border-bottom: none;
}
.btn-remove {
  background: none;
  border: 1px solid #DDE3EC;
  color: #C0231D;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 13px;
}
.btn-remove:hover { background: #FEE2E2; border-color: #C0231D; }


/* === No footer en /cart y /checkout === */
body.no-footer footer,
body.no-footer .footer-bottom { display: none !important; }

/* === Botones del carrito - 3 niveles === */
.cart-actions {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
/* Nivel 1: chicos (mitad del grande) */
.cart-actions-l1 {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.cart-actions-l1 button {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  border: 1.5px solid var(--blue, #1A5EA8);
  background: #fff;
  color: var(--blue, #1A5EA8);
  transition: background .15s;
}
.cart-actions-l1 button:hover { background: #EBF2FC; }
/* Nivel 2: grande (tamano estandar) */
.cart-actions-l2 {
  text-align: right;
  margin-bottom: 10px;
}
.cart-actions-l2 button {
  padding: 11px 28px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  background: var(--green, #1A8F5C);
  color: #fff;
  transition: background .15s;
}
.cart-actions-l2 button:hover { background: #22A86E; }
/* Nivel 3: chico rojo */
.cart-actions-l3 {
  text-align: right;
}
.cart-actions-l3 button {
  background: #C0231D;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 11px;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
}
.cart-actions-l3 button:hover { background: #DC2626; }

/* === Checkout placeholder === */
.checkout-summary {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 14px;
}
.checkout-totals {
  background: #F4F6F9;
  border-radius: 8px;
  padding: 16px;
  margin-top: 14px;
}


/* === Modal detalle de producto === */
.det-overlay {
  position: fixed; inset: 0;
  background: rgba(15,42,74,0.6);
  z-index: 9997;
  display: flex; align-items: center; justify-content: center;
  animation: qtyFadeIn .15s ease-out;
}
.det-modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px 22px 20px;
  width: 320px;
  max-width: 94vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
  position: relative;
  outline: none;
}
.det-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 16px;
  color: #8A9BB0; cursor: pointer; line-height: 1;
}
.det-close:hover { color: #C0231D; }
.det-foto { text-align: center; margin-bottom: 14px; }
.det-foto img { max-width: 180px; max-height: 140px; object-fit: contain; border-radius: 6px; border: 1px solid #EBF2FC; }
.det-codigo { font-size: 17px; font-weight: 700; color: #1A5EA8; font-family: monospace; margin-bottom: 4px; }
.det-nombre { font-size: 13px; color: #0F2A4A; margin-bottom: 2px; line-height: 1.4; }
.det-familia { font-size: 11px; color: #8A9BB0; margin-bottom: 12px; }
.det-divider { border: none; border-top: 1px solid #EBF2FC; margin: 10px 0; }
.det-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid #F4F6F9; }
.det-lbl { font-size: 11px; color: #8A9BB0; text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
.det-val { font-size: 13px; color: #0F2A4A; font-weight: 500; text-align: right; }
.det-cantmin { color: #B45309; background: #FEF3C7; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.det-precio { font-size: 15px; font-weight: 700; color: #1A5EA8; font-family: monospace; }
.det-iva { font-size: 10px; color: #8A9BB0; font-weight: 400; font-family: sans-serif; margin-left: 3px; }
.det-ds { display: block; margin-top: 14px; text-align: center; color: #C0231D; text-decoration: none; font-size: 12px; font-weight: 600; }
.det-ds:hover { text-decoration: underline; }
.code-link { color: #1A5EA8; text-decoration: none; font-weight: 600; cursor: pointer; }
.code-link:hover { text-decoration: underline; }


/* === Modal cantidad al agregar al carrito === */
.qty-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 42, 74, 0.55);
  z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  animation: qtyFadeIn .15s ease-out;
}
@keyframes qtyFadeIn { from { opacity: 0; } to { opacity: 1; } }
.qty-modal {
  background: #fff;
  border-radius: 12px;
  padding: 22px 24px;
  width: 320px;
  max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.qty-modal h4 {
  font-size: 14px; color: #0F2A4A; margin-bottom: 4px;
  font-family: var(--sans);
}
.qty-modal .code {
  font-family: monospace; color: #1A5EA8; font-weight: 700;
  font-size: 13px; margin-bottom: 4px;
}
.qty-modal .desc {
  font-size: 12px; color: #4A5568; margin-bottom: 16px;
  line-height: 1.4;
}
.qty-modal .qty-row {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin: 18px 0;
}
.qty-modal .qty-btn {
  width: 36px; height: 36px; border-radius: 6px;
  border: 1.5px solid #DDE3EC; background: #fff;
  font-size: 18px; font-weight: 700; cursor: pointer;
  color: #1A5EA8; transition: background .12s;
}
.qty-modal .qty-btn:hover { background: #EBF2FC; }
.qty-modal .qty-input {
  width: 70px; text-align: center;
  padding: 8px; font-size: 16px; font-weight: 700;
  border: 1.5px solid #DDE3EC; border-radius: 6px;
  font-family: var(--sans);
}
.qty-modal .qty-input:focus { border-color: #1A5EA8; outline: none; }
.qty-modal .actions {
  display: flex; gap: 8px; margin-top: 14px;
}
.qty-modal .btn-cancel {
  flex: 1; padding: 9px; background: #F4F6F9; color: #4A5568;
  border: 1px solid #DDE3EC; border-radius: 5px; cursor: pointer;
  font-weight: 600; font-size: 12px; font-family: var(--sans);
}
.qty-modal .btn-cancel:hover { background: #EBF2FC; }
.qty-modal .btn-add {
  flex: 2; padding: 9px; background: #1A8F5C; color: #fff;
  border: none; border-radius: 5px; cursor: pointer;
  font-weight: 700; font-size: 12px; font-family: var(--sans);
}
.qty-modal .btn-add:hover { background: #22A86E; }
.qty-modal .qty-min-info {
  text-align: center;
  font-size: 12px;
  color: #666;
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-radius: 4px;
  padding: 4px 8px;
  margin: 4px 0 6px;
}
.qty-modal .qty-precio {
  text-align: center;
  font-size: 13px;
  font-family: monospace;
  color: #1A5EA8;
  margin: 2px 0 4px;
}

/* ================================================================
   MOBILE -- CICEM (max-width: 900px)
   Un solo bloque consolidado. No duplicar reglas aqui.
================================================================ */
@media (max-width: 900px) {

  /* -- Topbar: una linea por item, compacto -- */
  .topbar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0 !important;
    gap: 0 !important;
  }
  .topbar-left {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }
  .topbar-left .topbar-row-2 {
    display: flex !important;
    flex-direction: row !important;
    border-bottom: 1px solid rgba(255,255,255,.08);
    align-items: center;
  }
  .topbar-left .topbar-row-2 .topbar-item {
    border-bottom: none !important;
    flex: 1;
    white-space: nowrap !important;
    overflow: hidden;
    font-size: 10px !important;
  }
  .topbar-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 5px 12px !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    gap: 8px !important;
  }
  .topbar > .topbar-item {
    background: rgba(255,255,255,.04) !important;
    border-bottom: none !important;
  }
  .topbar-item i {
    font-size: 13px !important;
    color: rgba(255,255,255,.55) !important;
    width: 16px !important;
    flex-shrink: 0 !important;
  }
  .topbar-item a {
    color: #93C5FD !important;
    text-decoration: none !important;
  }

  /* -- Navbar 2 lineas -- */
  /* Linea 1: Logo | hamburguesa | carrito */
  /* Linea 2: Buscador 100% ancho */
  .navbar {
    padding: 0;
    flex-wrap: wrap;
    min-height: auto;
    position: sticky; top: 0; z-index: 200;
    gap: 0;
  }
  .nav-logo {
    display: none;
  }
  .nav-logo img { height: 28px; }
  .nav-logo-sub  { display: none !important; }
  .nav-logo-name { display: none !important; }
  .nav-links { display: none; }

  .nav-search {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    border-left: none;
    border-top: 1px solid #E2E8F0;
    margin: 0;
    padding: 5px 12px;
    gap: 8px;
    display: flex;
    align-items: center;
    background: #fff;
  }
  .nav-search input,
  #search-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    flex: 1;
    width: 100%;
    height: 36px;
    background-color: #F1F5F9;
    border: 1.5px solid #CBD5E1;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 13px;
    font-family: Arial, Helvetica, sans-serif;
    color: #1E293B;
    outline: none;
    box-sizing: border-box;
    box-shadow: none;
  }
  #search-input::placeholder {
    color: #94A3B8;
    opacity: 1;
  }
  #search-input:focus {
    border-color: #1A5EA8;
    background-color: #fff;
  }
  .btn-search {
    height: 36px;
    padding: 0 12px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 8px;
  }

  /* -- Botones movil -- */
  .mob-nav-btns {
    display: flex !important;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
    order: 2;
    margin-left: auto;
    padding: 5px 12px 5px 0;
  }
  .mob-btn {
    padding: 6px;
    font-size: 20px;
  }
  /* Botón "Ver catálogo" fijo: fondo azul y cuadraditos en blanco, para
     diferenciarlo claramente de menú/carrito/teléfono (que quedan con el
     estilo por defecto, más neutro). */
  #mob-catalogo-btn {
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 8px;
  }
  .mob-drawer { top: 90px; }

  /* -- Espacio entre navbar y banner -- */
  .promo-bar { display: none !important; }
  #page-home > *:not(.banner):not(.promo-bar) { margin-top: 0 !important; }

  /* -- Banner compacto -- */
  .banner-logo-wrap { display: none !important; }
  .banner-tag {
    display: block !important;
    width: fit-content !important;
    margin: 0 auto 6px auto !important;
    text-align: center !important;
    font-size: 10px;
    letter-spacing: 2px;
    padding: 3px 12px;
    border-radius: 3px;
  }
  .banner { padding: 10px 8px !important; min-height: auto !important; height: auto !important; }
  .banner-bg, .banner-circuit,
  .banner-dots, .banner-glow, .banner-glow2 { display: none; }
  .banner-content {
    padding: 0 !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
    width: 100% !important;
  }
  .banner-text { 
    width: 100% !important; 
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .banner-title {
    font-size: 22px !important;
    line-height: 1.2 !important;
    margin-bottom: 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    text-align: center !important;
    display: block !important;
  }
  .banner-sub {
    font-size: 11px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    text-align: center !important;
  }
  .banner-stats { display: none !important; }
  .hero-btns, .banner-btns {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    width: 100%;
  }
  .hero-btns .btn-primary,
  .hero-btns .btn-outline,
  .banner-btns .btn-primary,
  .banner-btns .btn-outline {
    flex: 1;
    padding: 9px 8px !important;
    font-size: 12px !important;
    text-align: center;
    justify-content: center;
    width: auto !important;
  }

  /* -- Promo bar oculta -- */
  .promo-bar { display: none; }

  /* -- Layout catalogo -- */
  .catalog-layout { grid-template-columns: 1fr !important; }

  /* -- Sidebar como drawer (v3.10 celular: fondo solido, scroll real, encima del overlay) -- */
  .sidebar {
    position: fixed !important;
    top: 0; left: -320px;
    width: 280px !important;
    min-width: 0 !important;
    max-width: 85vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    box-sizing: border-box !important;
    background: #FFFFFF !important;
    z-index: 1200 !important;
    transition: left .25s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,.28);
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-top: 60px;
  }
  .sidebar.mob-open { left: 0 !important; }

  /* -- FABs flotantes -- */
  .mob-cat-btn {
    display: flex;
    position: fixed;
    bottom: 20px; left: 16px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
    align-items: center;
    box-shadow: 0 4px 16px rgba(26,94,168,.4);
    cursor: pointer;
    z-index: 150;
    font-family: var(--sans);
  }
  .mob-cart-fab {
    display: flex;
    position: fixed;
    bottom: 20px; right: 16px;
    background: #1A8F5C;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
    align-items: center;
    box-shadow: 0 4px 16px rgba(26,143,92,.4);
    cursor: pointer;
    z-index: 150;
    font-family: var(--sans);
  }

  /* -- Seccion y titulo -- */
  .section { padding: 12px 12px 8px !important; }
  .section-title { font-size: 14px !important; margin-bottom: 10px !important; }
  .wrap, .section { padding: 16px 12px; }

  /* -- Cards familias -- */
  .cat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .cat-card { padding: 8px 10px; min-height: 60px; }
  .cat-name { font-size: 11px; line-height: 1.3; }
  .cat-icon { font-size: 20px !important; }

  /* -- Tabla productos -> cards mobile -- */
  .prod-table thead { display: none; }
  .prod-table, .prod-table tbody { display: block; width: 100%; }

  /* Cada fila = card */
  .prod-table tbody tr {
    display: grid;
    grid-template-columns: 72px 1fr;
    grid-template-rows: auto auto auto auto;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
  }

  /* Familia - ocultar */
  .prod-table tbody tr td:first-child { display: none; }

  /* Foto - columna izquierda, ocupa filas 1 y 2 */
  .prod-table tbody tr td.td-thumb {
    grid-column: 1;
    grid-row: 1 / 3;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: #F8FAFC;
    border-right: 1px solid #E2E8F0;
  }
  .prod-table tbody tr td.td-thumb img,
  .prod-table tbody tr td.td-thumb .pc-img-empty { 
    width: 52px; height: 52px; 
  }

  /* Codigo - fila 1, columna 2 */
  .prod-table tbody tr td.td-code {
    grid-column: 2;
    grid-row: 1;
    padding: 8px 10px 2px;
    font-size: 13px;
    font-weight: 700;
    color: #1A5EA8;
    font-family: monospace;
  }

  /* Descripcion - fila 2, columna 2 */
  .prod-table tbody tr td.td-name {
    grid-column: 2;
    grid-row: 2;
    padding: 0 10px 8px;
    font-size: 11px;
    color: #374151;
    white-space: normal !important;
    word-break: normal;
    line-height: 1.4;
    border-bottom: 1px solid #E2E8F0;
  }

  /* Precio - fila 3, span 2 columnas */
  .prod-table tbody tr td.td-price,
  .prod-table tbody tr td[style*="right"][style*="monospace"] {
    grid-column: 1 / 3;
    grid-row: 3;
    padding: 6px 10px;
    font-size: 15px;
    font-weight: 700;
    color: #1A5EA8;
    text-align: right !important;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
  }

  /* PDF - fila 4 columna 1 */
  .prod-table tbody tr td:nth-last-child(2) {
    grid-column: 1;
    grid-row: 4;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: #fff;
  }

  /* Botones - fila 4 columna 2 */
  .prod-table tbody tr td:last-child {
    grid-column: 2;
    grid-row: 4;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 10px;
    background: #fff;
  }

  /* -- Paginacion -- */
  .pag { flex-wrap: wrap; gap: 4px; }
  .pag button { padding: 6px 10px; font-size: 12px; }

  /* -- Footer -- */
  footer { padding: 24px 16px; }

  /* -- Drawer menu -- */
  .mob-drawer {
    display: none;
    position: fixed;
    top: 90px; left: 0; right: 0;
    background: var(--bg-card);
    border-bottom: 2px solid var(--blue);
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
    z-index: 201;
    padding: 8px 0;
    animation: slideDown .2s ease;
  }
  .mob-drawer.open { display: block !important; }
  .mob-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1150;
  }
  .mob-sidebar-overlay.open { display: block; }

}
/* Ocultos en desktop (en mobile, el JS controla cada uno con display:flex/none) */
@media (min-width: 901px) {
  .mob-nav-btns,
  .mob-drawer,
  .mob-cat-btn,
  .mob-cart-fab,
  .mob-sidebar-overlay,
  .mobile-only { display: none; }
}

/* -- Sub-rubros siempre en negrita (v3.10) -- */
.sg-item, .sg-item span { font-weight: 700 !important; }

/* -- Feedback momentaneo: subrayado breve al tocar rubro o sub-rubro (v3.12) -- */
.sidebar-item.tap-flash,
.sidebar-item.tap-flash .si-name,
.sg-item.tap-flash,
.sg-item.tap-flash span { text-decoration: underline !important; }

/* -- Celular: boton "Volver al menu anterior" y pantalla de sub-rubros -- */
#mob-back { display: inline-flex; }
.det-back { display: none; }
@media (max-width: 900px) {
  #mob-back {
    display: flex; align-items: center; gap: 8px; width: 100%;
    margin: 0 0 10px; padding: 11px 14px;
    background: #fff; border: 1.5px solid var(--blue, #1A5EA8); border-radius: 8px;
    color: var(--blue, #1A5EA8); font-size: 14px; font-weight: 700;
    font-family: inherit; cursor: pointer; text-align: left;
  }
  #mob-back .mb-arrow { font-size: 18px; line-height: 1; }
  #mob-back:active { background: #EBF2FC; }
  .det-back {
    display: flex; align-items: center; gap: 8px; width: 100%;
    margin: 0 0 10px; padding: 10px 14px;
    background: #fff; border: 1.5px solid var(--blue, #1A5EA8); border-radius: 8px;
    color: var(--blue, #1A5EA8); font-size: 14px; font-weight: 700;
    font-family: inherit; cursor: pointer;
  }
  .sg-landing .cat-card { min-height: 72px; }
  .sg-landing .cat-name { min-height: 0; font-size: 13px; }
  .sg-landing .cat-count { font-size: 11px; }
}

/* -- PC: boton volver y pantalla de sub-rubros mas elegantes -- */
@media (min-width: 901px) {
  #mob-back {
    align-items: center; gap: 8px; margin: 0 0 14px; padding: 8px 16px;
    background: #fff; border: 1.5px solid var(--border2, #C8D3E0); border-radius: 8px;
    color: var(--blue, #1A5EA8); font-size: 13px; font-weight: 700;
    font-family: inherit; cursor: pointer; transition: all .15s;
  }
  #mob-back:hover { border-color: var(--blue, #1A5EA8); background: #EBF2FC; transform: translateX(-2px); }
  #mob-back .mb-arrow { font-size: 16px; line-height: 1; }
  .sg-landing { grid-template-columns: repeat(4, 1fr) !important; gap: 14px !important; margin-top: 14px; }
  .sg-landing .cat-card {
    padding: 20px 18px; min-height: 96px; border-radius: 12px; gap: 14px;
    border: 1.5px solid var(--border); background: linear-gradient(180deg, #fff 0%, #F7FAFE 100%);
  }
  .sg-landing .cat-card:hover { border-color: var(--blue, #1A5EA8); box-shadow: 0 6px 18px rgba(15,42,74,.12); transform: translateY(-3px); }
  .sg-landing .cat-icon { font-size: 30px; }
  .sg-landing .cat-name { min-height: 0; font-size: 14px; }
  .sg-landing .cat-count { font-size: 12px; margin-top: 4px; }
}
@media (min-width: 901px) and (max-width: 1250px) {
  .sg-landing { grid-template-columns: repeat(3, 1fr) !important; }
}
