/* ===================== MOBILE RESPONSIVE ===================== */

/* --- TABLET --- */
@media (max-width: 1200px) {
  .cards-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- MOBILE LANDSCAPE --- */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
  .menu-toggle { display: flex; }
  .main, footer { margin-left: 0; }
  section { padding: 80px 20px 60px; }
  #about { padding: 80px 20px 60px; }
  .section-title { font-size: 28px; }
  .hero-name { font-size: 36px; }
  .cards-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .iptv-grid { grid-template-columns: 1fr; }
  .admin-two-col { grid-template-columns: 1fr; }
  .admin-items-grid { grid-template-columns: 1fr; }
  footer { padding: 30px 20px; }
}

/* --- MOBILE PORTRAIT --- */
@media (max-width: 600px) {
  :root {
    --sidebar-w: 280px;
  }

  /* === MOBILE TOP BAR === */
  .menu-toggle {
    top: 12px; left: 12px;
    width: 40px; height: 40px;
    border-radius: 10px;
    font-size: 16px;
    background: rgba(11,26,53,0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
  }

  /* === MOBILE HEADER AREA === */
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: rgba(4,9,26,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border2);
  }
  .mobile-header .m-logo {
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin-left: 48px;
  }
  .mobile-header .m-logo span {
    color: var(--accent);
    font-size: 12px;
    display: block;
    font-weight: 500;
    letter-spacing: 1px;
  }

  /* === SECTIONS === */
  section {
    padding: 24px 16px;
  }
  #about {
    min-height: auto;
    padding: 80px 16px 40px;
  }

  .section-header {
    margin-bottom: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .section-title { font-size: 22px; }
  .section-desc { font-size: 13px; margin-top: 6px; }
  .section-label { font-size: 10px; letter-spacing: 2px; }

  /* === HERO MOBILE === */
  .hero-content { animation: none; }
  .hero-tag { font-size: 10px; padding: 5px 12px; margin-bottom: 16px; }
  .hero-name { font-size: 32px; margin-bottom: 4px; }
  .hero-subtitle { font-size: 16px; margin-bottom: 14px; }
  .hero-bio { font-size: 14px; margin-bottom: 24px; line-height: 1.6; }
  .hero-stats { gap: 20px; margin-bottom: 24px; }
  .hero-stat-num { font-size: 26px; }
  .hero-stat-label { font-size: 11px; }
  .hero-actions { gap: 10px; margin-bottom: 20px; }
  .hero-actions .btn-primary,
  .hero-actions .btn-whatsapp {
    padding: 12px 20px;
    font-size: 13px;
    flex: 1;
    justify-content: center;
  }
  .social-links { gap: 8px; }
  .social-btn { width: 38px; height: 38px; font-size: 14px; }

  /* === MOBILE CARD GRID - 2 COLUMNS like the screenshot === */
  .cards-grid-4,
  .cards-grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .cards-grid-2 { grid-template-columns: 1fr; gap: 12px; }

  /* === PRODUCT CARDS - COMPACT MOBILE === */
  .card {
    padding: 14px;
    border-radius: 10px;
  }
  .product-card .prod-img {
    height: 100px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 32px;
  }
  .prod-badge { font-size: 8px; padding: 2px 8px; margin-bottom: 6px; }
  .prod-name { font-size: 13px; margin-bottom: 4px; line-height: 1.3; }
  .prod-desc {
    font-size: 11px; margin-bottom: 10px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .btn-wa-small {
    padding: 8px 10px; font-size: 11px; border-radius: 8px;
  }
  .btn-wa-small i { font-size: 13px; }

  /* === SERVICE CARDS MOBILE === */
  .service-icon { width: 44px; height: 44px; font-size: 20px; border-radius: 10px; margin-bottom: 12px; }
  .service-title { font-size: 14px; margin-bottom: 6px; }
  .service-desc { font-size: 12px; margin-bottom: 12px; }
  .service-features li { font-size: 11px; padding: 3px 0; }

  /* === IPTV MOBILE === */
  .iptv-card { padding: 24px; }
  .iptv-name { font-size: 20px; }
  .iptv-price { font-size: 34px; margin: 12px 0; }
  .iptv-features li { font-size: 13px; padding: 6px 0; }

  /* === TOOLS MOBILE - COMPACT LIST === */
  .tool-card {
    gap: 12px;
    padding: 14px;
  }
  .tool-icon { width: 42px; height: 42px; font-size: 18px; }
  .tool-name { font-size: 13px; }
  .tool-desc { font-size: 11px; }
  .btn-download { padding: 7px 10px; font-size: 11px; }

  /* === SOCIAL CARDS MOBILE === */
  .social-card {
    padding: 14px 16px;
    gap: 14px;
    flex-wrap: wrap;
  }
  .social-card-icon { width: 44px; height: 44px; font-size: 20px; border-radius: 10px; }
  .social-card-name { font-size: 14px; }
  .btn-follow { padding: 7px 14px; font-size: 12px; }

  /* === PROJECT CARDS MOBILE === */
  .project-title { font-size: 14px; margin-bottom: 6px; }
  .project-desc { font-size: 11px; margin-bottom: 10px; line-height: 1.4; }
  .tech-stack { gap: 4px; margin-bottom: 12px; }
  .tech-badge { font-size: 9px; padding: 2px 8px; }
  .project-links { gap: 6px; }
  .btn-project { padding: 7px 12px; font-size: 11px; }

  /* === VIDEO CARDS MOBILE === */
  .video-thumb { height: 120px; border-radius: 8px; margin-bottom: 10px; }
  .video-play { width: 44px; height: 44px; font-size: 16px; }
  .video-title { font-size: 13px; }
  .video-meta { font-size: 11px; }

  /* === MODALS MOBILE === */
  .modal-overlay { padding: 10px; align-items: flex-end; }
  .modal {
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
    animation: slideUp 0.3s ease;
  }
  @keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
  .modal-header { padding: 18px 20px 14px; }
  .modal-title { font-size: 16px; }
  .modal-body { padding: 18px 20px; }
  .modal-footer { padding: 14px 20px 20px; }
  .modal-lg { max-width: 100%; }
  .modal-body .cards-grid-3,
  .modal-body .cards-grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* === PRODUCT DETAIL MOBILE === */
  .pd-container { grid-template-columns: 1fr; gap: 20px; }
  .pd-main-img { aspect-ratio: 3/2; }
  .pd-title { font-size: 20px; }
  .pd-short-desc { font-size: 13px; }
  .pd-long-desc { font-size: 13px; padding: 12px; }
  .pd-spec-row { grid-template-columns: 110px 1fr; font-size: 12px; padding: 6px 10px; }
  .pd-actions { flex-direction: column; }
  .pd-thumb { width: 52px; height: 52px; }
  .btn-ver-detalle { padding: 7px 10px; font-size: 11px; }
  .product-card .prod-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }

  /* === VER MAS BUTTON === */
  .btn-ver-mas {
    padding: 8px 16px;
    font-size: 12px;
    width: 100%;
    justify-content: center;
  }

  /* === FOOTER MOBILE === */
  footer { padding: 24px 16px; }
  footer .footer-logo { font-size: 16px; }
  footer .footer-links { gap: 14px; }

  /* === ADMIN MOBILE === */

  /* Sidebar vira painel deslizante */
  .admin-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 600;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.5);
  }
  .admin-sidebar.open { transform: translateX(0); }

  /* Overlay escuro ao abrir a sidebar */
  .admin-sidebar-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 599;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
  }
  .admin-sidebar-overlay.show { display: block; }

  /* Botão hamburger na topbar */
  .admin-hamburger {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 10px;
    background: rgba(0,200,255,0.1); border: 1px solid var(--border2);
    color: var(--accent); font-size: 16px; cursor: pointer;
    flex-shrink: 0;
  }

  .admin-topbar { padding: 0 16px; height: 56px; }
  .admin-topbar h3 { font-size: 15px; }
  .admin-user-label { display: none; }
  .admin-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card-value { font-size: 20px; }
  .stat-card-label { font-size: 9px; }
  .dash-welcome { padding: 20px; flex-direction: column; gap: 12px; text-align: center; }
  .dash-welcome-text h2 { font-size: 20px; }
  .dash-welcome-icon { display: none; }
  .admin-items-grid { grid-template-columns: 1fr; }
  .admin-item-card { padding: 14px; gap: 10px; }
  .admin-section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .admin-section-title { font-size: 18px; }
  .admin-table { font-size: 12px; }
  .admin-table th { font-size: 9px; padding: 6px 8px; }
  .admin-table td { padding: 8px; font-size: 12px; }
  .form-row { grid-template-columns: 1fr; }
  .earnings-total { font-size: 30px; }

  /* === HORIZONTAL SCROLL SECTIONS (screenshot style) === */
  .mobile-scroll-wrapper {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .mobile-scroll-wrapper::-webkit-scrollbar { display: none; }
  .mobile-scroll-wrapper > .card {
    flex: 0 0 calc(50% - 6px);
    scroll-snap-align: start;
    min-width: 160px;
  }

  /* === SCROLL INDICATOR DOTS === */
  .scroll-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
  }
  .scroll-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--border); transition: all 0.3s;
  }
  .scroll-dot.active { background: var(--accent); width: 18px; border-radius: 3px; }
}

/* === ULTRA SMALL SCREENS === */
@media (max-width: 380px) {
  .cards-grid-4, .cards-grid-3 { grid-template-columns: 1fr; }
  .hero-name { font-size: 28px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn-primary,
  .hero-actions .btn-whatsapp { width: 100%; }
}
