/* ===================================================================== */
/* === MƏHSUL GRİDİ VƏ LAYOUT (PRODUCT GRID & LAYOUT) === */
/* ===================================================================== */

/* Ana səhifə konteyneri */
body.post-type-archive-product .site-content .container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Məhsul gridi - 5 sütun (desktop) */
.archive-product-page .product-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 30px !important;
    max-width: 1500px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* Responsive: 4 sütun (≤1400px) */
@media (max-width: 1400px) {
    .archive-product-page .product-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Responsive: 3 sütun (≤992px) */
@media (max-width: 992px) {
    .archive-product-page .product-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Responsive: 1 sütun (≤768px) */
@media (max-width: 767px) {
    .archive-product-page .product-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        /* Increased gap for clarity */
        padding: 0 10px !important;
        padding-top: 15px !important;
        /* Balanced spacing to prevent clipping while reducing gap */
    }
}

/* Responsive: 1 sütun (≤480px) */
@media (max-width: 480px) {
    .archive-product-page .product-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===================================================================== */

/* 1. ƏSAS KART BLOKU (SABİT HÜNDÜRLÜK VƏ DİZAYN) */
/* --------------------------------------------------------------------- */
body.post-type-archive-product .product-card {
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    height: 320px !important;
}

body.post-type-archive-product .product-card:hover {
    transform: translateY(-6px);
    border-color: #36bff1 !important;
    box-shadow: 0 0 0 1px #36bff1, 0 12px 20px -5px rgba(54, 191, 241, 0.25) !important;
}

/* Şəkil bloku */
body.post-type-archive-product .product-card .product-image-wrapper {
    border: none !important;
    background: transparent !important;
    border-radius: 0;
    border-bottom: 1px solid #f1f5f9;
    height: 180px !important;
    padding-top: 0 !important;
}

/* Məzmun bloku */
body.post-type-archive-product .product-card .product-content {
    padding: 15px !important;
    padding-bottom: 1px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}



/* 2. AD DİZAYNI */
/* --------------------------------------------------------------------- */
/* Brend və Model fontları artıq css/brand-model.css faylındadır */

body.post-type-archive-product .product-card .brand-model-wrapper {
    display: block !important;
    text-align: center !important;
    min-height: 38px !important;
    margin-bottom: 10px !important;
}



/* 3. VAHİD QİYMƏT/SƏBƏT DÜYMƏSİ (UNIFIED ACTION BAR) */
/* --------------------------------------------------------------------- */

/* Unified action bar-ı yuxarı çək və kartdan ayır */
body.post-type-archive-product .product-card .unified-action-bar {
    display: flex !important;
    align-items: stretch !important;
    margin-top: auto !important;
    /* ← DƏYİŞDİRDİM */
    margin-bottom: 7px !important;
    /* ← ALTDAN 7PX BOŞLUQ */
    position: relative !important;
    top: -7px !important;
    /* ← YUXARI 7PX ÇƏKDIM */
    border-radius: 10px !important;
    overflow: hidden !important;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
}

/* Sol tərəf: Qiymət bloku */
body.post-type-archive-product .product-card .price-display {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-grow: 1;
    height: 40px !important;
    font-family: 'Oswald', sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    text-align: center !important;
}

/* Desktop - qiyməti aşağı sal */
@media (min-width: 769px) {
    body.post-type-archive-product .product-card .price-display {
        padding-top: 10px !important;
    }
}



/* Qiymət mətni də mərkəzdə olsun */
body.post-type-archive-product .product-card .price-display>* {
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
}


/* Sağ tərəf: Səbətə at düyməsi */
body.post-type-archive-product .product-card .unified-action-bar .button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    width: 55px !important;
    height: 40px !important;
    background: var(--blue-border) !important;
    color: white !important;
    border-radius: 0 !important;
    transition: background 0.3s ease !important;
    font-size: 0 !important;
}

body.post-type-archive-product .product-card .unified-action-bar .button:hover {
    background: #008cbf !important;
}

body.post-type-archive-product .product-card .unified-action-bar .button::before {
    content: '\f07a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 16px;
}

/* Köhnə sepetə at düyməsini və mətni gizlət */
body.post-type-archive-product .product-card .p-actions {
    display: none !important;
}

.ajax_add_to_cart+.added_to_cart {
    display: none !important;
}


/* ===================================================================== */
/* === "SEPETİM" YAZISINI GİZLƏDƏN SEHRLİ KOD (SON DOKUNUŞ) === */
/* ===================================================================== */

/*
  Bu kod, səbətə məhsul əlavə etdikdən sonra düymənin yanında
  yaranan "Səbəti Görüntülə" (və ya "Sepetim") linkini gizlədir.
*/
.ajax_add_to_cart+.added_to_cart {
    display: none !important;
}

/* ===================================================================== */
/* === FİLTR DİZAYNI (PƏLƏNGİN YEKUN TOXUNUŞLARI) === */
/* ===================================================================== */

/* Ana panel */
.gentech-filter-panel-native {
    max-width: 1500px;
    margin: 0 auto 40px auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 16px;
    padding: 12px 15px;
}

/* Filtrləri saxlayan formanın özü */
.gentech-filter-panel-native form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex-grow: 1;
    align-items: center;
}

/* Hər bir filtr qrupu (ümumi) */
.gentech-filter-panel-native .filter-group {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    height: 46px;
    transition: all 0.2s ease;
}

.gentech-filter-panel-native .filter-group:hover {
    border-color: var(--blue-border);
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.1);
}

/* Select qutuları olan qruplar */
.filter-category,
.filter-brand,
.filter-sorting {
    padding: 0 12px;
    flex: 1 1 auto;
    /* Avtomatik böyüsünlər */
}

/* <<< İSTƏK 1: KATEQORİYA ENİ >>> */
.filter-category {
    min-width: 350px !important;
    flex-grow: 2.5 !important;
    /* Brend ilə eyni səviyyəyə gətirmək üçün eni artırıldı */
}

/* <<< İSTƏK 2: SIRALAMA ENİ >>> */
.filter-sorting {
    min-width: 180px !important;
    flex-grow: 0.8 !important;
    /* Daha az yer tutsun */
}

/* İkonlar (ümumi) */
.gentech-filter-panel-native .filter-group .fas {
    font-size: 15px;
    color: #94a3b8;
    margin-right: 10px;
}

/* <<< İSTƏK 3: YENİ BREND İKONU >>> */
.filter-brand .filter-icon {
    width: 20px !important;
    height: 20px !important;
    margin-right: 10px;
    flex-shrink: 0 !important;
    stroke-width: 1.5 !important;
}

/* Select qutuları */
.gentech-filter-panel-native select {
    width: 100%;
    height: 100%;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 16px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 20px !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 10px center !important;
    background-repeat: no-repeat !important;
    background-size: 1.25em !important;
}

/* ===================================================================== */
/* === STOK FİLTRİNİN DİZAYNINI STANDARTLAŞDIRMAQ (YEKUN) === */
/* ===================================================================== */
.filter-stock {
    flex: 1 1 auto;
    max-width: 210px;
    min-width: auto;
    padding: 0 15px;
    /* Yaşıl fonu və sərhədi ləğv edirik, digərləri kimi olsun */
}

/* Stock filter hover - no special styles needed */


.stock-filter-label {
    display: flex;
    align-items: center;
    gap: 8px;

    /* <<< --- BAŞLA: FONT VƏ ÖLÇÜ DƏYİŞİKLİYİ --- >>> */
    font-family: inherit !important;
    /* Select-lərlə eyni fontdan istifadə */
    font-size: 16px !important;
    /* Select-lərdəki ölçü ilə eyni */
    font-weight: 500 !important;
    /* Normal qalınlıq */
    color: #334155 !important;
    /* Rəngə toxunmuruq, eynidir */
    /* <<< --- BİTTİ: FONT DƏYİŞİKLİYİ --- >>> */

    cursor: pointer;
    height: 100%;

    /* <<< --- YAŞIL RƏNGİ LƏĞV EDİRİK --- >>> */
    accent-color: #3b82f6;
    /* Mavi rəng (və ya standart brauzer rəngi) */
}



/* ===================================================================== */
/* === SƏHİFƏ HİZALANMASI: PƏLƏNGİN SON NİZAMLAMASI === */
/* ===================================================================== */

/*
  Bu kod, filtr panelini və məhsul kartlarını yuxarıdakı
  axtarış çubuğu ilə eyni enə və mövqeyə gətirir.
*/
/* ===================================================================== */
/* === SƏHİFƏ HİZALANMASI: DÜZGÜN VƏ YEKUN HƏLL === */
/* ===================================================================== */

/*
  Bu kod, BODY-ni azad edir və yalnız lazımi elementləri
  hədəf alaraq onları header ilə eyni xəttə gətirir.
*/
body.post-type-archive-product .section-header,
body.post-type-archive-product .gentech-filter-panel-native,
body.post-type-archive-product .archive-product-page,
body.post-type-archive-product .pagination-wrapper {
    max-width: 1500px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

body.post-type-archive-product .archive-product-page .product-grid {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

/* "Məhsullar" başlığını ortalamaq üçün */
.section-header {
    text-align: center !important;
}

/* 1366x768 və daha kiçik ekranlarda filter panel sağ/sol 45px boşluq */
@media (max-width: 1366px) and (min-width: 1025px) {
    body.post-type-archive-product .gentech-filter-panel-native {
        margin-left: 45px !important;
        margin-right: 45px !important;
    }

    /* Product grid sağ/sol 45px padding */
    body.post-type-archive-product .archive-product-page .product-grid {
        padding-left: 45px !important;
        padding-right: 45px !important;
    }
}

/* Tablet rejimi artıq faylın sonuna köçürüldü */

.orderby {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    width: 100%;
    cursor: pointer;
}

/* 2. Fokusda olan zaman heç bir border/outline çıxmasın */
.brand-filter:focus,
.category-filter:focus,
.orderby:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* 3. Parent divə fokus vizualı ver — tam nəzarət səndə olsun */
.filter-group:focus-within {
    box-shadow: 0 0 0 2px #3b82f6;
    /* istədiyin rəng və ölçü */
    border-radius: 6px;
    transition: box-shadow 0.2s ease;
}

/* ===================================================================== */
/* === FİLTR PANELİ: CUSTOM DROPDOWN STİLLƏRİ === */
/* ===================================================================== */
/* Qeyd: Ana panel stilləri yuxarıda (sətir 212-233) mövcuddur */

/* 2. BÜTÜN FİLTR QUTULARI ÜÇÜN ÜMUMİ STİL (BİZİM DİZAYN) */
/* --------------------------------------------------------------------- */
.gentech-filter-panel-native .custom-dropdown,
.gentech-filter-panel-native .filter-stock {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    height: 46px;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* <<< BİZİM MAVİ HOVER EFFEKTİMİZİ BƏRPA EDİRİK >>> */
.gentech-filter-panel-native .custom-dropdown:hover,
.gentech-filter-panel-native .filter-stock:hover {
    border-color: var(--blue-border);
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.1);
}

/* 3. CUSTOM DROPDOWN ELEMENTLƏRİ (COPİLOTUN SİSTEMİ + BİZİM DİZAYN) */
/* --------------------------------------------------------------------- */

/* Seçilmiş elementi saxlayan qutu */
.custom-dropdown .dropdown-selected {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 15px;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #334155;
}

/* Seçilmiş elementin yanındakı aşağı ox */
.custom-dropdown .dropdown-selected::after {
    content: '';
    display: block;
    margin-left: auto;
    width: 1.25em;
    height: 1.25em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

/* Açılan siyahı */
.dropdown-options {
    list-style: none;
    margin: 6px 0 0;
    padding: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    /* JS bunu idarə edir */
}

.dropdown-options.open {
    display: block;
}

/* Siyahıdakı hər bir element */
.dropdown-options li {
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-options li:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.dropdown-options li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

/* 4. İKONLAR VƏ ENLƏR (BİZİM DİZAYN) */
/* --------------------------------------------------------------------- */
.gentech-filter-panel-native .filter-group i,
.gentech-filter-panel-native .custom-dropdown i {
    font-size: 15px;
    color: #94a3b8;
}

.custom-dropdown,
.filter-stock {
    flex: 1 1 auto;
}

@media (min-width: 1025px) {
    .gentech-filter-panel-native #catDropdown {
        flex: 0 0 700px;
        max-width: 700px;
    }

    .gentech-filter-panel-native #brandDropdown {
        flex: 0 0 210px;
        max-width: 210px;
        min-width: 0;
    }

    .gentech-filter-panel-native .filter-group.filter-stock {
        flex: 0 0 180px;
        max-width: 180px;
        min-width: 0;
        padding: 0 10px;
    }

    .gentech-filter-panel-native #sortDropdown {
        flex: 0 0 190px;
        max-width: 190px;
        min-width: 0;
    }

    .gentech-filter-panel-native .stock-filter-label {
        font-size: 14px !important;
        gap: 6px;
        white-space: nowrap;
    }

    .gentech-filter-panel-native .gentech-reset-filters-btn {
        flex: 0 0 120px;
        max-width: 120px;
        height: 46px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: #ffffff;
        color: #334155;
        font-family: inherit;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .gentech-filter-panel-native .gentech-reset-filters-btn:hover {
        border-color: #f87171;
        color: #b91c1c;
        background: #fff1f2;
    }

    .gentech-filter-panel-native #dynamic-filters-container {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ===================================================================== */
/* === FİLTR PANELİ: NƏHƏNG BREND İKONUNU KİÇİLTMƏK (YEKUN) === */
/* ===================================================================== */

/*
  Bu kod, birbaşa o nəhəng SVG ikonunu hədəf alır və ona
  səliqəli, kiçik bir ölçü verir.
*/

/* ===================================================================== */
/* === DİNAMİK FİLTRLƏR ÜÇÜN ƏLAVƏ STILLƏR (MANUS ABİ) === */
/* ===================================================================== */

/* Dinamik filtrlərin olduğu ana konteyner */
.dynamic-filters-wrapper {
    width: 100%;
    flex-wrap: wrap;
    gap: 12px;
    /* Elementlər arasında boşluq */
    margin-top: 12px;
    /* Yuxarıdakı filtrlərlə arasında boşluq */
    padding-top: 12px;
    /* Vahid görünüş üçün */
    border-top: 1px solid #eef2f6;
    /* Ayırıcı xətt */
}

/* Dinamik filtrlərin hər biri (eynilə yuxarıdakılar kimi görünsün) */
.dynamic-filters-wrapper .custom-dropdown {
    flex: 1 1 180px;
    /* Avtomatik böyüsünlər, minimum 180px olsunlar */
}

/* ===================================================================== */
/* === ACCORDION DROPDOWN MENYU STILLƏRİ (MANUS ABİ) === */
/* ===================================================================== */

/* Ana menyu elementi (içində alt menyu olan) */
.accordion-menu .has-children {
    padding: 0;
}

/* Ana kateqoriya adı və + ikonunu saxlayan qutu */
.accordion-menu .parent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.accordion-menu .parent-item:hover {
    background: #f8f9fa;
    border-radius: 8px;
}

/* + / - ikonu */
.accordion-menu .accordion-toggle {
    font-size: 12px;
    color: #9ca3af;
    padding: 5px;
    transition: transform 0.3s ease;
}

/* Alt menyu (gizli) */
.accordion-menu .sub-menu {
    list-style: none;
    padding-left: 20px;
    /* Soldan boşluq */
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

/* Alt menyu AÇIQ olduqda */
.accordion-menu .has-children.open .sub-menu {
    max-height: 500px;
    /* Açılarkən maksimum hündürlük (yetərincə böyük bir rəqəm) */
    padding-top: 5px;
    padding-bottom: 10px;
}

/* İkonu döndərmək (- olsun) */
.accordion-menu .has-children.open .accordion-toggle {
    transform: rotate(45deg);
    color: var(--blue-border);
}

/* Alt menyudakı elementlər */
.accordion-menu .sub-menu li {
    padding: 8px 12px;
    font-size: 14px;
}

/* Sadə, alt menyusu olmayan elementlər */
.accordion-menu .top-level-item {
    padding: 10px 12px;
}

/* ===================================================================== */
/* === MOBİL GÖRÜNÜŞ ÜÇÜN FİLTR VƏ MƏHSUL DÜZƏLİŞLƏRİ (MANUS) === */
/* ===================================================================== */

/* Bu kodlar yalnız 767px və daha kiçik ekranlarda aktiv olacaq */
@media (max-width: 767px) {

    /* --- 1. FİLTRLƏRİN DÜZÜLÜŞÜ --- */
    /* Filterləri saxlayan ana formanı flexbox edirik və alt-alta düzülməsini təmin edirik */
    .gentech-filter-panel-native form {
        display: flex !important;
        flex-direction: column !important;
        /* Elementləri şaquli düzür */
        gap: 10px !important;
        /* Aralarındakı boşluğu azaldır */
    }

    /* Hər bir filtr qutusu (Kateqoriya, Brend, Stok, Sırala) tam eni tutsun */
    .gentech-filter-panel-native .custom-dropdown,
    .gentech-filter-panel-native .filter-group.filter-stock {
        width: 100% !important;
        max-width: 100% !important;
        /* Maksimum en məhdudiyyətini ləğv edir */
        min-width: 0 !important;
        /* Minimum en məhdudiyyətini ləğv edir */
    }

    /* "Yalnız stokda olanlar" checkbox-ının mətnini sola düzləndiririk */
    .gentech-filter-panel-native .stock-filter-label {
        justify-content: flex-start !important;
        width: 100%;
    }


    /* --- 2. MƏHSUL KARTININ SƏHİFƏYƏ YERLƏŞMƏSİ --- */
    /* Məhsul kartlarını saxlayan grid konteynerinin yan boşluqlarını tənzimləyirik */
    body.post-type-archive-product .archive-product-page {
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box;
    }

    /* Məhsul kartlarının öz aralarındakı boşluğu azaldırıq */
    body.post-type-archive-product .archive-product-page .product-grid {
        gap: 12px !important;
    }

    /* Məhsul kartının özünün daxili boşluqlarını və hündürlüyünü optimallaşdırırıq */
    body.post-type-archive-product .product-card {
        height: auto !important;
        /* Hündürlüyü avtomatik edirik ki, məzmun yerləşsin */
        padding: 10px !important;
        /* Kartın daxili boşluğu */
        border-radius: 12px !important;
        border: 1px solid #e2e8f0 !important;
    }

    /* Şəkil blokunun hündürlüyünü azaldırıq */
    body.post-type-archive-product .product-card .product-image-wrapper {
        height: 140px !important;
    }

    /* Brend/Model və Qiymət/Səbət bloklarının yuxarı-aşağı boşluqlarını azaldırıq */
    body.post-type-archive-product .product-card .brand-model-wrapper {
        margin-top: 0 !important;
        margin-bottom: 8px !important;
        min-height: auto !important;
    }

    body.post-type-archive-product .product-card .unified-action-bar {
        position: relative !important;
        /* static-dən relative-ə */
        top: 0 !important;
        /* auto-dan 0-a */
        margin-bottom: 0 !important;
    }

    /* Məzmun blokunun daxili boşluqlarını sıfırlayırıq, çünki ana karta verdik */
    body.post-type-archive-product .product-card .product-content {
        padding: 0 !important;
    }
}

/* ===================================================================== */
/* === FİLTR MENYUSU: "BÜTÜN KATEQORİYALAR" VƏ "GENEL"İ GİZLƏT === */
/* ===================================================================== */

/* "Bütün kateqoriyalar" seçimini gizlədir */
#catDropdown .dropdown-options li[data-value="-1"] {
    display: none !important;
}

/* "Genel" kateqoriyasını gizlədir (əgər adı "Genel"dirsə) */
#catDropdown .dropdown-options li[data-value="genel"] {
    display: none !important;
}

/* Brend və Model fontları artıq css/brand-model.css faylındadır */


/* ===================================================================== */
/* Qiymət artıq mərkəzdədir (sətir 127-147) */


/* ===================================================================== */
/* === MOBİL FİLTER DÜZƏLİŞİ (BACKUP STİLİNƏ QAYITMAQ) === */
/* ===================================================================== */

@media (max-width: 767px) {

    /* Bütün dropdown-ların minimum enini sıfırla, tam genişlikdə et */
    /* Bütün dropdown-ların və elementlərin ölçülərini standartlaşdır */
    #catDropdown,
    #brandDropdown,
    #sortDropdown,
    .custom-dropdown,
    .filter-group,
    .gentech-filter-panel-native .filter-stock,
    .gentech-filter-panel-native .filter-group.filter-stock,
    .filter-stock {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
        margin-bottom: 0 !important;
        /* Changed from 8px to 0 */
        height: 46px !important;
        min-height: 46px !important;
        box-sizing: border-box !important;
    }

    #dynamic-filters-container {
        display: none !important;
    }

    /* Filter panelini alt-alta düz (column) */
    .gentech-filter-panel-native {
        flex-direction: column !important;
        width: 100% !important;
        padding: 10px !important;
        gap: 8px !important;
    }

    .gentech-filter-panel-native form {
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
    }

    /* Dropdown seçilmiş hissəsi */
    .custom-dropdown .dropdown-selected {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Dropdown açılan siyahı */
    .custom-dropdown .dropdown-options {
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }
}


/* ===================================================================== */
/* === QİYMƏT VƏ SORĞU AYRI STİLLƏNDİRİLMƏSİ (PHP-DƏN CLASS GƏLİR) === */
/* ===================================================================== */

/* Əsas price-display stili */
body.post-type-archive-product .product-card .price-display {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-grow: 1;
    height: 40px !important;
    font-family: 'Oswald', sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

/* === DESKTOP === */
@media (min-width: 769px) {

    /* Qiymət aşağı salsın - hər halda */
    body.post-type-archive-product .product-card .price-display {
        padding-top: 10px !important;
    }

    /* Sorğu əsasında - sağa çək */
    body.post-type-archive-product .product-card .price-display.no-price {
        justify-content: flex-start !important;
        padding-left: 10px !important;
    }

    /* Qiymət varsa - mərkəzdə qalsın */
    body.post-type-archive-product .product-card .price-display.has-price {
        justify-content: center !important;
        padding-left: 0 !important;
    }
}

/* === MOBİL === */
@media (max-width: 767px) {

    /* Kart hündürlüyünü avtomatik et (320px-i ləğv et) */
    body.post-type-archive-product .product-card {
        height: auto !important;
    }

    /* Qiymət varsa - sağa çək */
    body.post-type-archive-product .product-card .price-display.has-price {
        justify-content: flex-start !important;
        padding-left: 15px !important;
    }

    /* Sorğu əsasında - mərkəzdə qalsın */
    body.post-type-archive-product .product-card .price-display.no-price {
        justify-content: center !important;
        padding-left: 40px !important;
    }
}

body.post-type-archive-product .product-card .price-display.no-price {
    justify-content: center !important;
    transform: translateX(-20px) !important;
    /* 15px sola çəkir */
}

/* ===================================================================== */
/* === YEKUN PLANŞET DÜZƏLİŞİ (768px - 1024px) - ƏN SONDA OLMALIDIR === */
/* ===================================================================== */
@media (min-width: 768px) and (max-width: 1024px) {
    body.post-type-archive-product .site-content .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Panel boşluğunu grid ilə tam eyniləşdiririk (30px) */
    body.post-type-archive-product .gentech-filter-panel-native {
        margin-left: 30px !important;
        margin-right: 30px !important;
        margin-bottom: 25px !important;
        width: calc(100% - 60px) !important;
        display: block !important;
        padding: 15px !important;
        box-sizing: border-box !important;
    }

    .gentech-filter-panel-native form {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
        width: 100% !important;
        justify-content: space-between !important;
    }

    /* Kateqoriya və Brend: Üst sətirdə tam en (100%) */
    .gentech-filter-panel-native .filter-category,
    .gentech-filter-panel-native .filter-brand,
    .gentech-filter-panel-native .custom-dropdown:not(#sortDropdown) {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 5px !important;
    }

    /* Stokda olanlar və Sıralama: ALT SƏTİRDƏ YAN-YANA (50/50) */
    .gentech-filter-panel-native .filter-group.filter-stock,
    .gentech-filter-panel-native .custom-dropdown#sortDropdown {
        flex: 0 0 calc(50% - 6px) !important;
        width: calc(50% - 6px) !important;
        max-width: calc(50% - 6px) !important;
        min-width: 0 !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        display: flex !important;
        /* Mütləq görünməsi üçün */
        height: 46px !important;
    }

    /* Checkbox yazısının sığması üçün */
    .gentech-filter-panel-native .stock-filter-label {
        font-size: 14px !important;
        white-space: nowrap !important;
        width: 100% !important;
        justify-content: center !important;
    }

    body.post-type-archive-product .archive-product-page .product-grid {
        padding-left: 30px !important;
        padding-right: 30px !important;
        box-sizing: border-box !important;
        gap: 30px !important;
        /* Kartlar arasındakı boşluq (şaquli və üfüqi) 30px edildi */
    }
}

@media (max-width: 768px) {

    /* Global Reset for Theme Padding */
    html,
    body {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Hard hide for ALL theme header elements on this page */
    .site-header,
    header.site-header,
    .topbar,
    .search-row,
    .wc-mobile-search-panel,
    .mobile-only-icons,
    #gentech-side-menu,
    .gentech-side-menu,
    .real-page-title,
    .desktop-view-only {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        visibility: hidden !important;
    }

    /* Reset main theme containers that usually have top padding/margin */
    main,
    .site-main,
    .site-content,
    .search-results-container,
    #content,
    .content-area {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    .mobile-app-view {
        display: block !important;
        padding-top: 0 !important;
        margin-top: 15px !important;
        position: relative !important;
        z-index: 9999 !important;
    }

    /* Reset spacing between mobile view and results */
    .search-results-container,
    .archive-product-page {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}

@media (min-width: 769px) {
    .mobile-app-view {
        display: none !important;
    }
}

/* MOBILE APP VIEW STYLES */
.mobile-app-view {
    font-family: 'Poppins', sans-serif !important;
    background: #ffffff !important;
    min-height: auto !important;
    padding: 15px !important;
    padding-top: 0 !important;
    /* Forces content to top */
    position: relative !important;
    box-sizing: border-box !important;
    z-index: 99 !important;
    overflow: visible !important;
}

/* HEADER */
.mobile-app-view .m-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 15px;
    padding-top: 10px;
}

.mobile-app-view .icon-btn {
    width: 42px;
    height: 42px;
    background: #F3F4F6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    color: #111827;
}

.mobile-app-view .icon-btn svg {
    width: 20px;
    height: 20px;
    stroke: #374151;
}

.mobile-app-view .m-header h1,
.mobile-app-view .m-header .mobile-page-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    flex-grow: 1 !important;
    margin: 0 0 0 15px !important;
    padding: 0 !important;
    line-height: normal !important;
    display: flex !important;
    align-items: center !important;
    height: 42px !important;
    /* Same as icon buttons height */
    color: #111827 !important;
}

/* SEARCH */
.mobile-app-view .search-box {
    position: relative;
    margin-bottom: 25px;
    display: none;
}

.mobile-app-view .search-box.active {
    display: block;
}

.mobile-app-view .search-box input {
    width: 100%;
    padding: 14px 15px 14px 44px;
    background: #F3F5F9;
    border: 1px solid transparent;
    border-radius: 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #111827;
    transition: 0.3s;
}

.mobile-app-view .search-box input:focus {
    background: #fff;
    border-color: #0EA5E9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.mobile-app-view .search-icon-inside {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
}

/* FILTER KARTLARI */
.mobile-app-view .filter-group {
    display: block !important;
    flex-direction: column;
    gap: 12px;
    height: auto !important;
    min-height: auto !important;
    padding-bottom: 5px !important;
    /* Reduced from 40px to collapse the gap */
}

.mobile-app-view .filter-card {
    display: block !important;
    background-color: #ffffff !important;
    margin-bottom: 12px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    height: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-app-view .filter-header {
    padding: 18px 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    cursor: pointer !important;
    user-select: none !important;
    min-height: 56px !important;
}

.mobile-app-view .fh-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-app-view .fh-left svg {
    color: #0EA5E9 !important;
    display: block !important;
    width: 20px !important;
    height: 20px !important;
}

.mobile-app-view .fh-left span {
    font-weight: 600 !important;
    font-size: 15px !important;
    color: #111827 !important;
    display: inline-block !important;
    margin-left: 0 !important;
}

.mobile-app-view .fh-arrow {
    transition: transform 0.3s ease !important;
    color: #9CA3AF !important;
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.mobile-app-view .filter-card.active>.filter-header .fh-arrow {
    transform: rotate(180deg);
}

.mobile-app-view .filter-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #fff;
    padding: 0 16px;
}

.mobile-app-view .filter-card.active .filter-content {
    border-top: 1px solid #F3F5F9;
}

/* KATEQORIYA (Sub-Category) */
.mobile-app-view .parent-cat-item {
    border-bottom: 1px solid #F3F4F6;
}

.mobile-app-view .parent-cat-item:last-child {
    border-bottom: none;
}

.mobile-app-view .parent-cat-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 52px !important;
    /* Fixed height as requested */
    padding: 0 5px !important;
    margin: 0 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    line-height: 52px !important;
}

.mobile-app-view .plus-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F9FAFB;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 400;
    color: #6B7280;
    transition: 0.3s;
}

.mobile-app-view .parent-cat-item.active .plus-icon {
    transform: rotate(45deg);
    background: #0EA5E9;
    color: #fff;
}

.mobile-app-view .parent-cat-item.active .parent-cat-header {
    color: #0EA5E9;
}

.mobile-app-view .sub-cat-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 10px;
}

.mobile-app-view .sub-cat-list li {
    list-style: none;
    padding: 8px 0;
    font-size: 13px;
    color: #6B7280;
    cursor: pointer;
}

.mobile-app-view .sub-cat-list li:hover {
    color: #111827;
}

/* TOGGLE SWITCH */
.mobile-app-view .toggle-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.mobile-app-view .toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #E5E7EB;
    border-radius: 20px;
    transition: 0.3s;
}

.mobile-app-view .toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-app-view #stock-check-mobile {
    display: none;
}

.mobile-app-view #stock-check-mobile:checked+.toggle-wrapper .toggle-switch {
    background: #0EA5E9;
}


/* Fix: Parent item must be auto height to allow expansion of sub-categories */
body.woocommerce-page .mobile-app-view .filter-group .filter-card .filter-content .parent-cat-item {
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    overflow: visible !important;
    border-bottom: 1px solid #F3F4F6;
}

/* Header gets the fixed 52px height and vertical centering */
.mobile-app-view .parent-cat-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 52px !important;
    padding: 0 10px !important;
    margin: 0 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    line-height: 52px !important;
}

body.woocommerce-page .mobile-app-view .sub-cat-list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* Alt kateqoriyalar üçün xüsusi */
.mobile-app-view .sub-cat-list li {
    padding: 8px 10px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    margin: 0 !important;
}

/* Linklərin daxili padding-ni sıfırla */
.mobile-app-view .filter-content a {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

.mobile-app-view #stock-check-mobile:checked+.toggle-wrapper .toggle-switch::after {
    transform: translateX(20px);
}
