/* ============================================
   LAYOUT.CSS - FlowTrading Global
   Header, Footer, Ticker, Navegación
============================================ */

/* ============================================
   TICKER BAR
============================================ */
.ticker-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--ticker-height);
    background: var(--bg-dark-secondary);
    border-bottom: 1px solid var(--border-gold);
    overflow: hidden;
    z-index: var(--z-ticker);
    display: flex;
    align-items: center;
    transition: background var(--transition-normal);
    /* Gradient mask para fade suave en los bordes */
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 3%,
        black 97%,
        transparent 100%
    );
    mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
}

body.light-mode .ticker-bar {
    background: var(--bg-light-secondary);
}

.ticker-content {
    display: flex;
    animation: tickerScroll 20s linear infinite;
    white-space: nowrap;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
}

.ticker-content.updating {
    animation-play-state: paused;
}

.ticker-item {
    color: var(--text-light-secondary);
    font-size: var(--font-size-sm);
    margin-right: var(--spacing-2xl);
    display: inline-flex;
    align-items: center;
}

body.light-mode .ticker-item {
    color: var(--text-dark-secondary);
}

.ticker-item strong {
    color: var(--gold);
    margin-right: var(--spacing-xs);
}

@keyframes tickerScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.333%);
    }
}

/* Ticker - Precios en tiempo real */
.ticker-item.ticker-price {
    gap: var(--spacing-xs);
}

.ticker-value {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-weight: 500;
    color: var(--text-light-primary);
}

body.light-mode .ticker-value {
    color: var(--text-dark-primary);
}

.ticker-change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 4px;
}

.ticker-change.ticker-up {
    color: #00c853;
    background: rgba(0, 200, 83, 0.15);
}

.ticker-change.ticker-down {
    color: #ff5252;
    background: rgba(255, 82, 82, 0.15);
}

.ticker-loading {
    color: var(--text-light-secondary);
    font-style: italic;
}

/* Noticias económicas en el ticker (mismo estilo que precios) */
.ticker-news {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ticker-news-icon {
    font-size: 0.75rem;
}

.ticker-news-text {
    color: var(--text-light-secondary);
    font-size: var(--font-size-sm);
}

.ticker-news strong {
    color: var(--gold);
}

/* ============================================
   HEADER
============================================ */
header {
    position: fixed;
    top: var(--ticker-height);
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-gold);
    z-index: var(--z-header);
    transition: background var(--transition-normal);
}

body.light-mode header {
    background: rgba(255, 255, 255, 0.7);
    border-bottom-color: rgba(212, 175, 55, 0.2);
}

/* ============================================
   NAVEGACIÓN PRINCIPAL
============================================ */
nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-xl);
}

/* Nav Left - Logo */
.nav-left {
    display: flex;
    align-items: center;
}

.logo {
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: transform var(--transition-normal);
    display: block;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Nav Center - Links */
.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: var(--spacing-xl);
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--font-size-sm);
    transition: color var(--transition-normal);
    position: relative;
}

body.light-mode .nav-links a {
    color: var(--text-dark);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width var(--transition-normal);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Nav Dropdown */
.nav-links li {
    position: relative;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown > a::after {
    display: none;
}

.nav-dropdown > a {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-dropdown > a .dropdown-arrow,
.nav-dropdown > a .nav-dropdown-arrow {
    font-size: 10px;
    transition: transform var(--transition-normal);
    display: inline-flex;
    align-items: center;
}

.nav-dropdown > a .nav-dropdown-arrow svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
    transition: transform var(--transition-normal);
}

.nav-dropdown:hover > a .dropdown-arrow,
.nav-dropdown:hover > a .nav-dropdown-arrow svg {
    transform: rotate(180deg);
}

.nav-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    padding-top: 0.8rem;
    min-width: 180px;
    z-index: var(--z-dropdown);
}

/* Puente invisible para mantener el hover */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}

body.light-mode .nav-submenu {
    background: rgba(255, 255, 255, 0.95);
}

.nav-dropdown:hover .nav-submenu {
    display: block;
}

.nav-submenu a {
    display: block;
    padding: 0.7rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    font-size: var(--font-size-sm);
    white-space: nowrap;
}

body.light-mode .nav-submenu a {
    color: var(--text-dark);
}

.nav-submenu a:hover {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold);
}

.nav-submenu a::after {
    display: none;
}

/* Nav Right - Actions */
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* ============================================
   SOCIAL DROPDOWN (Header)
============================================ */
.contact-icons {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-right: var(--spacing-sm);
    position: relative;
}

.social-dropdown {
    position: relative;
}

/* Puente invisible para mantener el hover en social dropdown */
.social-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -10px;
    right: -10px;
    height: 20px;
    background: transparent;
}

.social-trigger {
    background: transparent;
    color: var(--whatsapp);
    font-size: var(--font-size-xl);
    padding: var(--spacing-xs);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    text-decoration: none;
    outline: none;
    box-shadow: none;
}

.social-trigger:hover {
    color: #20ba5a;
    transform: scale(1.1);
}

.social-trigger svg {
    width: 22px;
    height: 22px;
}

.social-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--spacing-sm);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: 0.8rem;
    z-index: var(--z-dropdown);
    min-width: 200px;
}

body.light-mode .social-menu {
    background: rgba(255, 255, 255, 0.95);
}

.social-dropdown:hover .social-menu {
    display: block;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    font-size: var(--font-size-sm);
}

body.light-mode .social-link {
    color: var(--text-dark);
}

.social-link:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: translateX(5px);
}

.social-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-link.facebook:hover {
    color: var(--facebook);
}
.social-link.instagram:hover {
    color: var(--instagram);
}
.social-link.youtube:hover {
    color: var(--youtube);
}
.social-link.twitter:hover {
    color: var(--twitter);
}
.social-link.whatsapp:hover {
    color: var(--whatsapp);
}
.social-link.tiktok:hover {
    color: var(--tiktok);
}

body.light-mode .social-link.tiktok:hover {
    color: #ff0050;
}

/* ============================================
   ICON BUTTONS (Search, Cart, etc)
============================================ */
.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    padding: var(--spacing-sm);
    transition:
        color var(--transition-normal),
        transform var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    box-shadow: none;
}

body.light-mode .icon-btn {
    color: var(--text-dark);
}

.icon-btn:hover {
    color: var(--gold);
    transform: scale(1.1);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Notification Button */
.notification-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--error);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1;
}

/* Cart Button */
.cart-btn {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--gold);
    color: var(--bg-dark);
    font-size: var(--font-size-xs);
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-md);
    min-width: 18px;
    text-align: center;
}

/* ============================================
   DOWNLOAD APP DROPDOWN
============================================ */
.download-app-dropdown {
    position: relative;
}

.download-app-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--border-gold);
    border-radius: 50%;
    width: 38px;
    height: 38px;
}

.download-app-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold);
}

.download-app-menu {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: rgba(20, 20, 25, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-gold);
    border-radius: 16px;
    padding: 20px;
    z-index: var(--z-dropdown);
    min-width: 180px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

body.light-mode .download-app-menu {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* Puente invisible para mantener hover */
.download-app-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -20px;
    right: -20px;
    height: 20px;
    background: transparent;
}

.download-app-dropdown:hover .download-app-menu {
    display: block;
    animation: fadeInDown 0.3s ease;
}

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

.download-app-qr {
    width: 100px;
    height: auto;
    min-height: 40px;
    margin: 0 auto 8px;
    background: transparent;
    border-radius: 8px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-app-qr:has(img) {
    background: #fff;
    height: 120px;
}

.download-app-qr img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.qr-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 8px;
}

.download-app-text {
    display: block;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
}

body.light-mode .download-app-text {
    color: var(--text-dark);
}

/* Coming Soon Badge */
.coming-soon-badge {
    color: var(--text-light-secondary, #ccc);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 6px;
    text-align: center;
}

/* ============================================
   LANGUAGE DROPDOWN
============================================ */
.lang-dropdown {
    position: relative;
}

.lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--spacing-sm);
    background: var(--bg-dark-secondary);
    border: 2px solid var(--gold);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    min-width: 120px;
    z-index: var(--z-dropdown);
}

body.light-mode .lang-menu {
    background: var(--bg-dark);
}

.lang-menu.active {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.7rem 1rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    color: var(--text-light-secondary);
}

.lang-option:hover {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold);
}

.lang-option.active {
    background: rgba(212, 175, 55, 0.3);
    color: var(--gold);
}

/* ============================================
   THEME TOGGLE
============================================ */
.theme-toggle {
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid var(--border-gold);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xs);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    transition: all var(--transition-normal);
    font-size: var(--font-size-lg);
    outline: none;
    box-shadow: none;
    position: relative;
    width: 70px;
    height: 32px;
}

.theme-toggle:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.2);
}

.theme-toggle-track {
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(50% - 2px);
    height: calc(100% - 4px);
    background: rgba(212, 175, 55, 0.4);
    border-radius: var(--radius-lg);
    transition: transform var(--transition-normal);
    z-index: 0;
}

body.light-mode .theme-toggle-track {
    transform: translateX(100%);
    background: rgba(212, 175, 55, 0.5);
}

.theme-icons-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    position: relative;
    z-index: 1;
    padding: 0 var(--spacing-xs);
}

.theme-icon {
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-base);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.theme-icon.moon {
    color: var(--text-light);
}

.theme-icon.sun {
    color: #fdb813;
}

body.light-mode .theme-icon.moon {
    color: #999;
}

body.light-mode .theme-icon.sun {
    color: #ffa500;
}

/* ============================================
   LOGIN & CTA BUTTONS (Header)
============================================ */
.login-btn {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--font-size-sm);
    transition: color var(--transition-normal);
    padding: var(--spacing-sm) var(--spacing-md);
}

body.light-mode .login-btn {
    color: var(--text-dark);
}

.login-btn:hover {
    color: var(--gold);
}

.cta-button {
    background: transparent;
    color: var(--gold);
    padding: 0.6rem 1.3rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--font-size-sm);
    border: 2px solid var(--gold);
    transition: all var(--transition-normal);
    cursor: pointer;
    outline: none;
    box-shadow: none;
}

.cta-button:hover {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

/* ============================================
   USER AVATAR BUTTON (Logged In)
============================================ */
.user-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* Avatar styles movidos a CSS/components/avatar.css */

/* Mobile user section */
.mobile-menu-user {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-gold);
}

/* .mobile-user-avatar movido a CSS/components/avatar.css */

.mobile-user-info {
    display: flex;
    flex-direction: column;
}

.mobile-user-name {
    color: var(--text-light);
    font-weight: 600;
    font-size: var(--font-size-base);
}

body.light-mode .mobile-user-name {
    color: var(--text-dark);
}

.mobile-user-link {
    color: var(--gold);
    font-size: var(--font-size-sm);
    text-decoration: none;
}

.mobile-user-link:hover {
    text-decoration: underline;
}

/* Mobile logout button */
.mobile-menu-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-gold);
    margin-top: auto;
}

.mobile-logout-btn {
    width: 100%;
    padding: var(--spacing-md);
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.mobile-logout-btn:hover {
    background: var(--error);
    color: white;
}

.app-version {
    display: block;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: var(--spacing-sm);
}

/* ============================================
   DRAWER MENU ITEMS (Igual que app)
============================================ */
.mobile-user-email {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
}

.mobile-menu-account {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border);
}

.drawer-menu-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

body.light-mode .drawer-menu-item {
    color: var(--text-dark);
}

.drawer-menu-item:hover {
    background: rgba(212, 175, 55, 0.1);
}

.drawer-menu-item.admin {
    color: var(--error);
}

.drawer-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.drawer-item-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--gold);
}

.drawer-item-icon.bot {
    background: rgba(33, 150, 243, 0.15);
}

.drawer-item-icon.bot svg {
    fill: #2196f3;
}

.drawer-item-icon.help {
    background: rgba(76, 175, 80, 0.15);
}

.drawer-item-icon.help svg {
    fill: #4caf50;
}

.drawer-item-icon.whatsapp {
    background: rgba(37, 211, 102, 0.15);
}

.drawer-item-icon.whatsapp svg {
    fill: #25d366;
}

.drawer-item-icon.admin {
    background: rgba(244, 67, 54, 0.15);
}

.drawer-item-icon.admin svg {
    fill: var(--error);
}

/* Preferences Section */
.mobile-menu-preferences {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border);
}

.drawer-preference-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
}

.drawer-pref-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.drawer-pref-left span {
    color: var(--text-light);
    font-size: 14px;
}

body.light-mode .drawer-pref-left span {
    color: var(--text-dark);
}

.language-select {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-light);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
}

body.light-mode .language-select {
    background: #f5f5f5;
    color: var(--text-dark);
}

.language-select:focus {
    outline: none;
    border-color: var(--gold);
}

/* Account Section (like app drawer) */
.mobile-menu-account {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border);
}

/* Support Section */
.mobile-menu-support {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border);
}

/* Admin Section */
.mobile-menu-admin {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border);
}

/* ============================================
   MOBILE MENU BUTTON
============================================ */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    padding: var(--spacing-sm);
    outline: none;
    box-shadow: none;
    line-height: 1;
}

body.light-mode .mobile-menu-btn {
    color: var(--text-dark);
}

/* ============================================
   MOBILE MENU
============================================ */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(10px);
    padding: 0;
    z-index: var(--z-modal);
    overflow-y: auto;
}

body.light-mode .mobile-menu {
    background: rgba(255, 255, 255, 0.98);
}

.mobile-menu.active {
    display: block !important;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-gold);
}

.mobile-menu-header .logo {
    width: 40px;
    height: 40px;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    padding: var(--spacing-sm);
    line-height: 1;
}

body.light-mode .mobile-menu-close {
    color: var(--text-dark);
}

.mobile-menu-actions {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-gold);
}

.mobile-menu-actions .mobile-menu-btn {
    flex: 1;
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-align: center;
    text-decoration: none;
    transition: all var(--transition-normal);
    display: block;
}

.mobile-login-btn {
    background: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
}

.mobile-register-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--bg-dark);
    border: none;
}

/* Mobile Menu Search */
.mobile-menu-search {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-gold);
}

.mobile-search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid var(--gold);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.mobile-search-input-wrapper:focus-within {
    background: rgba(212, 175, 55, 0.15);
    border: 3px solid var(--gold);
}

.mobile-search-icon-input {
    flex-shrink: 0;
    fill: var(--gold);
}

.mobile-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px; /* Mínimo 16px para evitar zoom en iOS */
    color: var(--text-color);
}

.mobile-search-input::placeholder {
    color: var(--text-muted);
}

.mobile-search-clear {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--transition-fast);
}

.mobile-search-clear svg {
    fill: var(--text-muted);
}

.mobile-search-clear:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-search-clear:hover svg {
    fill: var(--gold);
}

/* Mobile Search Results */
.mobile-search-results {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    max-height: 280px;
    overflow-y: auto;
}

.mobile-search-results.active {
    display: block !important;
}

.mobile-search-result-item {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    margin-bottom: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-search-result-item:hover {
    background: rgba(212, 175, 55, 0.15);
}

.mobile-search-result-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-search-result-icon svg {
    width: 18px;
    height: 18px;
    fill: var(--gold);
}

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

.mobile-search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-search-result-type {
    font-size: 12px;
    color: var(--gold);
}

.mobile-search-no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Light mode */
body.light-mode .mobile-search-input-wrapper {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.25);
}

body.light-mode .mobile-search-input-wrapper:focus-within {
    background: rgba(212, 175, 55, 0.12);
}

body.light-mode .mobile-search-result-item {
    background: rgba(0, 0, 0, 0.03);
}

body.light-mode .mobile-search-result-item:hover {
    background: rgba(212, 175, 55, 0.1);
}

body.light-mode .mobile-search-result-title {
    color: var(--text-dark);
}

/* Mobile Menu Navigation Section */
.mobile-menu-nav {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border-gold);
}

.mobile-menu-nav .drawer-menu-item {
    padding: 0.9rem var(--spacing-md);
}

.mobile-menu-nav .drawer-menu-item.active {
    background: rgba(212, 175, 55, 0.15);
    border-radius: var(--radius-sm);
}

.mobile-menu-nav .drawer-menu-item.active .drawer-item-icon {
    color: var(--gold);
}

.mobile-menu-nav .drawer-menu-item.active span {
    color: var(--gold);
    font-weight: 600;
}

/* Mobile Menu Submenu Item - indented child link */
.mobile-menu-nav .drawer-submenu-item {
    padding-left: calc(var(--spacing-md) + 24px);
    font-size: 0.9rem;
}

.mobile-menu-nav .drawer-submenu-item .drawer-item-icon {
    width: 32px;
    height: 32px;
}

.mobile-menu-nav .drawer-submenu-item .drawer-item-icon svg {
    width: 16px;
    height: 16px;
}

/* Mobile Nav Dropdown (Inicio con Sobre Nosotros) */
.mobile-nav-dropdown {
    display: flex;
    flex-direction: column;
}

.drawer-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.drawer-dropdown-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.drawer-dropdown-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    transition: transform var(--transition-normal);
}

.drawer-dropdown-arrow svg {
    width: 20px;
    height: 20px;
}

.mobile-nav-dropdown.open .drawer-dropdown-arrow {
    transform: rotate(180deg);
}

.mobile-nav-submenu {
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.mobile-nav-dropdown.open .mobile-nav-submenu {
    display: flex;
}

/* Mobile Menu User Section (cuando esta logueado) */
.mobile-menu-user {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-gold);
    background: rgba(212, 175, 55, 0.05);
    text-decoration: none;
    transition: background var(--transition-normal);
}

.mobile-menu-user:hover {
    background: rgba(212, 175, 55, 0.1);
}

/* Avatar styles movidos a CSS/components/avatar.css */

.mobile-user-info {
    flex: 1;
    min-width: 0;
}

.mobile-user-name {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 2px;
}

.mobile-user-id {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

/* ID row con toggle */
.mobile-user-id-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mobile-id-toggle {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color 0.2s ease;
    border-radius: 4px;
}

.mobile-id-toggle:hover {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

.mobile-id-toggle svg {
    width: 14px;
    height: 14px;
}

.mobile-user-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(212, 175, 55, 0.15);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold);
    width: fit-content;
}

.mobile-user-plan-badge svg {
    color: var(--gold);
}

.mobile-user-plan-badge.free {
    background: rgba(136, 136, 136, 0.15);
    color: var(--text-muted);
}

.mobile-user-plan-badge.free svg {
    color: var(--text-muted);
}

.mobile-user-plan-badge.premium {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold);
}

.mobile-user-plan-badge.elite {
    background: rgba(156, 39, 176, 0.2);
    color: #9c27b0;
}

.mobile-user-plan-badge.elite svg {
    color: #9c27b0;
}

.mobile-user-plan-badge.maestro {
    background: rgba(255, 87, 34, 0.2);
    color: #ff5722;
}

.mobile-user-plan-badge.maestro svg {
    color: #ff5722;
}

.mobile-user-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Drawer Menu Item Arrow */
.drawer-item-arrow {
    margin-left: auto;
    color: var(--text-muted);
    opacity: 0.5;
}

.drawer-menu-item:hover .drawer-item-arrow {
    opacity: 1;
    color: var(--gold);
}

/* Drawer Item Icon Colors */
.drawer-item-icon.subscription {
    color: var(--gold);
}

.drawer-item-icon.security {
    color: #4caf50;
}

.drawer-item-icon.bot {
    color: #2196f3;
}

.drawer-item-icon.book {
    color: #9c27b0;
}

/* Legacy styles for compatibility */
.mobile-user-avatar-legacy {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.mobile-user-info {
    flex: 1;
    min-width: 0;
}

.mobile-user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.light-mode .mobile-user-name {
    color: var(--text-dark);
}

.mobile-user-email {
    font-size: 13px;
    color: var(--text-light-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

body.light-mode .mobile-user-email {
    color: var(--text-dark-secondary);
}

/* Mobile user plan badge */
.mobile-user-plan {
    font-size: 12px;
    color: var(--gold);
    font-weight: 500;
    margin-top: 2px;
}

/* Mobile user edit button */
.mobile-user-edit {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    text-decoration: none;
    flex-shrink: 0;
    margin-left: auto;
    transition: all 0.2s ease;
}

.mobile-user-edit:hover {
    background: rgba(212, 175, 55, 0.3);
}

.mobile-user-edit svg {
    width: 18px;
    height: 18px;
}

/* Mobile Settings Row (Theme + Language) */
.mobile-settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-gold);
    gap: var(--spacing-md);
}

.mobile-setting-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.mobile-setting-label {
    font-size: 13px;
    color: var(--text-light-secondary);
    font-weight: 500;
}

body.light-mode .mobile-setting-label {
    color: var(--text-dark-secondary);
}

/* Mobile Language Selector */
.mobile-lang-selector {
    display: flex;
    gap: 4px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: var(--radius-md);
    padding: 3px;
}

.mobile-lang-btn {
    background: transparent;
    border: none;
    color: var(--text-light-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

body.light-mode .mobile-lang-btn {
    color: var(--text-dark-secondary);
}

.mobile-lang-btn.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #000;
}

.mobile-lang-btn:hover:not(.active) {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold);
}

/* User menu button (desktop header) */
.user-menu-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.user-menu-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.mobile-menu-search {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-gold);
}

.mobile-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(212, 175, 55, 0.1);
    border: 3px solid var(--gold);
    border-radius: var(--radius-md);
    padding: 0 0.75rem;
}

.mobile-search-icon {
    color: var(--gold);
    font-size: 18px;
    flex-shrink: 0;
}

.mobile-search-input {
    flex: 1;
    padding: 0.6rem 0.5rem;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 16px;
}

.mobile-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

body.light-mode .mobile-search-input {
    color: var(--text-dark);
}

body.light-mode .mobile-search-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

/* Mobile Search Results */
.mobile-search-results {
    display: none;
    margin-top: var(--spacing-sm);
    max-height: 250px;
    overflow-y: auto;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-gold);
}

.mobile-search-result-item {
    display: block;
    padding: var(--spacing-md);
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    transition: background var(--transition-normal);
}

.mobile-search-result-item:last-child {
    border-bottom: none;
}

.mobile-search-result-item:active,
.mobile-search-result-item:hover {
    background: rgba(212, 175, 55, 0.15);
}

.mobile-search-result-title {
    display: block;
    color: #ffffff;
    font-weight: 600;
    font-size: var(--font-size-sm);
    margin-bottom: 4px;
}

.mobile-search-result-desc {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-xs);
}

.mobile-search-no-results {
    padding: var(--spacing-md);
    text-align: center;
    color: var(--text-light-secondary);
    font-size: var(--font-size-sm);
}

body.light-mode .mobile-search-results {
    background: rgba(255, 255, 255, 0.95);
}

body.light-mode .mobile-search-result-desc {
    color: var(--text-dark-secondary);
}

body.light-mode .mobile-search-result-title {
    color: var(--text-dark);
}

.mobile-menu-content {
    padding: var(--spacing-md) 0;
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu ul li a {
    display: flex;
    align-items: center;
    padding: 1.2rem var(--spacing-lg);
    color: var(--text-light);
    text-decoration: none;
    font-size: var(--font-size-base);
    font-weight: 500;
    transition: all var(--transition-normal);
    border-left: 3px solid transparent;
}

body.light-mode .mobile-menu ul li a {
    color: var(--text-dark);
}

.mobile-menu ul li a:active,
.mobile-menu ul li a.active {
    background: rgba(212, 175, 55, 0.1);
    border-left-color: var(--gold);
    color: var(--gold);
}

.mobile-menu-section {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-gold);
}

.mobile-menu-section-title {
    padding: var(--spacing-sm) var(--spacing-lg);
    color: var(--gold);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-menu-tools {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: var(--spacing-md) var(--spacing-lg);
}

.mobile-tool-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: var(--spacing-md);
    background: rgba(212, 175, 55, 0.05);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    text-decoration: none;
    transition: all var(--transition-normal);
}

body.light-mode .mobile-tool-item {
    color: var(--text-dark);
    background: rgba(212, 175, 55, 0.08);
}

.mobile-tool-item:active {
    background: rgba(212, 175, 55, 0.15);
}

.mobile-tool-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.mobile-tool-icon {
    font-size: var(--font-size-xl);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-tool-icon svg {
    width: 20px;
    height: 20px;
}

/* TikTok icon - negro en modo claro */
body.light-mode .mobile-tool-item[href*='tiktok'] svg {
    fill: #000000;
}

.mobile-tool-text {
    font-weight: 500;
}

.mobile-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-gold);
}

.mobile-theme-label {
    color: var(--text-light);
    font-weight: 500;
}

body.light-mode .mobile-theme-label {
    color: var(--text-dark);
}

/* ============================================
   MOBILE DOWNLOAD APP SECTION
============================================ */
.drawer-item-icon.download {
    background: rgba(212, 175, 55, 0.15);
}

.drawer-item-icon.download svg {
    width: 20px;
    height: 20px;
    stroke: var(--gold);
}

.mobile-download-toggle {
    cursor: pointer;
}

.mobile-download-toggle .drawer-item-arrow {
    transition: transform 0.3s ease;
}

.mobile-qr-dropdown {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md);
    margin: 0 var(--spacing-md) var(--spacing-md);
    background: rgba(212, 175, 55, 0.05);
    border-radius: var(--radius-md);
}

.mobile-qr-dropdown.active {
    display: flex;
}

.mobile-qr-content {
    width: 100px;
    height: auto;
    min-height: 40px;
    background: transparent;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-qr-content:has(img) {
    width: 140px;
    height: 140px;
    background: #fff;
    padding: 10px;
    border-radius: 12px;
}

.mobile-qr-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.qr-placeholder-mobile {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 8px;
    color: #999;
}

.mobile-qr-text {
    color: var(--text-muted);
    font-size: 13px;
}

/* ============================================
   FOOTER
============================================ */
footer {
    background: rgba(0, 0, 0, 0.95);
    border-top: 1px solid var(--border-gold);
    padding: var(--spacing-2xl) var(--spacing-xl);
}

body.light-mode footer {
    background: rgba(255, 255, 255, 0.95);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-lg);
    align-items: center;
}

.footer-section:first-child {
    max-width: 280px;
}

.footer-section:not(:first-child) {
    text-align: center;
}

.footer-logo {
    width: 120px;
    margin-bottom: var(--spacing-md);
}

.footer-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.footer-section h4 {
    color: var(--gold);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-lg);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.7rem;
}

.footer-section a {
    color: var(--text-light);
    text-decoration: none;
    transition: color var(--transition-normal);
}

body.light-mode .footer-section a {
    color: var(--text-dark);
}

.footer-section a:hover {
    color: var(--gold);
}

.footer-contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.footer-contact-links a {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: color var(--transition-normal);
}

body.light-mode .footer-contact-links a {
    color: var(--text-dark);
}

.footer-contact-links a:hover {
    color: var(--gold);
}

.footer-contact-links a[href*='wa.me']:hover {
    color: var(--whatsapp);
}

.footer-contact-links svg {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.8rem var(--spacing-xl);
    border-top: 1px solid var(--border-gold);
    text-align: center;
    color: var(--text-light-muted);
    font-size: var(--font-size-sm);
}

body.light-mode .footer-bottom {
    color: var(--text-dark-muted);
}

.footer-bottom p {
    margin: 0;
    line-height: 1.4;
}

/* ============================================
   RESPONSIVE - LAYOUT
============================================ */

/* Desktop-only utility class */
.desktop-only {
    display: flex;
}

@media (max-width: 1024px) {
    /* Ocultar elementos desktop-only */
    .desktop-only {
        display: none !important;
    }

    .nav-center {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Mostrar: notificaciones, carrito y menú hamburguesa */
    .nav-right .notification-btn,
    .nav-right .cart-btn {
        display: flex !important;
    }

    /* Reordenar los elementos del header móvil */
    .nav-right {
        flex-direction: row;
        align-items: center;
        gap: 0.3rem;
    }

    .nav-right .notification-btn {
        order: 1;
    }

    .nav-right .cart-btn {
        order: 2;
    }

    .nav-right .mobile-menu-btn {
        order: 3;
    }

    /* Ocultar user avatar en header móvil (está dentro del menú) */
    .nav-right .user-menu-btn {
        display: none !important;
    }
}

@media (max-width: 768px) {
    nav {
        padding: var(--spacing-md);
    }

    .logo {
        width: 50px;
        height: 50px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-section:first-child {
        max-width: 100%;
    }

    .footer-section:not(:first-child) {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-section,
    .footer-section:not(:first-child) {
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto var(--spacing-md);
    }

    .footer-contact-links {
        align-items: center;
    }

    /* Dropdowns responsive - full width en móvil */
    .nav-submenu {
        min-width: min(180px, 90vw);
        left: 50%;
        transform: translateX(-50%);
    }

    .social-menu {
        min-width: min(200px, 90vw);
        right: -10px;
    }

    .download-app-menu {
        min-width: min(180px, 90vw);
        right: -10px;
    }

    .lang-menu {
        min-width: min(120px, 80vw);
        right: 0;
    }

    /* Ajustar QR en móvil pequeño */
    .download-app-qr {
        width: 120px;
        height: 120px;
    }
}

/* ============================================
   LANGUAGE SELECTOR - HIDDEN (Pending translations)
   Uncomment to show when translations are ready
============================================ */
.lang-dropdown,
.language-preference-item {
    display: none !important;
}
