/* ============================================================
   web.css — Public Website Stylesheet
   SaaS FujiSystem — Customer-facing catalog & pages
   Premium design · Mobile-first · Dark mode · iPhone safe-area
   ============================================================ */

/* ============================================================
   1. CSS CUSTOM PROPERTIES (defaults; overridden by web.js)
   ============================================================ */

:root {
  --web-primary:       #2563eb;
  --web-secondary:     #1e40af;
  --web-bg:            #ffffff;
  --web-bg-alt:        #f8fafc;
  --web-text:          #1e293b;
  --web-text-muted:    #64748b;
  --web-border:        #e2e8f0;
  --web-card:          #ffffff;
  --web-card-shadow:   0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(15,23,42,0.06);
  --web-radius:        14px;
  --web-radius-sm:     10px;
  --web-max-width:     1200px;
  --web-header-height: 64px;
  --web-transition:    0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --web-accent-gradient: linear-gradient(135deg, var(--web-primary), #7c3aed, #a855f7);
  --web-glow-primary:  0 0 20px color-mix(in srgb, var(--web-primary) 35%, transparent);

  /* Booking module variables (used by embedded reservas.js) */
  --accent:     var(--web-primary);
  --text:       var(--web-text);
  --heading:    var(--web-text);
  --muted:      var(--web-text-muted);
  --card:       var(--web-card);
  --bg:         var(--web-bg);
  --bg2:        var(--web-bg-alt);
  --line:       var(--web-border);
  --input-bg:   var(--web-card);
  --input-text: var(--web-text);
  --success:    #059669;
  --success-bg: #d1fae5;
  --info-bg:    #dbeafe;
}

/* v6.1 (2026-05-04d): el dark-mode :root override SOLO aplica cuando NO hay theme custom.
   Antes este bloque sobreescribia --web-text en :root, y los themes que NO lo redefinian
   (automotive-modern, etc — solo definen --amo-*) heredaban --web-text:#f1f5f9 casi blanco
   sobre bg claro --amo-bg:#f7f9fc → texto invisible en sistemas con dark mode preferido.
   Scoping a body:not([class*="web-theme-"]) hace que el override solo afecte al fallback
   default sin theme aplicado. */
@media (prefers-color-scheme: dark) {
  body:not([class*="web-theme-"]) {
    --web-bg:          #0f172a;
    --web-bg-alt:      #1e293b;
    --web-text:        #f1f5f9;
    --web-text-muted:  #94a3b8;
    --web-border:      #334155;
    --web-card:        #1e293b;
    --web-card-shadow: 0 1px 4px rgba(0,0,0,0.3), 0 4px 20px rgba(0,0,0,0.25);
    --text:            #f1f5f9;
    --heading:         #f1f5f9;
    --muted:           #94a3b8;
    --card:            #1e293b;
    --bg:              #0f172a;
    --bg2:             #1e293b;
    --line:            #334155;
    --input-bg:        #1e293b;
    --input-text:      #f1f5f9;
  }
}

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 8px color-mix(in srgb, var(--web-primary) 30%, transparent); }
  50%      { box-shadow: 0 0 24px color-mix(in srgb, var(--web-primary) 55%, transparent), 0 0 48px color-mix(in srgb, var(--web-primary) 20%, transparent); }
}

@keyframes blobMove {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(30px, -40px) scale(1.1); }
  66%  { transform: translate(-20px, 20px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes borderGlow {
  0%, 100% { border-color: color-mix(in srgb, var(--web-primary) 20%, var(--web-border)); }
  50%      { border-color: color-mix(in srgb, var(--web-primary) 50%, var(--web-border)); }
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  background: var(--web-bg);
  color: var(--web-text);
  overflow-wrap: break-word;
  word-break: break-word;
  transition: background var(--web-transition), color var(--web-transition);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--web-primary);
  text-decoration: none;
  transition: color var(--web-transition);
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  color: var(--web-text);
  letter-spacing: -0.02em;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 16px;
}

/* Scrollbar */
::-webkit-scrollbar          { width: 6px; height: 6px; }
::-webkit-scrollbar-track    { background: transparent; }
::-webkit-scrollbar-thumb    { background: var(--web-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--web-text-muted); }

/* ============================================================
   3. LAYOUT HELPERS
   ============================================================ */

.web-container {
  width: 100%;
  max-width: var(--web-max-width);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.web-main {
  padding-top: var(--web-header-height);
  min-height: calc(100dvh - var(--web-header-height));
}

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   4. HEADER & NAVIGATION
   ============================================================ */

.web-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: var(--web-header-height);
  background: transparent;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  padding-top: env(safe-area-inset-top);
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Scrolled state - activated by JS adding this class */
.web-header-scrolled {
  background: color-mix(in srgb, var(--web-bg) 85%, transparent);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid color-mix(in srgb, var(--web-border) 60%, transparent);
  box-shadow: 0 1px 24px rgba(0,0,0,0.06);
}

@media (prefers-color-scheme: dark) {
  .web-header-scrolled {
    background: color-mix(in srgb, #0f172a 80%, transparent);
    box-shadow: 0 1px 24px rgba(0,0,0,0.3);
  }
}

.web-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--web-max-width);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
  gap: 16px;
}

.web-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity var(--web-transition), transform var(--web-transition);
}

.web-logo-link:hover {
  text-decoration: none;
  opacity: 0.85;
  transform: scale(1.02);
}

.web-logo {
  height: 38px;
  width: auto;
  border-radius: var(--web-radius-sm);
}

.web-brand {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--web-text);
  letter-spacing: -0.02em;
}

/* Desktop navigation */
.web-nav {
  display: none;
  align-items: center;
  gap: 4px;
}

.web-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--web-radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--web-text-muted);
  text-decoration: none;
  transition: background var(--web-transition), color var(--web-transition);
  white-space: nowrap;
  min-height: 44px;
  position: relative;
}

/* Animated underline on hover */
.web-nav-link::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--web-primary);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.web-nav-link:hover::after {
  transform: scaleX(1);
}

.web-nav-link:hover {
  color: var(--web-primary);
  text-decoration: none;
}

.web-nav-active {
  color: var(--web-primary);
  font-weight: 600;
  background: color-mix(in srgb, var(--web-primary) 10%, transparent);
}

.web-nav-active::after {
  transform: scaleX(1);
}

/* Hamburger button */
.web-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--web-border);
  border-radius: var(--web-radius-sm);
  background: transparent;
  color: var(--web-text);
  font-size: 1.3rem;
  transition: background var(--web-transition), border-color var(--web-transition), transform var(--web-transition);
  flex-shrink: 0;
}

.web-menu-btn:hover {
  background: var(--web-bg-alt);
  border-color: var(--web-primary);
  transform: scale(1.05);
}

/* Mobile nav open state */
.web-nav-open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: fixed;
  inset-block-start: var(--web-header-height);
  inset-inline: 0;
  background: color-mix(in srgb, var(--web-bg) 95%, transparent);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--web-border);
  padding: 16px clamp(16px, 4vw, 32px) 20px;
  gap: 4px;
  z-index: 999;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  animation: fadeInUp 0.25s ease-out;
}

.web-nav-open .web-nav-link {
  font-size: 1rem;
  padding: 14px 16px;
  border-radius: var(--web-radius-sm);
}

.web-nav-open .web-nav-link::after {
  display: none;
}

/* ============================================================
   5. HERO
   ============================================================ */

.web-hero {
  position: relative;
  width: 100%;
  min-height: clamp(340px, 60vw, 70vh);
  background: var(--web-bg-alt) center center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Dark overlay with gradient */
.web-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(0,0,0,0.65) 0%,
    rgba(0,0,0,0.35) 50%,
    rgba(0,0,0,0.55) 100%
  );
  z-index: 1;
}

/* Animated gradient blob overlay */
.web-hero::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, color-mix(in srgb, var(--web-primary) 25%, transparent) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
  animation: blobMove 12s ease-in-out infinite;
  pointer-events: none;
}

.web-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 740px;
  padding: 48px clamp(24px, 5vw, 56px);
  color: #ffffff;
  /* Glassmorphism card */
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  animation: fadeInUp 0.8s ease-out;
}

.web-hero-title {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 16px;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.03em;
  /* Gradient shimmer text */
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    #e0e7ff 25%,
    #ffffff 50%,
    #c7d2fe 75%,
    #ffffff 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}

.web-hero-subtitle {
  font-size: clamp(1.05rem, 2.8vw, 1.35rem);
  opacity: 0.9;
  margin-bottom: 32px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
  color: #ffffff;
  line-height: 1.5;
}

.web-hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   6. BUTTONS
   ============================================================ */

.web-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  min-height: 48px;
  line-height: 1;
  letter-spacing: 0.01em;
}

.web-btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.web-btn:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

.web-btn-primary {
  background: linear-gradient(135deg, var(--web-primary), color-mix(in srgb, var(--web-primary) 80%, #7c3aed));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 12px color-mix(in srgb, var(--web-primary) 30%, transparent);
}

.web-btn-primary:hover {
  background: linear-gradient(135deg, var(--web-secondary), color-mix(in srgb, var(--web-secondary) 80%, #7c3aed));
  color: #ffffff;
  box-shadow: 0 4px 24px color-mix(in srgb, var(--web-primary) 45%, transparent);
  animation: pulseGlow 2s ease-in-out infinite;
}

.web-btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
  border-color: rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
}

.web-btn-secondary:hover {
  background: rgba(255,255,255,0.22);
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 4px 20px rgba(255,255,255,0.12);
}

.web-btn-outline {
  background: transparent;
  color: var(--web-primary);
  border-color: var(--web-primary);
}

.web-btn-outline:hover {
  background: color-mix(in srgb, var(--web-primary) 10%, transparent);
  color: var(--web-primary);
  box-shadow: var(--web-glow-primary);
}

.web-btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(37,211,102,0.3);
}

.web-btn-whatsapp:hover {
  background: linear-gradient(135deg, #1ebe5d, #0f7b6f);
  color: #ffffff;
  box-shadow: 0 4px 24px rgba(37,211,102,0.4);
}

.web-btn-wa-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--web-radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #ffffff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--web-transition);
  min-height: 36px;
  white-space: nowrap;
}

.web-btn-wa-small:hover {
  background: linear-gradient(135deg, #1ebe5d, #0f7b6f);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(37,211,102,0.35);
}

/* ============================================================
   7. SECTIONS
   ============================================================ */

.web-section {
  padding: clamp(48px, 7vw, 88px) clamp(16px, 4vw, 32px);
  max-width: var(--web-max-width);
  margin-inline: auto;
  position: relative;
}

/* Section divider - gradient line between sections */
.web-section + .web-section::before,
.web-section-alt + .web-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 400px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--web-border), transparent);
}

.web-section-alt {
  background: var(--web-bg-alt);
}

.web-section-title {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 40px;
  color: var(--web-text);
  letter-spacing: -0.02em;
  position: relative;
}

/* Decorative underline for section titles */
.web-section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--web-accent-gradient);
  border-radius: 2px;
  margin: 12px auto 0;
}

.web-section-cta {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.web-page-title {
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  font-weight: 800;
  color: var(--web-text);
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}

/* Filters, Products, Product Detail, Pagination → web-products.css */

/* ============================================================
   8. CONTACT
   ============================================================ */

.web-contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.web-contact-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  background: var(--web-card);
  border: 1px solid var(--web-border);
  border-radius: var(--web-radius);
  box-shadow: var(--web-card-shadow);
  position: relative;
  overflow: hidden;
}

/* Gradient accent top border */
.web-contact-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--web-accent-gradient);
}

.web-contact-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.web-contact-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--web-primary);
  background: color-mix(in srgb, var(--web-primary) 8%, transparent);
  border-radius: 10px;
  transition: background var(--web-transition), transform var(--web-transition);
}

.web-contact-row:hover .web-contact-icon {
  background: color-mix(in srgb, var(--web-primary) 15%, transparent);
  transform: scale(1.05);
}

.web-contact-row a {
  color: var(--web-primary);
  word-break: break-all;
}

.web-contact-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 28px;
  background: var(--web-card);
  border: 1px solid var(--web-border);
  border-radius: var(--web-radius);
  box-shadow: var(--web-card-shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Gradient accent top border */
.web-contact-social::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--web-accent-gradient);
}

.web-contact-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.web-contact-item {
  margin-bottom: 8px;
}

.web-contact-item a {
  color: var(--web-primary);
}

.web-social-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.web-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--web-bg-alt);
  border: 1px solid var(--web-border);
  font-size: 1.25rem;
  color: var(--web-text);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.web-social-link:hover {
  background: color-mix(in srgb, var(--web-primary) 12%, transparent);
  color: var(--web-primary);
  border-color: var(--web-primary);
  transform: translateY(-4px) scale(1.08);
  text-decoration: none;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--web-primary) 20%, transparent);
}

/* ============================================================
   9. ABOUT
   ============================================================ */

.web-about-text {
  max-width: 740px;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--web-text);
}

.web-about-text p + p {
  margin-top: 1.2em;
}

/* ============================================================
   10. FOOTER
   ============================================================ */

.web-footer {
  background: #0a0a1a;
  color: #94a3b8;
  padding: 40px clamp(16px, 4vw, 32px);
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
  margin-top: auto;
  position: relative;
}

/* Gradient top border line */
.web-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--web-primary), #7c3aed, #a855f7, var(--web-primary));
}

@media (prefers-color-scheme: dark) {
  .web-footer {
    background: #050510;
  }
}

.web-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: var(--web-max-width);
  margin-inline: auto;
  text-align: center;
}

.web-footer-social {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.web-footer-social .web-social-link {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: #94a3b8;
}

.web-footer-social .web-social-link:hover {
  background: rgba(255,255,255,0.12);
  color: #f1f5f9;
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 4px 16px rgba(255,255,255,0.06);
}

.web-footer-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #ffffff;
  border-radius: var(--web-radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--web-transition);
  min-height: 44px;
}

.web-footer-wa:hover {
  background: linear-gradient(135deg, #1ebe5d, #0f7b6f);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(37,211,102,0.3);
}

.web-footer-copy {
  font-size: 0.8rem;
  color: #475569;
  text-align: center;
}

/* ============================================================
   11. UTILITIES
   ============================================================ */

.web-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  color: var(--web-text-muted);
  font-size: 0.95rem;
  gap: 10px;
}

.web-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  color: var(--web-text-muted);
  text-align: center;
  gap: 10px;
  font-size: 1rem;
}

.web-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  color: #dc2626;
  text-align: center;
  gap: 10px;
  font-size: 0.95rem;
}

@media (prefers-color-scheme: dark) {
  .web-error {
    color: #f87171;
  }
}

.web-disabled {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 48px 24px;
  color: var(--web-text-muted);
  text-align: center;
  font-size: 1rem;
}

/* ============================================================
   12. RESPONSIVE
   ============================================================ */

@media (min-width: 640px) {
  .web-contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .web-nav {
    display: flex;
  }

  .web-menu-btn {
    display: none;
  }

  .web-hero {
    min-height: 70vh;
  }
}

@media (min-width: 1024px) {
  .web-contact-grid {
    grid-template-columns: 3fr 2fr;
    gap: 40px;
  }
}

/* ── Tablet & Mobile (≤768px) ── */
@media (max-width: 768px) {
  .web-nav {
    flex-wrap: wrap;
  }
  .web-nav-link {
    font-size: 0.85rem;
    padding: 6px 10px;
  }
  .web-nav-user-email {
    display: none !important; /* hide email on mobile nav — too crowded */
  }
  .web-nav-user-group {
    display: none !important;
  }
  .web-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .web-product-detail {
    flex-direction: column;
  }
  .web-product-detail img {
    max-height: 300px;
  }
  .web-section {
    padding: 32px 16px;
  }
  .web-page-title {
    font-size: 1.5rem;
  }
  .web-hero-title {
    font-size: 1.8rem;
  }
  .web-contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Small phones (≤429px) ── */
@media (max-width: 429px) {
  .web-hero-content {
    padding: 32px 20px;
    border-radius: 16px;
  }

  .web-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .web-hero-actions .web-btn {
    justify-content: center;
  }

  .web-section {
    padding: 36px 16px;
  }

  .web-contact-info,
  .web-contact-social {
    padding: 20px;
  }

  .web-social-link {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }

  .web-hero-title {
    font-size: 1.6rem;
  }
}

/* Ultra-small phones (<375px) */
@media (max-width: 374px) {
  .web-hero-content {
    padding: 24px 16px;
    border-radius: 12px;
  }

  .web-hero-title {
    font-size: 1.4rem;
  }

  .web-hero-subtitle {
    font-size: 0.9rem;
  }

  .web-btn {
    padding: 12px 20px;
    font-size: 0.88rem;
  }

  .web-section-title {
    font-size: 1.3rem;
  }

  .web-contact-icon {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }
}

/* ============================================================
   13. PRINT STYLES
   ============================================================ */

@media print {
  .web-header,
  .web-footer,
  .web-menu-btn,
  .web-nav {
    display: none !important;
  }

  .web-main {
    padding-top: 0;
  }

  body {
    background: #ffffff;
    color: #000000;
    padding: 0;
  }

  a {
    color: #000;
    text-decoration: none;
  }
}

/* Portal styles → web-portal.css */
/* Social Feed & Banners → web-extras.css */
/* Cart & Checkout → web-cart.css */
/* Products, Filters, Detail, Pagination → web-products.css */

/* ============================================================
   UNIFIED HEADER v3 (2026-04-24) — una sola barra persistente
   Reemplaza .web-header-inner + .web-logo-link + .web-nav legacy.
   Estilo tipo header-ecommerce pero integrado al framework.
   ============================================================ */
.web-header:has(.web-uhdr-inner),
.web-header.web-uhdr-active {
  background: #0f172a;
  height: auto;
  min-height: var(--web-header-height);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* v5 (2026-05-04c): cuando se activa scroll-state, NO degradar a fondo claro
   (causa textos blancos sobre fondo blanco invisible). Mantener dark + reforzar
   con backdrop-blur. Sobrescribe la regla generica .web-header-scrolled del top. */
.web-header.web-header-scrolled:has(.web-uhdr-inner),
.web-header.web-header-scrolled.web-uhdr-active {
  background: rgba(15, 23, 42, 0.92) !important;
  backdrop-filter: blur(20px) saturate(1.6) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.6) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: 0 4px 28px rgba(0,0,0,0.35) !important;
}

.web-uhdr-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  /* v8 (2026-05-04f): navbar FULL-WIDTH. max-width:1200 + 6 nav-links + brand
     "OS PREMIUM SERVICES" + search 280 + actions excedia 1144px disponibles a
     >=1501 y a zoom 80% (viewport CSS efectivo ~1875). Patron GitHub/Stripe/
     Vercel: header usa todo el viewport con padding holgado, secciones siguen
     en 1200. Cero overlap garantizado por construccion a cualquier zoom. */
  max-width: none;
  width: 100%;
  margin-inline: 0;
  padding: 10px clamp(16px, 3vw, 40px);
  min-height: 64px;
  /* v5 (2026-05-04c): permitir que los hijos flex se contraigan correctamente.
     Sin min-width:0 los <a> con texto largo (brand/auth label) NO se contraen
     y el header desborda en viewports intermedios (1025-1500px). */
  min-width: 0;
  /* v8 (2026-05-04f): overflow:hidden REMOVIDO. Era parche v7 que clipaba
     silenciosamente el desborde. Con max-width:none ya no hace falta y su
     ausencia evita que .web-uhdr-search-icon (position:absolute) escape el
     clipping context y se renderice ENCIMA de los nav-links. */
}

.web-uhdr-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}
.web-uhdr-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
}
.web-uhdr-brand {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.web-uhdr-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 1 auto;
  min-width: 0;
}
.web-uhdr-link {
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.web-uhdr-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.web-unav-link {
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.web-unav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.web-unav-link-active {
  color: #fbbf24;
  background: rgba(251,191,36,0.08);
  border-bottom: 2px solid #fbbf24;
  border-radius: 6px 6px 0 0;
}

/* v7 (2026-05-04e): search SIEMPRE como toggle hasta desktop grande.
   Solo expande inline a viewport >=1501px. Patron GitHub/Stripe/Vercel/Linear.
   Elimina por construccion el overlap entre 1025-1500 (sin input visible que
   pueda chocar con nav links). El overlay del toggle abierto se controla con
   .web-uhdr-search-open en el header (CSS mas abajo). */
.web-uhdr-search {
  flex: 0 0 40px;
  min-width: 40px;
  max-width: 40px;
  position: relative;
}
.web-uhdr-search input {
  display: none;
  width: 100%;
  padding: 10px 16px 10px 42px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.05);
  color: #fff;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.web-uhdr-search input::placeholder { color: rgba(255,255,255,0.4); }
.web-uhdr-search input:focus {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
}
.web-uhdr-search-icon {
  display: none;
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.5);
  pointer-events: none;
}
.web-uhdr-search-toggle {
  display: inline-flex;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.web-uhdr-search-toggle:hover { background: rgba(255,255,255,0.08); color: #fff; }
.web-uhdr-search-toggle svg { width: 20px; height: 20px; }
/* Toggle abierto: input full-width como overlay sobre el header */
.web-header.web-uhdr-search-open .web-uhdr-search input {
  display: block;
  position: absolute;
  top: 100%;
  left: 8px;
  right: 8px;
  width: auto;
  margin-top: 6px;
  padding: 12px 18px 12px 44px;
  font-size: 1rem;
  background: rgba(15,23,42,0.96);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  z-index: 60;
}
.web-header.web-uhdr-search-open .web-uhdr-search-icon {
  display: block;
  position: absolute;
  top: 100%;
  left: 24px;
  margin-top: 18px;
  pointer-events: none;
  z-index: 61;
}
/* v7: en desktop GRANDE (>=1501), search expande inline; toggle se oculta */
@media (min-width: 1501px) {
  .web-uhdr-search {
    flex: 0 1 280px;
    min-width: 220px;
    max-width: 360px;
  }
  .web-uhdr-search input { display: block; position: static; padding: 10px 16px 10px 42px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); margin-top: 0; box-shadow: none; }
  .web-uhdr-search-icon { display: block; position: absolute; top: 50%; left: 14px; transform: translateY(-50%); margin-top: 0; }
  .web-uhdr-search-toggle { display: none; }
}

.web-uhdr-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.web-uhdr-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s;
  position: relative;
}
.web-uhdr-action:hover { background: rgba(255,255,255,0.08); }
.web-uhdr-action svg { opacity: 0.9; flex-shrink: 0; }
.web-uhdr-cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.web-uhdr-logout {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
}
.web-uhdr-logout:hover {
  border-color: #ef4444;
  color: #ef4444;
}

.web-uhdr-menu-btn {
  display: none;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.8em;
  cursor: pointer;
  padding: 0 8px;
}

/* ── v7 (2026-05-04e): los breakpoints intermedios 1025-1500 ya NO existen ──
   Reemplazados por la regla default (search en toggle mode) + el @media
   (min-width: 1501px) que expande inline. Resultado:
   • <=1024px: hamburger menu + search visible (regla mas abajo).
   • 1025-1500px: nav 6 links + search como toggle icono + actions con texto.
                  Cero overlap por construccion (no hay input search inline).
   • >=1501px: search expandido inline, toggle oculto.
   Compresion moderada de nav links + actions a 1025-1500: */
@media (max-width: 1500px) and (min-width: 1025px) {
  .web-uhdr-inner { gap: 12px; }
  .web-unav-link { padding: 6px 9px; font-size: 0.78rem; letter-spacing: 0.03em; }
  .web-uhdr-action { padding: 6px 9px; font-size: 0.8rem; gap: 5px; }
  .web-uhdr-action span {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
  }
  .web-uhdr-actions { gap: 4px; }
  .web-uhdr-brand { font-size: 0.92rem; }
  .web-uhdr-logo img { width: 32px; height: 32px; }
}

/* 769-1024: compresion sin wrap (iPad landscape, small desktop).
   Mantiene nav + search-toggle + actions inline, solo achica spans/links. */
@media (max-width: 1024px) {
  .web-uhdr-action span { display: none; }
  .web-unav-link { padding: 6px 10px; font-size: 0.78rem; letter-spacing: 0.05em; }
}

/* v9 (2026-05-05): en wrap mode el navbar crece a ~98-110px (2 filas: logo+actions / nav).
   --web-header-height debe acompañar para que .web-main padding-top NO esconda el primer
   contenido (announcement-bar) bajo el navbar fixed. JS en web.js renderNav() ajusta
   con la altura real (ResizeObserver), pero estos defaults aseguran first-paint correcto. */
@media (max-width: 1023px) {
  :root { --web-header-height: 110px; }
}

/* v9 (2026-05-05): WRAP layout extendido a <=1023 para cubrir iPhone landscape (~932/956px).
   Antes wrap solo a <=768, dejando 769-1024 sin wrap → en iPhone landscape los nav-links
   chocaban con search/actions (cliente reporto search-icon encima de "CONTACTO").
   Ademas search ya no toma fila propia en mobile portrait (antes flex-basis:100%):
     Row 1: Logo + (gap auto) + Search-toggle(40px) + Login + Cart
     Row 2: Nav scrollable horizontal
   Si search no se renderiza (tenant lo desactivo), regla `.web-uhdr-nav + .web-uhdr-actions`
   empuja actions a la derecha igual (alineacion perfecta con o sin lupa). */
@media (max-width: 1023px) {
  .web-uhdr-inner { flex-wrap: wrap; gap: 10px; padding: 8px 16px; }
  .web-uhdr-logo { order: 0; }
  .web-uhdr-search {
    flex: 0 0 40px;
    min-width: 40px;
    max-width: 40px;
    order: 5;
    margin-left: auto;
    /* v9: position:static en wrap mode -> el input.absolute del overlay se posiciona
       contra .web-header (ancestro positioned) y queda full-width abajo del navbar.
       Antes era position:relative con container 40px → overlay quedaba 24px de ancho. */
    position: static;
  }
  .web-uhdr-actions { order: 6; }
  /* Fallback cuando search NO se renderiza: actions adyacente a nav toma margin-left:auto */
  .web-uhdr-inner > .web-uhdr-nav + .web-uhdr-actions { margin-left: auto; }
  .web-uhdr-logout { order: 7; }
  .web-uhdr-menu-btn { order: 8; display: none; }
  .web-uhdr-nav {
    order: 10;
    flex-basis: 100%;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    position: relative;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), transparent 100%);
  }
  .web-uhdr-nav::-webkit-scrollbar { height: 3px; }
  .web-uhdr-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
  .web-uhdr-nav .web-unav-link { scroll-snap-align: start; flex-shrink: 0; }
  .web-unav-link { padding: 6px 12px; font-size: 0.78rem; letter-spacing: 0.04em; }

  /* Search overlay abierto en wrap mode: input full-width relativo a .web-header */
  .web-header.web-uhdr-search-open .web-uhdr-search input {
    left: 8px;
    right: 8px;
    width: auto;
  }
  .web-header.web-uhdr-search-open .web-uhdr-search-icon {
    left: 22px;
  }
}

@media (max-width: 430px) {
  .web-uhdr-inner { padding: 6px 12px; gap: 6px; }
  /* v9 (2026-05-05): brand truncado + flex-shrink para que logo ceda espacio
     a search+actions en mobile portrait. Sin esto, en iPhone SE/SE3 el brand
     "OS PREMIUM SERVICES" empuja actions a una segunda fila debajo de search. */
  .web-uhdr-brand {
    font-size: 0.85rem;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .web-uhdr-logo { min-width: 0; flex-shrink: 1; }
  .web-uhdr-logo img { width: 30px; height: 30px; }
  .web-uhdr-action svg { width: 22px; height: 22px; }
  .web-uhdr-search input { font-size: 0.92rem; padding: 8px 14px 8px 36px; }
  .web-unav-link { padding: 5px 10px !important; font-size: 0.72rem !important; letter-spacing: 0.02em !important; }
}

/* v9 (2026-05-05): viewport ultra-chico (iPhone SE 375 / Galaxy 360) — brand
   se contrae mas para garantizar Logo+Search+Actions caben en una sola fila. */
@media (max-width: 380px) {
  .web-uhdr-brand { font-size: 0.78rem; max-width: 130px; }
  .web-uhdr-logo img { width: 28px; height: 28px; }
}

/* ============================================================
   v6 (2026-05-04d) — Cleanup post-audit (jornada 2026-05-04d)
   ============================================================
   El bloque "v5 PREMIUM POLISH OVERRIDES" (ex 2026-05-04c) era
   DEAD CODE: web-sections.css se carga DESPUES de web.css en
   server.js:920-927, asi que sus reglas con specificity igual
   ganaban por orden de cascada. El override aqui NUNCA aplico.

   Fix de raiz: opacity de subtitulos/labels normalizada a >=0.85
   (WCAG AA) directamente en frontend/css/web-sections.css.
   Si algun theme aplica color light en futuro, el override va
   en frontend/css/web-theme-*.css especifico, NO aqui.

   Las mejoras cosmeticas del v5 (timeline cards premium look,
   gradient vertical line, date badges premium, section padding
   80px en desktop) se omiten en v6 — eran cosmeticas, no de
   contraste, y agregaban complejidad sin solucionar la causa raiz.
   Si se necesitan en futuro, agregar en web-sections.css con
   specificity nativa.
   ============================================================ */
