:root {
  --background: #ffffff;
  --foreground: #1d1d1f;
  --surface: #f5f5f5;
  --card: #ffffff;
  --primary: #141c26;
  --primary-foreground: #ffffff;
  --accent: #f24405;
  --accent-foreground: #ffffff;
  --muted-foreground: #6b6b70;
  --border: #e5e5e5;
  --radius: 0.5rem;
}
* { margin: 0; padding: 0; box-sizing: border-box; border-color: var(--border); }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--background); color: var(--foreground);
  -webkit-font-smoothing: antialiased; line-height: 1.5;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
.container { max-width: 72rem; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.container-narrow { max-width: 48rem; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.icon { width: 2rem; height: 2rem; color: var(--accent); }

/* Header */
header { position: sticky; top: 0; z-index: 50; background: var(--primary); border-bottom: 1px solid var(--border); }
.header-inner { max-width: 72rem; margin: 0 auto; height: 4rem; display: flex; align-items: center; justify-content: space-between; padding: 0 1.25rem; }
.logo { height: 2.25rem; width: auto; display: block; }
nav.desktop { display: none; align-items: center; gap: 2rem; }
nav.desktop a { font-size: 1rem; color: rgba(255,255,255,.85); transition: color .15s; }
nav.desktop a:hover { color: #fff; }
.header-cta { display: none; }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; background: none; border: none; color: #fff; cursor: pointer; border-radius: .375rem; }
.menu-btn .icon { color: #fff; width: 1.5rem; height: 1.5rem; }
.mobile-menu { display: none; border-top: 1px solid rgba(255,255,255,.15); background: var(--primary); padding: 0 1.25rem 1.25rem; }
.mobile-menu.open { display: block; }
.mobile-menu nav { display: flex; flex-direction: column; gap: .25rem; padding: .5rem 0; }
.mobile-menu a.mobile-link { padding: .5rem 0; font-size: 1rem; color: rgba(255,255,255,.85); }
@media (min-width: 768px) {
  nav.desktop { display: flex; }
  .header-cta { display: block; }
  .menu-btn, .mobile-menu { display: none !important; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 3rem; padding: 0 1.5rem; border-radius: .375rem;
  background: var(--accent); color: var(--accent-foreground);
  font-size: 1rem; font-weight: 700; transition: background .15s; border: none; cursor: pointer;
}
.btn:hover { background: rgba(242,68,5,.9); }
.btn-small { height: 2.5rem; padding: 0 1.25rem; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--foreground); }
.btn-outline:hover { background: var(--surface); }
.btn-block { width: 100%; }

/* Hero */
.hero { background: var(--background); }
.hero .container-narrow { padding-top: 5rem; padding-bottom: 5rem; text-align: center; }
.hero h1 { font-size: 36px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.hero p { max-width: 36rem; margin: 1.25rem auto 0; font-size: 1.125rem; color: var(--muted-foreground); }
.hero .btn { margin-top: 2rem; }
@media (min-width: 768px) {
  .hero .container-narrow { padding-top: 7rem; padding-bottom: 7rem; }
  .hero h1 { font-size: 3rem; }
}

/* Sections */
section { scroll-margin-top: 4rem; }
.section-surface { background: var(--surface); }
.section-pad { padding-top: 4rem; padding-bottom: 4rem; }
@media (min-width: 768px) { .section-pad { padding-top: 5rem; padding-bottom: 5rem; } }
h2 { font-size: 1.875rem; font-weight: 600; letter-spacing: -0.02em; }
@media (min-width: 768px) { h2 { font-size: 2.25rem; } }
.section-sub { margin-top: .75rem; font-size: 1rem; color: var(--muted-foreground); }

/* Benefits */
.benefits-grid { display: grid; gap: 2.5rem; }
.benefit { text-align: center; }
.benefit .icon { margin: 0 auto; }
.benefit h3 { margin-top: 1rem; font-size: 1.5rem; font-weight: 600; }
.benefit p { margin-top: .5rem; font-size: 1rem; color: var(--muted-foreground); }
@media (min-width: 768px) {
  .benefits-grid { grid-template-columns: repeat(3, 1fr); }
  .benefit { text-align: left; }
  .benefit .icon { margin: 0; }
}

/* Cards grid */
.grid { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.cat-card { padding: 1.5rem; transition: border-color .15s; }
.cat-card:hover { border-color: var(--accent); }
.cat-card h3 { margin-top: 1rem; font-size: 1.25rem; font-weight: 600; }
.cat-card p { margin-top: .25rem; font-size: .875rem; color: var(--muted-foreground); }
.product-card { padding: 1.25rem; }
.product-card img { aspect-ratio: 1/1; width: 100%; object-fit: contain; border-radius: .375rem; }
.product-card h3 { margin-top: 1.25rem; font-size: 1.125rem; font-weight: 600; }
.product-card .price { margin-top: .25rem; font-size: 1.25rem; font-weight: 700; }
.product-card { display: flex; flex-direction: column; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.product-card:hover { border-color: var(--accent); }
.product-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242,68,5,.15); }
.product-visual { aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; background: var(--surface); border-radius: .375rem; }
.product-visual .icon { width: 4.5rem; height: 4.5rem; }
.product-note { margin-top: .25rem; font-size: .875rem; color: var(--muted-foreground); }
.product-pay { margin-top: auto; padding-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.product-pay select { height: 2.75rem; padding: 0 .75rem; font: inherit; color: var(--foreground); background: var(--background); border: 1px solid var(--border); border-radius: .375rem; }
.product-pay select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242,68,5,.15); }
.product-pay .btn:disabled { opacity: .6; cursor: wait; }
.product-error { margin-top: .5rem; font-size: .875rem; color: #b42318; }
.product-error[hidden] { display: none; }

/* Testimonials */
.testimonial { padding: 1.5rem; }
.testimonial blockquote { font-size: 1.125rem; line-height: 1.6; }
.testimonial figcaption { margin-top: 1rem; font-size: .875rem; font-weight: 500; color: var(--muted-foreground); }
@media (min-width: 768px) { .grid.testimonials { grid-template-columns: repeat(3, 1fr); } }

/* Contact */
.contact { text-align: center; }
.contact p.lead { margin-top: .75rem; font-size: 1.125rem; color: var(--muted-foreground); }
.contact-actions { margin-top: 2rem; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
@media (min-width: 640px) { .contact-actions { flex-direction: row; justify-content: center; } }
.contact .mail { margin-top: 2rem; font-size: 1rem; }
.contact .mail a { font-weight: 500; color: var(--accent); text-decoration: underline; }

/* Footer */
footer { background: var(--primary); }
.footer-inner { max-width: 72rem; margin: 0 auto; padding: 2.5rem 1.25rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.footer-brand { font-size: 1.25rem; font-weight: 800; color: #fff; }
.footer-inner nav { display: flex; gap: 1.5rem; }
.footer-inner nav a { font-size: .875rem; color: rgba(255,255,255,.85); transition: color .15s; }
.footer-inner nav a:hover { color: #fff; }
.footer-inner p { font-size: .875rem; color: rgba(255,255,255,.7); }
@media (min-width: 640px) { .footer-inner { flex-direction: row; justify-content: space-between; } }

/* Auth */
@media (min-width: 768px) { .header-cta { display: flex; align-items: center; gap: 1rem; } }
.btn-auth { background: transparent; color: var(--primary-foreground); border: 1px solid rgba(255,255,255,.35); }
.btn-auth:hover { background: rgba(255,255,255,.1); }
.auth-logout { font-size: 1rem; color: rgba(255,255,255,.85); transition: color .15s; }
.auth-logout:hover { color: #fff; }
.mobile-auth { display: flex; flex-direction: column; gap: .5rem; margin-top: .75rem; }
.mobile-auth .auth-logout { text-align: center; }

.welcome-bar { background: var(--surface); border-bottom: 1px solid var(--border); }
.welcome-bar .container { padding-top: .625rem; padding-bottom: .625rem; font-size: .875rem; color: var(--foreground); overflow-wrap: anywhere; }
.welcome-bar strong { font-weight: 600; }

.auth-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(20,28,38,.6); }
.auth-dialog { position: relative; width: 100%; max-width: 26rem; max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); overflow-y: auto; padding: 2rem 1.5rem 1.5rem; }
.auth-close { position: absolute; top: .75rem; right: .75rem; width: 2.25rem; height: 2.25rem; display: inline-flex; align-items: center; justify-content: center; background: none; border: none; border-radius: .375rem; color: var(--muted-foreground); cursor: pointer; }
.auth-close:hover { background: var(--surface); color: var(--foreground); }
.auth-close .icon { width: 1.25rem; height: 1.25rem; color: currentColor; }
/* Área táctil de 44 px sin cambiar cómo se ven */
.auth-close::after, .auth-link::after { content: ""; position: absolute; }
.auth-close::after { inset: -4px; }
.auth-link { position: relative; }
.auth-link::after { inset: -12px -4px; }
.auth-title { font-size: 1.5rem; }
.auth-tabs { display: flex; margin-top: 1.25rem; border-bottom: 1px solid var(--border); }
.auth-tab { flex: 1; padding: .75rem 0; margin-bottom: -1px; background: none; border: none; border-bottom: 2px solid transparent; font: inherit; font-weight: 600; color: var(--muted-foreground); cursor: pointer; }
.auth-tab[aria-selected="true"] { color: var(--foreground); border-bottom-color: var(--accent); }
.auth-panel { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.auth-field { display: flex; flex-direction: column; gap: .375rem; }
.auth-field label { font-size: .875rem; font-weight: 500; }
.auth-field input { height: 2.75rem; padding: 0 .875rem; font: inherit; color: var(--foreground); background: var(--background); border: 1px solid var(--border); border-radius: .375rem; }
.auth-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242,68,5,.15); }
.auth-hint { font-size: .8125rem; color: var(--muted-foreground); }
.auth-text { color: var(--muted-foreground); overflow-wrap: anywhere; }
.auth-text strong { color: var(--foreground); }
.auth-link { align-self: flex-start; padding: 0; background: none; border: none; font: inherit; font-size: .875rem; color: var(--accent); text-decoration: underline; cursor: pointer; }
.auth-msg { padding: .75rem .875rem; font-size: .875rem; background: var(--surface); border: 1px solid var(--border); border-radius: .375rem; }
.auth-msg:empty { display: none; }
.auth-msg.is-error { border-color: var(--accent); }
.auth-msg .auth-link { display: inline; }
.auth-panel .btn:disabled { opacity: .6; cursor: wait; }
.auth-modal[hidden], .auth-panel[hidden], .auth-tabs[hidden], .welcome-bar[hidden], .auth-logout[hidden] { display: none; }
