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

/* DARK THEME (Default) */
:root {
    --bg-main: #0b0f19;
    --bg-card: #151a28;
    --bg-nav: #0b111e;
    --bg-input: #1e2538;
    --text-main: #ffffff;
    --text-muted: #8b94a7;
    --accent-cyan: #00d2ff;
    --border-color: #2a344a;
    --gradient-btn: linear-gradient(135deg, #00d2ff 0%, #7a28ff 100%);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* LIGHT THEME */
body.theme-light {
    --bg-main: #f3f4f6;
    --bg-card: #ffffff;
    --bg-nav: #ffffff;
    --bg-input: #e5e7eb;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #d1d5db;
    --accent-cyan: #2563eb;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-main); color: var(--text-main); overflow-x: hidden; transition: background-color 0.3s, color 0.3s; }
a { text-decoration: none; color: inherit; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.relative { position: relative; }
.ms-auto { margin-left: auto; }
.desktop-only { display: flex; }
.mobile-only { display: none; }

/* HEADER */
.header { background-color: var(--bg-card); padding: 15px 0; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 100; transition: background-color 0.3s; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { width: 38px; height: 38px; background: var(--gradient-btn); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: white; flex-shrink: 0; }
.logo-text { font-size: 20px; font-weight: 700; color: var(--text-main); letter-spacing: -0.5px; }

/* QIDIRUV FORMASI VA LOKATSIYA BIZNESI UCHUN YOPISHIK JOY */
.search-section { display: flex; flex: 1; max-width: 600px; background-color: var(--bg-main); border: 1px solid var(--border-color); border-radius: 24px; overflow: hidden; transition: 0.3s; align-items: center;}
.location-btn { padding: 10px 20px; color: var(--text-muted); border-right: 1px solid var(--border-color); display: flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; height: 100%;}
.search-bar { display: flex; flex: 1; align-items: center; padding-right: 5px; }
.search-bar input { flex: 1; background: none; border: none; color: var(--text-main); padding: 10px 15px; outline: none; font-size: 14px; }
.search-btn { background-color: var(--bg-input); color: var(--accent-cyan); width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 5px;}

/* HEADER ACTIONS */
.header-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn { color: var(--text-muted); font-size: 20px; transition: 0.3s; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; }
.icon-btn:hover { color: var(--accent-cyan); background: var(--bg-input); }
.text-btn { font-size: 14px; font-weight: 600; width: auto; padding: 0 10px; border-radius: 15px; }
.badge { position: absolute; top: 0; right: 0; background-color: #ff3366; color: white; font-size: 10px; padding: 2px 5px; border-radius: 10px; font-weight: bold; }

@keyframes rgbGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.rgb-anim { background: linear-gradient(90deg, #ff007f, #7a28ff, #00d2ff, #00ff88, #ff007f); background-size: 400% 400%; animation: rgbGradient 4s ease infinite; color: white !important; }
.add-ad-btn { padding: 10px 20px; border-radius: 20px; font-weight: 600; display: flex; align-items: center; gap: 8px; font-size: 14px; border: none; }

/* SECTIONS */
.main-content { padding-top: 30px; padding-bottom: 50px; }
.section { margin-bottom: 40px; }
.section-title { font-size: 20px; font-weight: 600; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ''; display: block; width: 4px; height: 18px; background-color: var(--accent-cyan); border-radius: 2px; }

/* KATEGORIYALAR */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 15px; }
.cat-card { background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 15px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; transition: 0.3s; }
.neon-hover:hover { border-color: var(--accent-cyan); transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0, 210, 255, 0.1); }
.cat-svg-inline { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.cat-card span { font-size: 13px; font-weight: 600; color: var(--text-main); }
.cat-count { font-size: 11px; color: var(--text-muted); }

/* PRODUCTS */
@media (min-width: 992px) {
    .products-grid { display: grid; grid-template-columns: repeat(4, 1fr) !important; gap: 15px; }
}
.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }

.product-card { background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: hidden; transition: 0.3s; }
.product-card:hover { border-color: var(--accent-cyan); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.product-image { position: relative; height: 180px; }
.badge-top { position: absolute; top: 10px; left: 10px; background: #d946ef; color: white; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px; z-index: 2; }
.like-btn { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.5); width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; z-index: 2; transition: 0.2s;}
.photo-count { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,0.6); color: white; font-size: 11px; padding: 4px 8px; border-radius: 6px; z-index: 2;}
.product-info { padding: 15px; }
.product-title { font-size: 14px; font-weight: 500; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-main); }
.product-price { font-size: 18px; font-weight: 700; color: var(--accent-cyan); margin-bottom: 12px; }
.product-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); }

/* =========================================
   SOMON.TJ STYLE SIDEBAR (NEW)
========================================= */
.somon-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s;
    display: flex;
    justify-content: flex-end; /* PC'da o'ngdan */
    backdrop-filter: blur(3px);
}

.somon-sidebar-overlay.active {
    visibility: visible;
    opacity: 1;
}

.somon-sidebar {
    width: 400px; /* PC eni */
    height: 100%;
    background: var(--bg-card);
    transform: translateX(100%); /* O'ngga yashirilgan */
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0,0,0,0.4);
}

.somon-sidebar-overlay.active .somon-sidebar {
    transform: translateX(0); /* Ekrandan chiqib keladi */
}

/* Tepadagi Header blokida Flex o'rniga joylashuv elementlari */
.somon-sidebar-header {
    padding: 15px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    position: relative; /* Ichkaridagi absolyutlarga moslama */
    justify-content: center; /* H3 o'rtaga chiqishi uchun */
    min-height: 60px;
}

.somon-sidebar-header h3 { font-size: 18px; font-weight: 700; color: var(--text-main); margin: 0; text-align: center;}

/* Chap va o'ngga yopishgan elementlarni ajratib qo'ydik */
.close-sidebar-btn {
    width: 35px;
    height: 35px;
    background: transparent;
    color: var(--text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: 0.2s;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
.close-sidebar-btn:hover { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.close-sidebar-btn#sidebarBackBtn { left: 15px; } /* Chap tarafdagi orqaga o'q */
.desktop-close { right: 15px; } /* O'ng tarafdagi x yopish */

.somon-sidebar-content {
    flex: 1;
    overflow-y: auto;
}

.somon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: 0.2s;
    text-decoration: none;
}

.somon-item:hover { background: var(--bg-input); padding-left: 25px; } /* Hover effekt */

.somon-item-info { display: flex; align-items: center; gap: 12px; }
.somon-item-name { color: var(--text-main); font-size: 15px; font-weight: 500; }
.somon-item-count { 
    color: var(--text-muted); 
    font-size: 12px; 
    background: var(--bg-main); 
    padding: 3px 10px; 
    border-radius: 12px; 
    font-weight: 600;
}

.somon-item i { font-size: 12px; color: var(--text-muted); }


/* =========================================
   LOCATION MODAL (Somon.tj Style)
========================================= */
.loc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    backdrop-filter: blur(3px);
}

.loc-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loc-modal {
    background: var(--bg-card);
    width: 100%;
    max-width: 600px;
    height: 85vh; /* Oynani to'liq egallamasligi uchun */
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    overflow: hidden;
}

.loc-modal-overlay.active .loc-modal {
    transform: scale(1);
}

.loc-modal-header {
    padding: 20px 25px;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.loc-modal-header h3 { margin: 0; font-size: 18px; color: var(--text-main); font-weight: 700; }

.loc-close-btn {
    width: 35px;
    height: 35px;
    background: var(--bg-input);
    border-radius: 50%;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: 0.2s;
}
.loc-close-btn:hover { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.loc-modal-content {
    padding: 0 25px 25px 25px;
    overflow-y: auto;
    flex: 1;
}

.all-tj-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 210, 255, 0.1);
    color: var(--accent-cyan) !important;
    border-radius: var(--radius-sm);
    font-weight: 700;
    margin: 20px 0;
    border: 1px solid rgba(0, 210, 255, 0.3);
}

.loc-region-group { margin-bottom: 25px; }

.loc-region-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.loc-cities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.loc-item {
    color: var(--text-muted);
    font-size: 15px;
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: 0.2s;
}

.loc-item:hover { background: var(--bg-input); color: var(--text-main); }
.region-only { font-weight: 600; color: var(--text-main); display: inline-block; }


/* =========================================
   MOBILE ADAPTATION (KOMPLEKS O'ZGARISH)
========================================= */
@media (max-width: 991px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: block; }
    
    body { padding-bottom: 80px; }
    .main-content { padding-top: 15px; }

    .header { display: none; }
    .mobile-header { padding: 15px; background: var(--bg-card); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--border-color); }
    .top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
    .top-actions { display: flex; align-items: center; gap: 10px; }
    
    .search-container { display: flex; flex-direction: column; gap: 10px; }
    .mobile-search-box { display: flex; background: var(--bg-main); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 5px; }
    .mobile-search-box input { flex: 1; background: none; border: none; color: var(--text-main); padding: 10px; outline: none; font-size: 14px; }
    .mobile-search-box button { width: 40px; height: 40px; color: var(--accent-cyan); display: flex; align-items: center; justify-content: center; font-size: 16px; }

    .categories-grid { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 10px; padding-bottom: 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .categories-grid::-webkit-scrollbar { display: none; }
    .cat-card { min-width: 110px; flex-shrink: 0; }

    .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
    .product-image { height: 140px; }
    .product-title { font-size: 13px; }
    .product-price { font-size: 15px; }

    /* MOBILE BOTTOM NAV */
    .bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; height: 65px; background: var(--bg-nav); border-top: 1px solid var(--border-color); display: flex; justify-content: space-around; align-items: center; z-index: 1000; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); }
    .nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-muted); font-size: 11px; width: 20%; height: 100%; }
    .nav-item i { font-size: 20px; }
    .nav-item.active { color: var(--accent-cyan); }
    .badge-dot { position: absolute; top: 5px; right: 20px; background: #ef4444; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--bg-nav); }
    
    .nav-item-center { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 20%; height: 100%; position: relative; padding-bottom: 8px; }
    .add-btn-circle { position: absolute; top: -20px; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 24px; border: 4px solid var(--bg-nav); z-index: 10; }
    .add-text { color: var(--text-muted); font-size: 11px; line-height: 1; }

    /* =========================================
       MOBIL SIDEBAR FIX (Orqaga < | Sarlavha | Yopish X)
    ========================================= */
    .somon-sidebar-overlay { align-items: flex-end; } /* Mobilda pastdan chiqadi */
    .somon-sidebar {
        width: 100%;
        height: 85vh; /* Ekranning 85% oladi */
        border-radius: 20px 20px 0 0;
        transform: translateY(100%); 
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .somon-sidebar-overlay.active .somon-sidebar {
        transform: translateY(0); 
        transform: translateX(0); /* PC X o'qi bekor qilinadi */
    }

    /* Header qismini absolyut tugmalarga moslaymiz */
    .somon-sidebar-header {
        position: relative; /* Ichidagi tugmalar uchun */
        justify-content: center; /* Sarlavha (Kategoriya) o'rtada turadi */
        padding: 15px 20px;
    }
    
    .somon-sidebar-header h3 {
        font-size: 16px;
        text-align: center;
    }

    /* Orqaga qaytish tugmasi (<) CHAPGA QOTIRILDI */
    .close-sidebar-btn#sidebarBackBtn {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        width: 35px;
        height: 35px;
        margin: 0;
    }

    /* Yopish tugmasi (X) O'NGGA QOTIRILDI */
    .desktop-close { 
        display: flex !important; /* Mobilda ko'rinishi shart! */
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        width: 35px;
        height: 35px;
        background: transparent !important; /* Mobilda X orqasida fon bo'lmasin */
        margin: 0;
    }
    .desktop-close i { font-size: 20px; }

    /* MOBIL LOKATSIYA OYNASI */
    .loc-modal {
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    .loc-cities-grid { grid-template-columns: 1fr; } /* Mobilda 1 qator */
}


/* =========================================
   SOMON.TJ RESULT PAGE STYLES (NEW)
========================================= */

/* Filter Bar */
.advanced-filter-wrapper {
    background-color: var(--accent-cyan);
    padding: 15px 0;
}
.advanced-filter-form {
    display: flex;
    justify-content: flex-start;
}
.filter-inputs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.filter-input, .filter-select {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 14px;
    outline: none;
}
.filter-btn-submit {
    padding: 10px 20px;
    background-color: #ffcc00; /* Sariq tugma */
    color: #000;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}
.filter-btn-submit:hover { background-color: #e6b800; }

/* Sarlavha */
.search-page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 25px;
}

/* Related Categories (Rubrikalar teglari) */
.related-cats-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}
.related-cat-link {
    font-size: 15px;
    color: var(--accent-cyan);
    text-decoration: none;
    display: flex;
    gap: 5px;
}
.related-cat-link:hover { text-decoration: underline; }
.rc-count { color: var(--text-muted); }

/* Subscribe / Orange Button */
.search-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.subscribe-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sub-text { font-size: 14px; font-weight: 600; color: var(--text-main); }
.btn-orange-ad {
    background-color: #f97316; /* Oranjiviy rang */
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s;
}
.btn-orange-ad:hover { background-color: #ea580c; color: #fff; }

.ads-count-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* iOS Style Switch */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--border-color); transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent-cyan); }
input:checked + .slider:before { transform: translateX(18px); }

/* Product Card O'zgarishlari (Somon Style) */
.vip-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ffcc00;
    color: #000;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
}
.product-price-somon {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 5px;
}
.product-title-somon {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-main);
    margin-bottom: 15px;
    line-height: 1.4;
}
.product-meta-somon {
    font-size: 12px;
    color: var(--text-muted);
}











/* =========================================
   AD.PHP (E'LON SAHIFASI) STYLES (100% FIXED)
========================================= */

/* LIGHT THEME Ikonkalari uchun to'g'rilash (style.css tepadagi qismiga yozish kerak aslida, lekin bu yerda ham ishlidi) */
body.theme-light .icon-btn { color: #4b5563; }
body.theme-light .icon-btn:hover { color: var(--accent-cyan); background: #e5e7eb; }

.ad-page-content { display: flex; gap: 30px; padding-top: 20px; padding-bottom: 50px; }
.ad-left { flex: 1; min-width: 0; }
.ad-right { width: 340px; flex-shrink: 0; }
.sticky-sidebar { position: sticky; top: 90px; }

.ad-breadcrumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.ad-breadcrumbs i { font-size: 10px; }
.ad-breadcrumbs a:hover { color: var(--accent-cyan); }

.ad-title { font-size: 26px; font-weight: 700; margin-bottom: 20px; color: var(--text-main); line-height: 1.3; }

/* NARX VA TUGMALAR BLOKI */
.ad-price-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 25px; margin-bottom: 20px; display: flex; flex-direction: column; }
.price-and-fav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; width: 100%; }
.ad-price { font-size: 32px; font-weight: 800; color: var(--accent-cyan); margin: 0; }

/* SEVIMLIGA QO'SHISH YURAKCHASI */
.favorite-icon-btn { width: 45px; height: 45px; border-radius: 50%; background: var(--bg-main); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--text-muted); transition: 0.3s; cursor: pointer; }
.favorite-icon-btn:hover { border-color: #ff3366; color: #ff3366; }
.favorite-icon-btn.liked { color: #ff3366; border-color: #ff3366; background: rgba(255, 51, 102, 0.1); }

/* TUGMALAR */
.action-buttons-group { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.btn-primary, .btn-whatsapp, .btn-outline { width: 100%; padding: 15px 20px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; transition: 0.3s; cursor: pointer; border: none; }
.btn-primary { background: var(--accent-cyan); color: #fff; }
.btn-primary:hover { background: #0284c7; }
.btn-whatsapp { background: #25D366; color: #fff; text-decoration: none; }
.btn-whatsapp:hover { background: #1ebd5a; }
.btn-outline { border: 1px solid var(--accent-cyan); color: var(--accent-cyan); background: transparent; }
.btn-outline:hover { background: rgba(0, 210, 255, 0.1); }

/* GALEREYA (Qora fon yo'qotildi) */
.ad-gallery { margin-bottom: 40px; }
.main-image-box { width: 100%; height: 480px; border-radius: var(--radius-md); overflow: hidden; background: var(--bg-main); margin-bottom: 15px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-color); }
.main-image-box img { width: 100%; height: 100%; object-fit: contain; }
.thumbnails-grid { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 5px; }
.thumbnails-grid::-webkit-scrollbar { display: none; }
.thumb-box { width: 90px; height: 65px; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; border: 2px solid transparent; opacity: 0.6; transition: 0.3s; flex-shrink: 0; background: var(--bg-main); }
.thumb-box img { width: 100%; height: 100%; object-fit: cover; }
.thumb-box:hover, .thumb-box.active { opacity: 1; border-color: var(--accent-cyan); }

/* XARAKTERISTIKALAR */
.ad-section { margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px solid var(--border-color); }
.ad-section-title { font-size: 22px; font-weight: 700; margin-bottom: 25px; color: var(--text-main); display: flex; align-items: center; }
.attr-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.attr-list li { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 1px dashed var(--border-color); }
.attr-name { color: var(--text-muted); font-size: 14px; }
.attr-value { color: var(--text-main); font-size: 16px; font-weight: 600; }
.ad-description { line-height: 1.8; color: var(--text-main); font-size: 16px; white-space: pre-wrap; }
.ad-meta-info { display: flex; flex-wrap: wrap; gap: 25px; color: var(--text-muted); font-size: 14px; margin-bottom: 30px; }
.ad-meta-info span { display: flex; align-items: center; gap: 8px; }

/* SOTUVCHI CARD */
.seller-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 25px; margin-bottom: 20px; }
.seller-profile { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.seller-avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-color); }
.seller-name { font-size: 18px; font-weight: 700; color: var(--text-main); margin-bottom: 6px; display: flex; align-items: center; }
.seller-date { font-size: 13px; color: var(--text-muted); }
.verify-status { padding: 12px 15px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.verify-status.success { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.verify-status.warning { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.seller-stats { display: flex; align-items: center; gap: 12px; font-size: 15px; margin-bottom: 25px; }
.rating-badge { background: #fbbf24; color: #000; padding: 4px 10px; border-radius: 8px; font-weight: 800; display: flex; align-items: center; gap: 6px; font-size: 14px; }
.btn-profile-link { display: block; text-align: center; width: 100%; padding: 14px; background: var(--bg-main); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-main); font-size: 15px; font-weight: 600; transition: 0.3s; }
.btn-profile-link:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }

/* OTZIVLAR BLOKI */
.review-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 25px; margin-bottom: 20px; }
.review-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; }
.review-author { display: flex; gap: 15px; align-items: center; }
.r-avatar { width: 45px; height: 45px; border-radius: 50%; color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.r-name { font-weight: 700; color: var(--text-main); font-size: 16px; margin-bottom: 4px;}
.r-date { font-size: 13px; color: var(--text-muted); }
.r-stars { color: #fbbf24; font-size: 14px; display: flex; gap: 3px; }
.review-text { color: var(--text-main); font-size: 15px; line-height: 1.6; }

/* MODAL OYNA (OTZIV YAZISH UCHUN - QOTIRILDI) */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.8); z-index: 99999; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.modal-overlay.active { display: flex; }
.modal-box { background: var(--bg-card); width: 90%; max-width: 450px; border-radius: var(--radius-lg); padding: 30px; border: 1px solid var(--border-color); box-shadow: 0 10px 40px rgba(0,0,0,0.5); animation: modalPop 0.3s ease-out; }
@keyframes modalPop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.modal-header h3 { font-size: 22px; color: var(--text-main); font-weight: 700; }
.close-modal { font-size: 24px; color: var(--text-muted); cursor: pointer; transition: 0.2s; }
.close-modal:hover { color: #ef4444; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; color: var(--text-muted); margin-bottom: 10px; font-weight: 600; }
.form-input, .form-textarea { width: 100%; background: var(--bg-main); border: 1px solid var(--border-color); color: var(--text-main); border-radius: var(--radius-sm); padding: 15px; font-size: 15px; outline: none; transition: 0.3s; }
.form-input:focus, .form-textarea:focus { border-color: var(--accent-cyan); box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.2); }
.form-textarea { resize: vertical; min-height: 120px; }
.star-rating-select { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 8px; }
.star-rating-select input { display: none; }
.star-rating-select label { font-size: 35px; color: var(--border-color); cursor: pointer; transition: 0.2s; }
.star-rating-select label:hover, .star-rating-select label:hover ~ label, .star-rating-select input:checked ~ label { color: #fbbf24; }

/* MOBILE MOSLASHUV */
@media (max-width: 991px) {
    .ad-page-content { flex-direction: column; gap: 15px; padding-top: 10px; padding-bottom: 90px; }
    .ad-right { width: 100%; }
    
    .ad-gallery { margin-bottom: 15px; }
    .main-image-box { height: auto; aspect-ratio: 4/3; border-radius: 0; margin-left: -15px; margin-right: -15px; width: calc(100% + 30px); background: var(--bg-main); border: none; }
    
    .ad-price.mobile-only { font-size: 28px; font-weight: 800; color: var(--accent-cyan); margin-bottom: 10px; }
    .ad-title { font-size: 22px; margin-bottom: 20px; }
    .attr-list { grid-template-columns: 1fr; }
    
    .mobile-action-bar { position: fixed; bottom: 0; left: 0; width: 100%; background: var(--bg-nav); border-top: 1px solid var(--border-color); display: flex; padding: 12px 15px; gap: 10px; z-index: 1000; box-shadow: 0 -5px 15px rgba(0,0,0,0.3); }
    .action-btn { padding: 12px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; border: none; cursor: pointer; }
    .message-btn { background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-main); }
    .call-btn { background: var(--accent-cyan); color: #fff; }
}