@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #F97316;
    --primary-hover: #EA580C;
    --secondary: #10B981;
    --dark: #1F2937;
    --dark-glass: rgba(31, 41, 55, 0.7);
    --light: #F3F4F6;
    --white-glass: rgba(255, 255, 255, 0.7);
    --white-glass-solid: rgba(255, 255, 255, 0.95);
    --gradient-bg: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    --radius-lg: 16px;
    --radius-md: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--gradient-bg);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Glass Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white-glass-solid);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 1000;
    padding: 1rem 2rem;
    box-shadow: var(--shadow-glass);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    color: white !important;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(249, 115, 22, 0.39);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.23);
}

/* Hero Section */
.hero {
    padding: 8rem 2rem 4rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: -webkit-linear-gradient(45deg, var(--primary), #FCD34D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: #6B7280;
    margin-bottom: 2rem;
}

.search-box {
    background: white;
    padding: 0.5rem;
    border-radius: 50px;
    display: flex;
    box-shadow: var(--shadow-glass);
    border: 1px solid rgba(0,0,0,0.05);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    outline: none;
    font-size: 1rem;
    border-radius: 50px 0 0 50px;
    background: transparent;
}

.search-box button {
    border: none;
    cursor: pointer;
    border-radius: 50px;
}

/* Section Title */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

/* Featured Listings */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* Glass Card */
.card {
    background: var(--white-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
    box-shadow: var(--shadow-glass);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    background: #E5E7EB;
}

.card-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: linear-gradient(45deg, #FBBF24, #F59E0B, #D97706);
    background-size: 200% 200%;
    animation: premiumShine 3s ease infinite;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
    z-index: 2;
}

@keyframes premiumShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
    text-decoration: none;
}

.card-location {
    font-size: 0.9rem;
    color: #6B7280;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: auto;
}

/* Categories List */
.categories-hub {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    margin-bottom: 3rem;
    scrollbar-width: none;
}
.categories-hub::-webkit-scrollbar { display: none; }

.cat-chip {
    white-space: nowrap;
    padding: 0.8rem 1.5rem;
    background: white;
    border-radius: 50px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.02);
    transition: all 0.2s;
}
.cat-chip:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Details Page */
.details-container {
    padding-top: 6rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.main-img {
    width: 100%;
    border-radius: var(--radius-lg);
    height: 450px;
    object-fit: cover;
    box-shadow: var(--shadow-soft);
}

.details-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 6rem;
}

.price-tag-big {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.seller-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
}

.avatar {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

/* ==================================
   NATIVE WEBVIEW (MOBILE) STYLES
=================================== */

.mobile-only { display: none; }
.desktop-only { display: flex; }
.footer-section { background: var(--dark); color: white; padding: 4rem 2rem; margin-top: 5rem; text-align: center; }

@media (max-width: 768px) {
    /* Touch behaviors and font sizing */
    body {
        -webkit-tap-highlight-color: transparent; /* No blue flash on click */
        user-select: none; /* No text selecting like browsers */
        padding-bottom: 80px; /* Space for bottom nav */
        padding-top: 60px; /* Space for mobile header */
        background: var(--light); /* Slightly lighter / flat color for app */
    }

    .desktop-only { display: none !important; }
    .mobile-only { display: flex; }

    /* App Top Bar */
    .mobile-header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: white;
        z-index: 1000;
        align-items: center;
        justify-content: space-between;
        padding: 0 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }

    /* Adjusted Hero for Mobile App */
    .hero {
        padding: 1rem 1rem 2rem;
        margin-top: 1rem;
    }
    .hero h1 { font-size: 1.6rem; letter-spacing: -0.5px; }
    .hero p { display: none; /* Gizle, App'te sade olsun */ }
    
    .search-box {
        background: white;
        padding: 0.3rem;
        border-radius: 12px; /* iOS style soft radius */
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }
    .search-box input { border-radius: 12px; font-size: 0.95rem; }

    /* Categories Horizontal Scroll */
    .container { padding: 1rem; }
    .section-title { font-size: 1.3rem; text-align: left; margin-bottom: 1rem; }
    .categories-hub { gap: 0.7rem; margin-bottom: 1.5rem; }
    .cat-chip { padding: 0.6rem 1.2rem; font-size: 0.9rem; border-radius: 10px; }

    /* Mobile App Grid (2 Columns) */
    .grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 0.8rem; /* Tighter gap for app feel */
    }

    /* Touch Friendly Card (No borders, more shadow) */
    .card {
        border-radius: 12px;
        border: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        background: white;
    }
    .card-img { height: 160px; border-radius: 12px 12px 0 0; }
    .card-content { padding: 0.8rem; }
    .card-title { font-size: 0.95rem; margin-bottom: 0.3rem; line-height: 1.3; }
    .card-location { font-size: 0.75rem; color: #9CA3AF; margin-bottom: 0.5rem; }
    .card-price { font-size: 1.1rem; }
    .card-badge { top: 0.5rem; right: 0.5rem; padding: 0.2rem 0.5rem; font-size: 0.65rem; }

    /* App Details Page */
    .details-container { grid-template-columns: 1fr; padding-top: 1rem; gap: 1rem; }
    .main-img { height: 280px; border-radius: 0; margin: -1rem -1rem 1rem -1rem; width: calc(100% + 2rem); }
    .details-card { position: relative; top: 0; box-shadow: none; padding: 1rem 0; border-radius: 0; }

    /* Bottom Native Navigation Tab Bar */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 70px;
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 1000;
        display: flex;
        justify-content: space-around;
        align-items: center;
        border-top: 1px solid rgba(0,0,0,0.05);
        padding-bottom: env(safe-area-inset-bottom); /* iPhone X+ safe area */
    }
    
    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #9CA3AF;
        width: 60px;
        transition: 0.2s color;
    }
    
    .nav-item i { font-size: 1.3rem; margin-bottom: 0.2rem; }
    .nav-item span { font-size: 0.65rem; font-weight: 500; }
    
    .nav-item.active { color: var(--primary); }

    /* Adding Floating Action Button (FAB) in the center */
    .center-btn { position: relative; width: 70px; }
    .fab-btn {
        position: absolute;
        top: -45px; /* pop out from top */
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 60px;
        background: var(--primary);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
        border: 4px solid var(--light);
    }
    .fab-btn i { color: white; font-size: 1.5rem; margin: 0; }
}
