/* ===== HOME PAGE STYLES ===== */

.home-page {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    background: #f0f2f5;
    padding-top: 0;
    overflow-x: hidden;
}

/* ===== HEADER ===== */
.home-header {
    background: linear-gradient(135deg, #fffdf5 0%, #fff8e1 55%, #ffe9a8 100%);
    padding: calc(20px + env(safe-area-inset-top)) 20px 30px;
    position: sticky;
    top: 0;
    z-index: 999;
    border-radius: 0 0 28px 28px;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.28);
}

.home-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.4);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.brand-text h1 {
    display: block;
    color: #ff6b00;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: none;
    margin: 0;
}

.brand-text p {
    color: #666;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0;
}

/* Search */
.home-search-container {
    position: relative;
}

.home-search-box {
    position: relative;
}

.home-search-box input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: none;
    border-radius: 16px;
    background: rgba(255,255,255,0.95);
    font-size: 0.95rem;
    font-family: 'Cairo', sans-serif;
    color: #333;
    outline: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.home-search-box input:focus {
    background: #fff;
    box-shadow: 0 6px 30px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.home-search-box input::placeholder {
    color: #999;
    font-family: 'Cairo', sans-serif;
}

.home-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
}

/* ===== MAIN ===== */
.home-main {
    padding: 0 0 100px;
}

/* ===== QUICK CATEGORIES ===== */
.quick-categories {
    display: flex;
    justify-content: space-around;
    padding: 24px 16px 8px;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.quick-categories::-webkit-scrollbar {
    display: none;
}

.quick-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 8px;
    min-width: 60px;
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.quick-cat-item.animate-in {
    opacity: 1;
    transform: translateY(0);
    animation: fadeSlideUp 0.5s ease forwards;
}

.quick-cat-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.quick-cat-item:active .quick-cat-icon {
    transform: scale(0.9);
}

.quick-cat-item span {
    font-size: 0.72rem;
    font-weight: 600;
    color: #555;
    font-family: 'Cairo', sans-serif;
    white-space: nowrap;
}

/* ===== PROMO ===== */
.home-promo {
    padding: 16px 16px 8px;
}

/* Promo Carousel */
.promo-carousel {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 160px;
}

.promo-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.promo-slide {
    min-width: 100%;
    height: 100%;
}

.promo-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.promo-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.promo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    padding: 0;
}

.promo-dot.active {
    background: #FFD700;
    width: 24px;
    border-radius: 4px;
}

.promo-card {
    border-radius: 20px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.25);
}

.promo-gradient-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.promo-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

.promo-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    margin-bottom: 10px;
}

.promo-content h3 {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
    margin: 0 0 4px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.promo-content p {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    font-family: 'Cairo', sans-serif;
    margin: 0;
}

.promo-emoji {
    font-size: 64px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    overflow: visible;
}

.promo-emoji .moto-wrapper {
    display: inline-flex;
    align-items: center;
    position: relative;
    animation: rideMoto 4s ease-in-out infinite;
}

.moto-flames {
    position: absolute;
    right: -22px;
    bottom: 8px;
    width: 30px;
    height: 40px;
    z-index: 1;
    filter: drop-shadow(0 0 8px rgba(255,100,0,0.6)) drop-shadow(0 0 20px rgba(255,60,0,0.3));
}

.flame {
    position: absolute;
    bottom: 0;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    filter: blur(1.5px);
}

.flame-1 {
    width: 18px; height: 32px;
    left: 6px;
    background: radial-gradient(ellipse at bottom, #ff4500 0%, #ff6600 40%, rgba(255,68,0,0) 70%);
    animation: flame1 0.4s ease-in-out infinite alternate;
}

.flame-2 {
    width: 14px; height: 26px;
    left: 2px;
    background: radial-gradient(ellipse at bottom, #ff8c00 0%, #ffaa00 50%, rgba(255,140,0,0) 70%);
    animation: flame2 0.35s ease-in-out infinite alternate;
}

.flame-3 {
    width: 12px; height: 22px;
    left: 12px;
    background: radial-gradient(ellipse at bottom, #ffcc00 0%, #ffee55 50%, rgba(255,204,0,0) 70%);
    animation: flame3 0.3s ease-in-out infinite alternate;
}

.flame-4 {
    width: 8px; height: 18px;
    left: 9px;
    background: radial-gradient(ellipse at bottom, #ffe066 0%, #fff8cc 60%, rgba(255,224,102,0) 80%);
    animation: flame4 0.25s ease-in-out infinite alternate;
}

.flame-core {
    position: absolute;
    bottom: 2px;
    left: 9px;
    width: 6px; height: 12px;
    background: radial-gradient(ellipse at bottom, #fff 0%, #ffffaa 50%, rgba(255,255,170,0) 80%);
    border-radius: 50%;
    filter: blur(1px);
    animation: coreFlicker 0.15s ease-in-out infinite alternate;
}

@keyframes flame1 {
    0% { transform: scaleY(1) scaleX(1) rotate(-3deg); opacity: 0.9; }
    50% { transform: scaleY(1.15) scaleX(0.9) rotate(2deg); opacity: 1; }
    100% { transform: scaleY(0.9) scaleX(1.1) rotate(-1deg); opacity: 0.85; }
}
@keyframes flame2 {
    0% { transform: scaleY(0.95) rotate(4deg) translateY(0); opacity: 0.85; }
    50% { transform: scaleY(1.1) rotate(-2deg) translateY(-3px); opacity: 1; }
    100% { transform: scaleY(1) rotate(3deg) translateY(1px); opacity: 0.9; }
}
@keyframes flame3 {
    0% { transform: scaleY(1.05) rotate(-5deg) translateY(1px); opacity: 0.9; }
    50% { transform: scaleY(0.9) rotate(3deg) translateY(-4px); opacity: 1; }
    100% { transform: scaleY(1.1) rotate(-2deg) translateY(0); opacity: 0.85; }
}
@keyframes flame4 {
    0% { transform: scaleY(1) rotate(2deg); opacity: 0.95; }
    100% { transform: scaleY(1.2) rotate(-3deg) translateY(-2px); opacity: 1; }
}
@keyframes coreFlicker {
    0% { transform: scaleY(0.9); opacity: 0.8; }
    100% { transform: scaleY(1.1); opacity: 1; }
}

@keyframes rideMoto {
    0% { transform: translateX(120px); opacity: 0; }
    10% { opacity: 1; }
    40% { transform: translateX(0) rotate(-3deg); }
    60% { transform: translateX(0) rotate(0deg); }
    80% { transform: translateX(-5px) rotate(-2deg); }
    100% { transform: translateX(-120px); opacity: 0; }
}

.promo-card::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    top: -40px;
    left: -40px;
}

.promo-card::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    bottom: -20px;
    left: 40%;
}

/* ===== CATEGORIES SECTION ===== */
.home-categories-section {
    padding: 20px 16px 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3436;
    font-family: 'Cairo', sans-serif;
    margin: 0;
    white-space: nowrap;
}

.section-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #FFD700 0%, transparent 100%);
    border-radius: 2px;
}

/* Category Grid */
.home-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.home-cat-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.home-cat-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    animation: fadeSlideUp 0.5s ease forwards;
}

.home-cat-card:active {
    transform: scale(0.97);
}

.cat-card-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    transition: opacity 0.3s ease;
}

.cat-card-bg::after {
    display: none;
}

.cat-card-content {
    position: relative;
    z-index: 1;
    padding: 16px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100%;
}

.cat-card-icon {
    font-size: 3.2rem;
    margin-bottom: auto;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25));
    align-self: flex-end;
    opacity: 0.9;
}

.cat-card-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    margin: 0 0 2px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.cat-card-content p {
    font-size: 0.72rem;
    font-family: 'Cairo', sans-serif;
    opacity: 0.9;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.cat-card-arrow {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    z-index: 2;
    transition: all 0.3s ease;
}

.home-cat-card:hover .cat-card-arrow {
    background: rgba(255,255,255,0.35);
    transform: translateX(-3px);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== BOTTOM NAV OVERRIDE ===== */
.home-page .bottom-nav {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}

.home-page .bottom-nav-item {
    font-family: 'Cairo', sans-serif;
    position: relative;
    transition: all 0.3s ease;
}

.home-page .bottom-nav-item.active {
    color: #FFD700;
}

.home-page .bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: #FF6B00;
    border-radius: 0 0 4px 4px;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
    .home-header {
        border-radius: 0;
    }

    .home-main {
        max-width: 700px;
        margin: 0 auto;
    }

    .home-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .home-cat-card {
        min-height: 170px;
    }
}

@media (max-width: 360px) {
    .quick-cat-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
        border-radius: 14px;
    }

    .quick-cat-item span {
        font-size: 0.65rem;
    }

    .home-cat-card {
        min-height: 120px;
    }

    .cat-card-icon {
        font-size: 1.8rem;
    }

    .cat-card-content h3 {
        font-size: 0.95rem;
    }
}
