/* =========================================================
   FittingExpress · Sistema de diseño (Material 3)
   Los tokens se derivan de la paleta del logo y se pasarán
   luego a theme.json del tema de WordPress.
   ========================================================= */
:root {
  /* Color · roles Material 3 */
  --primary: #003f5a;
  --on-primary: #ffffff;
  --primary-container: #cfe6f2;
  --on-primary-container: #001e2d;
  --secondary: #0298b9;
  --secondary-ink: #006b82; /* texto cian sobre claro, contraste 5.6:1 */
  --on-secondary: #ffffff;
  --secondary-container: #c9eff8;
  --on-secondary-container: #00363f;
  --accent: #05b5cd;
  --ink: #012237;

  --surface: #f7fafc;
  --surface-lowest: #ffffff;
  --surface-low: #f0f4f7;
  --surface-container: #e9eff3;
  --surface-high: #e2e9ee;
  --on-surface: #012237;
  --on-surface-variant: #45525e;
  --outline: #74818c;
  --outline-variant: #c6d0d8;
  --inverse-surface: #0f2333;
  --inverse-on-surface: #e8f1f6;

  --success: #146c43;
  --success-container: #d3f1df;
  --warning: #8a5300;
  --warning-container: #ffe3bf;

  /* Tipografía */
  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Forma */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Elevación */
  --e1: 0 1px 2px rgba(1, 34, 55, .08), 0 1px 3px 1px rgba(1, 34, 55, .04);
  --e2: 0 1px 2px rgba(1, 34, 55, .1), 0 2px 6px 2px rgba(1, 34, 55, .06);
  --e3: 0 4px 8px 3px rgba(1, 34, 55, .08), 0 1px 3px rgba(1, 34, 55, .1);

  /* Movimiento */
  --ease: cubic-bezier(.2, 0, 0, 1);
  --ease-emph: cubic-bezier(.05, .7, .1, 1);

  --max: 1280px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--on-surface);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
button, a, input, select, label { touch-action: manipulation; }
.price, .price-main, .lrow-price, .vt-price, .tier b, [data-cart-total], .sum-row, .line-total, .buybar strong { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--secondary); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Íconos Material Symbols */
.ms {
  font-family: "Material Symbols Rounded";
  font-weight: normal; font-style: normal;
  font-size: 24px; line-height: 1;
  display: inline-block; white-space: nowrap; letter-spacing: normal; text-transform: none;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  -webkit-font-feature-settings: "liga"; font-feature-settings: "liga";
  flex-shrink: 0;
  user-select: none;
}
.ms.fill { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }

/* Tipografía */
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.h2 { font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.overline { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--secondary-ink); }
.muted { color: var(--on-surface-variant); }

/* ---------------------------------------------------------
   Botones (Material 3)
   --------------------------------------------------------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px;
  border-radius: var(--r-full);
  font-weight: 600; font-size: 14px; letter-spacing: .01em;
  transition: box-shadow .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease);
  white-space: nowrap;
}
.btn .ms { font-size: 20px; }
.btn::after { content: ""; position: absolute; inset: 0; background: currentColor; opacity: 0; transition: opacity .2s var(--ease); }
.btn:hover::after { opacity: .08; }
.btn:active::after { opacity: .12; }
.btn-filled { background: var(--primary); color: var(--on-primary); }
.btn-filled:hover { box-shadow: var(--e1); }
.btn-tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
.btn-outlined { border: 1px solid var(--outline); color: var(--primary); }
.btn-text { color: var(--primary); padding: 0 12px; }
.btn-light { background: #fff; color: var(--primary); }
.btn-ghost-light { border: 1px solid rgba(255, 255, 255, .5); color: #fff; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 15px; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13px; }
.btn-block { width: 100%; }

.icon-btn {
  position: relative;
  width: 44px; height: 44px; border-radius: var(--r-full);
  display: inline-grid; place-items: center;
  color: var(--on-surface-variant);
  transition: background-color .2s var(--ease);
}
.icon-btn:hover { background: rgba(1, 34, 55, .06); }
.badge {
  position: absolute; top: 4px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #c62828; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  transform: scale(1); transition: transform .3s var(--ease-emph);
}
.badge[data-count="0"] { transform: scale(0); }
.badge.pop { animation: pop .4s var(--ease-emph); }
@keyframes pop { 50% { transform: scale(1.35); } }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--outline-variant); border-radius: var(--r-xs);
  background: var(--surface-lowest);
  font-size: 13.5px; font-weight: 500; color: var(--on-surface-variant);
  white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.chip .ms { font-size: 18px; }
.chip:hover { background: var(--surface-low); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--secondary-container); border-color: transparent; color: var(--on-secondary-container); }

/* ---------------------------------------------------------
   Barra superior
   --------------------------------------------------------- */
.topbar { background: var(--ink); color: #cfe0ea; font-size: 13px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.topbar-perks { display: flex; gap: 24px; overflow: hidden; }
.topbar-perks span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.topbar-perks .ms { font-size: 18px; color: var(--accent); }
.proto-tag { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 2px 10px; border-radius: 99px; background: rgba(5, 181, 205, .16); color: var(--accent); white-space: nowrap; }

/* Selector de precios con / sin IVA */
.segmented { display: inline-flex; border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--r-full); padding: 2px; }
.segmented button { height: 28px; padding: 0 12px; border-radius: var(--r-full); font-size: 12.5px; font-weight: 600; color: #cfe0ea; display: inline-flex; align-items: center; gap: 4px; transition: background-color .2s var(--ease), color .2s var(--ease); }
.segmented button .ms { font-size: 16px; width: 0; overflow: hidden; transition: width .2s var(--ease); }
.segmented button[aria-pressed="true"] { background: var(--accent); color: var(--ink); }
.segmented button[aria-pressed="true"] .ms { width: 16px; }

/* ---------------------------------------------------------
   Cabecera
   --------------------------------------------------------- */
.appbar { position: sticky; top: 0; z-index: 40; background: rgba(247, 250, 252, .92); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); transition: box-shadow .25s var(--ease); }
.appbar.is-scrolled { box-shadow: 0 1px 0 var(--outline-variant), var(--e1); }
.appbar-row { display: flex; align-items: center; gap: 20px; height: 76px; }
.menu-btn { display: none; margin-left: -10px; }

.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand svg { width: 42px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -.015em; color: var(--ink); }
.brand-by { font-size: 11px; color: var(--on-surface-variant); margin-top: 4px; }
.brand-by b { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.brand-by b span { color: var(--secondary-ink); }

.fx-search { flex: 1; max-width: 680px; margin: 0 auto; position: relative; }
.search-field {
  display: flex; align-items: center; gap: 4px;
  height: 52px; padding: 0 6px 0 18px;
  background: var(--surface-container); border-radius: var(--r-full);
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.search-field:hover { background: var(--surface-high); }
.search-field:focus-within { background: var(--surface-lowest); box-shadow: var(--e2); }
.search-field > .ms { color: var(--on-surface-variant); }
.fx-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font-size: 15px; padding: 0 8px; }
.fx-search input::placeholder { color: var(--on-surface-variant); }
.search-submit { height: 40px; padding: 0 18px; border-radius: var(--r-full); background: var(--primary); color: #fff; font-weight: 600; font-size: 14px; }
.search-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface-lowest); border-radius: var(--r-lg); box-shadow: var(--e3);
  padding: 12px; opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .2s var(--ease), transform .25s var(--ease-emph);
}
.fx-search:focus-within .search-panel { opacity: 1; transform: none; pointer-events: auto; }
.search-panel h4 { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--on-surface-variant); padding: 6px 8px; }
.search-panel .chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 8px 10px; }
.search-panel a.row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: var(--r-sm); }
.search-panel a.row:hover { background: var(--surface-low); }
.search-panel a.row .ms { color: var(--on-surface-variant); }
.search-panel a.row small { margin-left: auto; font-family: ui-monospace, Consolas, monospace; color: var(--on-surface-variant); }

.actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.action { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 10px; border-radius: var(--r-full); color: var(--on-surface); font-size: 13.5px; font-weight: 500; position: relative; }
.action:hover { background: rgba(1, 34, 55, .06); }
.action .ms { color: var(--primary); }
.action .badge { top: 2px; left: 26px; right: auto; }
.action-cart { background: var(--primary-container); color: var(--on-primary-container); padding-right: 16px; }
.action-cart:hover { background: #c1dcea; }
.action-cart strong { font-weight: 700; }

/* Navegación de categorías */
.catnav { border-top: 1px solid var(--outline-variant); }
.catnav .container { display: flex; align-items: center; gap: 4px; height: 52px; overflow-x: auto; scrollbar-width: none; }
.catnav .container::-webkit-scrollbar { display: none; }
.catnav .container > a { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r-full); font-size: 14px; font-weight: 500; color: var(--on-surface-variant); white-space: nowrap; transition: background-color .2s var(--ease), color .2s var(--ease); }
.catnav .container > a:hover { background: rgba(1, 34, 55, .06); color: var(--on-surface); }
.catnav .container > a.all { background: var(--ink); color: #fff; padding-left: 10px; }
.catnav .container > a.all:hover { background: var(--primary); }
.catnav .container > a.offer { color: #b3261e; }
.catnav .container > a.is-active { background: var(--secondary-container); color: var(--on-secondary-container); }
.catnav .sep { width: 1px; height: 22px; background: var(--outline-variant); margin: 0 6px; flex-shrink: 0; }

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.hero { padding: 24px 0 8px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; }
.hero-main {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  background: radial-gradient(120% 140% at 100% 0%, #0b5d80 0%, var(--primary) 45%, var(--ink) 100%);
  color: #fff;
  padding: 48px 48px 44px;
  min-height: 440px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-main .overline { color: var(--accent); }
.hero-main h1 { font-size: clamp(34px, 4.4vw, 56px); margin: 14px 0 16px; max-width: 12ch; }
.hero-main h1 em { font-style: normal; color: var(--accent); }
.hero-main p { font-size: 17px; color: #cfe3ee; max-width: 44ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art { position: absolute; right: -40px; top: -10px; width: 62%; opacity: .95; pointer-events: none; }
.hero-stats { display: flex; gap: 32px; margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .14); }
.hero-stats b { display: block; font-family: var(--font-display); font-size: 24px; }
.hero-stats span { font-size: 13px; color: #a9c6d6; }

/* Buscador por medida */
.finder { background: var(--surface-lowest); border-radius: var(--r-xl); padding: 28px; box-shadow: var(--e1); display: flex; flex-direction: column; }
.finder-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.finder-icon { width: 48px; height: 48px; border-radius: var(--r-md); background: var(--secondary-container); color: var(--on-secondary-container); display: grid; place-items: center; }
.finder h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.25; }
.finder > p { font-size: 14px; color: var(--on-surface-variant); margin: 6px 0 20px; }
.field { position: relative; display: block; margin-bottom: 16px; }
.field label { position: absolute; left: 14px; top: -8px; padding: 0 4px; background: var(--surface-lowest); font-size: 12px; font-weight: 500; color: var(--on-surface-variant); z-index: 1; }
.field select {
  width: 100%; height: 54px; padding: 0 44px 0 16px;
  border: 1px solid var(--outline); border-radius: var(--r-xs);
  background: transparent; appearance: none; -webkit-appearance: none;
  font-size: 15px; cursor: pointer;
}
.field select:focus { outline: none; border: 2px solid var(--secondary); padding-left: 15px; }
.field select:disabled { opacity: .45; cursor: not-allowed; }
.field::after { content: "expand_more"; font-family: "Material Symbols Rounded"; position: absolute; right: 14px; top: 15px; font-size: 24px; line-height: 1; color: var(--on-surface-variant); pointer-events: none; }
.finder-pop { margin: 4px 0 20px; }
.finder-pop > span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--on-surface-variant); margin-bottom: 10px; }
.finder-pop .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.finder .btn { margin-top: auto; }
.finder-foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--on-surface-variant); }
.finder-foot a { color: var(--secondary-ink); font-weight: 600; }

/* ---------------------------------------------------------
   Beneficios
   --------------------------------------------------------- */
.perks { padding: 20px 0 8px; }
.perks-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.perk { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: var(--surface-low); }
.perk .ms { width: 44px; height: 44px; border-radius: var(--r-full); background: var(--surface-lowest); color: var(--primary); display: grid; place-items: center; font-size: 22px; }
.perk b { display: block; font-size: 14.5px; }
.perk span { font-size: 13px; color: var(--on-surface-variant); }

/* ---------------------------------------------------------
   Secciones
   --------------------------------------------------------- */
.section { padding: 56px 0 8px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head p { margin-top: 6px; color: var(--on-surface-variant); }

/* Materiales */
.materials { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.mat {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); background: var(--surface-lowest);
  padding: 18px 18px 20px; box-shadow: var(--e1);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.mat:hover { box-shadow: var(--e3); transform: translateY(-2px); }
.mat-art { height: 110px; border-radius: var(--r-md); display: grid; place-items: center; margin-bottom: 14px; }
.mat-art svg { width: 82%; height: 100%; transition: transform .4s var(--ease-emph); }
.mat:hover .mat-art svg { transform: scale(1.06) rotate(-2deg); }
.mat b { display: block; font-family: var(--font-display); font-size: 16px; }
.mat span { font-size: 13px; color: var(--on-surface-variant); }

/* Sectores */
.sectors { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.sector {
  position: relative; overflow: hidden; min-height: 200px;
  border-radius: var(--r-lg); padding: 20px;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.sector:hover { transform: translateY(-2px); box-shadow: var(--e3); }
.sector > .ms { position: absolute; top: 18px; left: 18px; width: 48px; height: 48px; border-radius: var(--r-md); background: rgba(255, 255, 255, .16); display: grid; place-items: center; }
.sector::before { content: ""; position: absolute; right: -40px; bottom: -40px; width: 160px; height: 160px; border-radius: 50%; border: 22px solid rgba(255, 255, 255, .07); }
.sector b { font-family: var(--font-display); font-size: 18px; }
.sector span { font-size: 13px; opacity: .85; }
.sector .go { position: absolute; top: 22px; right: 18px; opacity: 0; transform: translateX(-6px); transition: opacity .2s var(--ease), transform .25s var(--ease-emph); }
.sector:hover .go { opacity: 1; transform: none; }

/* Pestañas */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--outline-variant); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; height: 48px; padding: 0 18px; font-weight: 600; font-size: 14px; color: var(--on-surface-variant); white-space: nowrap; }
.tab::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); transform: scaleX(0); transition: transform .3s var(--ease-emph); }
.tab[aria-selected="true"] { color: var(--primary); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }

/* Tarjetas de producto */
.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface-lowest); border-radius: var(--r-lg);
  box-shadow: var(--e1); overflow: hidden;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.card:hover { box-shadow: var(--e3); }
.card-media { position: relative; aspect-ratio: 4 / 3; margin: 8px 8px 0; border-radius: var(--r-md); display: grid; place-items: center; background: var(--surface-low); }
.card-media svg { width: 74%; height: 80%; transition: transform .4s var(--ease-emph); }
.card:hover .card-media svg { transform: scale(1.05); }
.card-tag { position: absolute; top: 10px; left: 10px; max-width: calc(100% - 64px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block !important; line-height: 26px; height: 26px; padding: 0 10px; border-radius: var(--r-xs); background: var(--surface-lowest); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.card-tag i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.card-fav { position: absolute; top: 12px; right: 12px; z-index: 1; background: rgba(255, 255, 255, .7); }
.card-fav:hover { background: #fff; }
.card-fav[aria-pressed="true"] .ms { font-variation-settings: "FILL" 1; color: #c62828; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; }
.card-sku { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--on-surface-variant); }
.card-title { font-size: 15px; font-weight: 600; line-height: 1.35; margin: 4px 0 10px; }
.card-title a:hover { color: var(--secondary-ink); }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.size { height: 24px; padding: 0 8px; border-radius: 6px; background: var(--surface-container); font-size: 12px; font-weight: 500; color: var(--on-surface-variant); display: inline-flex; align-items: center; }
.price-row { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.price small { display: block; font-size: 12px; color: var(--on-surface-variant); }
.price strong { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.price strong sup { font-size: 12px; font-weight: 600; color: var(--on-surface-variant); vertical-align: 6px; margin-left: 3px; }
.price .alt { font-size: 12px; color: var(--on-surface-variant); }
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; margin-top: 10px; }
.stock i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-container); }
.stock.low { color: var(--warning); }
.stock.low i { background: #c77700; box-shadow: 0 0 0 3px var(--warning-container); }
.stock.ok { color: var(--success); }
.card-actions { display: flex; gap: 8px; margin-top: 14px; }
.card-actions .btn { flex: 1; }
.card-actions .icon-btn { border: 1px solid var(--outline-variant); color: var(--primary); flex-shrink: 0; }

/* Banda empresas */
.b2b {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center;
  border-radius: var(--r-xl); padding: 44px;
  background: var(--primary-container); color: var(--on-primary-container);
  position: relative; overflow: hidden;
}
.b2b::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(5, 181, 205, .35), transparent 70%); }
.b2b h2 { margin: 10px 0 12px; }
.b2b p { color: #2a4656; max-width: 52ch; }
.b2b ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; position: relative; z-index: 1; }
.b2b li { display: flex; gap: 12px; align-items: flex-start; background: rgba(255, 255, 255, .7); border-radius: var(--r-md); padding: 14px; font-size: 14px; }
.b2b li .ms { color: var(--primary); }
.b2b li b { display: block; }
.b2b .hero-cta { margin-top: 24px; }

/* Lista de materiales */
.bom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.bom-card { border-radius: var(--r-xl); padding: 32px; background: var(--surface-lowest); box-shadow: var(--e1); }
.drop {
  margin-top: 20px; border: 2px dashed var(--outline-variant); border-radius: var(--r-lg);
  padding: 28px 20px; text-align: center; display: grid; justify-items: center; gap: 8px;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.drop:hover, .drop.is-over { border-color: var(--secondary); background: #f2fbfd; }
.drop .ms { font-size: 40px; color: var(--secondary); }
.drop b { font-size: 15px; }
.drop span { font-size: 13px; color: var(--on-surface-variant); }
.steps { list-style: none; display: grid; gap: 14px; margin-top: 20px; counter-reset: s; }
.steps li { display: flex; gap: 14px; align-items: flex-start; counter-increment: s; }
.steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; background: var(--secondary-container); color: var(--on-secondary-container); font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.steps b { display: block; }
.steps span { font-size: 14px; color: var(--on-surface-variant); }
.contact-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* Pagos */
.pay { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; padding: 28px 0 0; color: var(--on-surface-variant); font-size: 13px; }
.pay-logo { height: 34px; padding: 0 14px; border-radius: var(--r-xs); border: 1px solid var(--outline-variant); background: var(--surface-lowest); display: inline-flex; align-items: center; font-weight: 700; font-size: 13px; color: var(--ink); gap: 8px; }
.pay-logo .ms { font-size: 18px; color: var(--primary); }

/* ---------------------------------------------------------
   Pie
   --------------------------------------------------------- */
.footer { margin-top: 64px; background: var(--ink); color: #b9cdd9; padding: 56px 0 28px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 32px; }
.footer-contact { margin-top: 18px; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); color: #cfe3ee; transition: background .2s var(--ease), color .2s var(--ease); }
.footer-social a:hover { background: var(--accent); color: var(--ink); }
.footer-social svg { width: 20px; height: 20px; }
.footer .brand-name { color: #fff; }
.footer .brand-by { color: #8aa5b5; }
.footer .brand-by b { color: #fff; }
.footer .brand-by b span { color: var(--accent); }
.footer p { margin-top: 16px; max-width: 34ch; }
.footer h3 { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer a:hover { color: #fff; }
.footer li { display: flex; gap: 10px; align-items: center; }
.footer li .ms { font-size: 18px; color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: #8aa5b5; }

/* ---------------------------------------------------------
   Barra inferior móvil, menú lateral y aviso
   --------------------------------------------------------- */
.bottom-nav { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(1, 20, 33, .4); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(340px, 86vw); z-index: 61;
  background: var(--surface-lowest); border-radius: 0 var(--r-lg) var(--r-lg) 0;
  padding: 16px 12px; overflow-y: auto;
  transform: translateX(-102%); transition: transform .35s var(--ease-emph);
}
body.drawer-open .scrim { opacity: 1; pointer-events: auto; }
body.drawer-open .drawer { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 16px 12px; }
.drawer h4 { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--on-surface-variant); padding: 16px 16px 8px; }
.drawer a { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 16px; border-radius: var(--r-full); font-weight: 500; }
.drawer a:hover { background: var(--surface-low); }
.drawer a .ms { color: var(--on-surface-variant); }
.drawer a.is-active { background: var(--secondary-container); color: var(--on-secondary-container); }

.snackbar {
  position: fixed; left: 50%; bottom: 24px; z-index: 70;
  display: flex; align-items: center; gap: 16px;
  min-width: 300px; max-width: calc(100vw - 32px);
  padding: 6px 8px 6px 18px; min-height: 52px;
  border-radius: var(--r-xs); background: var(--inverse-surface); color: var(--inverse-on-surface);
  box-shadow: var(--e3); font-size: 14px;
  transform: translate(-50%, 140%); opacity: 0;
  transition: transform .4s var(--ease-emph), opacity .2s var(--ease);
}
.snackbar.show { transform: translate(-50%, 0); opacity: 1; }
.snackbar .ms { color: var(--accent); }
.snackbar a { margin-left: auto; color: var(--accent); font-weight: 600; padding: 8px 12px; border-radius: var(--r-full); }

/* Animación de entrada */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .7s var(--ease-emph); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 1180px) {
  .action span.lbl { display: none; }
  .action { padding: 0 10px; }
  .action .badge { left: 24px; }
  .materials { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sectors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .hero-grid, .b2b, .bom { grid-template-columns: 1fr; }
  .perks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .topbar-perks span:nth-child(n+3) { display: none; }
}
@media (max-width: 860px) {
  :root { --gutter: 16px; }
  .menu-btn { display: inline-grid; }
  .appbar-row { flex-wrap: wrap; height: auto; padding: 10px 0 12px; gap: 8px 12px; }
  .fx-search { order: 3; flex: 0 0 100%; min-width: 0; max-width: none; margin: 0; }
  .search-field { height: 48px; }
  .actions { margin-left: auto; }
  .action-cart strong, .action-quote, .action-account { display: none; }
  .action-cart { background: none; padding: 0; width: 44px; justify-content: center; }
  .action-cart .badge { left: auto; right: 0; }
  .catnav { display: none; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    height: calc(68px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface-low); box-shadow: 0 -1px 0 var(--outline-variant);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--on-surface-variant); position: relative; }
  .bottom-nav a .pill { width: 56px; height: 30px; border-radius: 15px; display: grid; place-items: center; transition: background-color .25s var(--ease); }
  .bottom-nav a.is-active { color: var(--on-surface); }
  .bottom-nav a.is-active .pill { background: var(--secondary-container); }
  .bottom-nav a.is-active .ms { font-variation-settings: "FILL" 1; color: var(--on-secondary-container); }
  .bottom-nav .badge { top: 6px; right: calc(50% - 26px); }
  body { padding-bottom: 68px; }
  .snackbar { bottom: 84px; }
  .hero-main { padding: 32px 24px 28px; min-height: 0; }
  .hero-art { width: 85%; right: -30%; top: -20px; opacity: .45; }
  .search-submit { padding: 0 14px; }
  .section { padding-top: 44px; }
  .b2b { padding: 28px 22px; }
  .bom-card { padding: 24px 20px; }
  .finder { padding: 22px 20px; }
}
@media (max-width: 640px) {
  .brand svg { width: 34px; }
  .brand-name { font-size: 19px; }
  .topbar .container { min-height: 36px; }
  .topbar-perks span:nth-child(n+2), .proto-tag { display: none; }
  .hero-stats { gap: 20px; }
  .hero-stats b { font-size: 20px; }
  .hero-art { display: none; }
  .hero-cta .btn { flex: 1 1 auto; }
  .perks-grid { grid-template-columns: 1fr; gap: 8px; }
  .perk { padding: 14px; }
  .materials, .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sectors { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .sectors::-webkit-scrollbar { display: none; }
  .sector { scroll-snap-align: start; min-height: 170px; }
  .mat { padding: 10px 10px 14px; }
  .mat-art { height: 84px; margin-bottom: 10px; }
  .mat b { font-size: 15px; }
  .section-head .btn { display: none; }
  .b2b ul { grid-template-columns: 1fr; }
  .card-media { margin: 6px 6px 0; }
  .card-body { padding: 10px 10px 12px; }
  .card-title { font-size: 13.5px; }
  .sizes { display: none; }
  .price strong { font-size: 18px; }
  .card-actions { flex-direction: row; }
  .card-actions .btn { padding: 0 10px; font-size: 13px; height: 40px; }
  .card-actions .btn .ms { display: none; }
  .card-actions .icon-btn { width: 40px; height: 40px; }
  .stock-extra { display: none; }
  .card-fav { width: 36px; height: 36px; top: 10px; right: 10px; }
  .card-tag { max-width: calc(100% - 50px); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
}
@media (max-width: 360px) {
  .brand-by { display: none; }
  .card-tag { font-size: 11px; padding: 0 7px; }
}

/* ---------------------------------------------------------
   Menú de selección propio (js/select.js)
   --------------------------------------------------------- */
.xsel-btn { position: absolute; z-index: 1; background: transparent; border: 0; padding: 0; cursor: pointer; border-radius: inherit; }
.xsel-btn:disabled { cursor: not-allowed; }
.xsel-btn:focus { outline: none; }
select.xsel-focus { outline: 3px solid var(--secondary); outline-offset: 2px; }
.xsel-btn[aria-expanded="true"] { outline: none; }
.xsel-pop {
  position: fixed; z-index: 90; display: flex; flex-direction: column;
  background: var(--surface-lowest); color: var(--on-surface);
  border-radius: var(--r-md); box-shadow: 0 12px 32px rgba(1, 34, 55, .18), 0 2px 6px rgba(1, 34, 55, .08), 0 0 0 1px rgba(1, 34, 55, .06);
  padding: 6px; outline: none; overflow: hidden;
  opacity: 0; transform: scaleY(.96) translateY(-4px);
  transition: opacity .16s var(--ease), transform .2s var(--ease-emph);
}
.xsel-pop.is-open { opacity: 1; transform: none; }
.xsel-list { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; max-height: 100%; }
.xsel-opt {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px 0 14px;
  border-radius: 10px; font-size: 14.5px; cursor: pointer; user-select: none;
  transition: background-color .12s var(--ease);
}
.xsel-opt span { flex: 1; }
.xsel-opt .ms { font-size: 20px; color: var(--primary); opacity: 0; transform: scale(.6); transition: opacity .15s var(--ease), transform .2s var(--ease-emph); }
.xsel-opt.is-active { background: var(--surface-container); }
.xsel-opt[aria-selected="true"] { background: var(--secondary-container); color: var(--on-secondary-container); font-weight: 600; }
.xsel-opt[aria-selected="true"] .ms { opacity: 1; transform: none; }
.xsel-opt[aria-selected="true"].is-active { background: #b4e7f2; }
.xsel-opt.is-placeholder { color: var(--on-surface-variant); font-style: normal; }
.xsel-opt[aria-disabled="true"] { opacity: .4; cursor: default; }

/* Hoja inferior en pantallas chicas */
.xsel-scrim { position: fixed; inset: 0; z-index: 89; background: rgba(1, 20, 33, .45); opacity: 0; transition: opacity .2s var(--ease); }
.xsel-scrim.is-open { opacity: 1; }
.xsel-pop.is-sheet {
  left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 72vh;
  border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 0 8px calc(12px + env(safe-area-inset-bottom));
  transform: translateY(100%); opacity: 1; transition: transform .32s var(--ease-emph);
}
.xsel-pop.is-sheet.is-open { transform: none; }
.xsel-head { display: grid; justify-items: center; gap: 10px; padding: 10px 8px 12px; border-bottom: 1px solid var(--outline-variant); margin-bottom: 6px; }
.xsel-grab { width: 32px; height: 4px; border-radius: 2px; background: var(--outline); opacity: .5; }
.xsel-head b { font-family: var(--font-display); font-size: 16px; }
.xsel-pop.is-sheet .xsel-opt { min-height: 52px; font-size: 16px; }
@media (prefers-reduced-motion: reduce) { .xsel-pop, .xsel-pop.is-sheet { transition: none; } }
