/* ===================================================================== */
/* === BREND VƏ MODEL STİLLƏRİ (BRAND & MODEL) === */
/* ===================================================================== */

/* --- 1. ÜMUMİ VƏ UNIVERSAL STİLLƏR --- */

/* Məhsulun adını (modelini) böyüdür - Qalereya/Köhnə Grid üçün */
.product h3.p-title a {
    font-size: 18px !important;
    font-weight: 600;
}

/* Universal Konteyner (Həm Ana Səhifə, Həm Arxiv) */
.brand-model-wrapper-universal {
    min-height: 40px;
    margin-bottom: 10px;
}

.brand-model-wrapper-universal .urun-markasi,
.brand-model-wrapper-universal .urun-modeli {
    display: block;
    text-align: center;
    white-space: normal;
}

.brand-model-wrapper-universal .urun-markasi {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.brand-model-wrapper-universal .urun-modeli {
    font-size: 14px;
    color: #777;
}

/* --- 2. BRAND və MODEL AYRILMASI - Qlobal Override --- */

/* Bütün product başlıqlarını override et */
.new-products-section .woocommerce-loop-product__title,
.new-products-section li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
html body .woocommerce ul.products li.product .woocommerce-loop-product__title {
    display: flex !important;
    -webkit-box-orient: unset !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    flex-direction: column !important;
    gap: 4px !important;
    min-height: auto !important;
    max-height: none !important;
    height: auto !important;
}

/* Brand elementi - üstdə, iri, qara */
.woocommerce-loop-product__title .urun-markasi,
.woocommerce-loop-product__title .product-brand {
    display: block !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #000 !important;
    text-transform: uppercase !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Model elementi - altda, kiçik, boz */
.woocommerce-loop-product__title .urun-modeli,
.woocommerce-loop-product__title .product-model {
    display: block !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #666 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* --- 3. ARXİV (MƏHSULLAR SƏHİFƏSİ) XÜSUSİ STİLLƏR --- */

.archive-product-page .product-card .brand-model-wrapper {
    display: block !important;
    text-align: center !important;
    margin-bottom: 12px !important;
    width: 100% !important;
}

/* Arxiv: Brend font düzəlişi (18px Bold) */
body.post-type-archive-product .product-card .urun-markasi {
    display: block !important;
    font-size: 18px !important;
    font-weight: bold !important;
    color: #222 !important;
    line-height: 1.3 !important;
    margin-bottom: 4px !important;
    text-align: center !important;
}

/* Arxiv: Model font düzəlişi (16px) */
body.post-type-archive-product .product-card .urun-modeli {
    display: block !important;
    /* ← BLOCK */
    overflow: hidden !important;
    /* ← HIDDEN QALSIN (ellipsis üçün) */
    text-overflow: ellipsis !important;
    /* ← ... ÜÇÜN */
    white-space: nowrap !important;
    /* ← BİR SƏTİR */

    font-size: 16px !important;
    color: #666 !important;
    text-align: center !important;

    line-height: 0.9 !important;
    /* ← YÜKSƏK LINE-HEIGHT */
    height: 28px !important;
    /* ← SABİT HÜNDÜRLÜK (g üçün yer) */

    word-break: normal !important;
    padding: 0 4px 6px 4px !important;
    /* ← ALTDAN 6PX PADDING */
    width: 100% !important;
    box-sizing: border-box !important;

    /* Line-clamp kodlarını silək */
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    -webkit-box-orient: unset !important;
}

/* Qlobal olaraq bütün arxiv/kateqoriya səhifələrində modeli 1 sətirdə saxla */
body.woocommerce-shop .urun-modeli,
body.post-type-archive-product .urun-modeli,
body.tax-product_cat .urun-modeli {
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-height: 20px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
}


/* Arxiv: Brend/model blokunu şəklə yaxınlaşdır */
.product-content .brand-model-wrapper {
    transform: translateY(-10px);
    margin-bottom: 8px;
}

/* --- 4. MOBİL STİLLƏR (≤768px) --- */

@media screen and (max-width: 768px) {
    .urun-markasi {
        font-size: 18px;
        font-weight: bold;
        color: #222;
        text-align: center;
        margin-bottom: 6px;
    }

    .urun-modeli {
        font-size: 12px;
        color: #666;
        text-align: center;
        margin-bottom: 10px;
        line-height: 1.4;
        word-break: break-word;
        white-space: normal;
        overflow-wrap: break-word;
        max-width: 100%;
        padding: 0 6px;
        box-sizing: border-box;
    }

    .woocommerce-loop-product__title .urun-modeli,
    .woocommerce-loop-product__title .product-model {
        font-size: 12px !important;
    }
}

/* iPhone SE və oxşar dar ekranlar üçün xüsusi düzəliş */
@media screen and (max-width: 375px) {
    .urun-modeli {
        font-size: 14px;
        padding: 0 8px;
    }
}