/* ============================================
   RESET & ROOT VARIABLES
   ============================================ */
* {
    list-style: none;
    text-decoration: none;
    font-family: vazir;
    outline: none;
    margin: 0;
    box-sizing: border-box;
    padding: 0;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --text-color: #ffffff;
    --glass-color: rgba(44, 70, 90, 0.95);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --accent-color: #3498db;
}

@font-face {
    font-family: vazir;
    src: url(/font/Vazir-Medium.ttf);
}

html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
    background-color: #1e272e;
    font-size: 1rem;
}

a {
    color: #212121;
}

/* ============================================
   HEADER (هدر سایت)
   ============================================ */
header {
    width: 100%;
    height: 70px;
    margin: 0 auto;
    position: fixed;
    top: 0;
    z-index: 999;
    background-color: rgba(109, 119, 126, 0.479);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    transition: top 0.3s;
}

header a {
    color: #ffffff;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    height: 100%;
    max-width: 1300px;
    margin: 0 auto;
}
/* ===== لوگو ===== */
header .logo img {
    width: 170px;
    height: 50px;
    margin-right: -25px;
    display: block;
}

/* ===== منوی اصلی (دسکتاپ) ===== */
header .nav ul {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
    padding: 0;
}

header .nav li {
    list-style: none;
    margin: 10px;
}
/* ===== بخش چپ هدر ===== */
.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

/* ===== بخش راست هدر ===== */
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ===== دکمه همبرگری (موبایل) ===== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    flex-shrink: 0;
}
.mobile-menu-btn img {
    width: 26px;
    height: 26px;
}

.hideOnMobile {
    display: block;
}

.hideOnMobile:hover {
    border-bottom: 2px solid #3498db;
    transition: all 0.3s ease;
}

/* ============================================
   BUTTONS (دکمه‌های ورود و ثبت آگهی)
   ============================================ */
.btn-login,
.btn-sell {
    font-size: 1.1rem;
    padding: 8px 22px !important;  
    border-radius: 25px !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
    cursor: pointer;
}
/* ===== مخفی کردن دکمه ثبت‌نام در سایدبار وقتی لاگین هستیم ===== */
#loginBtnSidebar[style*="display: none"] {
    display: none !important;
}
/* ===== دکمه ثبت‌نام در سایدبار (هماهنگ با بقیه) ===== */
#loginBtnSidebar {
    display: block !important;
    width: 100% !important;
    padding: 10px 20px !important;
    color: #2c465a !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 1rem !important;
    font-weight: normal !important;
    text-align: right !important;
    transition: 0.2s !important;
    cursor: pointer !important;
}

#loginBtnSidebar:hover {
    color: #3498db !important;
    background: rgba(52, 152, 219, 0.05) !important;
}

.btn-login:hover {
    background-color: #ffffff !important;
    color: #2c465a !important;
}

.btn-sell {
    color: #ffffff !important;
    background-color: #3498db !important;
    border: 2px solid #3498db !important;
}

.btn-sell:hover {
    background-color: #2980b9 !important;
    border-color: #2980b9 !important;
}

.ad-buttons-wrapper {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    margin-right: 5px;
}

.ad-btn {
    padding: 5px 18px !important;
    border-radius: 30px !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
    color: #ffffff !important;
    background-color: #3498db !important;
    border: 2px solid #3498db !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    white-space: nowrap;
}

.ad-btn:hover {
    background-color: #2980b9 !important;
    border-color: #2980b9 !important;
}

.ad-btn:first-child {
    background-color: #2ecc71 !important;
    border-color: #2ecc71 !important;
}

.ad-btn:first-child:hover {
    background-color: #27ae60 !important;
    border-color: #27ae60 !important;
}

/* ============================================
   SEARCH & FILTER (نوار جستجو و فیلترها)
   ============================================ */
/* ===== جستجو ===== */
.search-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 270px;
    margin: 0 8px;
    position: relative;
}

.search-form {
    display: flex;
    align-items: center;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: 0.3s;
    padding: 2px;
}

.search-form:focus-within {
    border-color: #3498db;
    background: rgba(255, 255, 255, 0.15);
}

.search-form input {
    flex: 1;
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    min-width: 50px;
}

.search-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 10px;
    cursor: pointer;
    transition: 0.3s;
}

.search-btn:hover {
    color: #3498db;
}

.filter-toggle {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 6px 10px;
    cursor: pointer;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-toggle:hover {
    color: #3498db;
}

.filter-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(30, 39, 46, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    min-width: 280px;
}

.filter-dropdown.show {
    display: block;
}

.filter-dropdown .filter-group {
    margin-bottom: 15px;
}

.filter-dropdown .filter-group label {
    display: block;
    color: #fff;
    font-size: 0.85rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.filter-dropdown .filter-group select,
.filter-dropdown .filter-group input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
}

.filter-dropdown .filter-group select:focus,
.filter-dropdown .filter-group input:focus {
    border-color: #3498db;
}

.filter-dropdown .filter-group select option {
    background: #1e272e;
    color: #fff;
}

.filter-dropdown .filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.filter-dropdown .filter-actions button {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.filter-dropdown .filter-actions .apply-filter {
    background: #3498db;
    color: #fff;
}

.filter-dropdown .filter-actions .apply-filter:hover {
    background: #2980b9;
}

.filter-dropdown .filter-actions .reset-filter {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.filter-dropdown .filter-actions .reset-filter:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== سبد خرید ===== */
.cart-link {
    position: relative;
    color: #fff;
    font-size: 1.3rem;
    transition: 0.3s;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.cart-link:hover {
    color: #3498db;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.55rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ============================================
   SIDEBAR (منوی کناری موبایل)
   ============================================ */
.nav .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 280px;
    z-index: 9999;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    display: none;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    padding: 10px 0;
}

.nav .sidebar li {
    width: 100%;
    padding: 5px 10px;
    list-style: none;
    margin: 0;
}
.nav .sidebar li a {
    color: #2c465a;
    font-size: 1rem;
    display: block;
}
.nav li:first-child {
    margin-right: auto;
    padding: 4px 16px;
}


.sidebar-ad-btn {
    display: block;
    width: 85%;
    margin: 6px auto;
    padding: 8px 0;
    text-align: center;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #ffffff;
    border: 2px solid transparent;
}

.sidebar-ad-online {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-color: #2ecc71;
    box-shadow: 0 2px 10px rgba(46, 204, 113, 0.25);
}

.sidebar-ad-online:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
    background: linear-gradient(135deg, #27ae60, #1e8449);
}

.sidebar-ad-offline {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-color: #3498db;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.25);
}

.sidebar-ad-offline:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9, #1f618d);
}

.sidebar-ad-btn i {
    margin-left: 8px;
}

.sidebar.active {
    display: flex !important;
}

/* ===== منوی پروفایل کشویی ===== */
.user-profile-wrapper {
    position: relative;
    display: inline-block;
}

.profile-btn {
    background: transparent;
    border: none;
    font-size: 1.6rem;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.profile-btn:hover {
    color: #3498db;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 120%;
    left: auto;
    right: -170px;          
    background: rgba(44, 70, 90, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    width: 200px;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-header {
    padding: 15px;
    border-bottom: 1px solid var(--glass-border);
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    font-size: 0.95rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.3s;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: rgba(52, 152, 219, 0.15);
    color: #fff;
}

.dropdown-item i {
    margin-left: 10px;
    width: 20px;
    text-align: center;
}

.logout-btn {
    color: #ff4757 !important;
    border-top: 1px solid var(--glass-border);
}

.logout-btn:hover {
    background: rgba(255, 71, 87, 0.15) !important;
    color: #ff6b81 !important;
}

/* ============================================
   HERO / ADVERTISING (بخش تبلیغاتی اصلی)
   ============================================ */
.advertising {
    position: relative;
    margin-top: 85px;
}

.img {
    width: 100%;
    height: 530px;
    margin-right: 0;
    filter: blur(5px);
    background-image: url('/images/Gemini_Generated_Image_nh8907nh8907nh89.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.advertising .adver {
    position: absolute;
    top:15%;
    left: 86%;
    transform: translate(-50%, -50%);
    color: #effffa;
    text-align: center;
    text-shadow: rgba(0, 0, 0, 0.128) 2px 5px 3px;
    width: 90%;
}
.advertising-buttons{
    position: absolute;
    top: 70%;
    left: 86%;
}
.advertising-buttons1{
    /* background: linear-gradient(135deg, #0066ff); */
    background-color: #bbe405;
    color: rgb(0, 0, 0);
    padding: 12px 40px;
    border-radius: 24px;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 119, 255, 0.658);
    transition: all 0.3s ease;
}
.advertising-buttons1:hover{
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 120, 255, 0.5);
}

/* SELLER SECTION (بخش انواع تبلیغات) */
.seller-section {
    --bg-color: #0f172a;
    --text-main: #ffffff;
    --text-sub: #94a3b8;
    --accent: #8b5cf6;
    margin-top: 110px;
    border-radius: 15px;
    width: 100%;
    max-width: 1200px;
    padding: 60px 20px;
    margin-left: auto;
    margin-right: auto;
    background-color: var(--bg-color);
    color: var(--text-main);
}

.seller-section .seller-section-header {
    text-align: center;
}

.seller-section .section-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.seller-section .grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.seller-section .card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    text-align: center;
    transition: 0.4s;
}

.seller-section .card:hover {
    transform: translateY(-10px);
    border-color: gold;
    background: rgba(255, 255, 255, 0.1);
}

.seller-section .avatar {
    width: 100%;
    height: 160px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.seller-section .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================
   ADS SECTION (بخش نمایش آگهی‌ها)
   ============================================ */
.ads-section {
    max-width: 1200px;
    margin: 60px auto 40px;
    padding: 0 20px;
}

.ads-section-header {
    text-align: center;
    margin-bottom: 30px;
}

.ads-section-header .section-title {
    font-size: 2rem;
    color: #fff;
    font-weight: 900;
}

.ads-section-header .section-title i {
    color: #3498db;
    margin-left: 10px;
}

.ads-section-header .section-subtitle {
    color: #bdc3c7;
    font-size: 1rem;
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.ad-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: 0.4s;
    display: flex;
    flex-direction: column;
}

.ad-item:hover {
    transform: translateY(-8px);
    border-color: #3498db;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ad-item-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #0f172a;
}

.ad-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.ad-item:hover .ad-item-image img {
    transform: scale(1.05);
}

.ad-item-info {
    padding: 15px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ad-item-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-item-category {
    color: #bdc3c7;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.ad-item-category i {
    color: #3498db;
    margin-left: 5px;
}

.ad-item-price {
    color: #2ecc71;
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: auto;
}

.ad-item-seller {
    color: #7f8c8d;
    font-size: 0.75rem;
    margin-top: 8px;
}

.loading-ads {
    text-align: center;
    color: #bdc3c7;
    padding: 40px 0;
    grid-column: 1 / -1;
}

.no-ads {
    text-align: center;
    color: #bdc3c7;
    padding: 40px 0;
    grid-column: 1 / -1;
}

.no-ads i {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 15px;
    display: block;
}

.btn-show-all {
    display: inline-block;
    padding: 12px 35px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-show-all:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(52, 152, 219, 0.5);
    background: linear-gradient(135deg, #2980b9, #1f618d);
}

.btn-show-all i {
    margin-left: 8px;
}

/* ============================================
   ABOUT SECTION (درباره ما)
   ============================================ */
.about {
    display: flex;
    flex-direction: row-reverse;
    width: 95%;
    height: 300px;
    max-width: 1200px;
    margin: 150px auto 0;
    background-color: #ffffff;
    align-items: center;
    justify-content: space-around;
    border-radius: 15px;
    padding: 20px;
    gap: 20px;
}

.about .img2 img {
    width: 300px;
    height: 100%;
}

/* ============================================
   FOOTER (فوتر سایت)
   ============================================ */
.contact-us {
    display: flex;
    justify-content: space-around;
    margin-top: 80px;
    background-color: #252f38;
    border-radius: 5px;
    color: rgba(255, 255, 255, 0.8);
    padding: 20px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.logo2 img {
    width: 200px;
    height: 200px;
    padding-top: 20px;
}

.contact {
    width: 500px;
    padding-top: 20px;
}

.Contact-information {
    width: 200px;
    height: 250px;
}

.phone,
.email {
    display: flex;
    justify-content: space-evenly;
    padding-top: 25px;
}

.our-site {
    display: grid;
    align-items: center;
    text-align: center;
    height: 60px;
    color: rgba(0, 0, 0, 0.85);
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 5px;
}

/* ============================================
   BACK TO TOP (دکمه بازگشت به بالا)
   ============================================ */
#back-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #333;
    color: white;
    text-align: center;
    line-height: 50px;
    border-radius: 50%;
    font-size: 24px;
    z-index: 999;
    cursor: pointer;
    transition: opacity 0.3s ease-in-out;
}

#back-to-top:hover {
    background-color: rgb(127, 53, 53);
}

#back-to-top.show {
    display: block;
}

/* ============================================
   RESPONSIVE (ریسپانسیو)
   ============================================ */

/* ===== TABLET ===== */
@media (max-width: 992px) {
    .container {
        padding: 0 10px;
    }
    header .nav ul {
        gap: 15px;
    }
    header .nav li {
        font-size: 0.9rem;
    }
    .search-wrapper {
        max-width: 300px;
    }
    
    .advertising {
        margin-top: 120px;
    }
    .img {
        width: 100%;
        height: 400px;
        margin-right: 0;
    }
    .advertising .adver {
        left: 50%;
        transform: translateX(-50%);
        top: 150px;
        width: 90%;
    }
    .advertising .h1 {
        font-size: 1.8rem;
    }
    .about {
        flex-direction: column-reverse;
        height: auto;
        width: 95%;
        margin-right: 0;
        padding: 20px;
        gap: 20px;
    }
    .about .img2 img {
        width: 100%;
        height: auto;
        max-height: 300px;
        object-fit: cover;
    }
    .about h2 {
        font-size: 1.5rem;
        text-align: center;
    }
    .about p {
        text-align: justify;
        font-size: 0.95rem;
    }
    .contact-us {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
        padding: 20px 0;
    }
    .logo2 img {
        width: 150px;
        height: 150px;
        padding-top: 0;
    }
    .contact {
        width: 90%;
        text-align: center;
    }
    .Contact-information {
        width: 90%;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .phone,
    .email {
        padding-top: 0;
        justify-content: center;
        gap: 10px;
    }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    /* هدر */
    header {
        width: 100%;
        height: 70px;
    }
    header .container {
        justify-content: space-between;
    }
    header .logo img {
        width: 100px;
        margin-right: -15px;

    }
    .header-right {
        gap: 8px;
    }
    .header-right .nav {
        display: none;
    }
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    .sidebar {
        display: none !important;
        width: 280px;
        right: 0;
        left: auto;
        top: 0;
        height: 100vh;
        z-index: 9999;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    }
    .sidebar.active {
        display: flex !important;
    }
    .hideOnMobile {
        display: none !important;
    }
    /* ===== دکمه ثبت‌نام ===== */
    .btn-login {
        padding: 3px 10px !important;
        font-size: 0.75rem !important;
    }
    /* ===== دکمه پروفایل ===== */
    .profile-btn {
        font-size: 1.3rem;
        margin-right: 2px;
    }
    /* ===== سبد خرید ===== */
    .cart-link {
        font-size: 1.1rem;
    }
    .cart-badge {
        width: 16px;
        height: 16px;
        font-size: 0.5rem;
        top: -6px;
        right: -8px;
    }
    /* جستجو */
    .search-wrapper {
        max-width: 160px;
        margin: 0 5px;
    }
    .search-form input {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    .search-btn {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
    .filter-toggle {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    .filter-dropdown {
        position: fixed;
        top: 70px;
        left: 10px;
        right: 10px;
        min-width: auto;
        max-height: 50vh;
        overflow-y: auto;
    }

    /* دکمه‌های ثبت آگهی */
    .ad-buttons-wrapper {
        flex-direction: column;
        gap: 5px;
        margin-right: 0;
    }
    .ad-btn {
        font-size: 0.7rem !important;
        padding: 4px 10px !important;
    }

    /* آگهی‌ها */
    .ads-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
    }
    .ad-item-image {
        height: 130px;
    }
    .ad-item-title {
        font-size: 0.95rem;
    }

    /* بخش فروشندگان */
    .seller-section {
        width: 100%;
        padding: 40px 15px;
        margin-top: 80px;
        border-radius: 0;
    }
    .seller-section .section-title {
        font-size: 1.8rem;
    }
    .seller-section .grid-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .seller-section .card {
        padding: 20px;
    }

    /* تبلیغات اصلی */
    .advertising {
        margin-top: 100px;
    }
    .img {
        height: 300px;
        background-attachment: scroll;
    }
    .advertising .adver {
        top: 100px;
    }
    .advertising .h1 {
        font-size: 1.4rem;
        line-height: 1.5;
    }

    /* درباره ما */
    .about {
        flex-direction: column-reverse;
        height: auto;
        padding: 20px;
    }
    .about .img2 img {
        width: 100%;
        max-height: 300px;
        object-fit: cover;
    }

    /* فوتر */
    .our-site {
        padding: 15px;
        font-size: 0.8rem;
    }

    /* دکمه بازگشت */
    #back-to-top {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    /* منوی پروفایل */
    .dropdown-menu {
        position: fixed !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-70%) !important;
        top: 70px !important;
        width: 220px;
        right: auto;
    }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 480px) {
    .sidebar-ad-btn {
        width: 90%;
        padding: 7px 0;
        font-size: 0.8rem;
    }
    .advertising .h1 {
        font-size: 1.2rem;
    }
    .about p {
        font-size: 0.85rem;
    }
    .seller-section .section-title {
        font-size: 1.5rem;
    }
}


/* ============================================
   RESPONSIVE - تبلت و موبایل (تا 834px)
   ============================================ */
@media (max-width: 1030px) {
    header {
        height: 70px;
    }
    header .logo img {
        width: 100px;
        margin-right: -15px;
    }
    /* ===== مخفی کردن منوی اصلی در تبلت و موبایل ===== */
    .hideOnMobile {
        display: none !important;
    }

    /* ===== نمایش دکمه همبرگری ===== */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* ===== جستجو ===== */
    .search-wrapper {
        max-width: 180px;
        margin: 0 8px;
    }
    .search-form input {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    .search-btn,
    .filter-toggle {
        padding: 5px 8px;
        font-size: 0.75rem;
    }

    /* ===== هدر راست ===== */
    .header-right {
        gap: 10px;
    }

    /* ===== دکمه پروفایل ===== */
    .profile-btn {
        font-size: 1.4rem;
        padding: 4px;
    }

    /* ===== سبد خرید ===== */
    .cart-link {
        font-size: 1.2rem;
    }
    .cart-badge {
        width: 16px;
        height: 16px;
        font-size: 0.5rem;
        top: -6px;
        right: -8px;
    }

    /* ===== دکمه ورود ===== */
    .btn-login {
        padding: 4px 12px !important;
        font-size: 0.8rem !important;
    }

    /* ===== دکمه‌های تبلیغات ===== */
    .ad-buttons-wrapper {
        flex-direction: column;
        gap: 4px;
    }
    .ad-btn {
        font-size: 0.7rem !important;
        padding: 3px 10px !important;
    }

    /* ===== منوی پروفایل در تبلت/موبایل ===== */
    .dropdown-menu {
        position: fixed !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        top: 70px !important;
        width: 220px;
    }

    /* ===== فیلتر dropdown ===== */
    .filter-dropdown {
        position: fixed;
        top: 70px;
        left: 10px;
        right: 10px;
        min-width: auto;
        max-height: 50vh;
        overflow-y: auto;
    }

    /* ===== دکمه همبرگری ===== */
    .mobile-menu-btn img {
        width: 26px;
        height: 26px;
    }
}

/* ============================================
   RESPONSIVE - موبایل کوچک (زیر 480px)
   ============================================ */
@media (max-width: 480px) {
    .search-wrapper {
        max-width: 120px;
        margin: 0 4px;
    }
    .search-form input {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    .search-btn,
    .filter-toggle {
        padding: 3px 5px;
        font-size: 0.65rem;
    }
    .btn-login {
        padding: 2px 8px !important;
        font-size: 0.65rem !important;
    }
    .profile-btn {
        font-size: 1.2rem;
    }
    .cart-link {
        font-size: 1rem;
    }
    header .logo img {
        width: 100px;
        margin-right: -15px;
    }
}