:root {
    --bg-base: #040508;
    --purple-glow: #2b8fff;
    --purple-dim: rgba(43, 143, 255, 0.2);
    --glass-bg: rgba(12, 16, 25, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #8b9bb4;
    --netflix-red: #E50914;
    --error-color: #ff3366;
}

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

body { background-color: var(--bg-base); color: var(--text-main); font-family: 'Inter', sans-serif; min-height: 100vh; overflow-x: hidden; overflow-y: auto; }

/* FONDOS Y NAVBAR */
.fixed-background { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.bg-grid { position: absolute; inset: 0; background-size: 50px 50px; background-image: linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px); mask-image: radial-gradient(circle at top, black 20%, transparent 100%); -webkit-mask-image: radial-gradient(circle at top, black 20%, transparent 100%); }
.ambient-light { position: absolute; border-radius: 50%; filter: blur(120px); }
.light-purple { width: 600px; height: 300px; background: var(--purple-dim); top: -10%; left: 50%; transform: translateX(-50%); }
.light-dark { width: 50%; height: 50%; background: radial-gradient(circle, rgba(0,234,255,0.05) 0%, transparent 70%); bottom: -20%; right: -10%; }

.navbar { position: sticky; top: 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; padding: 15px 5%; background: rgba(4, 5, 8, 0.8); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--glass-border); }
.nav-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 300; letter-spacing: 1px; }
.nav-brand i { color: var(--purple-glow); font-size: 24px; filter: drop-shadow(0 0 10px var(--purple-glow)); }
.nav-brand strong { font-weight: 800; }
.nav-user { display: flex; align-items: center; gap: 20px; }
.user-balance { background: rgba(43, 143, 255, 0.1); border: 1px solid rgba(43, 143, 255, 0.3); padding: 8px 15px; border-radius: 50px; display: flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-weight: 700; color: #fff; box-shadow: 0 0 15px rgba(43, 143, 255, 0.1); }
.user-balance i { color: var(--purple-glow); }
.user-profile-btn { position: relative; cursor: pointer; transition: transform 0.3s ease; }
.user-profile-btn:hover { transform: scale(1.1); }
.user-profile-btn img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--purple-glow); object-fit: cover; }
.status-indicator { position: absolute; bottom: 0; right: 0; width: 12px; height: 12px; background: #00ff66; border-radius: 50%; border: 2px solid var(--bg-base); }

/* MAIN CONTENT */
.main-content { padding: 40px 5%; max-width: 1400px; margin: 0 auto; }
.hero-section { text-align: center; margin-bottom: 40px; animation: fadeInDown 0.8s ease; }
.hero-section h1 { font-size: 38px; font-weight: 800; letter-spacing: 2px; margin-bottom: 10px; }
.hero-section h1 span { color: var(--purple-glow); text-shadow: 0 0 20px var(--purple-dim); }
.hero-section p { color: var(--text-muted); font-size: 15px; max-width: 600px; margin: 0 auto; }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* CARRUSEL Y COMPONENTES */
.carousel-container { width: 100%; max-width: 1200px; margin: 0 auto 40px auto; position: relative; border-radius: 24px; overflow: hidden; aspect-ratio: 21 / 8; box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 0 1px var(--glass-border); background: #0a0a0a; }
@media (max-width: 768px) { .carousel-container { aspect-ratio: 16 / 9; border-radius: 16px; margin-bottom: 30px; } }
.carousel-track { display: flex; width: 100%; height: 100%; transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); }
.carousel-slide { min-width: 100%; height: 100%; position: relative; }
.carousel-slide img, .carousel-slide video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.carousel-slide::after { content: ''; position: absolute; inset: 0; background: inset 0 0 50px rgba(0,0,0,0.5); pointer-events: none; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.4); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); color: #fff; width: 45px; height: 45px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; z-index: 10; opacity: 0; transition: 0.3s; }
.carousel-container:hover .carousel-btn { opacity: 1; }
.carousel-btn:hover { background: var(--purple-glow); border-color: var(--purple-glow); }
.prev-btn { left: 20px; } .next-btn { right: 20px; }
.carousel-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.dot { width: 8px; height: 8px; background: rgba(255,255,255,0.3); border-radius: 50px; cursor: pointer; transition: 0.3s; }
.dot.active { width: 24px; background: var(--purple-glow); box-shadow: 0 0 10px var(--purple-glow); }

.quick-categories { 
    display: flex; 
    gap: 12px; 
    overflow-x: auto; 
    margin-bottom: 30px; 
    padding-bottom: 10px; 
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; 
}
/* Barra de scroll delgada y estética */
.quick-categories::-webkit-scrollbar { 
    height: 6px; 
}
.quick-categories::-webkit-scrollbar-track { 
    background: rgba(255, 255, 255, 0.05); 
    border-radius: 10px; 
}
.quick-categories::-webkit-scrollbar-thumb { 
    background: var(--purple-glow); 
    border-radius: 10px; 
}

.cat-pill { background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); padding: 10px 20px; border-radius: 50px; color: var(--text-muted); font-weight: 600; font-size: 13px; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; gap: 8px; white-space: nowrap; backdrop-filter: blur(10px); }
.cat-pill:hover { background: rgba(255,255,255,0.08); color: #fff; }
.cat-pill.active { background: var(--purple-glow); color: #fff; border-color: var(--purple-glow); box-shadow: 0 5px 15px rgba(43, 143, 255,0.4); transform: translateY(-2px); }

.store-top-bar { display: flex; align-items: center; gap: 30px; margin-bottom: 40px; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 20px; padding: 20px 25px; backdrop-filter: blur(15px); }
.search-container { flex: 0 0 320px; }
.search-container h3, .trending-mini-container h3 { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; }
.search-input-wrapper { position: relative; width: 100%; }
.search-input-wrapper i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-input-wrapper input { width: 100%; background: rgba(0,0,0,0.4); border: 1px solid var(--glass-border); color: #fff; padding: 14px 20px 14px 45px; border-radius: 12px; font-size: 14px; outline: none; transition: 0.3s; font-family: 'Inter', sans-serif; }
.search-input-wrapper input:focus { border-color: var(--purple-glow); box-shadow: 0 0 15px rgba(43, 143, 255,0.2); background: rgba(0,0,0,0.7); }
.trending-mini-container { flex: 1; border-left: 1px solid rgba(255,255,255,0.05); padding-left: 30px; overflow: hidden; }
.trending-mini-list { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; scrollbar-color: var(--purple-glow) transparent; }
.trending-mini-list::-webkit-scrollbar { height: 4px; }
.trending-mini-list::-webkit-scrollbar-thumb { background: var(--purple-glow); border-radius: 4px; }
.mini-product-card { display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border); padding: 10px; border-radius: 12px; min-width: 240px; flex: 1; cursor: pointer; transition: 0.3s; }
.mini-product-card:hover { background: rgba(255,255,255,0.05); border-color: currentColor; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.mini-img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; border: 1px solid rgba(255,255,255,0.1); }
.mini-icon-box { width: 50px; height: 50px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.mini-info { flex-grow: 1; overflow: hidden; }
.mini-info h4 { font-size: 13px; color: #fff; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-info .mini-price { font-size: 14px; font-weight: 800; color: #00ff66; font-family: 'JetBrains Mono', monospace; }
.mini-buy-btn { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); border: none; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; transition: 0.3s; display:flex; align-items:center; justify-content:center; }
.mini-product-card:hover .mini-buy-btn { background: currentColor; color: #fff; }
@media (max-width: 900px) { .store-top-bar { flex-direction: column; align-items: stretch; padding: 20px; gap: 20px; } .search-container { flex: 1; max-width: 100%; } .trending-mini-container { border-left: none; border-top: 1px solid rgba(255,255,255,0.05); padding-left: 0; padding-top: 20px; } }

/* PRODUCTOS GRID */
.products-section { width: 100%; }
.section-title { font-size: 20px; font-weight: 700; margin-bottom: 25px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--glass-border); padding-bottom: 10px;}
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.loading-catalog { grid-column: 1 / -1; text-align: center; color: var(--text-muted); padding: 50px; font-size: 16px; }
.product-card { background: var(--glass-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid var(--glass-border); border-radius: 20px; padding: 15px; overflow: hidden; position: relative; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: flex; flex-direction: column; gap: 15px; }
.product-card:hover { transform: translateY(-8px); border-color: currentColor; box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 25px currentColor; }
.product-glow { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.05; filter: blur(30px); z-index: 0; pointer-events: none; transition: opacity 0.4s ease; }
.product-card:hover .product-glow { opacity: 0.15; }
.product-header { height: 140px; border-radius: 12px; position: relative; z-index: 2; overflow: hidden; box-shadow: inset 0 -20px 30px rgba(0,0,0,0.5); }
.header-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%); z-index: 1; }
.product-info { display: flex; flex-direction: column; flex-grow: 1; position: relative; z-index: 2; }
.cat-label { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 6px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; width: fit-content; margin-bottom: 10px; border: 1px solid currentColor; }
.product-info h3 { font-size: 18px; font-weight: 800; margin-bottom: 5px; color: #fff; letter-spacing: 0.5px;}
.product-desc { font-size: 13px; color: var(--text-muted); line-height: 1.4; margin-bottom: 10px; flex-grow: 1; }
.product-meta { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; font-size: 12px; color: #a1b0c9; }
.product-meta span { display: flex; align-items: center; gap: 5px; background: rgba(255,255,255,0.05); padding: 4px 8px; border-radius: 4px;}
.price-block { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 15px; }
.product-price { font-family: 'JetBrains Mono', monospace; font-size: 26px; font-weight: 800; color: #fff; display: flex; align-items: flex-start; gap: 4px; line-height: 1;}
.product-price .currency { font-size: 14px; color: var(--text-muted); margin-top: 2px; }
.stock-info { font-size: 11px; font-weight: 600; letter-spacing: 0.5px;}
.stock-info.high { color: #00ff66; } .stock-info.low { color: #ffbb00; } .stock-info.out { color: var(--error-color); }
.btn-buy { background: rgba(255,255,255,0.05); color: #fff; border: 1px solid var(--glass-border); padding: 12px; border-radius: 10px; font-weight: 700; cursor: pointer; transition: all 0.3s ease; display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; font-size: 14px; }
.product-card:hover .btn-buy { background: currentColor; color: #ffffff; border-color: currentColor; font-weight: 800; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.product-card:hover .btn-buy i { color: #ffffff; }

/* MODALES GLOBALES */
.profile-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 999; opacity: 0; visibility: hidden; transition: all 0.3s ease; display: flex; justify-content: flex-end;  }
.profile-overlay.active { opacity: 1; visibility: visible; }
.profile-panel { width: 100%; max-width: 350px; height: 100%; background: rgba(10, 14, 23, 0.95); border-left: 1px solid var(--purple-glow); box-shadow: -20px 0 50px rgba(0,0,0,0.8); padding: 40px 30px; display: flex; flex-direction: column; position: relative; transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1); }
.profile-overlay.active .profile-panel { transform: translateX(0); }

/* --- X CERRAR GENERAL (PERFIL) --- */
.close-btn { position: absolute; top: 20px; right: 20px; background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; transition: color 0.3s ease; }
.close-btn:hover { color: var(--error-color); }

.profile-header { text-align: center; margin-bottom: 30px; }
.profile-header img { width: 90px; height: 90px; border-radius: 50%; border: 3px solid var(--purple-glow); margin-bottom: 15px; box-shadow: 0 0 20px var(--purple-dim); object-fit: cover;}
.profile-header h2 { font-size: 20px; font-weight: 800; margin-bottom: 5px; color: #fff;}
.profile-header p { font-size: 13px; color: var(--text-muted); margin-bottom: 15px; }
.role-badge { background: rgba(43, 143, 255, 0.15); color: var(--purple-glow); border: 1px solid var(--purple-glow); padding: 5px 12px; border-radius: 50px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.profile-stats { display: flex; gap: 15px; margin-bottom: 30px; }
.stat-box { flex: 1; background: rgba(0,0,0,0.4); border: 1px solid var(--glass-border); border-radius: 12px; padding: 15px; text-align: center; }
.stat-box i { color: var(--purple-glow); font-size: 20px; margin-bottom: 10px; }
.stat-box h4 { font-size: 11px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 5px; }
.stat-box p { font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 800; color: #fff; }
.profile-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.btn-action, .btn-logout { width: 100%; padding: 15px; border-radius: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 10px; justify-content: flex-start; transition: all 0.3s ease; }
.btn-action { background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); color: #fff; }
.btn-action:hover { background: rgba(255,255,255,0.1); border-color: var(--purple-glow); }
.btn-logout { background: rgba(255, 51, 102, 0.1); border: 1px solid rgba(255, 51, 102, 0.3); color: var(--error-color); margin-top: 10px; }
.btn-logout:hover { background: var(--error-color); color: #fff; box-shadow: 0 0 20px rgba(255, 51, 102, 0.4); }

/* =====================================
   MODAL DE COMPRA (DISEÑO MEJORADO)
   ===================================== */
.buy-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(5px); z-index: 1100; opacity: 0; visibility: hidden; transition: 0.3s; display: flex; justify-content: center; align-items: center; }
.buy-modal-overlay.active { opacity: 1; visibility: visible; }
.buy-modal-content { background: var(--glass-bg); border: 1px solid var(--purple-glow); border-radius: 16px; width: 100%; max-width: 500px; padding: 35px 30px; transform: translateY(20px); transition: 0.3s; box-shadow: 0 0 50px rgba(43, 143, 255, 0.1); max-height: 90vh; overflow-y: auto; position: relative; }
.buy-modal-content::-webkit-scrollbar { width: 6px; }
.buy-modal-content::-webkit-scrollbar-thumb { background: var(--purple-glow); border-radius: 10px; }
.buy-modal-overlay.active .buy-modal-content { transform: translateY(0); }

/* ✅ NUEVA 'X' MODERNA ESTILO TIKTOK */
.close-buy-btn { position: absolute; top: 15px; right: 15px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: #fff; width: 35px; height: 35px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; font-size: 16px; transition: all 0.3s ease; }
.close-buy-btn:hover { background: rgba(255,51,102,0.2); color: var(--error-color); border-color: var(--error-color); transform: scale(1.1); box-shadow: 0 0 15px rgba(255,51,102,0.3); }

.buy-modal-header { text-align: center; margin-bottom: 20px; }
.buy-modal-header h3 { font-size: 18px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 1px;}
.buy-modal-body { margin-bottom: 25px; text-align: center;}
.buy-modal-footer { display: flex; gap: 15px; }
.btn-cancel-buy { flex: 1; background: transparent; border: 1px solid var(--glass-border); color: #fff; padding: 12px; border-radius: 8px; cursor: pointer; font-weight: 600; transition: 0.2s; }
.btn-cancel-buy:hover { background: rgba(255,255,255,0.05); }
.btn-confirm-buy { flex: 1; background: var(--purple-glow); border: none; color: #fff; padding: 12px; border-radius: 8px; cursor: pointer; font-weight: 600; transition: 0.3s; display:flex; justify-content:center; align-items:center; gap:8px;}
.btn-confirm-buy:hover { background: #c653ff; box-shadow: 0 0 15px rgba(43, 143, 255,0.4); }
.btn-confirm-buy:disabled { opacity: 0.6; cursor: not-allowed; }

/* INPUT WHATSAPP EN MODAL */
.whatsapp-group { text-align: left; margin-bottom: 20px; }
.whatsapp-group label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
.whatsapp-input-wrapper { position: relative; }
.whatsapp-input-wrapper i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #25D366; font-size: 18px; }
.whatsapp-input-wrapper input { width: 100%; background: rgba(0,0,0,0.5); border: 1px solid var(--glass-border); color: #fff; padding: 12px 15px 12px 45px; border-radius: 8px; font-size: 14px; outline: none; transition: 0.3s; font-family: 'Inter', sans-serif; }
.whatsapp-input-wrapper input:focus { border-color: #25D366; box-shadow: 0 0 15px rgba(37, 211, 102, 0.2); background: rgba(0,0,0,0.8); }
.whatsapp-warning { background: rgba(255,51,102,0.1); border-left: 3px solid var(--error-color); padding: 10px 12px; border-radius: 6px; margin-top: 12px; font-size: 11px; color: #ffcccc; line-height: 1.5; display: flex; gap: 8px; align-items: flex-start; text-align: left;}
.whatsapp-warning i { color: var(--error-color); margin-top: 2px; }

/* ✅ ESTILOS MÉTODOS DE PAGO MODAL */
.payment-methods { margin-bottom: 15px; }
.payment-options { display: flex; gap: 10px; align-items: stretch; }
.payment-option { flex: 1; cursor: pointer; display: flex;}
.payment-option input { display: none; }

.option-content { background: rgba(0,0,0,0.5); border: 1px solid var(--glass-border); padding: 12px 8px; border-radius: 8px; text-align: center; color: var(--text-muted); transition: all 0.3s ease; font-size: 13px; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 100%; }
.option-content i { font-size: 22px; }
.option-content small { font-size: 11px; opacity: 0.8; font-family: 'JetBrains Mono', monospace;}

.payment-option input:checked + .option-content { border-color: var(--purple-glow); background: rgba(43, 143, 255, 0.1); color: #fff; box-shadow: 0 0 15px rgba(43, 143, 255, 0.2); }
.payment-option input:checked + .option-content.whatsapp-color { border-color: #25D366; background: rgba(37, 211, 102, 0.15); color: #fff; box-shadow: 0 0 15px rgba(37, 211, 102, 0.3); }
.payment-option input:checked + .option-content.whatsapp-color i { color: #25D366; }
.payment-option input:checked + .option-content.yape-color { border-color: #742284; background: rgba(116, 34, 132, 0.15); color: #fff; box-shadow: 0 0 15px rgba(116, 34, 132, 0.3); }
.payment-option input:checked + .option-content.yape-color i { color: #00e0a8; }
.payment-option input:checked + .option-content.binance-color { border-color: #fcd535; background: rgba(252, 213, 53, 0.1); color: #fff; box-shadow: 0 0 15px rgba(252, 213, 53, 0.2); }
.payment-option input:checked + .option-content.binance-color i { color: #fcd535; }

/* Detalles del QR */
.payment-details-box { background: rgba(255,255,255,0.03); border: 1px dashed rgba(255,255,255,0.1); padding: 25px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.payment-details-box img { width: 200px; height: 200px; border-radius: 12px; border: 2px solid rgba(255,255,255,0.2); }
.payment-details-info { text-align: center; font-size: 14px; color: #ccc; }
.payment-details-info strong { color: #00ff66; font-size: 24px; display: block; margin-bottom: 5px; margin-top: 5px; font-family: 'JetBrains Mono', monospace;}
.upload-voucher-btn { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 12px 20px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 700; margin-top: 10px; width: 100%; text-align: center; transition: 0.3s; }
.upload-voucher-btn:hover { background: rgba(255,255,255,0.2); }

/* TOASTS */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: rgba(15, 20, 30, 0.9); border-left: 4px solid var(--purple-glow); color: #fff; padding: 15px 20px; border-radius: 8px; font-size: 14px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); backdrop-filter: blur(10px); transform: translateX(120%); transition: transform 0.3s ease; display: flex; align-items: center; gap: 12px; }
.toast.show { transform: translateX(0); }
.toast.error { border-left-color: var(--error-color); }

/* ==========================================
   🎬 NUEVO MODAL MIS COMPRAS (TIKTOK TREND)
   ========================================== */
.tiktok-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.92); backdrop-filter: blur(20px); display: flex; justify-content: center; align-items: center; z-index: 9999; opacity: 0; visibility: hidden; transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.tiktok-overlay.active { opacity: 1; visibility: visible; }
.tiktok-card { background: #09090b; width: 90%; max-width: 400px; border-radius: 24px; padding: 35px 25px; position: relative; overflow: hidden; transform: scale(0.8); transition: 0.4s; border: 1px solid rgba(43, 143, 255, 0.3); box-shadow: 0 20px 50px rgba(0,0,0,0.9), 0 0 40px rgba(43, 143, 255,0.15); }
.tiktok-overlay.active .tiktok-card { transform: scale(1); }
.tiktok-card::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: conic-gradient(from 0deg, transparent 0%, rgba(43, 143, 255,0.4) 25%, transparent 50%); animation: spin 4s linear infinite; pointer-events: none; z-index: 0; }
@keyframes spin { 100% { transform: rotate(360deg); } }
.tiktok-content { position: relative; z-index: 1; text-align: center; }
.btn-close-tiktok { position: absolute; top: 15px; right: 15px; background: rgba(255,255,255,0.1); border: none; color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; z-index: 10; transition: 0.3s; }
.btn-close-tiktok:hover { background: var(--error-color); transform: scale(1.1); }
.tiktok-icon-top { font-size: 55px; margin-bottom: 15px; text-shadow: 0 0 25px currentColor; animation: pop 1s ease infinite alternate; }
@keyframes pop { 100% { transform: scale(1.08); } }
.tiktok-title { font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; }
.tiktok-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 25px; }
.tiktok-cred-box { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 18px 20px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: 0.3s; position: relative; overflow: hidden; text-align: left; }
.tiktok-cred-box:hover { background: rgba(0,255,102,0.1); border-color: #00ff66; box-shadow: inset 0 0 20px rgba(0,255,102,0.1); }
.tiktok-cred-info { display: flex; flex-direction: column; align-items: flex-start; }
.tiktok-cred-label { font-size: 11px; color: #888; font-weight: 800; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px;}
.tiktok-cred-value { font-family: 'JetBrains Mono', monospace; font-size: 16px; color: #fff; font-weight: bold; }
.tiktok-cred-box i { color: #00ff66; font-size: 20px; opacity: 0.3; transition: 0.3s; }
.tiktok-cred-box:hover i { opacity: 1; transform: scale(1.2); }
.blur-reveal { filter: blur(6px); transition: 0.3s ease; }
.tiktok-cred-box:hover .blur-reveal { filter: blur(0); color: #00ff66; }
.btn-tiktok-action { width: 100%; padding: 16px; border-radius: 14px; font-weight: 800; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; background: linear-gradient(90deg, #00f2fe, #4facfe); border: none; color: #fff; cursor: pointer; margin-top: 15px; transition: 0.3s; display: flex; justify-content: center; align-items: center; gap: 10px; }
.btn-tiktok-action:hover { box-shadow: 0 0 25px rgba(0, 242, 254, 0.4); transform: translateY(-3px); filter: brightness(1.1); }
.btn-refresh { background: linear-gradient(90deg, var(--purple-glow), #ff3366); }
.btn-refresh:hover { box-shadow: 0 0 25px rgba(43, 143, 255,0.4); }

/* ==========================================
   🎧 MODAL SOPORTE INTELIGENTE
   ========================================== */
.support-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 9999; opacity: 0; visibility: hidden; transition: 0.3s; }
.support-modal-overlay.active { opacity: 1; visibility: visible; }
.support-modal-content { background: var(--glass-bg); border: 1px solid var(--purple-glow); border-radius: 16px; width: 90%; max-width: 450px; padding: 35px 30px; position: relative; box-shadow: 0 0 40px rgba(43, 143, 255,0.15); transform: translateY(20px); transition: 0.3s; }
.support-modal-overlay.active .support-modal-content { transform: translateY(0); }
.support-form label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
.support-form select { width: 100%; background: rgba(0,0,0,0.5); border: 1px solid var(--glass-border); color: #fff; padding: 12px; border-radius: 8px; font-size: 14px; outline: none; margin-bottom: 15px; }
.support-form select:focus { border-color: var(--purple-glow); }
.btn-support-wa { width: 100%; background: #25D366; border: none; color: #000; font-weight: bold; font-size: 14px; padding: 12px; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; transition: 0.3s; margin-top: 10px; }
.btn-support-wa:hover { box-shadow: 0 0 20px rgba(37,211,102,0.4); transform: translateY(-2px); }

/* ==========================================
   💡 BOTONES DE CATÁLOGO PÚBLICO
   ========================================== */
.btn-back-portal {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-back-portal:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-3px);
}

.btn-guest-login {
    background: linear-gradient(135deg, var(--purple-glow) 0%, #ff007f 100%);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(43, 143, 255, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-guest-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(43, 143, 255, 0.6);
}
/* ===== Métodos de pago dinámicos (se configuran en /manager/pagos) ===== */
.payment-options { flex-wrap: wrap; }
.payment-option { min-width: 95px; }
.option-content.pm-dyn i { color: var(--pm-color); }
.payment-option input:checked + .option-content.pm-dyn { border-color: var(--pm-color); background: var(--pm-bg); color: #fff; box-shadow: 0 0 15px var(--pm-glow); }
.pm-copy { background: transparent; border: none; color: var(--pm-color, #00ff66); cursor: pointer; font-size: 14px; }
.pm-wa-only { background: rgba(37, 211, 102, 0.08); border: 1px solid rgba(37, 211, 102, 0.3); color: #cfe; border-radius: 8px; padding: 12px; font-size: 13px; text-align: center; line-height: 1.5; }

/* ===== v2: descuento + condiciones de uso en la tarjeta ===== */
.product-price-wrap { display: flex; flex-direction: column; gap: 2px; }
.product-price-wrap .disc-row { display: flex; align-items: center; gap: 8px; }
.old-price { color: #8b93a7; text-decoration: line-through; font-size: 14px; font-family: 'JetBrains Mono', monospace; }
.disc-badge { background: #ff3366; color: #fff; font-weight: 800; font-size: 11px; padding: 2px 7px; border-radius: 6px; letter-spacing: .3px; }
.product-terms { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-left: 3px solid var(--purple-glow); border-radius: 8px; padding: 10px 12px; margin-bottom: 15px; text-align: left; }
.product-terms b { display: block; font-size: 11px; color: #cbd3e1; margin-bottom: 4px; font-weight: 700; }
.product-terms b i { color: var(--purple-glow); margin-right: 4px; }
.product-terms span { display: block; font-size: 12px; color: var(--text-muted); line-height: 1.45; white-space: pre-line; }

/* ===== v2: catálogo en 2 columnas también en celular ===== */
@media (max-width: 760px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-card { padding: 10px; gap: 10px; border-radius: 16px; }
    .product-header { height: 92px; border-radius: 10px; }
    .product-info h3 { font-size: 15px; }
    .product-desc { font-size: 11.5px; margin-bottom: 8px; }
    .product-price { font-size: 20px; }
    .product-price .currency { font-size: 11px; }
    .old-price { font-size: 12px; }
    .disc-badge { font-size: 10px; padding: 1px 6px; }
    .price-block { margin-bottom: 10px; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
    .stock-info { font-size: 10px; }
    .product-terms { padding: 8px 10px; margin-bottom: 10px; }
    .product-terms span { font-size: 11px; }
    .btn-buy { padding: 10px; font-size: 12.5px; }
    .cat-label { font-size: 10px; }
    .product-meta span { font-size: 9px !important; padding: 3px 6px !important; }
}
@media (max-width: 380px) {
    .products-grid { gap: 9px; }
    .product-card { padding: 8px; }
}

/* ===== v2: selector de meses en la compra ===== */
.buy-months { text-align: left; margin: 4px 0 18px; }
.buy-months-label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
.buy-months-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.buy-month { flex: 1 1 auto; min-width: 84px; cursor: pointer; background: rgba(0,0,0,0.5); border: 1px solid var(--glass-border); border-radius: 10px; padding: 9px 10px; text-align: center; transition: all .25s ease; }
.buy-month.active { border-color: var(--purple-glow); background: rgba(43,143,255,0.12); box-shadow: 0 0 14px rgba(43,143,255,0.2); }
.buy-month b { display: block; color: #fff; font-size: 13px; font-weight: 800; }
.buy-month small { display: block; color: var(--text-muted); font-size: 11px; margin-top: 2px; font-family: 'JetBrains Mono', monospace; }
.buy-month.active small { color: #00ff66; }
.buy-price-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.buy-price-now { font-size: 24px; font-weight: 800; color: #00ff66; font-family: 'JetBrains Mono', monospace; }
.buy-price-old { font-size: 15px; color: #8b93a7; text-decoration: line-through; font-family: 'JetBrains Mono', monospace; }
.buy-price-badge { background: #ff3366; color: #fff; font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.pm-empty { background: rgba(255,187,0,0.08); border: 1px solid rgba(255,187,0,0.3); color: #ffd98a; border-radius: 8px; padding: 12px; font-size: 13px; text-align: center; line-height: 1.5; }
.saldo-insuf { background: rgba(255,51,102,0.08); border: 1px solid rgba(255,51,102,0.3); color: #ffb3c4; border-radius: 8px; padding: 12px; font-size: 13px; text-align: center; line-height: 1.5; margin-top: 4px; }
.saldo-ok { background: rgba(0,255,102,0.06); border: 1px solid rgba(0,255,102,0.25); color: #b6f5cf; border-radius: 8px; padding: 12px; font-size: 13px; text-align: center; line-height: 1.5; margin-top: 4px; }

/* ===== v3: Condiciones de uso como BOTÓN + ventana ===== */
.btn-terms {
    display: inline-flex; align-items: center; gap: 7px; width: 100%; justify-content: center;
    background: rgba(43,143,255,0.08); color: #9ec7ff; border: 1px solid rgba(43,143,255,0.35);
    padding: 10px 12px; border-radius: 10px; font-weight: 700; font-size: 13px; cursor: pointer;
    transition: all .25s ease; margin-bottom: 14px; font-family: inherit;
}
.btn-terms:hover { background: rgba(43,143,255,0.18); border-color: var(--purple-glow); color: #fff; }
.btn-terms i { font-size: 13px; }

.terms-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(6px); z-index: 1200; opacity: 0; visibility: hidden; transition: .25s; display: flex; justify-content: center; align-items: center; padding: 18px; }
.terms-modal-overlay.active { opacity: 1; visibility: visible; }
.terms-modal-box { background: #0c0e14; border: 1px solid var(--glass-border); border-radius: 18px; width: 100%; max-width: 440px; max-height: 85vh; display: flex; flex-direction: column; overflow: hidden; transform: translateY(14px) scale(.98); transition: .25s cubic-bezier(0.175,0.885,0.32,1.275); box-shadow: 0 20px 60px rgba(0,0,0,0.7); }
.terms-modal-overlay.active .terms-modal-box { transform: translateY(0) scale(1); }
.terms-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px 12px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.terms-modal-head h3 { color: #fff; font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.terms-modal-head h3 i { color: var(--purple-glow); }
.terms-modal-close { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: #fff; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; flex: 0 0 auto; transition: .2s; }
.terms-modal-close:hover { background: rgba(255,255,255,0.15); }
.terms-modal-product { padding: 10px 20px 0; color: var(--purple-glow); font-weight: 700; font-size: 13px; }
.terms-modal-body { padding: 12px 20px 18px; color: #d7dce6; font-size: 14px; line-height: 1.6; white-space: pre-line; overflow-y: auto; }
.terms-modal-foot { padding: 12px 20px 18px; border-top: 1px solid rgba(255,255,255,0.07); display: flex; justify-content: flex-end; }
.btn-terms-ok { background: var(--purple-glow); color: #fff; border: none; padding: 11px 26px; border-radius: 10px; font-weight: 800; font-size: 14px; cursor: pointer; transition: .25s; }
.btn-terms-ok:hover { filter: brightness(1.1); transform: translateY(-1px); }
@media (max-width: 760px) {
    .btn-terms { padding: 9px 10px; font-size: 12px; margin-bottom: 10px; }
    .terms-modal-box { max-width: 100%; }
}

/* ===== v4: foto de perfil (subir/cambiar) ===== */
.avatar-wrap { position: relative; display: inline-block; margin-bottom: 8px; }
.avatar-wrap img { margin-bottom: 0 !important; }
.avatar-cam { position: absolute; bottom: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; border: 2px solid #0c0e14; background: var(--purple-glow); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 13px; transition: .2s; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.avatar-cam:hover { filter: brightness(1.15); transform: scale(1.08); }
.avatar-remove { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #ff6b8a; text-decoration: none; margin-bottom: 12px; }
.avatar-remove:hover { text-decoration: underline; }
