/* =========================================================
   VISTA DE PRODUCTOS · Hub de categorías
   Reusa la paleta ya definida en tienda-general.css:
   --marino, --titulo, --azul, --teal, --teal-fuerte, --cielo,
   --grad-oscuro, --grad-nav, --radio, --sombra-suave, --linea
   ========================================================= */

.hub-seccion { padding-top: 0.6rem; }
.page-shell .seccion.hub-seccion:first-child { padding-top: 0.6rem; }

.hub-seccion .seccion-cabecera h1 {
  margin: 0;
  color: #12477b;
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1.1;
}

/* ---------- Grid principal ---------- */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 0.75rem;
  margin-top: 0.8rem;
}

@media (max-width: 56rem) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 34rem) {
  .hub-grid { grid-template-columns: 1fr; }
}

/* ---------- Tarjeta de categoría ---------- */
.hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 13.5rem;
  padding: 0.8rem;
  background: #fff;
  border: 1px solid #d5eaf4;
  border-radius: 0.8rem;
  box-shadow: 0 5px 14px rgba(28, 119, 158, 0.08);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.hub-card:hover { transform: translateY(-2px); box-shadow: 0 9px 20px rgba(28, 119, 158, 0.13); }

.hub-card-head { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; }
.hub-icono {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: #d8f5fb; color: #0786ad;
}
.hub-icono svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; }
.hub-card-titulo { flex: 1; min-width: 0; }
.hub-card-titulo h2 { margin: 0; font-size: 1rem; line-height: 1.25; color: #12477b; }
.hub-sub { margin: 0.2rem 0 0; font-size: 0.82rem; color: var(--texto-suave, #5b7489); }

.hub-badge {
  position: absolute; top: 0.05rem; right: 0;
  display: inline-flex; align-items: center; gap: 0.2rem;
  padding: 0.22rem 0.4rem; border-radius: 999px;
  background: #078bad; color: #fff;
  font-size: 0.65rem; font-weight: 700; line-height: 1;
}
.hub-badge svg { width: 0.72rem; height: 0.72rem; }

.hub-card-body { flex: 1; }
.hub-bullets {
  margin: 0; padding: 0; list-style: none;
  display: grid; gap: 0.28rem;
  font-size: 0.82rem; line-height: 1.35; color: #64839e;
}
.hub-bullets li { position: relative; padding-left: 0.82rem; }
.hub-bullets li::before {
  content: ""; position: absolute; left: 0; top: 0.5em;
  width: 4px; height: 4px; border-radius: 50%;
  background: #05a1c8;
}
.hub-bullet-link { color: inherit; text-decoration: none; }
.hub-bullet-link:hover { color: #087da1; text-decoration: underline; text-underline-offset: 2px; }
.hub-bullet-link:focus-visible { outline: 2px solid #078bad; outline-offset: 2px; }

.hub-boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  width: 100%; min-height: 2.25rem;
  margin-top: auto; padding: 0.5rem 0.65rem;
  background: linear-gradient(105deg, #0796b8, #0784a8);
  color: #fff; font-weight: 700; font-size: 0.82rem;
  text-decoration: none; border-radius: 0.45rem;
  transition: filter .15s ease;
}
.hub-boton:hover { filter: brightness(1.08); }
.hub-boton span { transition: transform .15s ease; }
.hub-boton:hover span { transform: translateX(3px); }
.hub-boton-carrito { flex: none; width: 0.9rem; height: 0.9rem; fill: none; stroke: currentColor; stroke-width: 1.8; }

.hub-icono-esquina {
  position: absolute; top: 0.9rem; left: 0.9rem;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cielo, #dff0f6); color: var(--teal-fuerte, #006c84);
}
.hub-icono-esquina svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.7; }

/* ---------- Tarjeta destacada (categoría 1) ---------- */
.hub-card-featured {
  grid-column: span 2;
  grid-row: span 2;
  padding: 1.5rem 1.5rem 1.3rem;
  background: var(--grad-oscuro, linear-gradient(135deg,#06283f 0%,#0a3f63 100%));
  border-color: transparent;
  color: #fff;
}
.hub-card-featured .hub-card-titulo h2 { color: #fff; font-size: 1.3rem; }
.hub-card-featured .hub-sub { color: #b9d3e4; }
.hub-card-featured .hub-bullets { color: #d8e8f1; grid-template-columns: repeat(2, 1fr); gap: 0.45rem 1rem; }
.hub-card-featured .hub-bullets li::before { background: var(--shell-acid, #00cfff); }
.hub-card-featured .hub-boton { background: #fff; color: var(--marino, #06283f); }
.hub-card-featured .hub-boton:hover { filter: none; background: var(--cielo, #dff0f6); }

.hub-visual {
  display: flex; align-items: center; justify-content: center;
  padding: 1.6rem; margin-bottom: 0.2rem;
  background: rgba(255,255,255,0.08); border-radius: calc(var(--radio, 16px) - 4px);
}
.hub-visual svg { width: 4.5rem; height: 4.5rem; fill: none; stroke: #fff; stroke-width: 1.3; }

@media (max-width: 74rem) {
  .hub-card-featured { grid-column: span 2; grid-row: span 1; }
  .hub-card-featured .hub-bullets { grid-template-columns: 1fr 1fr; max-height: 9rem; overflow: hidden; }
}
@media (max-width: 34rem) {
  .hub-card-featured { grid-column: span 1; }
  .hub-card-featured .hub-bullets { grid-template-columns: 1fr; max-height: none; }
}

/* ---------- Bloque inferior: destacados + cotización ---------- */
.hub-inferior {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 1.1rem;
  margin-top: 1.4rem;
}
@media (max-width: 60rem) { .hub-inferior { grid-template-columns: 1fr; } }

.hub-panel {
  padding: 1.4rem 1.5rem;
  border-radius: var(--radio, 16px);
  border: 1px solid var(--linea, #dce7f0);
  background: var(--superficie, #fff);
}
.hub-panel h2 { margin: 0 0 1rem; font-size: 1rem; color: var(--titulo, #0a3557); }

.hub-destacados-lista {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  gap: 0.9rem;
}
.hub-mini { display: grid; gap: 0.5rem; text-decoration: none; color: var(--texto, #2a4760); text-align: center; }
.hub-mini-img {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1; border-radius: calc(var(--radio, 16px) - 6px);
  background: var(--cielo, #dff0f6); overflow: hidden;
}
.hub-mini-img img { width: 100%; height: 100%; object-fit: contain; }
.hub-mini-img svg { width: 1.6rem; height: 1.6rem; fill: none; stroke: var(--teal-fuerte, #006c84); stroke-width: 1.6; }
.hub-mini-nombre { font-size: 0.78rem; font-weight: 600; line-height: 1.25; }
.hub-mini:hover .hub-mini-nombre { color: var(--teal-fuerte, #006c84); }

.hub-cotizacion {
  display: flex; flex-direction: column;
  background: var(--grad-nav, linear-gradient(90deg,#0a3e5c 0%,#0e5a7a 55%,#147b9a 100%));
  border-color: transparent; color: #fff;
}
.hub-cotizacion h2 { color: #fff; }
.hub-cotizacion p { margin: 0 0 1.1rem; font-size: 0.88rem; color: #d6ebf3; }
.hub-cotizacion-boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1rem; background: #fff; color: var(--marino, #06283f);
  font-weight: 700; border-radius: calc(var(--radio, 16px) - 6px); text-decoration: none;
}
.hub-ventajas { list-style: none; margin: 1.2rem 0 0; padding: 1rem 0 0; border-top: 1px solid rgba(255,255,255,.2); display: grid; gap: 0.7rem; }
.hub-ventajas li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; color: #e4f1f7; }
.hub-ventajas svg { width: 1.1rem; height: 1.1rem; flex: none; fill: none; stroke: #fff; stroke-width: 1.6; }

/* ---------- Barra de confianza ---------- */
.hub-trust-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  margin-top: 1.4rem; padding: 1.1rem 1.5rem;
  background: var(--marino, #06283f); border-radius: var(--radio, 16px);
  color: #dfeaf1;
}
.hub-trust-bar span { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.85rem; font-weight: 600; }
.hub-trust-bar svg { width: 1.2rem; height: 1.2rem; flex: none; fill: none; stroke: var(--shell-acid, #00cfff); stroke-width: 1.6; }

.page-shell .hub-card .hub-boton,
.page-shell .hub-cotizacion-boton
{
  min-height: 3rem;
  padding: .65rem 1rem;
  border: 1px solid #078eae;
  border-radius: .8rem;
  background: #0799bc;
  box-shadow: 0 10px 22px rgba(0, 116, 150, .16);
  color: #fff;
  font: 700 .88rem/1.2 var(--fuente);
  text-transform: none;
}

.page-shell .hub-card .hub-boton:hover,
.page-shell .hub-cotizacion-boton:hover { background: #0785a8; color: #fff; }
