/* ATHAR 2.0 — 118 DESKTOP GRID (4 per row) + SMOOTH / FAST INTERACTIONS
 * Loaded last. 107-athar-red-black-premium forced 2 columns with no media query,
 * which is why desktop mode showed big 2-column cards. */

/* ───────── DESKTOP: 4 panels per row ───────── */
@media (min-width: 700px) {
  html body #grid-all-panels,
  html body #grid-all-panels > .logo-grid,
  html body #grid-safe-location,
  html body .logo-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
    width: 100% !important;
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    align-items: stretch !important;
  }
  html body .logo-grid .logo-card,
  html body #grid-all-panels .logo-card {
    width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    height: 100% !important; box-sizing: border-box !important;
    border-radius: 20px !important; padding: 12px 12px 12px !important;
    transition: transform .16s cubic-bezier(.2,.8,.2,1), box-shadow .16s ease, border-color .16s ease !important;
  }
  html body .logo-grid .logo-card > img {
    width: 100% !important; height: auto !important; aspect-ratio: 1 / 1;
    max-height: 190px !important; object-fit: cover !important; border-radius: 14px !important;
  }
  html body .logo-grid .logo-card:hover {
    transform: translate3d(0, -4px, 0) !important;
    border-color: rgba(255, 77, 94, .85) !important;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .55), 0 0 26px rgba(225, 29, 46, .22) !important;
  }
  html body .logo-card .panel-name-top { font-size: 15px !important; }
  html body .logo-card .panel-buy-row .btn-buy-now { padding: 11px 12px !important; font-size: 14px !important; }

  /* compact floating nav on desktop */
  html body .bottom-nav {
    left: 50% !important; right: auto !important; width: min(520px, 92vw) !important;
    transform: translateX(-50%) !important;
  }
  /* keep the page content centred on a wide screen */
  html body #home-view, html body #main-content { max-width: 1280px !important; margin-left: auto !important; margin-right: auto !important; }
}
@media (min-width: 560px) and (max-width: 699px) {
  html body #grid-all-panels, html body #grid-all-panels > .logo-grid, html body .logo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 12px !important;
  }
}
@media (min-width: 1500px) {
  html body #grid-all-panels, html body #grid-all-panels > .logo-grid, html body .logo-grid { max-width: 1360px !important; gap: 22px !important; }
}

/* ───────── FAST + SMOOTH ───────── */
html { -webkit-text-size-adjust: 100%; }
a, button, .logo-card, .nav-item, .btn-buy-now, .login-submit-btn, .athar-social-btn,
.floating-support, .method-btn, .flat-price-item, [onclick], [role="button"] {
  touch-action: manipulation;                 /* removes the 300ms tap delay */
  -webkit-tap-highlight-color: transparent;
}
.logo-card, .btn-buy-now, .login-submit-btn, .nav-item, .athar-social-btn, .floating-support {
  transition: transform .12s cubic-bezier(.2,.8,.2,1), box-shadow .16s ease, filter .12s ease, background-color .16s ease, border-color .16s ease;
  backface-visibility: hidden;
}
/* instant press feedback (class is added on pointerdown, so no waiting for :active) */
html body .a118-tap { transform: scale(.965) !important; filter: brightness(1.12); }
html body .logo-card.a118-tap { transform: scale(.975) !important; }
.a118-rip-host { position: relative; overflow: hidden; }
.a118-ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, .32); transform: scale(0);
  animation: a118Rip .45s ease-out forwards;
}
@keyframes a118Rip { to { transform: scale(2.6); opacity: 0; } }

/* tab / view switch fade */
@keyframes a118View { from { opacity: 0; transform: translate3d(0, 6px, 0); } to { opacity: 1; transform: none; } }
html body #home-view, html body #account-view, html body #addfunds-view, html body #orders-view { animation: a118View .2s ease-out both; }

/* smoother scrolling on touch devices */
html body { overscroll-behavior-y: none; }
.athar-support-card-v4, #atharYtPopup .athar-yt-card { will-change: transform, opacity; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ───────── 119 FIX: section title on its own full-width row, 4 panels per row under it ─────────
 * #grid-all-panels holds [title, .logo-grid, title, .logo-grid ...]. It was ALSO forced into a
 * 4-column grid, so each title took one column and the real panel grid got squeezed into the next.
 * Now the wrapper is a plain block; only the inner .logo-grid is the 4-column grid. */
@media (min-width: 700px) {
  html body #grid-all-panels {
    display: block !important;
    width: 100% !important;
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  html body #grid-all-panels > .section-title,
  html body #grid-all-panels > .panel-section-title {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 26px 0 14px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    clear: both;
  }
  html body #grid-all-panels > .panel-section-title span {
    padding: 8px 22px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }
  html body #grid-all-panels > .logo-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
}
@media (min-width: 560px) and (max-width: 699px) {
  html body #grid-all-panels { display: block !important; }
  html body #grid-all-panels > .panel-section-title { width: 100% !important; margin: 20px 0 12px !important; }
  html body #grid-all-panels > .logo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
