/* Phone layout for every page (owner, 2026-10-22: "make the page really
 * mobile friendly"). Only screens up to 640px wide; desktop is untouched.
 * Loaded after each page's own styles, so these win. */

@media (max-width: 640px) {

    /* ── Header: one line, nothing cut off ─────────────────────────── */
    #main-nav > div { padding: 10px 14px !important; }
    #main-nav .space-x-4 > :not([hidden]) ~ :not([hidden]) { margin-left: 8px !important; }
    #main-nav .gap-4 { gap: 10px !important; }
    #main-nav .text-xl { font-size: 1.05rem !important; }
    #main-nav #displayText { display: none !important; }                 /* flag is enough */
    #main-nav button[onclick="toggleLangDropdown()"] { padding: 8px 9px !important; }
    #main-nav a[href*="wa.me"] { padding: 9px 11px !important; }          /* 💬 only */
    #main-nav a[href*="wa.me"] .lang-en,
    #main-nav a[href*="wa.me"] .lang-tr { display: none !important; }
    #main-nav #backLink { padding: 8px 4px !important; }
    #mobileMenu a { padding: 10px 0 !important; }

    /* ── Sale banner: slim, stays under the header (owner: keep it still) ─ */
    #saleBanner .max-w-7xl {
        flex-direction: row !important; flex-wrap: wrap !important;
        padding: 7px 12px !important; gap: 2px 8px !important;
    }
    #saleBanner .max-w-7xl > span { font-size: 12px !important; letter-spacing: 0.02em !important; }
    #saleBanner .max-w-7xl > span:nth-child(2) { font-size: 11px !important; }
    #saleBanner #saleCountdown { padding: 1px 8px !important; }

    /* ── Home: title, then the products, then updates / quick access ── */
    body.page-home { display: flex; flex-direction: column; }
    body.page-home > #hero     { order: 1; min-height: 0 !important; padding: 92px 18px 28px !important; }
    body.page-home > #store    { order: 2; padding: 24px 16px 40px !important; }
    body.page-home > #announce { order: 3; padding: 8px 16px 24px !important; }
    body.page-home > #info     { order: 4; padding: 48px 16px !important; }
    body.page-home > footer    { order: 5; }
    #hero h1 { font-size: 46px !important; margin-bottom: 14px !important; }
    #hero > div:nth-child(2) { margin-bottom: 18px !important; }
    #hero p { margin-bottom: 22px !important; }
    #store > .text-center { margin-bottom: 20px !important; }
    #store h2 { font-size: 28px !important; margin-bottom: 6px !important; }
    #info h2 { font-size: 28px !important; margin-bottom: 24px !important; }
    #info .glass, #info .reseller-gold { padding: 22px !important; }

    /* Game cards: the ones you can buy stay big, "coming soon" become
       small tiles two to a row (they used to fill 3-4 screens). */
    #games-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
    #games-grid .game-card:not(.game-soon) { grid-column: 1 / -1; }
    #games-grid .game-card:not(.game-soon) > div:first-child { height: 140px !important; }
    #games-grid .game-soon { border-radius: 1rem !important; opacity: 0.6; }
    #games-grid .game-soon > div:first-child { display: none !important; }
    #games-grid .game-soon > div:last-child { padding: 12px !important; }
    #games-grid .game-soon h3 { font-size: 13px !important; }
    #games-grid .game-soon .mt-auto { padding-top: 8px !important; }
    #games-grid .game-soon .mt-auto > :last-child { display: none !important; }   /* the arrow */
    #announcements-list > * { gap: 10px; }

    /* Store page: same -- what you sell full width, "coming soon" small. */
    .store-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
    .store-card:not(.is-soon) { grid-column: 1 / -1; }
    .store-card:not(.is-soon) > div:first-child { height: 140px !important; }
    .store-card.is-soon { border-radius: 1rem !important; }
    .store-card.is-soon > div:first-child { display: none !important; }
    .store-card.is-soon > div:last-child { padding: 12px !important; }
    .store-card.is-soon h3 { font-size: 13px !important; }
    .store-card.is-soon .mt-auto { padding-top: 8px !important; }
    .store-card.is-soon .mt-auto > span { white-space: nowrap; padding: 3px 8px !important; }

    /* Purchase page: its own header and orange bar. */
    body > nav.fixed > div { padding: 10px 14px !important; }
    body > nav.fixed .space-x-4 > :not([hidden]) ~ :not([hidden]) { margin-left: 8px !important; }
    body > nav.fixed .text-xl { font-size: 1.05rem !important; }
    body > nav.fixed #displayText { display: none !important; }
    body > nav.fixed a.bg-blue-600 { padding: 9px 12px !important; }
    #discountBanner { top: 56px !important; padding: 6px 10px !important; }
    #discountBanner span { font-size: 12px !important; }
    #purchaseSection { padding-top: 104px !important; }

    /* ── Readable text, fingers-sized links ─────────────────────────── */
    [class*="text-[8px]"], [class*="text-[9px]"], [class*="text-[10px]"] { font-size: 11px !important; }
    footer a { display: inline-block; padding: 10px 4px; }
    main a.hover\:text-white, a.text-gray-500.hover\:text-white { display: inline-block; padding: 8px 2px; }

    /* ── Guide page top bar: everything fits (it scrolled sideways) ── */
    .topbar { gap: 6px; padding-left: 10px !important; padding-right: 10px !important; }
    .topbar .brand { font-size: 0 !important; }                          /* "N" mark only */
    .topbar .brand .brand-mark { font-size: 14px !important; }
    .topbar nav a { margin-left: 10px !important; padding: 8px 0; }
}
