/* ============================================================
   YALLA THAILAND — MOBILE APP-STYLE REDESIGN
   Transforms WordPress Traveler theme into Klook-like mobile UX
   ============================================================ */

/* Only apply on mobile/tablet */
@media (max-width: 991px) {

    /* ── HIDE DESKTOP ELEMENTS ON MOBILE ── */
    .yalla-design .topbar,
    .yalla-design .top-bar,
    .yalla-design .header-topbar,
    .yalla-design .st-header-topbar {
        display: none !important;
    }

    /* ── STICKY MOBILE HEADER ── */
    .yalla-design header,
    .yalla-design .header,
    .yalla-design .st-header,
    .yalla-design #header {
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
        background: var(--yalla-bg, #FBF7EF) !important;
        border-bottom: 1px solid var(--yalla-border, #E8D4A8) !important;
        box-shadow: 0 2px 8px rgba(75, 46, 30, 0.08) !important;
        padding: 8px 12px !important;
    }

    /* Mobile logo size */
    .yalla-design header .logo img,
    .yalla-design .navbar-brand img,
    .yalla-design .site-logo img {
        max-height: 38px !important;
        width: auto !important;
    }

    /* ── HERO SECTION — COMPACT ── */
    .yalla-design .banner,
    .yalla-design .hero,
    .yalla-design .st-banner {
        padding: 16px !important;
        min-height: auto !important;
    }

    /* Hero heading */
    .yalla-design h1,
    .yalla-design .banner h1,
    .yalla-design .hero h1 {
        font-size: 1.4rem !important;
        margin-bottom: 4px !important;
    }

    .yalla-design h2 {
        font-size: 1.2rem !important;
    }

    /* ── SEARCH BAR — APP STYLE ── */
    .yalla-design .search-form-wrapper,
    .yalla-design .st-search-form,
    .yalla-design .search-form {
        border-radius: 16px !important;
        padding: 12px 16px !important;
        margin: 0 12px !important;
        border: 1px solid var(--yalla-border, #E8D4A8) !important;
        box-shadow: 0 2px 12px rgba(75, 46, 30, 0.08) !important;
    }

    .yalla-design .search-form input,
    .yalla-design .st-search-form input {
        font-size: 14px !important;
        padding: 10px 14px !important;
        border-radius: 12px !important;
    }

    .yalla-design .search-form .btn-search,
    .yalla-design .search-form button[type="submit"] {
        border-radius: 12px !important;
        padding: 10px 20px !important;
        font-size: 14px !important;
        width: 100% !important;
        margin-top: 8px !important;
    }

    /* ── DESTINATION CIRCLES — HORIZONTAL SCROLL ── */
    .yalla-design .destination-section,
    .yalla-design .location-section {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding: 0 12px !important;
    }

    .yalla-design .destination-item,
    .yalla-design .location-item {
        scroll-snap-align: center;
        flex-shrink: 0 !important;
        width: 80px !important;
    }

    .yalla-design .destination-item img,
    .yalla-design .location-item img {
        width: 64px !important;
        height: 64px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        border: 2px solid var(--yalla-border, #E8D4A8) !important;
    }

    .yalla-design .destination-item .title,
    .yalla-design .location-item .title,
    .yalla-design .destination-item h4,
    .yalla-design .location-item h4 {
        font-size: 11px !important;
        margin-top: 6px !important;
        text-align: center !important;
        line-height: 1.2 !important;
    }

    /* ── TOUR CARDS — APP STYLE ── */
    .yalla-design .item-tour,
    .yalla-design .tour-item,
    .yalla-design .st-tour-item,
    .yalla-design .service-border,
    .yalla-design .card-tour {
        border-radius: 16px !important;
        margin-bottom: 12px !important;
        border: 1px solid var(--yalla-border, #E8D4A8) !important;
        overflow: hidden !important;
        background: #fff !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
    }

    /* Card image — full width, taller */
    .yalla-design .item-tour .thumb img,
    .yalla-design .item-tour .thumbnail img,
    .yalla-design .service-border .thumb img {
        width: 100% !important;
        height: 200px !important;
        object-fit: cover !important;
        border-radius: 16px 16px 0 0 !important;
    }

    /* Card content padding */
    .yalla-design .item-tour .content,
    .yalla-design .item-tour .item-content,
    .yalla-design .service-border .item-content {
        padding: 12px 14px !important;
    }

    /* Card title */
    .yalla-design .item-tour .item-title,
    .yalla-design .item-tour .item-title a,
    .yalla-design .item-tour h3 a,
    .yalla-design .service-border .item-title a {
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 1.3 !important;
        color: var(--yalla-primary, #4B2E1E) !important;
    }

    /* Card price — prominent */
    .yalla-design .item-tour .price,
    .yalla-design .service-border .price,
    .yalla-design .item-price {
        font-size: 16px !important;
        font-weight: 800 !important;
        color: var(--yalla-gold, #C8A45C) !important;
        margin-top: 6px !important;
    }

    /* Card meta — smaller */
    .yalla-design .item-tour .item-meta {
        font-size: 11px !important;
        color: #999 !important;
        margin-top: 4px !important;
    }

    /* Wishlist heart button */
    .yalla-design .item-tour .btn-add-wishlist {
        width: 32px !important;
        height: 32px !important;
        top: 10px !important;
        right: 10px !important;
        border-radius: 50% !important;
        background: rgba(255,255,255,0.9) !important;
    }

    /* ── SECTIONS — CLEAN SPACING ── */
    .yalla-design section,
    .yalla-design .elementor-section {
        padding: 16px 0 !important;
    }

    .yalla-design .section-title,
    .yalla-design .heading-title,
    .yalla-design .st-heading {
        font-size: 18px !important;
        padding: 0 14px !important;
        margin-bottom: 12px !important;
    }

    /* ── CONTAINER PADDING ── */
    .yalla-design .container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    /* ── RECOMMENDED / HORIZONTAL SCROLL CARDS ── */
    .yalla-design .recommended-section .row,
    .yalla-design .slick-track {
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 10px !important;
    }

    .yalla-design .recommended-section .col-md-3,
    .yalla-design .recommended-section [class*="col-"] {
        flex: 0 0 260px !important;
        max-width: 260px !important;
        scroll-snap-align: start;
    }

    /* ── BUTTONS — LARGE TOUCH TARGETS ── */
    .yalla-design .btn,
    .yalla-design button,
    .yalla-design input[type="submit"] {
        min-height: 44px !important;
        font-size: 14px !important;
        border-radius: 12px !important;
        padding: 10px 20px !important;
    }

    /* ── BOOKING SIDEBAR — FULL WIDTH ON MOBILE ── */
    .yalla-design .sidebar-booking,
    .yalla-design .booking-form,
    .yalla-design .st-booking-form {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 999 !important;
        border-radius: 20px 20px 0 0 !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1) !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        margin: 0 !important;
    }

    /* ── NEWSLETTER SECTION — SIMPLIFIED ── */
    .yalla-design .newsletter-section,
    .yalla-design .st-newsletter {
        margin: 12px !important;
        padding: 24px 16px !important;
        border-radius: 16px !important;
    }

    /* ── FOOTER — COMPACT MOBILE ── */
    .yalla-design footer,
    .yalla-design .footer,
    .yalla-design #footer {
        padding: 24px 14px 80px 14px !important; /* Extra bottom padding for floating elements */
    }

    .yalla-design footer .col-md-3,
    .yalla-design footer [class*="col-"] {
        margin-bottom: 16px !important;
    }

    /* ── HIDE NON-ESSENTIAL ON MOBILE ── */
    .yalla-design .breadcrumb {
        display: none !important;
    }

    /* ── SMOOTH SCROLL ── */
    html {
        scroll-behavior: smooth;
    }

    /* ── GRID — SINGLE COLUMN ON SMALL MOBILE ── */
    @media (max-width: 575px) {
        .yalla-design .row > [class*="col-"] {
            flex: 0 0 100% !important;
            max-width: 100% !important;
        }
        
        /* Except horizontal scroll sections */
        .yalla-design .recommended-section .row > [class*="col-"],
        .yalla-design .slick-track > * {
            flex: 0 0 260px !important;
            max-width: 260px !important;
        }
    }

    /* ── ADMIN BAR FIX ── */
    .admin-bar .yalla-design header {
        top: 46px !important;
    }
    @media (max-width: 782px) {
        .admin-bar .yalla-design header {
            top: 0 !important;
        }
    }

} /* End mobile media query */

/* ── WHATSAPP FLOATING BUTTON — ALL SCREENS ── */
.yalla-whatsapp-float {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 9999 !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    background: #25D366 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}

.yalla-whatsapp-float:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5) !important;
}

.yalla-whatsapp-float svg {
    width: 28px !important;
    height: 28px !important;
    fill: white !important;
}

@media (max-width: 991px) {
    .yalla-whatsapp-float {
        bottom: 20px !important;
        right: 16px !important;
        width: 52px !important;
        height: 52px !important;
    }
}
