/**
 * TOP FIVE MOBILE - Horizontal Scroll + Full Width Cards
 * Only affects screens < 768px
 */

@media (max-width: 768px) {
    
    /* ========== MOBILE GRID → HORIZONTAL SCROLL ========== */
    .flip-cards-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-snap-stop: always;
        -webkit-overflow-scrolling: touch;
        gap: 0 !important;
        padding: 20px 0 30px !important;
        margin: 0 -15px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .flip-cards-grid::-webkit-scrollbar {
        display: none;
    }
    
    /* ========== FULL WIDTH CARDS ========== */
    .flip-card-wrapper {
        flex: 0 0 88vw;
        max-width: 88vw;
        margin: 0 1vw;
        scroll-snap-align: center;
        scroll-snap-stop: always;
        border-radius: 16px;
    }
    
    .flip-card-wrapper:first-child {
        margin-left: 6vw;
    }
    
    .flip-card-wrapper:last-child {
        margin-right: 6vw;
    }
    
    /* ========== EXTENDED CARD LAYOUT ========== */
    .flip-card {
        aspect-ratio: 4 / 5 !important;
    }
    
    .flip-card-front {
        border-radius: 16px 16px 0 0;
    }
    
    .flip-image {
        border-radius: 16px 16px 0 0;
    }
    
    /* Larger rank badge */
    .flip-rank {
        top: -12px !important;
        left: -12px !important;
        padding: 12px 18px !important;
        font-size: 22px !important;
        border-radius: 12px !important;
    }
    
    .rank-crown {
        font-size: 24px !important;
        top: -18px !important;
        left: -18px !important;
    }
    
    /* TAP FOR DEALS centered nicely */
    .flip-tap-hint {
        bottom: 35% !important;
        transform: translateX(-50%) !important;
        padding: 16px 32px !important;
        font-size: 18px !important;
        border-radius: 35px !important;
        font-weight: 800 !important;
        letter-spacing: 1px;
    }
    
    .tap-icon {
        font-size: 24px !important;
    }
    
    /* ========== FOOTER ENHANCED ========== */
    .flip-footer {
        padding: 16px 18px 20px !important;
        text-align: center;
    }
    
    .flip-title {
        font-size: 18px !important;
        margin-bottom: 12px !important;
        text-align: center;
    }
    
    .flip-reactions {
        justify-content: center !important;
        gap: 20px;
    }
    
    .flip-star {
        font-size: 18px !important;
    }
    
    .rating-val {
        font-size: 16px !important;
    }
    
    .flip-like-btn {
        padding: 10px 18px !important;
        font-size: 14px !important;
    }
    
    /* ========== SCROLL NAVIGATION ========== */
    .scroll-nav-container {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 20px;
        margin-top: 15px;
        padding: 0 20px;
    }
    
    .scroll-arrow {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: rgba(0, 242, 255, 0.1);
        border: 2px solid var(--flip-cyan);
        color: var(--flip-cyan);
        font-size: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
    }
    
    .scroll-arrow:hover,
    .scroll-arrow:active {
        background: rgba(0, 242, 255, 0.2);
        box-shadow: 0 0 25px rgba(0, 242, 255, 0.5);
        transform: scale(1.1);
    }
    
    .scroll-arrow.disabled {
        opacity: 0.3;
        pointer-events: none;
    }
    
    /* Dots indicator */
    .scroll-dots {
        display: flex;
        gap: 10px;
    }
    
    .scroll-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .scroll-dot.active {
        background: var(--flip-cyan);
        box-shadow: 0 0 10px var(--flip-cyan);
        transform: scale(1.2);
    }
    
    /* Hide on desktop */
    .scroll-nav-container {
        display: none;
    }
}

@media (max-width: 768px) {
    .scroll-nav-container {
        display: flex !important;
    }
}

/* ========== CATEGORIES MOBILE ACCORDION ========== */
@media (max-width: 768px) {
    .category-menu-items {
        background: rgba(18, 17, 26, 0.95);
        border-radius: 16px;
        padding: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .category-menu-items ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .category-menu-items li {
        margin-bottom: 0;
    }
    
    .category-menu-items li a {
        display: flex;
        align-items: center;
        padding: 14px 16px;
        color: #fff;
        text-decoration: none;
        border-radius: 10px;
        transition: all 0.2s ease;
        font-size: 15px;
        font-weight: 500;
        position: relative;
    }
    
    .category-menu-items li a::before {
        content: '';
        width: 18px;
        height: 18px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        margin-right: 12px;
        transition: all 0.2s ease;
        flex-shrink: 0;
    }
    
    .category-menu-items li a:hover,
    .category-menu-items li.active a {
        background: rgba(0, 242, 255, 0.1);
    }
    
    .category-menu-items li.active a::before {
        background: var(--flip-cyan);
        border-color: var(--flip-cyan);
        box-shadow: 0 0 10px var(--flip-cyan);
    }
    
    /* Submenu / expanded items */
    .category-menu-items li ul {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        margin-left: 30px;
        border-left: 2px solid rgba(0, 242, 255, 0.3);
        padding-left: 10px;
    }
    
    .category-menu-items li.expanded ul {
        max-height: 500px;
    }
    
    .category-menu-items li ul li a {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .category-menu-items li ul li a::before {
        width: 14px;
        height: 14px;
    }
}

