/* =========================================================
   CST Home v2 — capa estilo "GVS Colombia"
   Se carga DESPUÉS de cst.css (reutiliza tokens + secciones bajas)
   ========================================================= */

:root {
  --teal: #12B5A6;        /* acento secundario tipo "Registro" */
  --teal-600: #0FA294;
  --badge-red: #E23A3A;
  --topbar-h: 60px;
  --searchbar-h: 64px;
}

/* Heavy display font for hero headlines (GVS uses condensed heavy caps) */
.v2 { /* scope helper */ }

/* ============ HEADER (dos pisos) ============ */
.v2 .header { position: sticky; top: 0; z-index: 50; background: transparent; backdrop-filter: none; border: 0; }

/* --- Piso 1: barra navy --- */
.topnav { background: var(--navy-900); color: #DCE7F4; }
.topnav .container { display: flex; align-items: center; justify-content: space-between; height: var(--topbar-h); gap: 24px; }
.topnav .brand-name { color: #fff; }
.topnav .brand-name small { color: #6E89A6; }
.topnav-menu { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.topnav-menu a {
  position: relative; font-size: 15px; font-weight: 600; color: #DCE7F4;
  padding: 9px 14px; border-radius: 8px; transition: background .15s, color .15s; white-space: nowrap;
}
.topnav-menu a:hover { background: rgba(255,255,255,.08); color: #fff; }
.topnav-menu a .badge {
  position: absolute; top: -7px; right: 2px; background: var(--badge-red); color: #fff;
  font-family: var(--font-sans); font-size: 9px; font-weight: 700; letter-spacing: .04em;
  padding: 2px 6px; border-radius: 100px; text-transform: uppercase;
}
.topnav-wa {
  width: 40px; height: 40px; border-radius: 50%; background: #1FAA53; display: grid; place-items: center;
  flex: none; transition: transform .18s; margin-left: 8px;
}
.topnav-wa:hover { transform: scale(1.07); }
.topnav-wa svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* --- Piso 2: barra blanca (líneas + buscador + CTA) --- */
.subnav { background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.subnav .container { display: flex; align-items: center; gap: 18px; height: var(--searchbar-h); }
.lineas-btn {
  display: inline-flex; align-items: center; gap: 11px; flex: none;
  background: var(--blue-600); color: #fff; font-weight: 700; font-size: 14.5px;
  padding: 12px 18px; border-radius: 10px; border: 0; cursor: pointer;
  transition: background .18s; white-space: nowrap;
}
.lineas-btn:hover { background: var(--blue-500); }
.lineas-btn .bars { display: grid; gap: 3px; }
.lineas-btn .bars i { width: 16px; height: 2px; background: #fff; border-radius: 2px; display: block; }

.searchbox { flex: 1; position: relative; max-width: 620px; }
.searchbox input {
  width: 100%; font-family: var(--font-sans); font-size: 15px; color: var(--ink);
  padding: 13px 48px 13px 20px; border: 1.5px solid var(--line); border-radius: 100px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.searchbox input::placeholder { color: var(--slate-400); }
.searchbox input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(26,86,219,.12); }
.searchbox .s-ico { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.searchbox .s-ico svg { width: 19px; height: 19px; stroke: var(--slate-400); fill: none; stroke-width: 2; }
.searchbox .s-ico:hover svg { stroke: var(--blue-600); }

.subnav-cta { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }
.subnav-cta .btn { padding: 12px 18px; }

/* ============ HERO CARRUSEL ============ */
.hero-carousel { position: relative; background: var(--navy-900); overflow: hidden; }
.carousel-track { position: relative; height: clamp(440px, 52vw, 620px); }
.cslide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .7s ease; display: grid; align-items: center;
}
.cslide.active { opacity: 1; visibility: visible; }
.cslide .ph { position: absolute; inset: 0; }
.cslide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,23,40,.92) 0%, rgba(7,23,40,.72) 38%, rgba(7,23,40,.15) 70%, rgba(7,23,40,.05) 100%);
}
.cslide-inner { position: relative; width: 100%; }
.cslide-inner .container { display: grid; gap: 0; }
.cobrand { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.cobrand .cb-cst { font-weight: 800; font-size: 26px; color: #fff; letter-spacing: -.01em; }
.cobrand .cb-div { width: 1.5px; height: 30px; background: rgba(255,255,255,.4); }
.cobrand .cb-partner { font-family: var(--font-mono); font-weight: 600; font-size: 15px; letter-spacing: .14em; color: #9FC4FF; text-transform: uppercase; }
.cslide h2 {
  color: #fff; font-weight: 800; letter-spacing: -.02em; text-transform: uppercase;
  font-size: clamp(34px, 5vw, 64px); line-height: .98; max-width: 680px;
}
.cslide .csub { color: #CFE0F5; font-size: clamp(17px, 1.7vw, 21px); margin-top: 18px; max-width: 480px; }
.cslide-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

/* arrows + dots */
.car-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.32);
  background: rgba(7,23,40,.32); color: #fff; cursor: pointer; display: grid; place-items: center;
  transition: background .18s, border-color .18s; backdrop-filter: blur(3px);
}
.car-arrow:hover { background: rgba(7,23,40,.6); border-color: #fff; }
.car-arrow svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.car-arrow.prev { left: 22px; }
.car-arrow.next { right: 22px; }
.car-dots { position: absolute; bottom: 22px; left: 0; right: 0; z-index: 4; display: flex; justify-content: center; gap: 10px; }
.car-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.4); cursor: pointer; padding: 0; transition: background .18s, transform .18s; }
.car-dots button.active { background: #fff; transform: scale(1.25); }

/* ============ FRANJA DE SERVICIO (4 col) ============ */
.svc-strip { background: var(--bg-soft); }
.svc-strip .container { transform: translateY(-34px); }
.svc-strip-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); display: grid; grid-template-columns: repeat(4, 1fr);
}
.svc-strip-item { display: flex; align-items: center; gap: 16px; padding: 24px 26px; border-right: 1px solid var(--line-2); }
.svc-strip-item:last-child { border-right: 0; }
.svc-strip-item .ss-ico { width: 46px; height: 46px; flex: none; display: grid; place-items: center; }
.svc-strip-item .ss-ico svg { width: 38px; height: 38px; stroke: var(--blue-600); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.svc-strip-item b { display: block; font-size: 15.5px; color: var(--navy-900); }
.svc-strip-item span { display: block; font-size: 13px; color: var(--slate-600); margin-top: 2px; }

/* 7-card solutions grid */
.svc-grid.cols7 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* ============ MARCAS PROTAGONISTAS ============ */
.brands { background: #fff; }
.brand-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 44px; }
.brand-tile {
  aspect-ratio: 3/2; border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; place-items: center; background: var(--bg-soft); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.brand-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #D4DEEC; background: #fff; }
.brand-tile span { font-weight: 800; font-size: 19px; color: #8A99A9; letter-spacing: -.01em; transition: color .2s; }
.brand-tile:hover span { color: var(--navy-700); }
.brands-foot { margin-top: 34px; text-align: center; }

/* ============ LOGO IMG ============ */
.brand-logo { height: 42px; width: auto; display: block; }
.footer .brand-logo { height: 46px; }
.mobile-drawer .brand-logo { height: 36px; }
@media (max-width: 900px) { .brand-logo { height: 36px; } }

/* ============ OFERTAS Y NOVEDADES ============ */
.ofertas { background: var(--bg-soft); }
.center-head { max-width: 680px; margin-inline: auto; text-align: center; }
.center-head .eyebrow { justify-content: center; }
.title-rule { width: 64px; height: 3px; border-radius: 3px; background: var(--blue-600); margin: 18px auto 0; }
.ofertas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 44px; }
.oferta-card {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 16 / 7; background: #fff;
  transition: box-shadow .22s, transform .22s, border-color .22s;
}
.oferta-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: #D4DEEC; }
.oferta-card .ph { position: absolute; inset: 0; }
.oferta-card .of-tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: var(--blue-600); color: #fff; font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
  padding: 5px 11px; border-radius: 100px;
}
.oferta-card .of-ver {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 2;
  background: rgba(255,255,255,.92); color: var(--navy-900); font-weight: 700; font-size: 13px;
  padding: 9px 18px; border-radius: 100px; border: 1px solid rgba(11,42,74,.12); backdrop-filter: blur(3px);
  display: inline-flex; align-items: center; gap: 7px; opacity: 0; transition: opacity .22s, transform .22s;
}
.oferta-card:hover .of-ver { opacity: 1; transform: translateX(-50%) translateY(-2px); }
@media (max-width: 700px) {
  .ofertas-grid { grid-template-columns: 1fr; }
  .oferta-card .of-ver { opacity: 1; transform: translateX(-50%); }
}

/* ============ NOVEDADES (carrusel deslizable) ============ */
.novedades { background: #fff; }
.nv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.nv-title-wrap { display: flex; gap: 16px; align-items: flex-start; }
.nv-accent { width: 5px; align-self: stretch; min-height: 52px; border-radius: 4px; background: #185FA5; flex: none; }
.nv-title-wrap h2 { font-size: clamp(26px, 3vw, 36px); }
.nv-title-wrap .nv-sub { margin-top: 8px; color: var(--slate-600); font-size: 16.5px; max-width: 460px; }
.nv-seeall { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--blue-600); white-space: nowrap; flex: none; }
.nv-seeall:hover { gap: 12px; }

.nv-viewport { position: relative; margin-top: 36px; overflow: hidden; }
.nv-track {
  display: flex; gap: 20px; cursor: grab;
  user-select: none;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
  scroll-snap-type: x mandatory; padding-bottom: 4px;
}
.nv-track::-webkit-scrollbar { display: none; }
.nv-track.dragging { cursor: grabbing; scroll-snap-type: none; }
.nv-track.dragging a { pointer-events: none; }

.nv-card {
  flex: 0 0 calc((100% - 4 * 20px) / 5); scroll-snap-align: start;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .2s, box-shadow .2s;
}
.nv-card:hover { border-color: #CBD8E8; box-shadow: var(--shadow-sm); }
.nv-media { position: relative; aspect-ratio: 1 / 1; background: var(--bg-soft); display: grid; place-items: center; }
.nv-media .ph { position: absolute; inset: 0; }
.nv-media::before { content: ""; position: absolute; inset: 10px; border: 1.5px dashed #C3D0E0; border-radius: 8px; pointer-events: none; }
.nv-media::after { content: "Reemplazar imagen"; position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: 10px; letter-spacing: .03em; color: var(--slate-400); background: rgba(255,255,255,.88); padding: 3px 9px; border-radius: 6px; white-space: nowrap; }
.nv-media:has(img.nv-photo)::before, .nv-media:has(img.nv-photo)::after { display: none; }
.nv-ico { width: 44%; height: 44%; stroke: var(--blue-600); fill: none; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; opacity: .5; }
.nv-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.nv-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--blue-600); color: #fff; font-weight: 700; font-size: 11.5px;
  letter-spacing: .02em; padding: 4px 11px; border-radius: 100px;
}
.nv-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.nv-brand { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-400); }
.nv-name { font-size: 16px; font-weight: 700; color: var(--navy-900); margin-top: 7px; line-height: 1.3; }
.nv-desc { font-size: 13.5px; color: var(--slate-600); margin-top: 7px; line-height: 1.45; min-height: 2.9em; }
.nv-card .btn.btn-block { margin-top: auto; }

.nv-arrows { display: flex; gap: 10px; }
.nv-arrow {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line);
  background: #fff; color: var(--navy-900); cursor: pointer; display: grid; place-items: center;
  transition: border-color .18s, background .18s, color .18s, opacity .18s;
}
.nv-arrow:hover:not(:disabled) { border-color: var(--blue-600); color: var(--blue-600); }
.nv-arrow:disabled { opacity: .38; cursor: default; color: var(--slate-400); }
.nv-arrow svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.nv-dots { display: flex; justify-content: center; gap: 9px; margin-top: 26px; }
.nv-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: #CBD5E1; cursor: pointer; padding: 0; transition: background .18s, transform .18s, width .18s; }
.nv-dots button.active { background: var(--blue-600); width: 24px; border-radius: 100px; }

.nv-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.nv-foot .nv-dots { margin-top: 0; flex: 1; justify-content: flex-start; }

@media (max-width: 1024px) {
  .nv-card { flex-basis: calc((100% - 3 * 20px) / 4); }
}
@media (max-width: 860px) {
  .nv-card { flex-basis: calc((100% - 2 * 20px) / 3); }
}
@media (max-width: 680px) {
  .nv-card { flex-basis: calc((100% - 1.5 * 16px) / 2.5); }
  .nv-track { gap: 16px; }
  .nv-arrows { display: none; }
  .nv-seeall { font-size: 14px; }
  .nv-title-wrap .nv-sub { font-size: 15px; }
}
@media (max-width: 480px) {
  .nv-card { flex-basis: calc((100% - 16px) / 1.5); }
}
@media (max-width: 1024px) {
  .brand-tiles { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .topnav-menu { display: none; }
  .v2 .menu-toggle { display: inline-flex; }
  .topnav .container { gap: 12px; }
  .topnav-wa { margin-left: auto; }
  .subnav .container { gap: 12px; }
  .subnav-cta { display: none; }
  .lineas-btn .l-txt { display: none; }
  .lineas-btn { padding: 12px 14px; }
  .svc-strip-card { grid-template-columns: 1fr 1fr; }
  .svc-strip-item:nth-child(2) { border-right: 0; }
  .svc-strip-item:nth-child(1), .svc-strip-item:nth-child(2) { border-bottom: 1px solid var(--line-2); }
  .brand-tiles { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .cslide-overlay { background: linear-gradient(0deg, rgba(7,23,40,.96) 0%, rgba(7,23,40,.7) 55%, rgba(7,23,40,.45) 100%); }
  .cslide h2 { font-size: 32px; }
  .cslide-cta { width: 100%; }
  .cslide-cta .btn { flex: 1; }
  .car-arrow { display: none; }
  .svc-strip-card { grid-template-columns: 1fr; }
  .svc-strip-item { border-right: 0 !important; border-bottom: 1px solid var(--line-2) !important; }
  .svc-strip-item:last-child { border-bottom: 0 !important; }
  .brand-tiles { grid-template-columns: repeat(2, 1fr); }
  .searchbox { display: none; }
}


/* ============ Líneas de productos: panel desplegable ============ */
.subnav { position: relative; }
.lineas-panel {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 60; background: #fff;
  border-bottom: 1px solid var(--line); box-shadow: 0 18px 40px rgba(11,42,74,.16);
  max-height: 72vh; overflow-y: auto; padding: 26px 0 18px;
}
.lineas-panel[hidden] { display: none; }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px 28px; }
.lp-title { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 15px; color: var(--navy-900); padding-bottom: 8px; border-bottom: 2px solid var(--blue-600); }
.lp-title span { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--slate-400); align-self: center; }
.lp-title:hover { color: var(--blue-600); }
.lp-col ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.lp-col li a { font-size: 13.5px; color: var(--slate-600); }
.lp-col li a:hover { color: var(--blue-600); text-decoration: underline; }
.lp-all { display: inline-block; margin-top: 20px; font-weight: 700; font-size: 14px; color: var(--blue-600); }
.lineas-btn[aria-expanded="true"] { background: var(--navy-900); }

/* ============ Fotos reales de producto ============ */
.nv-media { display: grid; text-decoration: none; }
img.nv-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 14px; background: #fff; }
.nv-media .nv-badge { z-index: 2; }
.oferta-card { background: #F4F7FB; display: block; }
img.of-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 16px 16px 44px; }
.oferta-card .of-name { position: absolute; left: 16px; bottom: 14px; z-index: 2; font-weight: 800; font-size: 15px; color: var(--navy-900); }
.subnav .lineas-panel .container { display: block; height: auto; }

/* Tarjetas de Soluciones y marcas clicables */
.svc-card { position: relative; }
.svc-link { color: inherit; text-decoration: none; }
.svc-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.svc-card:hover h3 .svc-link { color: var(--blue-600); }
.brand-tile a { display: contents; color: inherit; text-decoration: none; }
.brand-tile:has(a):hover { border-color: var(--blue-600); }
