/* ==========================================================================
   ANTIGRAVITY GLOBAL DESIGN SYSTEM (v3.0 - Enterprise Edition)
   Architecture: Token-Based CSS System
   Standard: Modern Glassmorphism & High-Contrast B2B
   ========================================================================== */



:root {
    /* 1. CORE TOKENS (HSL for programmatic control) */
    --h: 228;
    --s: 18%;
    
    --bg:           hsl(var(--h), var(--s), 5%);
    --surface:      hsl(var(--h), var(--s), 9%);
    --surface-2:    hsl(var(--h), var(--s), 14%);
    --surface-3:    hsl(var(--h), var(--s), 18%);
    --surface-glass:hsla(var(--h), var(--s), 8%, 0.75);
    
    /* Brand Colors */
    --accent:       hsl(217, 91%, 64%);
    --accent-hover: hsl(217, 91%, 55%);
    --accent-glow:  hsla(217, 91%, 64%, 0.25);
    --accent-deep:  hsla(217, 91%, 64%, 0.1);
    
    /* Semantic Colors */
    --success:      hsl(150, 60%, 50%);
    --danger:       hsl(0, 72%, 55%);
    --warning:      hsl(45, 90%, 55%);
    --info:         hsl(190, 80%, 55%);
    
    /* Typography Tokens */
    --text:         hsl(var(--h), 20%, 94%);
    --text-muted:   hsl(var(--h), 15%, 75%);
    --text-on-acc:  #ffffff;
    
    --font:         'Inter', system-ui, -apple-system, sans-serif;
    --font-mono:    'JetBrains Mono', monospace;
    
    /* Border & Elevation */
    --border:       hsl(var(--h), var(--s), 18%);
    --border-light: hsla(0, 0%, 100%, 0.05);
    --shadow-sm:    0 4px 12px rgba(0,0,0,0.4);
    --shadow-md:    0 12px 40px rgba(0,0,0,0.6);
    --shadow-lg:    0 24px 80px rgba(0,0,0,0.8);
    
    /* Layout */
    --radius-sm:    10px;
    --radius-md:    18px;
    --radius-lg:    28px;
    --max-w:        1440px;
    --header-h:     110px;
    --transition:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. RESET & BASE (Modern Normalization)
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    letter-spacing: -0.011em;
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: var(--header-h);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; background: transparent; border: none; color: inherit; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
ul { list-style: none; }

/* ==========================================================================
   3. GLOBAL UTILITIES (Atomic CSS patterns)
   ========================================================================== */
.glass {
    background: var(--surface-glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--border-light);
}

.container { 
    max-width: var(--max-w); 
    margin: 0 auto; 
    padding: 0 50px; 
}

.mono { font-family: var(--font-mono); letter-spacing: -0.02em; }
.bold { font-weight: 800; }
.uppercase { text-transform: uppercase; letter-spacing: 0.1em; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }

/* ==========================================================================
   4. PREMIUM BUTTON SYSTEM
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 28px; border-radius: var(--radius-sm);
    font-weight: 700; cursor: pointer; transition: var(--transition);
    gap: 10px; font-size: 0.9rem; position: relative; overflow: hidden;
}

.btn-primary { 
    background: hsl(217, 88%, 46%); color: #ffffff;
    box-shadow: 0 4px 20px hsla(217, 88%, 46%, 0.35);
}
.btn-primary:hover { 
    background: hsl(217, 88%, 40%); transform: translateY(-3px);
    box-shadow: 0 8px 30px hsla(217, 88%, 46%, 0.45);
}

.btn-ghost {
    background: hsla(0, 0%, 100%, 0.03);
    border: 1px solid var(--border-light);
}
.btn-ghost:hover {
    background: hsla(0, 0%, 100%, 0.08);
    transform: translateY(-2px);
}

.btn-xl { padding: 20px 40px; border-radius: var(--radius-md); font-size: 1rem; }

/* ==========================================================================
   5. HEADER & NAVIGATION (Public)
   ========================================================================== */
.front-header {
    position: fixed; top: 0; left: 0; width: 100%;
    z-index: 1000; border-bottom: 1px solid var(--border-light);
}
.header-container { display: flex; flex-direction: column; }
.header-top {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; font-size: 0.75rem; border-bottom: 1px solid var(--border-light);
}
.header-main { height: 75px; display: flex; align-items: center; gap: 50px; }

.brand { display: flex; align-items: center; }
.brand-logo-wrapper {
    height: 50px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.brand:hover .brand-logo-wrapper {
    transform: scale(1.05);
}
.brand-logo {
    height: 100%;
    width: auto;
    object-fit: contain;
    filter: brightness(1.1) contrast(1.5) invert(1) contrast(1.5);
    mix-blend-mode: screen;
}

.header-search { flex: 1; max-width: 550px; position: relative; }
.header-search form {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 16px; display: flex; align-items: center; padding: 0 20px;
    transition: var(--transition);
}
.header-search form:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    background: var(--surface-3);
}
.header-search input { padding: 14px 0; width: 100%; outline: none; font-size: 0.95rem; }

/* Search Suggestions Dropdown */
.search-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 100%;
    max-height: 500px;
    overflow-y: auto;
    border-radius: 20px;
    padding: 12px;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    animation: dropdownFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 12px;
    transition: var(--transition);
    cursor: pointer;
}

.search-item:hover {
    background: hsla(0, 0%, 100%, 0.05);
}

.search-item-img {
    width: 54px;
    height: 54px;
    background: white;
    border-radius: 10px;
    padding: 4px;
    flex-shrink: 0;
}

.search-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.search-item-info {
    flex: 1;
    min-width: 0;
}

.search-item-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.search-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-dropdown-footer {
    padding: 15px;
    text-align: center;
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
}

.search-dropdown-footer a {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.search-dropdown::-webkit-scrollbar { width: 6px; }
.search-dropdown::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

.header-nav { display: flex; gap: 40px; align-items: center; }
.header-nav a { font-size: 0.95rem; font-weight: 700; color: var(--text-muted); }
.header-nav a:hover, .header-nav a.active { color: var(--accent); }

/* Hide mobile-only clones on desktop */
.mobile-search-clone, .mobile-actions-clone { display: none !important; }

.cart-trigger { 
    position: relative; 
    color: var(--text-muted); 
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 12px;
    transition: var(--transition);
}
.cart-trigger:hover {
    color: white;
    background: hsla(0, 0%, 100%, 0.05);
}
.cart-label { font-size: 0.95rem; font-weight: 700; }
.cart-badge {
    position: absolute; 
    top: -4px; 
    right: -4px; 
    background: var(--accent);
    color: white; 
    font-size: 0.75rem; 
    font-weight: 900; 
    min-width: 20px;
    height: 20px; 
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    line-height: 1;
    padding-top: 1px; /* Ajuste fino de alineación vertical */
}
.badge-pop { animation: badge-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes badge-pop {
    0% { transform: scale(0.5); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   6. LANDING COMPONENTS (Hero, Stats, etc.)
   ========================================================================== */
.hero {
    position: relative;
    height: 85vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: calc(-1 * var(--header-h));
    background: var(--bg);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4) contrast(1.1) saturate(1.2);
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), var(--bg) 95%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
}

.hero-tag {
    display: inline-block;
    padding: 8px 20px;
    background: var(--accent-deep);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    margin-bottom: 32px;
    animation: fadeInUp 0.8s ease-out;
}

.hero h1 {
    font-size: 5rem;
    font-weight: 950;
    line-height: 1;
    letter-spacing: -0.05em;
    margin-bottom: 32px;
    color: white;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--accent), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.4rem;
    color: var(--text-muted);
    margin-bottom: 48px;
    line-height: 1.6;
    max-width: 650px;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

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

/* ==========================================================================
   7. CATALOG & PRODUCTS (The Grid)
   ========================================================================== */
.product-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
}

.product-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 30px;
    display: flex; flex-direction: column; transition: var(--transition);
}
.product-card:hover {
    border-color: var(--accent); background: var(--surface-2);
    transform: translateY(-10px); box-shadow: var(--shadow-md);
}

.product-image-wrapper {
    background: white; border-radius: var(--radius-sm);
    height: 220px; display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px; padding: 20px;
}
.product-image-wrapper img { max-height: 100%; object-fit: contain; }

.product-title {
    font-size: 1.1rem; font-weight: 800; margin-bottom: 16px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; height: 2.8em; color: white;
}

.product-bottom {
    margin-top: auto; display: flex; align-items: center; justify-content: space-between;
    padding-top: 20px; border-top: 1px solid var(--border-light);
}
.product-price { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 900; color: var(--accent); }

/* ==========================================================================
   7. ULTRA-PREMIUM CHECKOUT & CART SYSTEM
   ========================================================================== */
.cart-premium-wrapper { padding: 60px 0 120px; }

.checkout-stepper {
    display: flex; align-items: center; justify-content: space-between;
    max-width: 850px; margin: 0 auto 80px; padding: 30px 50px;
    border-radius: 30px; border: 1px solid var(--border-light);
    background: hsla(0,0%,100%,0.02);
}
.step { display: flex; align-items: center; gap: 20px; opacity: 0.3; transition: var(--transition); }
.step.active { opacity: 1; transform: scale(1.05); }
.step-num {
    width: 46px; height: 46px; border-radius: 16px;
    background: var(--surface-3); border: 1px solid var(--border);
    display: grid; place-items: center; font-size: 1rem; font-weight: 900;
    font-family: var(--font-mono); color: var(--text-muted);
}
.step.active .step-num { background: var(--accent); color: white; border-color: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }

.cart-grid { display: grid; grid-template-columns: 1fr 420px; gap: 60px; align-items: start; }

.cart-item-card {
    display: grid; grid-template-columns: 130px 1fr auto; gap: 32px;
    padding: 30px; border-radius: var(--radius-lg); align-items: center;
    border: 1px solid var(--border-light); margin-bottom: 24px;
}
.cart-item-card:hover { border-color: var(--accent); background: hsla(0,0%,100%,0.02); transform: translateX(10px); }

.item-thumb {
    width: 130px; height: 130px; border-radius: 20px; background: white;
    display: grid; place-items: center; padding: 15px;
}

.item-name { font-size: 1.3rem; font-weight: 900; color: white; margin-bottom: 8px; display: block; }
.item-meta-info { display: flex; gap: 25px; font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.item-meta-info b { color: var(--accent); }

.premium-qty {
    display: flex; align-items: center; background: var(--bg);
    border: 1px solid var(--border); border-radius: 16px; padding: 8px;
}
.premium-qty button { width: 38px; height: 38px; font-size: 1.3rem; font-weight: 800; }

.total-price-hero { font-family: var(--font-mono); font-size: 3rem; font-weight: 950; color: white; }

/* ==========================================================================
   8. SYSTEM UTILITIES & ANIMATIONS
   ========================================================================== */
/* ==========================================================================
   9. PAGE ARCHITECTURE (Unified Shells)
   ========================================================================== */
.page-header {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 40px; padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}
.page-title { font-size: 2.2rem; font-weight: 950; letter-spacing: -0.05em; color: white; line-height: 1; }
.page-subtitle { font-size: 1rem; color: var(--text-muted); margin-top: 8px; font-weight: 500; }

.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); overflow: hidden; transition: var(--transition);
}
.card-header { 
    padding: 24px 32px; border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 1rem; font-weight: 800; color: white; }
.card-body { padding: 32px; }

/* Unified Data Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th {
    background: hsla(0,0%,100%,0.01); text-align: left; padding: 16px 24px;
    font-size: 0.7rem; font-weight: 800; text-transform: uppercase; color: var(--text-muted);
    border-bottom: 1px solid var(--border); letter-spacing: 0.05em;
}
td { padding: 16px 24px; border-bottom: 1px solid var(--border-light); font-weight: 500; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: hsla(0,0%,100%,0.02); }

/* Badges & Feedback */
.badge {
    display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 8px;
    font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-accent { background: var(--accent-deep); color: var(--accent); border: 1px solid var(--accent); }
.badge-success { background: hsla(150, 60%, 50%, 0.1); color: var(--success); border: 1px solid hsla(150, 60%, 50%, 0.2); }

/* Info Groups (Dashboard/Forms) */
.info-group { display: flex; flex-direction: column; gap: 8px; }
.info-label { font-size: 0.7rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.info-value { font-size: 1rem; font-weight: 700; color: white; }

/* Modal System (Global) */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85);
    backdrop-filter: blur(15px); z-index: 2000;
    display: grid; place-items: center; padding: 20px;
}
.modal {
    width: 100%; max-width: 900px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow-lg);
}

[v-cloak] { display: none; }

/* Media Queries */
@media (max-width: 1200px) {
    .container { padding: 0 30px; }
    .cart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    :root { --header-h: 80px; }
    .header-top { display: none; }
    .header-nav, .header-search { display: none; }
    .product-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .cart-item-card { grid-template-columns: 100px 1fr; }
    .item-actions { flex-direction: column; align-items: flex-start; gap: 20px; }
}


/* Mobile Menu Drawer */
.mobile-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    z-index: 1050; opacity: 0; visibility: hidden; transition: var(--transition);
}
.mobile-overlay.active { opacity: 1; visibility: visible; }

@media(max-width: 768px) {
    .front-header.glass { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: var(--bg); }
    #mobile-menu-btn { display: block !important; }
    
    /* Make the nav a drawer (100% width on mobile) */
    .header-nav {
        display: flex !important;
        position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
        background: #0f0f14; /* Fondo 100% sólido para evitar borrosidad */
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-left: none;
        box-shadow: none;
        padding: 80px 30px 30px; flex-direction: column; z-index: 1051;
        transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        gap: 0;
        overflow-y: auto;
    }
    .header-nav.mobile-open { right: 0; }
    .header-nav a { 
        padding: 15px 0; 
        font-size: 1.1rem; 
        border-bottom: 1px solid var(--border-light); 
        width: 100%; 
        color: #ffffff; /* Blanco puro para máxima nitidez */
        font-weight: 600;
        position: relative;
        z-index: 2;
    }
    .header-nav a:hover { color: var(--accent); }
    
    /* Mobile Clones Visibility */
    .mobile-search-clone, .mobile-actions-clone { display: block !important; }
    
    .mobile-search-clone { margin-bottom: 25px; width: 100%; }
    .mobile-search-clone form { background: var(--surface-3); border-radius: 12px; border: 1px solid var(--border); display: flex; align-items: center; padding: 0 15px; }
    .mobile-search-clone input { width: 100%; padding: 12px 0; outline: none; background: transparent; border: none; color: white; font-size: 0.95rem; }
    .mobile-search-clone button { background: transparent; border: none; color: white; cursor: pointer; padding-left: 10px; }

    /* Estilos para el clon de acciones (login/perfil) */
    .mobile-actions-clone { color: var(--text); font-size: 0.95rem; }
    .mobile-actions-clone strong { color: white; }
    .mobile-actions-clone a { border-bottom: none !important; padding: 10px 0 !important; }
}

/* ==========================================================================
   10. SKELETON LOADERS SYSTEM (Premium Loading States)
   ========================================================================== */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--surface-2) 25%,
        var(--surface-3) 37%,
        var(--surface-2) 63%
    );
    background-size: 200% 100%;
    animation: shimmer 1.8s ease-in-out infinite;
    border-radius: 8px;
    color: transparent !important;
    pointer-events: none;
    user-select: none;
}

/* Skeleton Card (for product grids) */
.skeleton-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
}
.skeleton-card .skeleton-img {
    width: 100%; aspect-ratio: 1;
    background: linear-gradient(90deg, #1a1a22 25%, #24242f 37%, #1a1a22 63%);
    background-size: 200% 100%; animation: shimmer 1.8s ease-in-out infinite;
}
.skeleton-card .skeleton-body { padding: 24px; }
.skeleton-card .skeleton-line {
    height: 14px; border-radius: 6px; margin-bottom: 12px;
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
    background-size: 200% 100%; animation: shimmer 1.8s ease-in-out infinite;
}
.skeleton-card .skeleton-line:nth-child(1) { width: 40%; height: 10px; }
.skeleton-card .skeleton-line:nth-child(2) { width: 85%; }
.skeleton-card .skeleton-line:nth-child(3) { width: 60%; margin-top: 20px; height: 20px; }

/* Skeleton Table Row */
.skeleton-row td {
    position: relative;
    overflow: hidden;
}
.skeleton-row td::after {
    content: '';
    display: block; width: 70%; height: 12px; border-radius: 6px;
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
    background-size: 200% 100%; animation: shimmer 1.8s ease-in-out infinite;
}
.skeleton-row td:first-child::after { width: 40%; }
.skeleton-row td:last-child::after { width: 50%; margin-left: auto; }

/* Skeleton Stat Card */
.skeleton-stat .stat-value,
.skeleton-stat .stat-label,
.skeleton-stat .stat-meta {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
    background-size: 200% 100%; animation: shimmer 1.8s ease-in-out infinite;
    color: transparent !important; border-radius: 6px;
}

/* Skeleton Chart */
.skeleton-chart {
    width: 100%; height: 100%; border-radius: 12px;
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
    background-size: 200% 100%; animation: shimmer 1.8s ease-in-out infinite;
}

/* Inline skeleton text */
.skeleton-text {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
    background-size: 200% 100%; animation: shimmer 1.8s ease-in-out infinite;
    color: transparent !important; border-radius: 4px; display: inline-block;
}

/* ==========================================================================
   11. PWA INSTALL BANNER
   ========================================================================== */
.pwa-install-banner {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: var(--surface); border: 1px solid var(--accent);
    border-radius: 18px; padding: 16px 28px; display: flex; align-items: center; gap: 20px;
    z-index: 9999; box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    animation: slideUpBanner 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 500px;
}
.pwa-install-banner .pwa-icon {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
}
.pwa-install-banner .pwa-text {
    flex: 1;
}
.pwa-install-banner .pwa-text strong {
    display: block; font-size: 0.95rem; color: white; margin-bottom: 2px;
}
.pwa-install-banner .pwa-text span {
    font-size: 0.8rem; color: var(--text-muted);
}
.pwa-install-banner .btn-pwa {
    padding: 10px 20px; background: var(--accent); color: white; border-radius: 10px;
    font-weight: 700; font-size: 0.85rem; cursor: pointer; white-space: nowrap;
    transition: var(--transition); border: none;
}
.pwa-install-banner .btn-pwa:hover { background: var(--accent-hover); transform: translateY(-2px); }
.pwa-install-banner .btn-close-pwa {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    font-size: 1.2rem; padding: 4px; transition: var(--transition);
}
.pwa-install-banner .btn-close-pwa:hover { color: white; }

@keyframes slideUpBanner {
    from { opacity: 0; transform: translateX(-50%) translateY(40px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ==========================================================================
   12. EMPTY STATE COMPONENT
   ========================================================================== */
.empty-state {
    text-align: center; padding: 80px 40px; color: var(--text-muted);
}
.empty-state .empty-icon {
    font-size: 4rem; margin-bottom: 24px; opacity: 0.3;
}
.empty-state h3 {
    font-size: 1.4rem; color: var(--text); margin-bottom: 12px; font-weight: 800;
}
.empty-state p {
    max-width: 400px; margin: 0 auto 24px; line-height: 1.6;
}

/* ==========================================================================
   13. TOAST NOTIFICATION SYSTEM (Global)
   ========================================================================== */
.toast {
    position: fixed; bottom: 20px; right: 20px; padding: 16px 24px;
    border-radius: 14px; font-weight: 700; z-index: 9999;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5); display: flex; align-items: center; gap: 12px;
    animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 400px;
}
.toast-success { background: var(--success); color: white; }
.toast-error { background: var(--danger); color: white; }
.toast-info { background: var(--accent); color: white; }

.toast-exit { animation: toastOut 0.3s ease-in forwards; }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
    to { opacity: 0; transform: translateY(20px) scale(0.95); }
}

/* ==========================================================================
   14. NOTIFICATION BELL & DROPDOWN
   ========================================================================== */
.notif-wrapper {
    position: relative;
}
.notif-bell {
    position: relative; background: transparent; border: none;
    color: var(--text-muted); cursor: pointer; padding: 8px;
    transition: var(--transition); border-radius: 10px;
}
.notif-bell:hover { color: white; background: var(--surface-2); }
.notif-badge {
    position: absolute; top: 2px; right: 2px;
    min-width: 18px; height: 18px; padding: 0 5px;
    background: var(--danger); color: white; border-radius: 9px;
    font-size: 0.65rem; font-weight: 900; display: grid; place-items: center;
    animation: badgePop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes badgePop {
    from { transform: scale(0); } to { transform: scale(1); }
}

.notif-dropdown {
    position: absolute; top: calc(100% + 12px); right: 0;
    width: 380px; max-height: 440px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; box-shadow: var(--shadow-lg);
    z-index: 1000; overflow: hidden;
    animation: dropIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dropIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.notif-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.notif-header strong { font-size: 0.95rem; color: var(--text); }
.notif-mark-all {
    background: none; border: none; color: var(--accent); font-size: 0.75rem;
    font-weight: 700; cursor: pointer; padding: 4px 8px; border-radius: 6px;
    transition: var(--transition);
}
.notif-mark-all:hover { background: var(--accent-deep); }

.notif-list {
    max-height: 360px; overflow-y: auto; scrollbar-width: thin;
}
.notif-item {
    display: flex; gap: 14px; padding: 14px 20px;
    border-bottom: 1px solid var(--border); cursor: pointer;
    transition: background 0.2s ease;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--accent-deep); }
.notif-item.unread:hover { background: hsla(217, 91%, 64%, 0.12); }
.notif-item .notif-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.notif-item .notif-content { flex: 1; min-width: 0; }
.notif-item .notif-title {
    font-weight: 700; font-size: 0.85rem; color: var(--text);
    margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-item .notif-msg {
    font-size: 0.78rem; color: var(--text-muted); line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notif-item .notif-time {
    font-size: 0.7rem; color: var(--text-muted); margin-top: 6px;
    font-family: var(--font-mono);
}
.notif-empty {
    text-align: center; padding: 40px 20px; color: var(--text-muted);
    font-size: 0.85rem;
}
.notif-dot {
    width: 8px; height: 8px; background: var(--accent); border-radius: 50%;
    flex-shrink: 0; margin-top: 6px;
}

@media (max-width: 500px) {
    .notif-dropdown { width: calc(100vw - 20px); right: -60px; }
}

/* ==========================================================================
   15. B2B SUPPORT WIDGET (Premium Floating UI)
   ========================================================================== */
.b2b-support-widget {
    position: fixed; bottom: 30px; right: 30px; z-index: 9000;
    font-family: var(--font);
}

.support-trigger {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--accent); color: white;
    display: grid; place-items: center; cursor: pointer;
    box-shadow: 0 10px 30px var(--accent-glow);
    transition: var(--transition); border: 2px solid rgba(255,255,255,0.1);
    position: relative;
}
.support-trigger:hover { transform: scale(1.1) rotate(5deg); background: var(--accent-hover); }

.trigger-icon { font-size: 1.8rem; }
.trigger-badge {
    position: absolute; top: 2px; right: 2px;
    width: 14px; height: 14px; background: var(--success);
    border: 3px solid var(--accent); border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 hsla(150, 60%, 50%, 0.7); }
    70% { transform: scale(1.2); box-shadow: 0 0 0 10px hsla(150, 60%, 50%, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 hsla(150, 60%, 50%, 0); }
}

.support-menu {
    position: absolute; bottom: 85px; right: 0;
    width: 280px; border-radius: 24px; padding: 24px;
    opacity: 0; visibility: hidden; transform: translateY(20px);
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.b2b-support-widget.active .support-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}

.support-header { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border-light); }
.support-header strong { display: block; font-size: 1rem; color: white; }
.support-header span { font-size: 0.8rem; color: var(--text-muted); }

.support-options { display: flex; flex-direction: column; gap: 12px; }
.support-opt {
    display: flex; align-items: center; gap: 16px; padding: 14px;
    border-radius: 14px; background: hsla(0,0%,100%,0.03);
    border: 1px solid var(--border-light); transition: var(--transition);
}
.support-opt:hover {
    background: hsla(0,0%,100%,0.08); transform: translateX(-5px);
    border-color: var(--accent);
}

.opt-icon { font-size: 1.4rem; }
.opt-text { display: flex; flex-direction: column; }
.opt-text strong { font-size: 0.85rem; color: white; }
.opt-text span { font-size: 0.75rem; color: var(--text-muted); }

.support-opt.whatsapp:hover .opt-icon { filter: drop-shadow(0 0 8px var(--success)); }
.support-opt.call:hover .opt-icon { filter: drop-shadow(0 0 8px var(--accent)); }

@media (max-width: 768px) {
    .b2b-support-widget { bottom: 20px; right: 20px; }
    .support-trigger { width: 56px; height: 56px; }
    .support-menu { width: 260px; bottom: 75px; right: -10px; }
}

/* ==========================================================================
   FORMULARIOS PREMIUM (Extraído de contacto)
   ========================================================================== */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-input {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 20px;
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}
.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    outline: none;
    background: var(--surface-3);
}
.form-input::placeholder { color: hsla(0,0%,100%,0.2); }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 20px center; }

@media (max-width: 1000px) {
    .contact-grid { grid-template-columns: 1fr !important; }
}

.mobile-close-btn { display: none; }

/* ==========================================================================
   ADAPTACIÓN MÓVIL (Estilo App Nativa)
   ========================================================================== */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    /* Barra de Navegación Inferior Sticky */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 65px;
        background: var(--surface-glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-light);
        z-index: 999;
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom, 0);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
    }
    
    .mobile-bottom-nav .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 100%;
        color: var(--text-muted);
        text-decoration: none;
        transition: var(--transition);
        gap: 4px;
        padding: 8px 0;
    }
    
    .mobile-bottom-nav .nav-item.active {
        color: var(--accent);
    }
    
    .mobile-bottom-nav .nav-item.active .nav-icon {
        transform: scale(1.15);
        filter: drop-shadow(0 0 8px var(--accent-glow));
    }
    
    .mobile-bottom-nav .nav-icon {
        font-size: 1.3rem;
        transition: var(--transition);
        display: inline-block;
    }
    
    .mobile-bottom-nav .nav-label {
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
    
    .mobile-bottom-nav .cart-icon-wrapper {
        position: relative;
        display: inline-flex;
    }
    
    .mobile-bottom-nav .badge {
        position: absolute;
        top: -6px;
        right: -8px;
        background: var(--accent);
        color: white;
        font-size: 0.65rem;
        font-weight: 900;
        min-width: 16px;
        height: 16px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid var(--bg);
        box-shadow: 0 2px 5px rgba(0,0,0,0.5);
        padding: 0;
        line-height: 1;
    }
    
    /* Prevenir tapado de contenido en body */
    body {
        padding-bottom: calc(65px + env(safe-area-inset-bottom, 0)) !important;
    }

    /* Header superior sticky en móvil */
    .front-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
        background: var(--surface-glass) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid var(--border-light) !important;
    }
    
    /* Simplificación del header para móvil */
    .header-container {
        padding: 0 16px !important;
    }
    
    .header-main {
        gap: 16px !important;
        justify-content: space-between !important;
        padding: 10px 0 !important;
    }
    
    .brand-logo-wrapper {
        height: 40px !important;
    }
    
    /* Ajustes generales de padding y layout */
    .container {
        padding: 0 16px !important;
    }
    
    /* Ajustes del Hero para evitar desbordes */
    .hero {
        height: auto !important;
        min-height: 450px !important;
        padding: 120px 0 60px !important;
        margin-top: calc(-1 * var(--header-h)) !important;
    }
    
    .hero h1 {
        font-size: 2.2rem !important;
        line-height: 1.2 !important;
        letter-spacing: -0.02em !important;
        margin-bottom: 20px !important;
    }
    
    .hero p {
        font-size: 1.05rem !important;
        margin-bottom: 32px !important;
        line-height: 1.5 !important;
    }
    
    .hero-tag {
        margin-bottom: 20px !important;
        padding: 6px 14px !important;
        font-size: 0.75rem !important;
    }
    
    /* Ajustes tipográficos */
    .page-title {
        font-size: 1.8rem !important;
    }
    
    .price-row.main .value {
        font-size: 2.2rem !important;
    }
    
    /* Ajustes de paddings de componentes */
    .cart-premium-wrapper {
        padding: 30px 0 80px !important;
    }
    
    .card-body {
        padding: 20px !important;
    }
    
    .card-header {
        padding: 16px 20px !important;
    }
    
    .empty-state {
        padding: 40px 20px !important;
    }
    
    /* Ajustes de tabs y grids de páginas */
    .services-grid, .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)) !important;
        gap: 20px !important;
    }
    
    .service-card {
        padding: 24px !important;
        border-radius: 20px !important;
    }
    
    .feature-card {
        padding: 30px 20px !important;
    }
    
    .cta-box {
        padding: 50px 20px !important;
        border-radius: 24px !important;
    }
    
    .cta-box h2 {
        font-size: 2.2rem !important;
    }
    
    /* Pestañas de la ficha de producto */
    .tab-headers {
        gap: 20px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 10px !important;
        scrollbar-width: none !important;
    }
    .tab-headers::-webkit-scrollbar {
        display: none !important;
    }
    .tab-pane {
        padding: 24px 16px !important;
    }
    
    /* Botón de cerrar para el menú hamburguesa */
    .mobile-close-btn {
        background: transparent;
        border: none;
        color: var(--accent);
        font-size: 0.85rem;
        font-weight: 800;
        letter-spacing: 0.1em;
        margin-bottom: 25px;
        cursor: pointer;
        padding: 12px 0;
        text-align: left;
        width: 100%;
        border-bottom: 1px dashed var(--border);
        text-transform: uppercase;
        display: block;
    }
    
    /* Adaptación del formulario de contacto */
    .contact-form-wrapper {
        padding: 24px 16px !important;
        border-radius: 20px !important;
    }
    .form-footer {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 16px !important;
        text-align: center !important;
    }
    .form-footer p {
        max-width: 100% !important;
        margin: 0 !important;
    }
    .form-footer button {
        width: 100% !important;
        justify-content: center !important;
    }
    
    /* Interfaz de compra en ficha de producto en móvil */
    .purchase-actions {
        flex-direction: column !important;
        gap: 12px !important;
    }
    .purchase-actions .qty-selector {
        width: 100% !important;
        justify-content: space-between !important;
    }
    .purchase-actions .qty-btn {
        flex: 1 !important;
    }
    .purchase-actions .btn-add {
        width: 100% !important;
        justify-content: center !important;
        padding: 14px !important;
    }
    
    /* Características de confianza de producto en móvil */
    .trust-features {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}
