/* RESET VƏ ƏSAS STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: #f8fafc;
}

/* REKLAM BANNERLƏRİ - REAL */
.ad-sidebar-left,
.ad-sidebar-right {
    width: 200px;
    position: fixed;
    top: 70px;
    height: 600px;
}

.ad-sidebar-left {
    left: 10px;
}

.ad-sidebar-right {
    right: 10px;
}

.ad-container {
    width: 200px;
    height: 600px;
    background: #f1f5f9;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}

/* ƏSAS MƏZMUN */
.main-wrapper {
    margin: 0 220px;
    min-height: 100vh;
}

/* TOPBAR STYLES */
.topbar {
    background: linear-gradient(135deg, #bae6fd 0%, #7dd3fc 100%);
    padding: 4px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9998;
    height: 50px;
}

.topbar-inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    width: 100%;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hamburger-menu {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
}

.hamburger-menu:hover {
    background-color: rgba(255,255,255,0.3);
}

.hamburger-menu img {
    width: 20px;
    height: 20px;
    display: block;
}

.logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.site-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-title span {
    font-size: 18px;
    font-weight: bold;
    color: #1e3a8a;
    white-space: nowrap;
}

.topbar-right {
    /* Buradakı margin-left: auto elementi sağa sıxışdırır. */
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.flags {
    display: flex;
    align-items: center;
    gap: 5px;
}

.flag {
    width: 22px;
    height: 14px;
    cursor: pointer;
    border-radius: 2px;
    transition: transform 0.2s;
}

.flag:hover {
    transform: scale(1.1);
}

/* ⭐ KRİTİK DÜZƏLİŞ: <a> etiketi üçün display və align-items */
.login-btn {
    display: inline-flex; /* Blok kimi davranır, amma hələ də inline axını saxlayır */
    align-items: center; /* Mətni şaquli olaraq mərkəzləşdirir (yəni vizual görünüşü düzəldir) */
    
    padding: 5px 12px;
    border-radius: 4px;
    color: white;
    text-decoration: none; /* <a> alt xəttini silir */
    font-size: 13px;
    background-color: #2563eb;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.login-btn:hover {
    background-color: #1d4ed8;
}

/* MAIN CONTENT */
.main-content {
    margin-top: 50px;
    padding: 15px;
    min-height: 100vh;
}

/* FILTER BLOK */
.filter-blok {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: 10px;
    padding: 12px 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: flex-end;
    border: 1px solid #7dd3fc;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    text-align: center;
}

.filter-box label {
    font-size: 12px;
    font-weight: 600;
    color: #1e40af;
    white-space: nowrap;
}

.filter-box input, 
.filter-box select {
    padding: 6px 8px;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    width: 120px;
    text-align: center;
}

.filter-box input:focus, 
.filter-box select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* QİYMƏT FİLTERİ */
.price-inputs {
    display: flex;
    gap: 4px;
    align-items: center;
}

.price-inputs input {
    width: 55px;
    padding: 6px 4px;
    text-align: center;
}

.price-separator {
    color: #1e40af;
    font-weight: bold;
    font-size: 12px;
}

/* =========================================
   Standard pages: moved from inline <style>
   (index.php + category pages + discounts)
   ========================================= */

.main-content-wrapper {
    display: flex;
    width: 100%;
    justify-content: center;
    margin-top: 0;
}

#elanContainerDesktop {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    max-width: 1140px;
    margin: 0 auto;
    padding-bottom: 96px;
}

.hidden {
    display: none !important;
}

/* Desktop topbar quick actions (used on standard pages) */
.topbar-right .home-btn,
.topbar-right .login-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    height: 36px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
}

.topbar-right .home-btn {
    background: #2563eb;
    color: #fff;
    border: 1px solid #2563eb;
}
.topbar-right .home-btn:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

/* Mobile language menu (bottom bar) */
#mobileLangMenu {
    display: none;
    position: fixed;
    left: 50vw !important;
    right: auto !important;
    margin: 0 !important;
    transform: translateX(-50%) !important;
    bottom: calc(var(--nav-h, 56px) + 8px);
    z-index: 9999;
    background: #fff;
    border-radius: 16px;
    padding: 8px 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    width: fit-content;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
}
#mobileLangMenu.open { display: block; }
#mobileLangMenu .langs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
#mobileLangMenu .langs button {
    background: transparent;
    border: 0;
    padding: 4px;
    width: 52px;
    height: 66px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
}
#mobileLangMenu .langs img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
#mobileLangMenu .langs span {
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: #111827;
    text-align: center;
}

@media (max-width: 767px) {
    .topbar,
    .filter-blok,
    .cats-wrap,
    .ad-sidebar-left,
    .ad-sidebar-right,
    .main-wrapper {
        display: none !important;
    }

    .dropdown-menu {
        display: none !important;
    }
    .dropdown-menu.open,
    .dropdown-menu.mobile-visible,
    .dropdown-menu.show {
        display: block !important;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        z-index: 99999;
        background: #fff;
        max-height: 80vh;
        overflow-y: auto;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
    }

    .seo-info-section {
        padding: 12px 12px 4px;
        font-size: 14px;
    }
}

@media (min-width: 768px) {
    .mobile-root {
        display: none !important;
    }
}

/* ENDİRİM FİLTERİ */
.filter-box--checkbox {
    flex-direction: column;
    gap: 4px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #93c5fd;
    width: 120px;
    justify-content: center;
}

.filter-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    margin: 0;
}

/* CATEGORY ICONS */
.cats-wrap {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-card {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 180px;
    height: 64px;
    border: 2px solid #bae6fd;
}

.category-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    border-color: #7dd3fc;
}

.category-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-name {
    margin-left: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

/* =========================
   DESKTOP TOPBAR FLAGS — REMOVE WHITE BOXES COMPLETELY
   ========================= */
@media (min-width: 1024px){

  /* Bayraqları saxlayan kliklənən element (a/div/button ola bilər) */
  .topbar .flags > *{
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    line-height: 0 !important;
  }

  /* linklər üçün (əgər <a> içindədirsə) */
  .topbar .flags a{
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Bayraq şəkillərinin özü */
  .topbar .flags .flag{
    width: 26px !important;
    height: 18px !important;
    display: block !important;
    background: transparent !important;

    /* kvadrat hissi olmasın, amma dairə də etməyək */
    border-radius: 4px !important;
    overflow: hidden !important;

    /* heç bir ağ çərçivə olmasın */
    border: 0 !important;
    box-shadow: none !important;

    object-fit: cover !important;
    transition: transform .15s ease !important;
  }

  .topbar .flags .flag:hover{
    transform: scale(1.08);
    cursor: pointer;
  }
}
