/* ==========================================================================
   ESTILOS MAESTROS ULTRA-PREMIUM (LIGHT & DARK MODE)
   SILLAS DE RUEDAS Y ORTOPEDIA TACUBA (NGV-BRICHT)
   ========================================================================== */

:root {
    /* MODO CLARO (DEFAULT) */
    --primary: #0056B3;
    --primary-light: #eff6ff;
    --primary-hover: #004494;
    --primary-glow: rgba(0, 86, 179, 0.25);
    
    --secondary: #00A896;
    --secondary-light: #f0fdfa;
    --secondary-hover: #0f766e;
    --secondary-glow: rgba(0, 168, 150, 0.25);
    
    --accent: #0284C7;
    --dark: #0f172a;
    --slate: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --border-subtle: rgba(226, 232, 240, 0.8);
    
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-secondary: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.88);
    --bg-glass-strong: rgba(255, 255, 255, 0.96);
    
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 30px -5px rgba(0, 86, 179, 0.08);
    --shadow-lg: 0 20px 40px -10px rgba(0, 86, 179, 0.12);
    --shadow-glow: 0 0 20px rgba(0, 168, 150, 0.2);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 9999px;
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Montserrat', system-ui, -apple-system, sans-serif;
    --font-bricht: 'Nunito', system-ui, -apple-system, sans-serif;
    
    --transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   VARIABLES DE MODO OSCURO (DEEP CLINICAL OBSIDIAN)
   ========================================================================== */
[data-theme="dark"] {
    --primary: #38BDF8;
    --primary-light: rgba(56, 189, 248, 0.12);
    --primary-hover: #7dd3fc;
    --primary-glow: rgba(56, 189, 248, 0.3);
    
    --secondary: #14B8A6;
    --secondary-light: rgba(20, 184, 166, 0.12);
    --secondary-hover: #2dd4bf;
    --secondary-glow: rgba(20, 184, 166, 0.3);
    
    --accent: #60A5FA;
    --dark: #ffffff;
    --slate: #f8fafc;
    --muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.09);
    --border-subtle: rgba(255, 255, 255, 0.06);
    
    --bg-page: #0B0F17;
    --bg-card: #131B2A;
    --bg-card-secondary: #1E293B;
    --bg-glass: rgba(19, 27, 42, 0.85);
    --bg-glass-strong: rgba(19, 27, 42, 0.95);
    
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 25px rgba(20, 184, 166, 0.35);
}

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

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--slate);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   TIPOGRAFÍAS OFICIALES NGV & BRICHT (REGLA CORPORATIVA ESTRICTA)
   ========================================================================== */
.brand-ngv {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 900 !important;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    color: #0056B3;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}
[data-theme="dark"] .brand-ngv { color: #38BDF8; }

.brand-bricht {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 900 !important;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    color: #00A896;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}
[data-theme="dark"] .brand-bricht { color: #14B8A6; }

.holding-badge-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: var(--transition);
}
.holding-badge-link:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

/* ==========================================================================
   1. OPENING CINEMÁTICO MÉDICO (1.25s)
   ========================================================================== */
#cinematic-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-page);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    transform: scale(0.95);
    animation: splashPulse 1.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash-logo {
    width: clamp(120px, 28vw, 160px);
    height: auto;
    filter: drop-shadow(0 16px 40px var(--primary-glow));
}

.splash-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(1rem, 3vw, 1.45rem);
    color: var(--primary);
    letter-spacing: 1.5px;
    text-align: center;
    line-height: 1.3;
    max-width: 90vw;
}
.splash-title span { color: var(--secondary); display: block; }

.splash-subtitle {
    font-size: clamp(0.62rem, 1.5vw, 0.78rem);
    color: var(--muted);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 600;
    text-align: center;
    max-width: 90vw;
}

@keyframes splashPulse {
    0% { opacity: 0; transform: scale(0.88); }
    40% { opacity: 1; transform: scale(1.02); }
    85% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.05); }
}

/* ==========================================================================
   2. TOP NOTICE BAR & NAVBAR GLASSMORPHISM
   ========================================================================== */
.top-notice-bar {
    background: linear-gradient(90deg, #003e82, #0056B3, #00A896);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 7px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
}
.notice-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
}

.notice-left, .notice-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.top-notice-bar a {
    color: #ffffff;
    text-decoration: none;
}
.top-notice-bar a:hover {
    text-decoration: underline;
}

header.navbar {
    position: sticky;
    top: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-brand img {
    height: 48px;
    width: auto;
    transition: filter 0.3s ease;
}
[data-theme="dark"] .nav-brand img {
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.3));
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 26px;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--slate);
    transition: var(--transition);
    position: relative;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--primary-glow);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* BOTÓN MINIMALISTA DE MODO OSCURO */
.btn-theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate);
    cursor: pointer;
    transition: var(--transition);
}
.btn-theme-toggle:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    transform: rotate(15deg);
}

/* BOTONES DE ACCIÓN NAVBAR */
.btn-nav-icon {
    background: var(--bg-card);
    border: 1px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.btn-nav-icon:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    width: 19px;
    height: 19px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

/* BOTÓN UNIFICADO DE MI CUENTA / ACCESO */
.btn-auth-nav {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-auth-nav:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--slate);
}

/* ==========================================================================
   3. HERO SECTION CINEMÁTICO & PRESTIGIO CLÍNICO
   ========================================================================== */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-page) 60%, var(--secondary-light) 100%);
    padding: 70px 24px 90px;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.hero-container {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 50px;
    align-items: center;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}

.hero-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 3rem;
    line-height: 1.15;
    color: var(--dark);
    margin-bottom: 22px;
    letter-spacing: -0.5px;
}
.hero-title span { color: var(--primary); }
.hero-title .highlight-teal { color: var(--secondary); }

.hero-desc {
    font-size: 1.08rem;
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 34px;
    max-width: 600px;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 40px;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    text-decoration: none;
    padding: 13px 26px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 22px var(--primary-glow);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px var(--primary-glow);
}

.btn-secondary {
    background: var(--secondary);
    color: #ffffff;
    text-decoration: none;
    padding: 13px 26px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 22px var(--secondary-glow);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.btn-secondary:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background: var(--bg-card);
    color: var(--slate);
    border: 1px solid var(--border);
    padding: 13px 24px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.hero-stats {
    display: flex;
    gap: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.stat-item h4 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}
.stat-item p {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
    margin-top: 4px;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-card-featured {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 440px;
    text-align: center;
    transition: var(--transition);
}
.hero-card-featured:hover {
    box-shadow: var(--shadow-glow), var(--shadow-lg);
    transform: translateY(-4px);
}

.hero-card-featured img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: #ffffff;
    padding: 10px;
}

/* ==========================================================================
   4. CATÁLOGO INTERACTIVO ULTRA-PREMIUM (MODO DUAL VENTA/RENTA)
   ========================================================================== */
.section-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 70px 24px;
}

.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 44px;
}

.section-tag {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
}

.section-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2.3rem;
    color: var(--dark);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.6;
}

/* TOOLBAR MINIMALISTA */
.catalog-toolbar {
    background: var(--bg-card);
    padding: 16px 22px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 34px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 260px;
}
.search-wrapper svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}
.search-input {
    width: 100%;
    padding: 10px 14px 10px 42px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-page);
    color: var(--slate);
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition);
}
.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cat-btn {
    background: var(--bg-card-secondary);
    border: 1px solid transparent;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: var(--transition);
}
.cat-btn:hover, .cat-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.mode-filter-toggle {
    display: flex;
    background: var(--bg-card-secondary);
    padding: 4px;
    border-radius: var(--radius-full);
}
.mode-filter-btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: var(--transition);
}
.mode-filter-btn.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* GRID DE PRODUCTOS */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.card-media {
    position: relative;
    background: #ffffff; /* Las fotos de catálogo de estudio lucen óptimas sobre fondo blanco */
    padding: 16px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
}
.card-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.35s ease;
}
.product-card:hover .card-media img {
    transform: scale(1.05);
}

.card-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.badge-tag {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
}
.badge-tag.hospital {
    background: var(--primary-light);
    color: var(--primary);
}
.badge-tag.rent-available {
    background: var(--secondary-light);
    color: var(--secondary);
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.card-category {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--dark);
    line-height: 1.3;
}

.specs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0;
}
.spec-chip {
    background: var(--bg-card-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    padding: 3px 8px;
    border-radius: 6px;
}

/* SELECTOR DUAL (VENTA / RENTA) EN CARD */
.dual-mode-container {
    background: var(--bg-card-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px;
    margin-top: auto;
}

.dual-switcher {
    display: flex;
    background: var(--border);
    border-radius: var(--radius-full);
    padding: 3px;
    margin-bottom: 8px;
}

.dual-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 6px 0;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.dual-btn.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.rental-options-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.rental-period-btn {
    flex: 1;
    border: 1px solid var(--border);
    background: var(--bg-card);
    padding: 5px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.rental-period-btn.active {
    border-color: var(--secondary);
    background: var(--secondary-light);
    color: var(--secondary);
    font-weight: 700;
}

.price-display {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 4px 0;
}
.price-main {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--primary);
}
.price-period-label {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 600;
}

.warranty-deposit-note {
    font-size: 0.7rem;
    color: #eab308;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-footer {
    padding: 0 20px 20px;
}

.btn-add-cart {
    width: 100%;
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}
.btn-add-cart:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 14px var(--primary-glow);
}

/* ==========================================================================
   5. COTIZADOR DE FLETES Y TALLER DE REPARACIÓN
   ========================================================================= */
.freight-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 34px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.freight-origin-badge {
    background: var(--primary-light);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--slate);
    margin-bottom: 6px;
}

.form-select, .form-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    background: var(--bg-page);
    color: var(--slate);
    outline: none;
    transition: var(--transition);
}
.form-select:focus, .form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.freight-result-card {
    background: var(--bg-card-secondary);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 2px dashed var(--border);
    text-align: center;
}
.freight-price-val {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary);
    margin: 8px 0;
}
.freight-delivery-time {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.taller-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.taller-info-card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.service-list {
    list-style: none;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.service-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.service-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--secondary-light);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ==========================================================================
   6. CARRITO DE COMPRAS & MODALES
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 15, 23, 0.7);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.cart-drawer {
    width: 100%;
    max-width: 490px;
    height: 100vh;
    background: var(--bg-card);
    box-shadow: -10px 0 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active .cart-drawer {
    transform: translateX(0);
}

.drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.drawer-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.cart-item {
    display: flex;
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--bg-card-secondary);
    border: 1px solid var(--border);
}
.cart-item img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 8px;
    background: #ffffff;
}
.cart-item-details { flex: 1; }
.cart-item-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--dark);
}
.cart-item-mode {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
}
.cart-item-price {
    font-weight: 800;
    color: var(--primary);
    font-size: 0.95rem;
    margin-top: 4px;
}

.cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}
.qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--slate);
    cursor: pointer;
    font-weight: 700;
}

.drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--muted);
}
.summary-row.total {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--dark);
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.gateway-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 8px 0;
}
.gateway-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    background: var(--bg-card-secondary);
    color: var(--slate);
}
.gateway-card.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* ==========================================================================
   7. MODAL UNIFICADO DE AUTENTICACIÓN (LOGIN & REGISTRO DE CLIENTES)
   ========================================================================== */
.center-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 15, 23, 0.75);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.center-modal.active { display: flex; }

.modal-dialog {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 960px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.modal-auth-box { max-width: 460px; }

.modal-header {
    padding: 20px 26px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card-secondary);
}
.modal-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-body { padding: 26px; }

.auth-nav-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.auth-tab-btn {
    flex: 1;
    border: none;
    background: none;
    padding: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    text-align: center;
}
.auth-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ERP TABS & TABLES */
.erp-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    overflow-x: auto;
}
.erp-tab-btn {
    border: none;
    background: none;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}
.erp-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.erp-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.kpi-card {
    background: var(--bg-card-secondary);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: var(--radius-md);
}
.kpi-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
}
.kpi-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--dark);
    margin-top: 4px;
}

.table-responsive { overflow-x: auto; }
.erp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    text-align: left;
}
.erp-table th {
    background: var(--bg-card-secondary);
    padding: 10px 14px;
    font-weight: 700;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}
.erp-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--slate);
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
}
.status-badge.active { background: #dcfce7; color: #166534; }
.status-badge.warning { background: #fef3c7; color: #92400e; }
.status-badge.danger { background: #fee2e2; color: #991b1b; }

/* ==========================================================================
   8. FOOTER CORPORATIVO & FIRMA OFICIAL NGV - BRICHT
   ========================================================================== */
footer.site-footer {
    background: #080C14;
    color: #94a3b8;
    padding: 60px 24px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-container {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    font-family: var(--font-heading);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 16px;
}
.footer-col p {
    font-size: 0.85rem;
    line-height: 1.6;
}
.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}
.footer-links a:hover {
    color: #ffffff;
    padding-left: 4px;
}

.footer-bottom {
    max-width: 1320px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: #64748b;
    flex-wrap: wrap;
    gap: 12px;
}

.bricht-signature {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   9. RESPONSIVE ADAPTABILITY
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-desc { margin: 0 auto 32px; }
    .hero-cta-group, .hero-stats { justify-content: center; }
    .freight-box, .taller-grid { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr 1fr; }
    .erp-kpis { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .hamburger-btn { display: block; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
        border-bottom: 1px solid var(--border);
    }
    .nav-menu.mobile-open { display: flex; }
    .hero-title { font-size: 2.2rem; }
    .footer-container { grid-template-columns: 1fr; }
    .erp-kpis { grid-template-columns: 1fr; }
}

/* ==========================================================================
   10. MÓDULO GPS GEOLOCALIZACIÓN & HUB DE NAVEGACIÓN (MAPS & WAZE)
   ========================================================================== */
.gps-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.gps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.gps-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gps-radar-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 86, 179, 0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

[data-theme="dark"] .gps-radar-icon {
    background: rgba(56, 189, 248, 0.15);
}

.gps-radar-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary);
    animation: radar-pulse 2s infinite ease-out;
}

@keyframes radar-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

.store-status-badge {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

[data-theme="dark"] .store-status-badge {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.15);
}

.gps-result-box {
    background: var(--bg-card-secondary);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin: 16px 0;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.nav-hub-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.btn-nav-gmaps {
    background: #4285F4;
    color: #ffffff !important;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-nav-gmaps:hover {
    background: #3367D6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.35);
}

.btn-nav-waze {
    background: #33CCFF;
    color: #0f172a !important;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-nav-waze:hover {
    background: #1eb8ed;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 204, 255, 0.4);
}

.btn-copy-address {
    background: var(--bg-card-secondary);
    color: var(--slate);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-copy-address:hover {
    background: var(--border);
}

/* ==========================================================================
   11. MODAL FICHA CLÍNICA & ASISTENTE INTERNACIONAL ("FIND YOUR FIT")
   ========================================================================== */
.clinical-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.84rem;
}

.clinical-table th {
    background: var(--bg-card-secondary);
    padding: 8px 12px;
    text-align: left;
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.clinical-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--slate);
}

.fit-selector-box {
    background: var(--bg-card-secondary);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin: 16px 0;
    border: 1px solid var(--border);
}

.fit-pills {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.fit-pill {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    color: var(--slate);
}

.fit-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* ==========================================================================
   12. FIRMA DIGITAL EN CANVAS & CONTRATO/PAGARÉ
   ========================================================================== */
.signature-box {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    background: #ffffff;
    position: relative;
    margin: 14px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#signature-canvas {
    width: 100%;
    height: 180px;
    cursor: crosshair;
    touch-action: none;
}

.signature-controls {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-card-secondary);
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
}

.contract-paper {
    background: #ffffff;
    color: #1e293b;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 0.82rem;
    line-height: 1.5;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    margin: 16px 0;
    max-height: 480px;
    overflow-y: auto;
}

[data-theme="dark"] .contract-paper {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
}

.contract-paper h3 {
    text-align: center;
    font-size: 1.05rem;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pagare-box {
    border: 2px solid #0056B3;
    background: rgba(0, 86, 179, 0.04);
    padding: 14px;
    border-radius: 6px;
    margin: 14px 0;
    font-size: 0.8rem;
}

[data-theme="dark"] .pagare-box {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
}

/* ==========================================================================
   13. CHECKLIST CLÍNICO DE TALLER (12 PUNTOS)
   ========================================================================== */
.checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.checklist-item {
    background: var(--bg-card-secondary);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
}

.checklist-item:hover {
    border-color: var(--primary);
}

.checklist-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ==========================================================================
   14. ARQUEO CIEGO DE GAVETA & CORTE Z
   ========================================================================== */
.arqueo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.arqueo-cell {
    background: var(--bg-card-secondary);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.arqueo-cell label {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--muted);
    display: block;
    margin-bottom: 6px;
}

.arqueo-cell input {
    width: 100%;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--slate);
    text-align: center;
    font-family: monospace;
    font-weight: 800;
    font-size: 0.95rem;
}

/* ==========================================================================
   15. RECIBO / TICKET TÉRMICO 78MM (@MEDIA PRINT)
   ========================================================================== */
#printable-ticket {
    display: none;
}

@media print {
    body * {
        visibility: hidden !important;
    }
    #printable-ticket, #printable-ticket *,
    #modal-visor-cfdi.active #visor-cfdi-content, #modal-visor-cfdi.active #visor-cfdi-content * {
        visibility: visible !important;
    }
    #modal-visor-cfdi.active #visor-cfdi-content {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: #ffffff !important;
        color: #000000 !important;
        padding: 20px !important;
    }
    #printable-ticket {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 78mm;
        margin: 0;
        padding: 4mm;
        background: #ffffff !important;
        color: #000000 !important;
        font-family: 'Courier New', Courier, monospace !important;
        font-size: 11px !important;
        line-height: 1.3 !important;
    }
    .ticket-header {
        text-align: center;
        border-bottom: 1px dashed #000;
        padding-bottom: 6px;
        margin-bottom: 8px;
    }
    .ticket-footer {
        text-align: center;
        border-top: 1px dashed #000;
        padding-top: 6px;
        margin-top: 8px;
        font-size: 9px;
    }
    .ticket-table {
        width: 100%;
        border-collapse: collapse;
        margin: 6px 0;
    }
    .ticket-table td {
        padding: 2px 0;
    }
    .ticket-qr-placeholder {
        text-align: center;
        margin: 8px 0;
    }
}

/* ==========================================================================
   16. W-BOT CHAT FLOTANTE ASISTENTE HUMANO 2026 (GEMINI FLASH)
   ========================================================================== */
.wbot-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #ffffff;
    border: none;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 990;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wbot-fab:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.45);
}

.wbot-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wbot-chat-box {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 43, 91, 0.18);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 991;
    animation: slideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wbot-chat-box.active {
    display: flex;
}

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

.wbot-chat-header {
    background: linear-gradient(135deg, #002B5B, #0056B3);
    color: #ffffff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wbot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.wbot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wbot-chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-canvas);
    font-size: 0.84rem;
}

.wbot-msg {
    padding: 10px 14px;
    border-radius: 12px;
    line-height: 1.45;
    max-width: 85%;
    word-break: break-word;
}

.wbot-msg.incoming {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--slate);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.wbot-msg.outgoing {
    background: var(--primary);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.wbot-chat-footer {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}

.wbot-chat-footer input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-card-secondary);
    color: var(--slate);
    font-size: 0.85rem;
    outline: none;
}

.wbot-chat-footer input:focus {
    border-color: var(--primary);
}

.wbot-chat-footer button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.wbot-chat-footer button:hover {
    transform: scale(1.05);
}

/* ==========================================================================
   19. AVISO MINIMALISTA DE DESCARGA DE LA APP (PWA NATIVA)
   ========================================================================== */
.app-download-notice {
    background: linear-gradient(90deg, rgba(0, 86, 179, 0.08) 0%, rgba(0, 168, 150, 0.08) 100%);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 7px 16px;
    position: relative;
    z-index: 990;
    transition: var(--transition);
}

[data-theme="dark"] .app-download-notice {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.12) 0%, rgba(20, 184, 166, 0.12) 100%);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.app-notice-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-notice-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-notice-thumb {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    flex-shrink: 0;
}

.app-notice-text {
    display: flex;
    flex-direction: column;
}

.app-notice-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-notice-desc {
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.25;
}

.app-notice-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-app-install-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-app-install-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.35);
}

.btn-app-notice-close {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.btn-app-notice-close:hover {
    color: var(--dark);
    background: var(--bg-card-secondary);
}

@media (max-width: 768px) {
    .app-notice-desc {
        display: none;
    }
    .app-notice-title {
        font-size: 0.75rem;
    }
    .btn-app-install-action {
        padding: 5px 10px;
        font-size: 0.72rem;
    }
}

/* ==========================================================================
   20. ICONOGRAFÍA MINIMALISTA & UTILIDADES VISUALES
   ========================================================================== */
.mini-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: -0.15em;
    stroke: currentColor;
    flex-shrink: 0;
}

.badge-pill-count {
    background: var(--primary);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 4px;
    display: inline-block;
    vertical-align: middle;
}

/* Tabs del Cotizador (Local CDMX vs Nacional) */
.freight-mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.freight-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--slate);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.freight-mode-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* Estilos de Órdenes Web & App en ERP */
.status-badge-web {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.status-badge-web.pendiente {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.status-badge-web.pagado {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.status-badge-web.en_transito {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.status-badge-web.entregado {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

/* Modal Interactivo de Transferencia SPEI */
.spei-clabe-box {
    background: var(--primary-light);
    border: 2px dashed var(--primary);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin: 14px 0;
}

.spei-clabe-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--primary);
    margin: 8px 0;
}

.btn-copy-clabe {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--slate);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy-clabe:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}



/* ==========================================================================
   21. RESPONSIVE GLOBAL  BREAKPOINTS INTERMEDIOS (EVITA DESBORDAMIENTO)
   ========================================================================== */

/* 1280px: Reducir gap del menu para evitar wrap */
@media (max-width: 1280px) {
    .nav-menu { gap: 14px; }
    .nav-link { font-size: 0.81rem; }
    .nav-brand img { height: 40px; }
    .notice-left > span:nth-child(5) { display: none; }
}

/* 1080px: Ocultar items menos criticos del notice bar */
@media (max-width: 1080px) {
    .nav-menu { gap: 10px; }
    .nav-link { font-size: 0.79rem; }
    .notice-left > span:nth-child(3),
    .notice-left > span:nth-child(4),
    .notice-left > span:nth-child(5) { display: none; }
}

/* 1024px: Colapsar menu en hamburger */
@media (max-width: 1024px) {
    .hamburger-btn { display: block; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-glass-strong);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px 20px;
        box-shadow: var(--shadow-md);
        border-bottom: 1px solid var(--border);
        z-index: 999;
        gap: 4px;
    }
    .nav-menu.mobile-open { display: flex; }
    .nav-link { padding: 10px 4px; font-size: 0.9rem; border-bottom: 1px solid var(--border-subtle); width: 100%; }
    .nav-link:last-child { border-bottom: none; }
    .nav-brand img { height: 36px; }
    .btn-auth-nav span { display: none; }
    .btn-auth-nav { padding: 8px 12px; min-width: 40px; justify-content: center; }
    .nav-actions { gap: 7px; }
}

/* 768px: Movil */
@media (max-width: 768px) {
    .notice-left > span:nth-child(1),
    .notice-left > span:nth-child(2),
    .notice-left > span:nth-child(3),
    .notice-left > span:nth-child(4),
    .notice-left > span:nth-child(5) { display: none; }
    .hero-title { font-size: clamp(1.6rem, 6vw, 2.4rem); }
    .hero-section { padding: 40px 16px 60px; }
    .section-container, .section-wrapper { padding: 40px 16px; }
    .freight-box { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; gap: 32px; }
    .btn-theme-toggle, #btn-install-pwa { width: 36px; height: 36px; }
    .nav-actions { gap: 6px; }
    .nav-brand img { height: 30px; }
    .nav-container { padding: 10px 14px; }
}

/* 480px: Pantallas muy pequenas */
@media (max-width: 480px) {
    .hero-title { font-size: clamp(1.4rem, 8vw, 2rem); }
    .hero-cta-group { flex-direction: column; gap: 10px; }
    .hero-cta-group .btn-primary,
    .hero-cta-group .btn-secondary { width: 100%; justify-content: center; }
    .hero-stats { flex-wrap: wrap; gap: 16px; }
    .top-notice-bar { padding: 5px 10px; font-size: 0.7rem; }
    .modal-content, .erp-modal-content { padding: 16px; }
    .erp-tab-btn { padding: 6px 8px; font-size: 0.72rem; }
    .gateway-options { grid-template-columns: 1fr 1fr; }
    .splash-logo { width: 88vw; }
}

/* Overflow global garantizado */
html, body { overflow-x: hidden; max-width: 100%; }
img, svg { max-width: 100%; height: auto; }
