/*
Theme Name: HIFI Microelectronica
Theme URI: https://microelectronicahifi.com
Description: Tema hijo de Hello Elementor para HIFI Microelectronica. Diseno industrial premium basado en el sistema visual de Figma. Compatible con WooCommerce.
Author: HIFI
Template: hello-elementor
Version: 1.2.0
Text Domain: hifi
*/

/* ============================================================
   SISTEMA DE DISENO  —  extraido del archivo de Figma
   ============================================================ */
:root {
  --black:      #000001;
  --topbar:     #14293A;
  --navy-deep:  #031272;
  --navy-mid:   #0E488B;
  --cyan:       #6ADDFF;
  --offwhite:   #FFFEFF;
  --bg:         #EEF4FB;
  --border:     rgba(14, 72, 139, 0.15);
  --muted:      #5a6b80;

  --font-display: 'Outfit', sans-serif;
  --font-body:    'Inter', sans-serif;

  --wrap: 1280px;
  --radius: 10px;
  --shadow-sm: 0 2px 8px rgba(13,27,62,0.06);
  --shadow-md: 0 12px 32px rgba(13,27,62,0.14);
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--black);
  font-size: 15px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); margin: 0 0 .5em; line-height: 1.15; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.hifi-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ============================================================
   HEADER
   ============================================================ */
.hifi-topbar { background: #14293A; }
.hifi-topbar .hifi-wrap {
  display: flex; align-items: center; justify-content: center;
  gap: 48px; flex-wrap: wrap;
  padding-top: 9px; padding-bottom: 9px;
}
.hifi-topbar .hifi-topbar-item {
  display: inline-flex !important; align-items: center; gap: 9px;
  color: #FFFEFF; font-size: 13px; font-weight: 500;
  white-space: nowrap; text-decoration: none;
  font-family: 'Inter', sans-serif;
}
.hifi-topbar .hifi-topbar-item svg { color: #6ADDFF; }
.hifi-topbar a.hifi-topbar-item:hover { color: #6ADDFF; }
.hifi-topbar .hifi-topbar-wa svg { color: #25D366 !important; }

.hifi-mainbar { background: var(--offwhite); }
.hifi-mainbar .hifi-wrap {
  display: flex; align-items: center; gap: 24px;
  padding-top: 14px; padding-bottom: 14px;
}
.hifi-logo img { height: 42px; width: auto; }

.hifi-search { flex: 1; position: relative; display: flex; }
.hifi-search input[type="search"], .hifi-search input[type="text"] {
  width: 100%; border: 1px solid rgba(14,72,139,0.2); border-radius: 8px;
  padding: 11px 54px 11px 16px; font-size: 14px; font-family: var(--font-body);
  background: var(--offwhite); color: var(--black); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.hifi-search input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(106,221,255,.22); }
.hifi-search button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--navy-deep); color: var(--cyan);
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.hifi-search button:hover { background: var(--navy-mid); }
.hifi-search button svg { width: 17px; height: 17px; display: block; }

.hifi-actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.hifi-action {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--navy-deep); position: relative; transition: color .2s;
}
.hifi-action:hover { color: var(--navy-mid); }
.hifi-action svg { width: 22px; height: 22px; }
.hifi-action span { font-size: 10px; font-weight: 500; }
.hifi-sep { width: 1px; height: 32px; background: var(--border); }
.hifi-badge {
  position: absolute; top: -5px; right: -9px;
  background: var(--cyan); color: var(--navy-deep);
  font-size: 9px; font-weight: 800; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
}

.hifi-nav { background: var(--navy-deep); color: #fff; position: relative; }
.hifi-nav .hifi-wrap { display: flex; align-items: center; gap: 4px; padding: 0 24px; }
.hifi-nav .hifi-catbtn,
.hifi-catbtn {
  display: inline-flex !important; align-items: center; gap: 9px;
  background: #6ADDFF !important; color: #031272 !important;
  border: 0; cursor: pointer; padding: 13px 20px;
  font-family: var(--font-body); font-size: 14px; font-weight: 700;
  flex-shrink: 0; transition: background .2s;
}
.hifi-catbtn:hover { background: var(--offwhite); }
.hifi-catbtn svg { width: 18px !important; height: 18px !important; flex-shrink: 0; display: block !important; }
.hifi-header svg, .hifi-footer svg { max-width: none !important; }
.hifi-search button svg { width: 17px !important; height: 17px !important; display: block !important; }

.hifi-navlinks { display: flex; align-items: center; }
.hifi-navlinks a {
  position: relative; font-size: 14px; padding: 13px 16px;
  white-space: nowrap; color: #fff; transition: color .2s;
}
.hifi-navlinks a::after {
  content: ''; position: absolute; bottom: 9px; left: 16px; right: 16px;
  height: 2px; background: var(--cyan); transform: scaleX(0); transform-origin: left;
  transition: transform .2s;
}
.hifi-navlinks a:hover { color: var(--cyan); }
.hifi-navlinks a:hover::after { transform: scaleX(1); }

.hifi-catpanel {
  display: none; position: absolute; z-index: 60; top: 100%; left: 24px;
  min-width: 290px; background: var(--offwhite); color: var(--navy-deep);
  border-top: 2px solid var(--cyan); border-radius: 0 0 8px 8px;
  box-shadow: 0 20px 44px rgba(0,0,0,.25); overflow: hidden;
}
.hifi-catpanel.is-open { display: block; }
.hifi-catpanel a {
  display: block; padding: 12px 18px; font-size: 14px; font-weight: 500;
  border-bottom: 1px solid #f0f2f5; transition: background .15s, color .15s;
}
.hifi-catpanel a:last-child { border-bottom: 0; }
.hifi-catpanel a:hover { background: rgba(106,221,255,.16); color: var(--navy-deep); }

.hifi-burger { display: none; margin-left: auto; background: none; border: 0; color: #fff; padding: 12px; cursor: pointer; }
.hifi-mobile { display: none; background: var(--offwhite); }
.hifi-mobile.is-open { display: block; }
.hifi-mobile a { display: block; padding: 13px 24px; font-size: 14px; font-weight: 600; color: var(--navy-deep); border-bottom: 1px solid #eef1f4; }

/* ============================================================
   HERO
   ============================================================ */
.hifi-hero { position: relative; background: linear-gradient(100deg, var(--navy-deep), var(--navy-mid)); overflow: hidden; }
.hifi-hero::after {
  content: ''; position: absolute; inset: 0;
  background: var(--hero-img) center/cover no-repeat;
  opacity: .22; mix-blend-mode: luminosity;
}
.hifi-hero .hifi-wrap { position: relative; z-index: 2; padding-top: 74px; padding-bottom: 74px; }
.hifi-hero-tag {
  display: inline-block; background: var(--cyan); color: var(--navy-deep);
  font-size: 11px; font-weight: 800; letter-spacing: .09em;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.hifi-hero h1 { color: #fff; font-size: clamp(32px, 4.4vw, 52px); font-weight: 900; max-width: 15ch; margin-bottom: 18px; }
.hifi-hero p { color: rgba(255,255,255,.82); font-size: 16px; max-width: 52ch; margin: 0 0 30px; }
.hifi-hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hifi-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: 8px; border: 0; cursor: pointer;
  font-family: var(--font-body); font-size: 14px; font-weight: 700;
  transition: background .2s, transform .1s, color .2s;
}
.hifi-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.hifi-btn-primary { background: var(--cyan); color: var(--navy-deep); }
.hifi-btn-primary:hover { background: var(--offwhite); }
.hifi-btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.42); }
.hifi-btn-ghost:hover { background: rgba(255,255,255,.12); }
.hifi-btn:active { transform: scale(.98); }

/* ============================================================
   BARRA DE CONFIANZA
   ============================================================ */
.hifi-trust { background: var(--navy-deep); }
.hifi-trust .hifi-wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 0 24px; }
.hifi-trust-item {
  display: flex; align-items: center; gap: 14px;
  padding: 26px 22px; border-right: 1px solid rgba(255,255,255,.12);
}
.hifi-trust-item:last-child { border-right: 0; }
.hifi-trust-item svg { width: 28px; height: 28px; color: var(--cyan); flex-shrink: 0; }
.hifi-trust-item strong { display: block; color: #fff; font-size: 14.5px; font-weight: 700; font-family: var(--font-display); }
.hifi-trust-item span { display: block; color: rgba(255,255,255,.62); font-size: 12.5px; }

/* ============================================================
   SECCIONES
   ============================================================ */
.hifi-section { padding: 72px 0; }
.hifi-section--white { background: var(--offwhite); }
.hifi-eyebrow { color: var(--navy-mid); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 8px; }
.hifi-h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; color: var(--navy-deep); margin: 0 0 36px; max-width: 24ch; }

/* Categorias */
.hifi-cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.hifi-cat {
  background: var(--offwhite); border: 1px solid #e6ecf3; border-radius: var(--radius);
  padding: 26px 14px; text-align: center;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.hifi-cat:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--cyan); }
.hifi-cat img { width: 68px; height: 68px; object-fit: contain; margin: 0 auto 15px; }
.hifi-cat span { display: block; font-size: 13px; font-weight: 700; color: var(--navy-deep); line-height: 1.3; }

/* Productos */
.hifi-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.hifi-product {
  background: var(--offwhite); border: 1px solid #e6ecf3; border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.hifi-product:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.hifi-product-img { aspect-ratio: 4/3; background: #fff; display: flex; align-items: center; justify-content: center; padding: 18px; }
.hifi-product-img img { max-height: 100%; width: auto; object-fit: contain; }
.hifi-product-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.hifi-product-cat { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--navy-mid); }
.hifi-product-name { font-size: 14px; font-weight: 600; color: var(--black); line-height: 1.35; flex: 1; }
.hifi-product-cta {
  display: block; text-align: center; background: var(--navy-deep); color: var(--cyan);
  font-size: 13px; font-weight: 700; padding: 10px; border-radius: 6px; transition: background .2s;
}
.hifi-product-cta:hover { background: var(--navy-mid); }

/* Marcas */
.hifi-brands { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 44px; }
.hifi-brands img { max-height: 42px; width: auto; filter: grayscale(100%) opacity(.55); transition: filter .2s; }
.hifi-brands img:hover { filter: grayscale(0) opacity(1); }

/* CTA final */
.hifi-cta-band { background: linear-gradient(100deg, var(--black), var(--navy-deep)); }
.hifi-cta-band .hifi-wrap { padding: 62px 24px; text-align: center; }
.hifi-cta-band h2 { color: #fff; font-size: clamp(26px, 3.4vw, 38px); font-weight: 900; margin: 0 0 12px; }
.hifi-cta-band p { color: rgba(255,255,255,.75); margin: 0 0 28px; }

/* ============================================================
   FOOTER
   ============================================================ */
.hifi-footer { background: var(--black); color: rgba(255,254,255,.7); }
.hifi-footer .hifi-wrap { padding-top: 56px; padding-bottom: 32px; }
.hifi-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.hifi-footer h4 { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 14px; }
.hifi-footer a { display: block; font-size: 13.5px; padding: 4px 0; transition: color .2s; }
.hifi-footer a:hover { color: var(--cyan); }
.hifi-footer-logo img { height: 42px; margin-bottom: 14px; filter: brightness(0) invert(1); }
.hifi-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 22px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px;
}

/* WhatsApp flotante */
.hifi-wa {
  position: fixed; right: 22px; bottom: 22px; z-index: 900;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,.24); transition: transform .18s;
}
.hifi-wa:hover { transform: scale(1.07); }
.hifi-wa svg { width: 30px; height: 30px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .hifi-cats { grid-template-columns: repeat(3, 1fr); }
  .hifi-products { grid-template-columns: repeat(3, 1fr); }
  .hifi-trust .hifi-wrap { grid-template-columns: repeat(2, 1fr); }
  .hifi-trust-item:nth-child(2) { border-right: 0; }
  .hifi-footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .hifi-mainbar .hifi-wrap { flex-wrap: wrap; gap: 14px; }
  .hifi-search { order: 3; flex-basis: 100%; }
  .hifi-navlinks { display: none; }
  .hifi-burger { display: flex; }
  .hifi-catpanel { left: 0; right: 0; width: 100%; }
  .hifi-hero .hifi-wrap { padding-top: 54px; padding-bottom: 54px; }
  .hifi-section { padding: 52px 0; }
}

@media (max-width: 560px) {
  .hifi-cats { grid-template-columns: repeat(2, 1fr); }
  .hifi-products { grid-template-columns: repeat(2, 1fr); }
  .hifi-trust .hifi-wrap { grid-template-columns: 1fr; }
  .hifi-trust-item { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .hifi-footer-grid { grid-template-columns: 1fr; }
  .hifi-topbar .hifi-wrap { gap: 14px 22px; justify-content: center; }
  .hifi-topbar .hifi-topbar-item { font-size: 12px; }
}

/* ============================================================
   MODO COTIZACION  —  ficha de producto  (estilos blindados)
   ============================================================ */
.hifi-quote { max-width: 560px; }

.hifi-quote .hifi-quote-brand {
  color: #0E488B !important; font-size: 15px !important; font-weight: 500 !important;
  margin: 0 0 4px !important; opacity: .75; font-family: 'Inter', sans-serif !important;
}
.hifi-quote .hifi-quote-name {
  font-family: 'Outfit', sans-serif !important; color: #031272 !important;
  font-size: clamp(20px, 2.4vw, 27px) !important; font-weight: 800 !important;
  margin: 0 0 26px !important; line-height: 1.25 !important; text-transform: none !important;
}

.hifi-quote .hifi-quote-qty {
  display: flex !important; flex-direction: row !important;
  align-items: center !important; justify-content: space-between !important;
  gap: 20px !important; margin: 0 0 22px !important; flex-wrap: wrap !important;
}
.hifi-quote .hifi-quote-label {
  color: #0E488B !important; font-size: 16px !important; font-weight: 500 !important;
  opacity: .75; font-family: 'Inter', sans-serif !important;
}

.hifi-quote .hifi-qty-control {
  display: flex !important; flex-direction: row !important;
  align-items: center !important; gap: 12px !important; width: auto !important;
}
.hifi-quote .hifi-qty-btn {
  width: 52px !important; height: 52px !important; min-width: 52px !important;
  padding: 0 !important; margin: 0 !important;
  border-radius: 50% !important; border: 0 !important; cursor: pointer;
  background: #031272 !important; color: #fff !important;
  font-size: 24px !important; font-weight: 600 !important; line-height: 1 !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  flex: 0 0 auto !important; transition: background .18s, transform .1s;
}
.hifi-quote .hifi-qty-btn:hover { background: #0E488B !important; }
.hifi-quote .hifi-qty-btn:active { transform: scale(.94); }

.hifi-quote input.hifi-qty-input {
  width: 96px !important; min-width: 96px !important; max-width: 96px !important;
  height: 52px !important; padding: 0 !important; margin: 0 !important;
  text-align: center !important; flex: 0 0 auto !important;
  border: 1.5px solid #dfe6ee !important; border-radius: 12px !important;
  font-family: 'Outfit', sans-serif !important; font-size: 20px !important; font-weight: 700 !important;
  color: #031272 !important; background: #fff !important; outline: none;
  -moz-appearance: textfield;
}
.hifi-quote input.hifi-qty-input::-webkit-outer-spin-button,
.hifi-quote input.hifi-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hifi-quote input.hifi-qty-input:focus { border-color: #6ADDFF !important; box-shadow: 0 0 0 3px rgba(106,221,255,.25) !important; }

.hifi-quote a.hifi-quote-cta {
  display: flex !important; flex-direction: row !important;
  align-items: center !important; justify-content: center !important; gap: 12px !important;
  width: 100% !important; padding: 19px 24px !important; margin: 0 !important;
  border-radius: 999px !important;
  background: #6ADDFF !important; color: #031272 !important;
  font-family: 'Outfit', sans-serif !important; font-size: 19px !important; font-weight: 700 !important;
  text-decoration: none !important; box-sizing: border-box !important;
  transition: background .18s, transform .1s;
}
.hifi-quote a.hifi-quote-cta:hover { background: #4ecdf5 !important; color: #031272 !important; }
.hifi-quote a.hifi-quote-cta:active { transform: scale(.99); }
.hifi-quote a.hifi-quote-cta svg {
  width: 24px !important; height: 24px !important; max-width: 24px !important;
  flex: 0 0 24px !important; display: block !important;
}

/* Boton "Ver producto" del listado */
.hifi-loop-btn {
  display: block; text-align: center; margin-top: 10px;
  background: #031272; color: #6ADDFF;
  font-size: 13px; font-weight: 700; padding: 10px; border-radius: 6px;
  text-decoration: none; transition: background .2s;
}
.hifi-loop-btn:hover { background: #0E488B; color: #6ADDFF; }

/* Ocultar restos de precio, carrito y titulo duplicado de WooCommerce */
.woocommerce-Price-amount, .price, .woocommerce-price-amount,
.product .price, ul.products li.product .price { display: none !important; }
.single_add_to_cart_button, form.cart .quantity, form.cart { display: none !important; }
.product_title.entry-title + .hifi-quote .hifi-quote-name { display: none !important; }

@media (max-width: 560px) {
  .hifi-quote .hifi-quote-qty { justify-content: flex-start !important; }
  .hifi-quote a.hifi-quote-cta { font-size: 17px !important; padding: 17px 20px !important; }
}

/* ============================================================
   BLINDAJE DE ICONOS  —  el tema padre encoge los SVG a 0
   ============================================================ */
.hifi-header svg, .hifi-footer svg, .hifi-quote svg, .hifi-trust svg, .hifi-btn svg, .hifi-wa svg {
  display: inline-block !important;
  max-width: none !important;
  max-height: none !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  min-width: 0 !important;
  vertical-align: middle;
}
/* El navegador aplasta los SVG dentro de flex: forzar ancho minimo por caso */
.hifi-search button svg { width: 18px !important; height: 18px !important; min-width: 18px !important; flex: 0 0 18px !important; display: block !important; }
.hifi-topbar svg       { width: 17px !important; height: 17px !important; min-width: 17px !important; flex: 0 0 17px !important; }
.hifi-topbar .hifi-topbar-wa svg { width: 18px !important; height: 18px !important; min-width: 18px !important; flex: 0 0 18px !important; }
.hifi-action svg       { width: 22px !important; height: 22px !important; min-width: 22px !important; flex: 0 0 22px !important; }
.hifi-catbtn svg       { width: 18px !important; height: 18px !important; min-width: 18px !important; flex: 0 0 18px !important; }
.hifi-burger svg       { width: 24px !important; height: 24px !important; min-width: 24px !important; flex: 0 0 24px !important; }
.hifi-trust-item svg   { width: 28px !important; height: 28px !important; min-width: 28px !important; flex: 0 0 28px !important; }
.hifi-btn svg          { width: 16px !important; height: 16px !important; min-width: 16px !important; flex: 0 0 16px !important; }
.hifi-wa svg           { width: 30px !important; height: 30px !important; min-width: 30px !important; flex: 0 0 30px !important; }
.hifi-quote-cta svg    { width: 24px !important; height: 24px !important; min-width: 24px !important; flex: 0 0 24px !important; }
.hifi-topbar svg { width: 15px !important; height: 15px !important; }
.hifi-search button svg { width: 18px !important; height: 18px !important; display: block !important; }
.hifi-action svg { width: 22px !important; height: 22px !important; }
.hifi-catbtn svg { width: 18px !important; height: 18px !important; }
.hifi-burger svg { width: 24px !important; height: 24px !important; }
.hifi-trust-item svg { width: 28px !important; height: 28px !important; }
.hifi-btn svg { width: 16px !important; height: 16px !important; }
.hifi-wa svg { width: 30px !important; height: 30px !important; }
