/* =====================================================
   PC Layout - Shared Desktop Styles
   แสดง desktop top nav และปรับ layout สำหรับจอ PC (≥1100px)
   ใช้ร่วมกันกับทุกหน้า: history, news, profile, show_promo,
   new_product, recommend_all, recent_all
   ===================================================== */

/* Default: ซ่อน desktop nav (แสดงเมื่อ ≥1100px) */
.desktop-top-nav { display: none; }

/* ==========================================
   DESKTOP LAYOUT (≥1100px)
   ========================================== */
@media (min-width: 1100px) {

    body {
        background: #f5f5f5 !important;
    }

    /* ซ่อน mobile header + bottom nav บน desktop */
    .app-header  { display: none !important; }
    .bottom-nav  { display: none !important; }

    /* ซ่อน body::before decorative (เช่น profile.php background gradient) */
    body::before { display: none !important; }

    /* ===== DESKTOP TOP NAV ===== */
    .desktop-top-nav {
        display: block !important;
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1100;
        background: #fff;
        box-shadow: 0 2px 12px rgba(0,0,0,0.08);
        border-bottom: 1px solid #eee;
    }

    .desktop-top-nav .dtn-inner {
        max-width: 1280px;
        margin: 0 auto;
        padding: 0 24px;
        height: 68px;
        display: flex;
        align-items: center;
        gap: 28px;
    }

    /* Brand */
    .dtn-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
        flex-shrink: 0;
    }
    .dtn-logo {
        width: 38px;
        height: 38px;
        object-fit: contain;
        border-radius: 8px;
    }
    .dtn-brand-name {
        font-size: 1.25rem;
        font-weight: 800;
        color: #f87600;
        letter-spacing: -0.4px;
        font-family: 'Kanit', sans-serif;
    }

    /* Menu links */
    .dtn-menu {
        display: flex;
        align-items: center;
        gap: 4px;
        flex: 1;
        justify-content: center;
    }
    .dtn-link {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        border-radius: 10px;
        color: #555;
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 500;
        transition: all 0.2s ease;
        position: relative;
    }
    .dtn-link i {
        font-size: 1rem;
        color: #888;
        transition: color 0.2s ease;
    }
    .dtn-link:hover {
        background: #fff5ec;
        color: #f87600;
    }
    .dtn-link:hover i { color: #f87600; }
    .dtn-link.active {
        background: linear-gradient(135deg, #f87600, #e65100);
        color: #fff;
        font-weight: 700;
        box-shadow: 0 4px 12px rgba(248,118,0,0.3);
    }
    .dtn-link.active i { color: #fff; }

    /* Notification badge on nav link */
    .dtn-badge {
        position: absolute;
        top: 4px;
        right: 4px;
        background: #e74c3c;
        color: #fff;
        border-radius: 10px;
        padding: 2px 6px;
        font-size: 0.65rem;
        font-weight: 700;
        line-height: 1;
        min-width: 18px;
        text-align: center;
        box-shadow: 0 2px 6px rgba(231,76,60,0.4);
        border: 2px solid #fff;
    }

    /* Actions (cart + profile) */
    .dtn-actions {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-shrink: 0;
    }
    .dtn-icon-btn {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: #f7f7f7;
        color: #555;
        text-decoration: none;
        font-size: 1.1rem;
        transition: all 0.2s ease;
    }
    .dtn-icon-btn:hover {
        background: #f87600;
        color: #fff;
        transform: scale(1.05);
    }
    .dtn-cart-count {
        position: absolute;
        top: -2px;
        right: -2px;
        background: #e74c3c;
        color: #fff;
        font-size: 0.7rem;
        font-weight: 700;
        min-width: 20px;
        height: 20px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 5px;
        border: 2px solid #fff;
        box-shadow: 0 2px 6px rgba(231,76,60,0.4);
        line-height: 1;
        z-index: 2;
        pointer-events: none;
    }
    .dtn-profile {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 6px 14px 6px 6px;
        background: #f7f7f7;
        border-radius: 30px;
        text-decoration: none;
        color: #333;
        font-weight: 600;
        font-size: 0.9rem;
        transition: all 0.2s ease;
    }
    .dtn-profile:hover {
        background: #fff5ec;
        color: #f87600;
        box-shadow: 0 4px 12px rgba(248,118,0,0.15);
    }
    .dtn-profile.active {
        background: linear-gradient(135deg, #f87600, #e65100);
        color: #fff;
        box-shadow: 0 4px 12px rgba(248,118,0,0.3);
    }
    .dtn-profile img,
    .dtn-profile i {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        object-fit: cover;
        background: #f87600;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.95rem;
        flex-shrink: 0;
    }
    .dtn-username {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* ===== MAIN / PAGE CONTENT - กึ่งกลาง max-width 1600px ===== */
    .main-content {
        max-width: 1600px !important;
        margin-top: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 32px 24px 60px !important;
        background: transparent !important;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* ===== RECENT-RESULTS / RECOMMEND section (recommend_all, recent_all) ===== */
    .recent-results-section {
        max-width: 1600px !important;
        margin-top: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 32px 24px 60px !important;
        background: transparent !important;
        min-height: auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}
