/* =========================================================
   main.css - Global Styles (Modern Dark Theme)
   ========================================================= */

/* SF Pro Display loaded via @font-face below — no external Google Font needed */

@font-face {
    font-family: 'SF Pro Display';
    src: url('../fonts/sf-pro-display-cufonfonts/SFPRODISPLAYREGULAR.OTF') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('../fonts/sf-pro-display-cufonfonts/SFPRODISPLAYMEDIUM.OTF') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('../fonts/sf-pro-display-cufonfonts/SFPRODISPLAYBOLD.OTF') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Apple Color Emoji Local';
    src: url('../fonts/AppleColorEmoji-Windows.ttf') format('truetype');
}

:root {
    scroll-behavior: smooth;
    color-scheme: light dark;
    /* Base Variables - Always same */
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --max-width: 1000px;
    --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", sans-serif, "Apple Color Emoji Local", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";


    /* Theme Dependent - Default Light */
    --bg-base: #fbfbfd; /* Apple Light Gray */
    --bg-card: #ffffff;
    --bg-card-hover: #f5f5f7;
    --bg-input: #ffffff;
    --text-main: #1d1d1f; /* Apple Black */
    --text-muted: #86868b; /* Apple Muted Gray */
    --border-color: #d2d2d7;
    --border-focus: #0071e3; /* Apple Blue */
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.04);
    --header-bg: #fbfbfd;
    --accent-green-bg: rgba(16, 185, 129, 0.05);
    --accent-red-bg: rgba(239, 68, 68, 0.05);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) {
        --bg-base: #000000;
        --bg-card: #000000;
        --bg-card-hover: #111111;
        --bg-input: #000000;
        --text-main: #f8fafc;
        --text-muted: #94a3b8;
        --border-color: #27272a;
        --border-focus: #3b82f6;
        --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.5);
        --header-bg: #000000;
        --accent-green-bg: rgba(16, 185, 129, 0.1);
        --accent-red-bg: rgba(239, 68, 68, 0.1);
    }
}

html[data-theme='dark'] {
    --bg-base: #000000;
    --bg-card: #000000;
    --bg-card-hover: #111111;
    --bg-input: #000000;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #27272a;
    --border-focus: #3b82f6;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.5);
    --header-bg: #000000;
    --accent-green-bg: rgba(16, 185, 129, 0.1);
    --accent-red-bg: rgba(239, 68, 68, 0.1);
}

/* Theme Toggle Button */
.theme-toggle-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-soft);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--accent-blue);
    background: var(--bg-card-hover);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Ocultar iconos según tema */
html[data-theme='dark'] .sun-icon { display: none; }
html:not([data-theme='dark']) .moon-icon { display: none; }
/* Si no hay data-theme pero el sistema es dark, también ocultar sol */
@media (prefers-color-scheme: dark) {
    html:not([data-theme='light']) .sun-icon { display: none; }
    html:not([data-theme='light']) .moon-icon { display: block; }
}

@media (max-width: 600px) {
    .theme-toggle-container { top: 15px; right: 15px; }
    .theme-toggle, .account-btn { width: 38px; height: 38px; }
}

/* Google Sign-In Iframe Fix */
iframe[src^="https://accounts.google.com/gsi/"] {
    background: transparent !important;
    color-scheme: dark !important;
    border-radius: 20px !important;
}

/* Account Button */
.account-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-soft);
}
.account-btn:hover {
    transform: scale(1.1);
    border-color: var(--accent-blue);
    background: var(--bg-card-hover);
}

/* Promo Banner */
.promo-banner {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.promo-banner:hover {
    background: rgba(59, 130, 246, 0.12);
    transform: translateY(-2px);
}
.promo-banner svg {
    color: var(--accent-blue);
    flex-shrink: 0;
}
.promo-banner p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-main);
}


/* 3D Map Wrapper */
.map-3d-wrapper {
    width: 100%;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    aspect-ratio: 16 / 9;
}

.map-3d-wrapper iframe,
.map-3d-wrapper model-viewer {
    width: 100%;
    height: 100% !important;
    border: none;
    display: block;
    user-select: auto !important; /* Permitir interacción */
    -webkit-user-select: auto !important;
}

/* Model Viewer Hotspots (Apple-Style Tooltips) */
.hotspot {
    display: block;
    width: auto;
    height: auto;
    border-radius: 20px; /* Más redondeado, estilo píldora Apple */
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-sizing: border-box;
    cursor: pointer;
    padding: 8px 16px;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 14px;
    color: #1d1d1f; /* Negro Apple */
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    white-space: nowrap;
}

.hotspot:hover {
    background-color: #ffffff;
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
    border-color: var(--accent-blue);
}

/* Ajuste para Modo Oscuro */
html[data-theme='dark'] .hotspot {
    background-color: rgba(28, 28, 30, 0.7);
    color: #f5f5f7;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

html[data-theme='dark'] .hotspot:hover {
    background-color: #1c1c1e;
    border-color: var(--accent-blue);
}

.hotspot[data-visible="false"] {
    opacity: 0;
    pointer-events: none;
}

.zona {
    cursor: pointer;
    transition: all 0.2s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.47059;
    min-height: 100vh;
    
    /* Apple Typography Master Rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    font-variant-ligatures: common-ligatures;
    letter-spacing: -0.011em; /* Tracking para texto cuerpo */
    
    user-select: none;
    -webkit-user-select: none;
}

/* Header */
header {
    background: var(--header-bg);
    padding: 30px 40px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.header-logo-large {
    height: 60px;
    width: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

header h1 {
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

header p {
    font-size: 15px;
    color: var(--text-muted);
}

.floating-nav {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    gap: 12px;
}

.floating-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-btn:hover {
    transform: scale(1.1);
    background: var(--bg-card-hover);
    border-color: var(--accent-blue);
}

@media (max-width: 600px) {
    header { padding: 40px 20px 20px; }
    .header-logo-large { height: 50px; }
    .floating-nav { top: 10px; right: 10px; gap: 8px; }
    .floating-btn { width: 42px; height: 42px; }
}

/* Containers */
.container {
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 20px;
}

/* Typography Helpers */
.h2-title {
    font-size: 38px; /* Un poquito más ajustado para alineación lateral */
    font-weight: 500;
    margin-bottom: 24px;
    color: var(--text-main);
    display: flex;
    flex-direction: row; /* Icono al lado */
    align-items: center;
    justify-content: flex-start; /* Todo a la izquierda */
    gap: 16px;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.h2-title svg {
    color: var(--accent-blue);
    width: 24px;
    height: 24px;
}

/* Cards Global */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 28px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 0 1px rgba(255, 255, 255, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Forms & Inputs */
.campo {
    flex: 1;
    min-width: 200px;
    margin-bottom: 16px;
}

.campo label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.campo input,
.campo select {
    width: 100%;
    padding: 14px 18px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    color: var(--text-main);
    font-family: var(--font-family);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

.campo select {
    padding-right: 45px;
}

.campo input:focus,
.campo select:focus {
    outline: none;
    border-color: var(--accent-blue);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

/* Buttons Global */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background-color: var(--accent-blue);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background-color: var(--accent-blue-hover);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background-color: #475569;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-main);
}

/* Flex rows */
.fila {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* SVG Base icons */
.icon-svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

/* Tienda específicas */
.entradas-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Scrollbar Personalizado (Estilo Apple) */
.scroll-elegante::-webkit-scrollbar {
    width: 6px;
}
.scroll-elegante::-webkit-scrollbar-track {
    background: transparent;
}
.scroll-elegante::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.scroll-elegante::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.entrada-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    min-width: 90px;
}

.entrada-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

.entrada-btn.seleccionado {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    font-weight: 600;
}

.entrada-btn .icono svg {
    width: 24px;
    height: 24px;
}

.recomendacion {
    background: var(--accent-green-bg);
    border: 1px solid var(--accent-green);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    display: none;
}

.recomendacion.visible {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.recomendacion h3 {
    color: var(--accent-green);
    font-size: 16px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recomendacion p {
    color: var(--text-muted);
    font-size: 15px;
}

.cargadores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

.success-icon-anim {
    color: #25D366;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-icon-anim svg {
    width: 48px;
    height: 48px;
    display: block;
}

.cargador-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cargador-card:hover {
    border-color: #64748b;
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.cargador-card.seleccionado {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

.cargador-card.recomendado-badge {
    border-color: var(--accent-green);
}

.badge-rec {
    position: absolute;
    top: -1px;
    left: -1px;
    background: var(--accent-green);
    color: #022c22;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-lg) 0px var(--radius-lg) 0px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-stock-bajo {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--accent-red-bg);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.cargador-card h3 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 16px 0 8px;
    color: var(--text-main);
}

.cargador-card .mah {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.cargador-card .desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.6;
}

.cargador-card .personas-rec {
    font-size: 13px;
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 16px;
    display: inline-block;
    padding: 4px 10px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 20px;
}

.entradas-compatibles {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tag-entrada {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--bg-card-hover);
    color: var(--text-muted);
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.tag-entrada.incompatible {
    opacity: 0.3;
    background: transparent;
    border-style: dashed;
}

.precio {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
}

.precio span {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

.form-cliente {
    display: none;
}

.form-cliente.visible {
    display: block;
    animation: slideUp 0.4s ease-out;
}

.resumen-compra {
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    font-size: 15px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.resumen-compra strong {
    color: var(--text-main);
    font-size: 18px;
}

.cantidad-selector {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 8px;
    border: 1px solid var(--border-color);
    gap: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-cant {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-cant:hover {
    background: var(--accent-blue);
    color: white;
    transform: scale(1.05);
}

.btn-cant:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.12);
}

.btn-cant svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5px;
}

#cantidadDisplay {
    font-size: 20px;
    font-weight: 700;
    min-width: 50px;
    text-align: center;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.total-calculado {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--accent-blue);
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CSS del Mapa sector */
#sectorElegido {
    display: none;
    margin-top: 20px;
    background: var(--accent-green-bg);
    border: 1px solid var(--accent-green);
    border-radius: var(--radius-md);
    padding: 16px;
}

/* Confirmacion Específicas */
.card-exito {
    border-top: 4px solid var(--accent-green);
}

.card-exito h1 {
    color: var(--accent-green);
}

.card-error {
    border-top: 4px solid var(--accent-red);
}

.card-error h1 {
    color: var(--accent-red);
}

.ticket-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--accent-blue);
}

.icono-big {
    margin-bottom: 16px;
    color: var(--accent-green);
}

.subtitulo {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 24px;
}

.detalle {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: left;
    margin-bottom: 20px;
}

.detalle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.detalle-row:last-child {
    border-bottom: none;
}

.detalle-row span:first-child {
    color: var(--text-muted);
}

.detalle-row span:last-child {
    font-weight: 500;
    color: var(--text-main);
}

.total-row span:last-child {
    font-weight: 700;
    font-size: 16px;
    color: var(--accent-green);
}

.pago-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
}

.retiro-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid var(--accent-blue);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: left;
    margin-bottom: 24px;
}

.retiro-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-blue);
}

.retiro-info p:first-child {
    font-weight: 700;
    font-size: 13px;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.retiro-info p:last-child {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
}

/* Admin Específicas */
.metricas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metrica {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s;
}

.metrica:hover {
    transform: translateY(-3px);
}

.metrica-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.metrica-valor {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-blue);
}

.seccion {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-soft);
    overflow-x: auto;
}

.seccion-titulo {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

thead th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: rgba(59, 130, 246, 0.03);
}

.badge-stock {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

.badge-stock.bajo {
    background: rgba(217, 119, 6, 0.1);
    color: #fbbf24;
    border-color: #fbbf24;
}

.badge-stock.agotado {
    background: var(--accent-red-bg);
    color: var(--accent-red);
    border-color: var(--accent-red);
}

.sin-datos {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-color);
}

/* =========================================================
   Mapa Vertigo - HTML/CSS Layout
   ========================================================= */
.mapa-vertigo {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.mapa-titulo {
    letter-spacing: 5px;
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    color: var(--text-main);
}

.mapa-badge {
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: inline-block;
    padding: 4px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-main);
}

.mapa-wrapper {
    position: relative;
    height: 360px;
    margin-top: 10px;
}

.mapa-area {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
    border-radius: 6px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.mapa-area:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.mapa-area.zona-activa {
    border: 3px solid #fff !important;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
    transform: scale(1.08);
    z-index: 10;
}

/* Posiciones individuales del mapa */
.mapa-barra2 {
    top: 6%;
    left: 5%;
    width: 26%;
    height: 50px;
    background: #c5a021;
}

.mapa-banos {
    top: 6%;
    left: 33%;
    width: 34%;
    height: 55px;
    background: #0088cc;
    border-radius: 6px 6px 0 0;
    cursor: default;
    font-size: 11px;
}

.mapa-banos:hover {
    transform: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.mapa-barra1 {
    top: 6%;
    right: 3%;
    width: 22%;
    height: 50px;
    background: #c5a021;
}

.mapa-mesas {
    top: 28%;
    left: 10%;
    width: 42%;
    height: 80px;
    background: #b0b0b0;
    color: #1a1a1a;
    text-shadow: none;
    font-size: 13px;
}

.mapa-camarotes {
    top: 52%;
    left: 3%;
    width: 16%;
    height: 120px;
    background: #8b4513;
    flex-direction: column;
}

.mapa-cabina {
    bottom: 22%;
    left: 32%;
    width: 20%;
    height: 50px;
    background: #a0522d;
}

.mapa-box {
    top: 35%;
    right: 3%;
    width: 36%;
    height: 60px;
    background: #555;
    font-size: 13px;
}

.mapa-backizq {
    bottom: 4%;
    left: 22%;
    width: 22%;
    height: 38px;
    background: #475569;
    font-size: 11px;
}

.mapa-backder {
    bottom: 4%;
    right: 18%;
    width: 22%;
    height: 38px;
    background: #475569;
    font-size: 11px;
}

.mapa-entrada {
    position: absolute;
    top: 55%;
    right: 3%;
    transform: rotate(-90deg);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    pointer-events: none;
}

.mapa-footer {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Removing duplicated header h1 rule to prevent color override */

.header-logo-large {
    width: 260px;
    height: auto;
    max-width: 100%;
    vertical-align: middle;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.titulo-vertigo {
    color: var(--text-main) !important;
    -webkit-text-fill-color: var(--text-main) !important;
}

/* --- PREMIUM TRACKING TIMELINE --- */
.tracking-timeline {
    margin: 40px auto;
    max-width: 300px; /* Centrar el bloque, pero alinear texto a la izquierda */
    position: relative;
    padding-left: 40px;
    text-align: left;
}

.tracking-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: rgba(255, 255, 255, 0.15); /* More visible on black */
}

.timeline-step {
    position: relative;
    padding-bottom: 30px;
    opacity: 0.4;
    transition: all 0.5s ease;
}

.timeline-step:last-child {
    padding-bottom: 0;
}

.timeline-step.active {
    opacity: 1;
}

.timeline-step.completed {
    opacity: 0.8;
}

.timeline-dot {
    position: absolute;
    left: -40px; /* Alineado con el padding de .tracking-timeline */
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: all 0.5s ease;
    overflow: hidden;
}

.timeline-step.active .timeline-dot {
    border-color: var(--accent-blue);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.timeline-step.completed .timeline-dot {
    background: var(--accent-green);
    border-color: var(--accent-green);
}

.timeline-dot svg {
    width: 12px !important;
    height: 12px !important;
    display: none;
    color: white;
    stroke-width: 3;
}

.timeline-step.completed .timeline-dot svg {
    display: block;
}

.timeline-content h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-main);
}

.timeline-content p {
    font-size: 13px;
    color: var(--text-muted);
}

/* --- DISABLED STATES --- */
.cargador-card.agotado {
    opacity: 0.5;
    filter: grayscale(1);
    cursor: not-allowed !important;
    pointer-events: none;
}

.cargador-card.agotado::after {
    content: 'SIN DISPONIBILIDAD';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(239, 68, 68, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
    z-index: 10;
}

/* --- HELP CENTER IN TRACKING --- */
.help-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 30px;
}

.help-item {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-main);
}

.help-item:hover {
    border-color: var(--accent-blue);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.help-item svg {
    width: 24px !important;
    height: 24px !important;
    margin-bottom: 8px;
    color: var(--accent-blue);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.help-item span {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none !important;
}

.help-item {
    text-decoration: none !important;
}

/* --- PULSE ANIMATION FOR ACTIVE STEP --- */
.timeline-step.active .timeline-dot::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--accent-blue);
    animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

.login-popover {
    position: fixed;
    top: 85px;
    right: 74px;
    width: 300px;
    background: rgba(28, 28, 30, 0.7);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 24px;
    z-index: 999999;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: elasticPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top right;
}

.login-popover::before {
    content: '';
    position: absolute;
    top: -9px;
    right: 14px;
    width: 18px;
    height: 18px;
    background: rgba(28, 28, 30, 0.7);
    backdrop-filter: blur(25px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    transform: rotate(45deg);
}

.login-popover p {
    font-size: 14px;
    color: #f5f5f7;
    margin-bottom: 18px;
    line-height: 1.5;
    font-weight: 500;
    letter-spacing: -0.015em;
}

@keyframes elasticPop {
    from { transform: scale(0.5) translateY(-30px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}
/* =========================================================
   Mobile Responsiveness (Global main.css)
   ========================================================= */

@media (max-width: 768px) {
    body { padding-bottom: 80px; } /* Space for floating elements */
    
    .card { padding: 20px; margin-bottom: 20px; border-radius: var(--radius-md); }
    .h2-title { font-size: 20px; }
    
    /* Responsive Grid */
    .cargadores-grid { 
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .cargador-card { 
        width: 100%; 
        max-width: none; 
        padding: 20px;
    }

    /* Step 2.5: Map & List */
    #cardSector > div {
        flex-direction: column !important;
    }
    #listaSectores {
        max-height: 300px !important;
        order: 2;
    }
    #cardSector div[style*="flex:2"] {
        order: 1;
        width: 100%;
        min-width: 0 !important;
    }
    .map-3d-wrapper {
        aspect-ratio: 4 / 3;
    }

    /* Checkout Layout */
    .form-cliente { padding: 20px; }
    .cantidad-selector { width: 100%; justify-content: space-between; }
    .total-calculado { font-size: 20px; text-align: center; }
    .btn-alquilar { font-size: 16px; padding: 18px; }

    /* AI Chat Mobile */
    .ai-chat-bubble {
        bottom: 24px;
        right: 90px; /* Space for WhatsApp on the right */
    }
}

/* --- NAV TABS (WiFi & Chargers) --- */
.nav-tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    gap: 8px;
}

.nav-tab {
    flex: 1;
    padding: 14px;
    border-radius: 14px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-tab.active {
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.nav-tab svg {
    width: 20px;
    height: 20px;
}

/* --- WIFI SECTION --- */
.wifi-card {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.5s ease;
}

.wifi-icon-anim {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    color: var(--accent-blue);
    animation: pulse-wifi 2s infinite;
}

@keyframes pulse-wifi {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

.wifi-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.wifi-details {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    margin-top: 24px;
}

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

/* --- APPLE STYLE TOGGLE --- */
.switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.switch-container:hover {
    background: rgba(255, 255, 255, 0.05);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: var(--accent-blue);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* WiFi Only Card */
.wifi-price-tag {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    margin: 15px 0;
}

.wifi-benefit-list {
    text-align: left;
    margin: 20px 0;
    list-style: none;
    padding: 0;
}

.wifi-benefit-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-muted);
}

.wifi-benefit-list li svg {
    color: var(--accent-green);
    width: 18px;
}

@media (max-width: 400px) {
    .h2-title { font-size: 18px; gap: 8px; }
    .h2-title svg { width: 18px; height: 18px; }
    .precio { font-size: 20px; }
}

.spinner-small {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse-blue {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.02); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}
