﻿/* ================================================
   mobile.css — Mobile Responsive Styles
   max-width: 768px
   ufa899.it.com
================================================ */

@media (max-width: 768px) {

  body { padding-bottom: 0; overflow-x: hidden; }
  html { overflow-x: hidden; }

  /* ===== HEADER ===== */
  .site-header { overflow: visible; }

  .header-container {
    padding: 8px 10px;
    gap: 6px;
    align-items: center;
  }

  .logo-wrap { flex: 1; text-align: center; min-width: 0; }
  .logo-img { max-width: 100px; }
  .logo-sub { font-size: 0.45rem; letter-spacing: 0.5px; }

  .header-info { display: none !important; }
  .lang-toggle { flex-shrink: 0; margin-right: 0; }
  .auth-btns { flex-shrink: 0; gap: 5px; }

  .btn { padding: 6px 10px; font-size: 0.7rem; white-space: nowrap; }

  /* ===== BANNER ===== */
  .banner-section { aspect-ratio: auto; height: 140px; }
  .slider-track { height: 140px; }
  .slide { height: 140px; background-size: cover; }
  .slide-1 { background-image: url('../images/banners/banner1-mobile.webp'); background-position: center 35%; }
  .slide-2 { background-image: url('../images/banners/banner2-mobile.webp'); background-position: center 35%; }
  .slide-3 { background-image: url('../images/banners/banner3-mobile.webp'); background-position: center 35%; }


  /* ===== PROVIDERS STRIP — ซ่อนบน mobile ===== */
  .providers-strip { display: none; }

  /* ===== PAGE LAYOUT WRAPPER — sidebar + content ===== */
  .page-layout-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
  }

  /* ===== CATEGORY NAV — แปลงเป็น sidebar ซ้าย ===== */
  .category-nav {
    display: block !important;
    width: 68px;
    flex-shrink: 0;
    background: #0d0d0d;
    border-right: 1px solid #222;
    border-bottom: none;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    overflow-x: hidden;
    -ms-overflow-style: none;
  }
  .category-nav::-webkit-scrollbar { display: none; }

  .cat-list {
    flex-direction: column;
    max-width: 68px;
    padding: 6px 0;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
  }

  .cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 68px;
    padding: 10px 4px;
    gap: 4px;
    font-size: 0.48rem;
    border-bottom: none;
    border-right: none;
    border-left: 3px solid transparent;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }

  .cat-item:hover { border-left-color: rgba(201,162,39,0.4); border-bottom-color: transparent; }

  .cat-item.active {
    border-left-color: var(--gold);
    border-bottom-color: transparent;
    background: rgba(201,162,39,0.08);
  }

  .cat-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: brightness(0.55) saturate(0.5);
    transition: filter 0.15s;
  }
  .cat-item.active .cat-icon-img { filter: brightness(1.1) saturate(1.2); }
  .cat-item:hover .cat-icon-img { filter: brightness(0.8) saturate(0.8); }

  .cat-label { color: #666; font-size: 0.47rem; }
  .cat-item.active .cat-label { color: var(--gold-light); }

  /* ===== SECTION HEADER ===== */
  .games-section { flex: 1; min-width: 0; }
  .section-header { padding: 8px 8px 8px; margin-left: 0; margin-right: 0; }

  /* ===== GAMES SECTION ===== */
  .games-section { padding: 0 0 24px; }

  .games-layout {
    grid-template-columns: 1fr;
    padding: 0 6px;
    gap: 8px;
  }

  .game-featured { aspect-ratio: 4/3; }
  .featured-title { font-size: 1.2rem; }
  .btn-bet-now { padding: 8px 24px; font-size: 0.8rem; }

  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .card-name { font-size: 0.65rem; }
  .card-info { padding: 5px 7px; }

  /* ===== HIDE MOBILE BOTTOM NAV (categories moved to sidebar) ===== */
  .mobile-bottom-nav { display: none !important; }

  /* ===== PROMO SECTION ===== */
  #promoGrid { grid-template-columns: 1fr !important; gap: 10px; }
  .promo-img-grid { grid-template-columns: 1fr !important; gap: 10px; }
  .promo-img-grid { grid-template-columns: 1fr !important; gap: 10px; }
  .promo-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .promo-card-title { font-size: 0.82rem; }
  .promo-card-desc { font-size: 0.7rem; }

  /* ===== FOOTER ===== */
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-nav {
    display: flex; flex-direction: row; flex-wrap: nowrap;
    overflow-x: auto; justify-content: flex-start;
    gap: 0; padding-bottom: 4px; -ms-overflow-style: none;
  }
  .footer-nav::-webkit-scrollbar { display: none; }
  .footer-nav a {
    flex-shrink: 0; font-size: 0.68rem; white-space: nowrap; padding: 4px 8px;
  }
  .footer-nav .footer-sep { flex-shrink: 0; }

  /* ===== LANG TOGGLE MOBILE ===== */
  .lang-toggle { margin-right: 0; }
  .lang-btn { padding: 5px 7px; gap: 0; border-radius: 8px; border: none; background: none; }
  .lang-btn #langLabel { display: none; }
  .lang-btn .lang-arrow { display: none; }
  .lang-flag .fi { font-size: 1.5rem; }
  .lang-dropdown { right: -8px; min-width: 155px; }

  /* ===== AUTH BTNS MOBILE ===== */
  .btn-login { display: flex; }
  .btn-register { display: flex; }

  /* ===== GAMES SECTION — card right edge fix ===== */
  .games-section { overflow: hidden; padding-right: 6px; }
  .games-grid { padding: 0; width: 100%; box-sizing: border-box; }
}

/* ===== Small mobile ===== */
@media (max-width: 375px) {
  .logo-text { font-size: 1.3rem; }
  .btn { padding: 4px 8px; font-size: 0.68rem; }
  .games-grid { gap: 5px; }
  .category-nav { width: 60px; }
  .cat-list { max-width: 60px; }
  .cat-item { width: 60px; }
  .cat-icon-img { width: 28px; height: 28px; }
}