/* ========== BASE ========== */
:root {
  --bg: #fbfbfd;
  --surface: #f5f5f7;
  --surface-2: #ececf0;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, .1);
  --blue: #0071e3;
  --blue-dark: #0060c0;
  --wa: #1fa855;
  --radius: 24px;
  --radius-sm: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bar-h: 56px;
  --tabbar-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--bar-h);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.ic {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
.ic-lg { width: 40px; height: 40px; stroke-width: 1.3; color: var(--blue); }

:focus-visible { outline: 3px solid rgba(0, 113, 227, .45); outline-offset: 2px; border-radius: 8px; }

/* ========== BARRA SUPERIOR ========== */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--bar-h);
  background: rgba(251, 251, 253, .78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1080px; height: 100%; margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.brand img { border-radius: 8px; }

.tabs { display: flex; gap: 4px; background: var(--surface); padding: 4px; border-radius: 999px; }
.tabs a {
  padding: 6px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--muted);
  transition: background .2s, color .2s, box-shadow .2s;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
}
.pill .ic { width: 18px; height: 18px; }
.pill-wa { background: var(--wa); color: #fff; transition: filter .2s; }
.pill-wa:hover { filter: brightness(1.08); }

/* ========== BARRA INFERIOR (móvil) ========== */
.tabbar {
  display: none;
  position: fixed; inset: auto 0 0 0; z-index: 50;
  background: rgba(251, 251, 253, .82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: var(--tabbar-h); padding-top: 2px;
  font-size: 10.5px; font-weight: 500; color: #8e8e93;
}
.tabbar a .ic { width: 25px; height: 25px; }
.tabbar a[aria-current="page"] { color: var(--blue); }

/* ========== VISTAS (PESTAÑAS) ========== */
.view { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px 72px; }
.wrap-narrow { max-width: 760px; }

.view-head { padding: 64px 0 36px; }
.view-head h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); line-height: 1.07; letter-spacing: -.03em; font-weight: 700; }
.view-head .lead { margin-top: 14px; }

.eyebrow { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.eyebrow-light { color: rgba(255, 255, 255, .6); }
.lead { font-size: clamp(1.1rem, 2.4vw, 1.35rem); line-height: 1.4; color: var(--muted); max-width: 40ch; }
.view-head .lead { max-width: 52ch; }

/* ========== BOTONES ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; border: 0; cursor: pointer;
  font-size: 17px; font-weight: 500; line-height: 1.2;
  transition: background .2s, transform .15s, filter .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-light { background: #fff; color: #1d1d1f; }
.btn-light:hover { filter: brightness(.94); }
.btn-link { color: var(--blue); padding-left: 8px; padding-right: 8px; }
.btn-link .ic { width: 18px; height: 18px; transition: transform .2s; }
.btn-link:hover .ic { transform: translateX(3px); }
.btn-block { width: 100%; }

/* ========== INICIO ========== */
.hero { text-align: center; padding: 72px 22px 56px; }
.hero-logo { margin: 0 auto 18px; border-radius: 24px; }
.hero h1 { font-size: clamp(3rem, 9.5vw, 5.8rem); line-height: 1.02; letter-spacing: -.04em; font-weight: 700; margin: 10px 0 18px; }
.hero .lead { margin: 0 auto; max-width: 34ch; }
.hero-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 30px; }

.feature {
  display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 24px;
  background: #000; color: #f5f5f7; border-radius: var(--radius);
  padding: clamp(28px, 5vw, 56px); overflow: hidden; position: relative;
  background-image: radial-gradient(120% 90% at 100% 0%, rgba(0, 113, 227, .5), transparent 60%);
}
.feature h2 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.07; letter-spacing: -.03em; font-weight: 700; margin: 8px 0 14px; }
.feature p { color: rgba(245, 245, 247, .72); max-width: 44ch; }
.feature .chips { margin: 20px 0 26px; }
.feature-visual { display: grid; place-items: center; }
.feature-visual svg { width: min(100%, 240px); aspect-ratio: 1; fill: none; stroke: rgba(255, 255, 255, .85); stroke-width: .5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 28px rgba(41, 151, 255, .55)); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.tile {
  background: var(--surface); border-radius: var(--radius); padding: 28px;
  transition: transform .25s, box-shadow .25s;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0, 0, 0, .08); }
.tile h3 { font-size: 21px; letter-spacing: -.02em; margin: 16px 0 6px; }
.tile p { color: var(--muted); font-size: 15px; }

/* ========== CHIPS ========== */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  font-size: 12.5px; font-weight: 500; color: var(--muted);
  background: var(--surface); padding: 4px 10px; border-radius: 999px;
}
.chips-dark li { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .85); }

/* ========== PRODUCTOS ========== */
.toolbar { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border-radius: 12px; padding: 10px 14px; color: var(--muted);
}
.search input { flex: 1; border: 0; background: transparent; outline: none; font-size: 17px; color: var(--text); min-width: 0; }
.search input::placeholder { color: #8e8e93; }
.search:focus-within { box-shadow: 0 0 0 3px rgba(0, 113, 227, .3); }

.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.filters::-webkit-scrollbar { display: none; }
.filters button {
  flex: none; border: 0; cursor: pointer; white-space: nowrap;
  background: var(--surface); color: var(--text);
  padding: 8px 16px; border-radius: 999px; font-size: 14.5px; font-weight: 500;
  transition: background .2s, color .2s;
}
.filters button:hover { background: var(--surface-2); }
.filters button[aria-selected="true"] { background: var(--text); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.product {
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  transition: transform .25s, box-shadow .25s;
  animation: fade .4s ease both;
}
.product:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0, 0, 0, .08); }
.product-media {
  aspect-ratio: 16 / 10; display: grid; place-items: center;
  background: linear-gradient(160deg, #fff, #e9e9ee);
  color: #86868b;
}
.product-media .ic { width: 54px; height: 54px; stroke-width: 1.1; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.product-group { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.product h3 { font-size: 19px; line-height: 1.2; letter-spacing: -.02em; font-weight: 600; }
.product p { font-size: 15px; color: var(--muted); line-height: 1.4; }
.product .chips { margin-top: 2px; }
.product .chips li { background: #fff; }
.product-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stock { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #34c759; }
.price { font-weight: 600; font-size: 15px; }
.buy { color: var(--blue); font-size: 15px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.buy .ic { width: 16px; height: 16px; transition: transform .2s; }
.buy:hover .ic { transform: translateX(3px); }

.product.is-featured { grid-column: 1 / -1; flex-direction: row; background: #000; color: #f5f5f7; }
.product.is-featured .product-media { flex: 0 0 38%; aspect-ratio: auto; background: radial-gradient(100% 100% at 50% 0%, #0b3a7a, #000); color: rgba(255, 255, 255, .85); }
.product.is-featured .product-media .ic { width: 96px; height: 96px; stroke-width: .8; filter: drop-shadow(0 0 20px rgba(41, 151, 255, .6)); }
.product.is-featured .product-group,
.product.is-featured p,
.product.is-featured .stock { color: rgba(245, 245, 247, .68); }
.product.is-featured .chips li { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .88); }
.product.is-featured .buy { color: #2997ff; }
.product.is-featured h3 { font-size: 26px; }
.product.is-featured .product-body { padding: 28px; justify-content: center; }

.empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* ========== BANDA CTA ========== */
.cta-band {
  margin-top: 56px; background: var(--surface); border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.cta-band h2 { font-size: 24px; letter-spacing: -.02em; }
.cta-band p { color: var(--muted); margin-top: 4px; }

/* ========== SERVICIOS ========== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 30px; }
.card h3 { font-size: 21px; letter-spacing: -.02em; margin: 18px 0 8px; }
.card p { color: var(--muted); font-size: 16px; }

/* ========== NOSOTROS ========== */
.rows { border-top: 1px solid var(--line); }
.row { padding: 26px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1.5fr; gap: 16px 32px; }
.row h3 { font-size: 21px; letter-spacing: -.02em; }
.row p { color: var(--muted); }

.subhead { font-size: clamp(1.7rem, 4vw, 2.2rem); letter-spacing: -.03em; margin: 64px 0 24px; }
.steps { display: grid; gap: 14px; }
.steps li { display: flex; gap: 18px; align-items: flex-start; background: var(--surface); border-radius: var(--radius-sm); padding: 22px; }
.steps span { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--text); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 15px; }
.steps h4 { font-size: 18px; letter-spacing: -.01em; }
.steps p { color: var(--muted); font-size: 15.5px; }

.note { margin-top: 40px; border-radius: var(--radius-sm); padding: 24px; border: 1px solid var(--line); }
.note h3 { font-size: 18px; margin-bottom: 6px; }
.note p { color: var(--muted); font-size: 15.5px; }

/* ========== CONTACTO ========== */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.contact-list { display: grid; gap: 10px; }
.contact-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border-radius: var(--radius-sm); padding: 18px 20px;
  transition: background .2s;
}
a.contact-item:hover { background: var(--surface-2); }
.contact-item .ic { color: var(--blue); width: 24px; height: 24px; }
.contact-item span { display: flex; flex-direction: column; font-weight: 500; overflow-wrap: anywhere; line-height: 1.3; }
.contact-item small { font-size: 13px; color: var(--muted); font-weight: 400; }

.form { background: var(--surface); border-radius: var(--radius); padding: clamp(22px, 4vw, 34px); display: grid; gap: 16px; }
.form h2 { font-size: 24px; letter-spacing: -.02em; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.form input, .form select, .form textarea {
  width: 100%; background: #fff; border: 1px solid transparent; border-radius: 12px;
  padding: 12px 14px; font-size: 16px; color: var(--text); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 113, 227, .2); }
.form textarea { resize: vertical; min-height: 110px; }
.fineprint { font-size: 13px; color: var(--muted); text-align: center; margin-top: -4px; }

/* ========== PIE ========== */
.footer { border-top: 1px solid var(--line); padding: 28px 22px; text-align: center; font-size: 13px; color: var(--muted); display: grid; gap: 8px; }
.footer-links { display: flex; justify-content: center; gap: 18px; }
.footer-links a:hover { color: var(--text); }

/* ========== RESPONSIVE ========== */
@media (max-width: 860px) {
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .tabs { display: none; }
  .tabbar { display: flex; }
  .topbar-inner { padding: 0 18px; }
  .view-head { padding: 40px 0 28px; }
  .hero { padding: 48px 20px 40px; }
  .wrap { padding: 0 18px 56px; }
  .feature { grid-template-columns: 1fr; }
  .feature-visual { display: none; }
  .tiles { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 6px; }
  .product.is-featured { flex-direction: column; }
  .product.is-featured .product-media { flex: none; aspect-ratio: 16 / 8; }
  .pill span { display: none; }
  .pill { padding: 8px; }
  .pill .ic { width: 20px; height: 20px; }
  .footer { padding-bottom: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
