/* TechBar Catalog UI — məhsul səhifəsi.
 * 1) köhnə mu-plugins/techbar-pdp-compact.php v1.2.0  2) techbar-pdp-meta.php v1.0.0  3) mobil alt panel (functions.php)  4) yeni: stok sətri, aylıq, WhatsApp, oxşar məhsullar */

/* ===== 1. pdp-compact ===== */
/* ========== UNIFORM BLOK BOŞLUĞU = 14px — YALNIZ MASAÜSTÜ ==========
   (mobildə temanın öz margin-ları ilə TOPLANIB boşluqları böyüdürdü) */
@media(min-width:769px){
body.tbnew .elementor-widget-wd_single_product_title,
body.tbnew .elementor-widget-wd_single_product_meta,
body.tbnew .elementor-widget-wd_single_product_short_description,
body.tbnew .elementor-widget-wd_single_product_price{margin-top:0!important;margin-bottom:14px!important}
body.tbnew .elementor-widget-wd_single_product_add_to_cart{margin-top:0!important}
}

/* başlıq: 34 → 28px — yalnız masaüstü (mobildə temanın öz responsive ölçüsü qalır) */
@media(min-width:769px){
body.tbnew .elementor-widget-wd_single_product_title h1,
body.tbnew .wd-single-title h1,
body.tbnew h1.product_title{font-size:28px!important;line-height:1.18!important;margin:2px 0 0!important;font-weight:700!important}
}

/* badge-lər: kiçik, sıx, bir sıra */
body.tbnew .tb-badge,
body.tbnew .free-shipping-button{font-size:11px!important;padding:3px 8px!important;line-height:1.5!important;
  margin:0 4px 4px 0!important;border-radius:5px!important}
body.tbnew .tb-badge svg,body.tbnew .tb-badge i{transform:scale(.9)}

/* meta (stok/SKU): sıx sətirlər */
body.tbnew .elementor-widget-wd_single_product_meta{font-size:13px!important}
body.tbnew .wd-single-product-meta{font-size:13px!important}
body.tbnew .wd-single-product-meta>*{margin:0!important;line-height:1.22!important}

/* qısa təsvir bölməsi */
body.tbnew .elementor-widget-wd_single_product_short_description,
body.tbnew .wd-single-short-description{line-height:1.4!important}
/* banner: tema mt:15 + konteyner mt:9 kompensasiyası — yalnız masaüstü (mobildə 4px-ə sıxılırdı) */
@media(min-width:769px){
body.tbnew .elementor-widget-wd_single_product_short_description>.elementor-widget-container{margin-top:0!important}
body.tbnew .techbar-product-banner{margin-top:-20px!important}
}
body.tbnew .techbar-product-banner{margin-bottom:14px!important}
/* texniki göstərici mətni: 13px */
body.tbnew .woocommerce-product-details__short-description,
body.tbnew .woocommerce-product-details__short-description p{font-size:13px!important;line-height:1.45!important;margin:0!important}
/* çatdırılma qutusunun padding-i */
body.tbnew .elementor-widget-wd_single_product_short_description [style*="background"]{padding:6px 11px!important}

/* qiymət: BİR SƏTİRDƏ — yeni böyük solda, köhnə üstüxətli sağda */
body.tbnew .elementor-widget-wd_single_product_price{width:auto!important;max-width:100%!important}
body.tbnew .elementor-widget-wd_single_product_price .price{display:flex!important;align-items:baseline!important;
  gap:14px!important;flex-wrap:nowrap!important;width:max-content!important;max-width:100%!important;white-space:nowrap!important;
  font-size:26px!important;line-height:1.1!important;margin:0!important}
body.tbnew .elementor-widget-wd_single_product_price .price ins{order:1;text-decoration:none!important;background:none!important}
body.tbnew .elementor-widget-wd_single_product_price .price del{order:2}
body.tbnew .elementor-widget-wd_single_product_price .price del,
body.tbnew .elementor-widget-wd_single_product_price .price del .amount{font-size:16px!important}
body.tbnew .elementor-widget-wd_single_product_price p{margin:0!important}
/* qiymət widget-inin altındakı boş sahə → qiymət→düymə 14px (masaüstü) */
@media(min-width:769px){
body.tbnew .elementor-widget-wd_single_product_price{margin-bottom:-6px!important}
}

/* düymələr: kompakt 44px + hover (rənglər toxunulmur) */
body.tbnew .single_add_to_cart_button,
body.tbnew #wd-add-to-cart.wd-buy-now-btn{min-height:44px!important;padding:8px 22px!important;
  font-size:14px!important;font-weight:800!important;border-radius:7px!important;
  display:inline-flex!important;align-items:center;justify-content:center;transition:filter .15s}
body.tbnew .single_add_to_cart_button:hover,
body.tbnew #wd-add-to-cart:hover{filter:brightness(1.06)}
body.tbnew .quantity .qty{height:44px!important}
/* düymə → kredit: 14px (masaüstü) */
@media(min-width:769px){
body.tbnew form.cart{margin-bottom:14px!important}
body.tbnew .kredit-taksit-row{margin-top:0!important}
body.tbnew .kredit-taksit{margin-top:14px!important}
}

/* ===== MOBİL: bərabər 14px ritm (temanın öz margin-ları: 8,35,14,0,20,30,25,55 idi) ===== */
@media(max-width:768px){
/* h1→meta: 8→14 */
body.tbnew .elementor-widget-wd_single_product_meta{margin-top:6px!important}
/* meta→banner: 35→14 (meta-nın +6-sı nəzərə alınıb) */
body.tbnew .techbar-product-banner{margin-top:-15px!important}
/* specs→price: 0→14 ; price→düymə: 20→14 */
body.tbnew .elementor-widget-wd_single_product_price{margin-top:14px!important;margin-bottom:-6px!important}
/* düymə→kart1: 30→14 (temanın .kredit-taksit mt:30-u əvəzlənir) */
body.tbnew .kredit-taksit{margin-top:14px!important}
/* kart1→kart2: 25→14 ; kart2→akkordeon: 55→~19 (bölmə paddinqi kompensasiya) */
body.tbnew .kredit-taksit-row{gap:14px!important;margin-bottom:-36px!important}
}

/* ===== MOBİL: kart şəkillərinin əzilməsi + dağılması (temanın öz baqı) =====
   Loqolar 32×32/1024×1024 → 40×25 "fill" ilə əzilirdi; kart şəkli 622×380 → 65×25.
   space-around isə onları kartın eninə səpələyirdi. */
@media(max-width:768px){
body.tbnew .kredit-taksit-row img{object-fit:contain!important;height:28px!important;width:auto!important;max-width:64px!important}
body.tbnew .kredit-taksit-row .taksit-wrap:last-child img{height:36px!important;max-width:88px!important}
/* paylanma temanın öz space-around-u ilə qalır (Ilkin: balanslı görünüş) — yalnız şaquli mərkəzləmə */
body.tbnew .kredit-taksit-row .left{align-items:center!important}
}

/* ödəniş üsulları mətn bloku */
body.tbnew .elementor-widget-wd_text_block{margin-bottom:4px!important}

/* ===== SOL TƏRƏF (qalereya): sağ sütunla bərabər, fold-a sığır ===== */
body.tbnew .wd-single-gallery .wd-carousel .wd-slide img,
body.tbnew .woocommerce-product-gallery__image img{max-height:470px!important;width:100%!important;
  object-fit:contain!important;margin:0 auto!important}
body.tbnew .wd-single-gallery .wd-gallery-thumb{max-height:470px!important;overflow:hidden}
body.tbnew .wd-gallery-thumb img{max-height:88px!important;object-fit:contain!important}

/* Mobildə yapışqan bar ƏLAVƏ ETMİRİK — temanın öz #mobile-bottom-bar-ı var
   (qiymət + kredit + Müraciət, z-index 999999). Dublikat yaratmamaq üçün çıxarıldı. */

/* ========== L2 (Klaster L, 2026-07-19): WhatsApp düyməsi toqquşmaları ==========
   Sübut (skrinşotlar pdp-analiz-2026-07-19/): 1600×900-də 24 ay "Müraciət et"i,
   1024×768-də taksit qutusunu, 812×375-də H1-i, 768 portretdə akkordeon başlığını örtürdü.
   Həll: PDP-də sol-alt künc (sağ-alt = konversiya zonasıdır: taksit + Müraciət et),
   ≤1024-də mobil toolbar-dan yuxarı, alçaq ekranda (landşaft telefon) yalnız ikon.
   Mobil portretdə (≤~600) plagin düyməni onsuz da göstərmir — qayda zərərsizdir.
   ROLLBACK: bu bloku sil. */
body.tbnew .qlwapp__container--bottom-right{right:auto!important;left:18px!important;bottom:14px!important}
@media(max-width:1024px){
body.tbnew .qlwapp__container--bottom-right{bottom:104px!important}
}
@media(max-height:520px){
body.tbnew .qlwapp__container--bottom-right{bottom:100px!important}
body.tbnew .qlwapp__button--button .qlwapp__text{display:none!important}
body.tbnew .qlwapp__button--button{padding:11px!important;border-radius:50%!important}
body.tbnew .qlwapp__button--button .qlwapp__icon{margin:0!important;font-size:22px!important}
}

/* ========== FAZA 2 (L3, 2026-07-20): mobil fold sıxlaşdırması ==========
   Ölçülmüş baza (375×812, staging): qiymət 1.15 ekran, ATC 1.20 ekran dərinlikdə;
   thumbs 88px, badge-lər 2 sətir, stok 2 sətir. Hədəf: ATC ≈1 ekran.
   ROLLBACK: bu bloku sil (+title.php-dəki .tb-badges wrapper-i). */
@media(max-width:768px){
/* badge-lər: tək sətir, barmaqla sürüşən zolaq */
body.tbnew .tb-badges{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;
  padding-bottom:2px;margin:0 0 6px;scrollbar-width:none;-ms-overflow-style:none;
  -webkit-overflow-scrolling:touch}
body.tbnew .tb-badges::-webkit-scrollbar{display:none}
body.tbnew .tb-badges .tb-badge{flex:0 0 auto;white-space:nowrap;margin:0!important}
/* qalereya thumb-ları: 88 → 52px */
body.tbnew .wd-gallery-thumb img{max-height:52px!important}
body.tbnew .wd-single-gallery .wd-gallery-thumb{max-height:60px!important}
/* stok: 2 sətir → 1 sətir */
body.tbnew .stock_status_custom{flex-direction:row!important;flex-wrap:wrap;gap:4px 14px!important}
body.tbnew .stock_row{font-size:12px!important}
/* SKU + baxış sayı: mərkəzlənmiş sütun → sol, tək sətir */
body.tbnew .sku_wrapper_custom{width:100%!important;flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;gap:14px!important;margin-top:2px!important}
}

/* ===== 2. pdp-meta ===== */
/* ═══════════ STOK STATUSU — pill ═══════════ */
/* ⚠️ Valideyn `.product_meta.wd-layout-default` ARTIQ flex-row + space-between + gap:10px-dir
   → stok SOLDA, SKU SAĞDA, eyni sətirdə. Bu blokların öz margin-i OLMAMALIDIR (yoxsa sətir qırılır
   və blok hündürlüyü artır — ölçüldü: width:100% verdikdə +23px) */
body.tbnew .stock_status_custom{
	display:flex !important; flex-direction:row !important; flex-wrap:wrap;
	gap:7px !important; margin:0 !important; padding:0 !important;
}
body.tbnew .stock_status_custom .stock_row{
	display:inline-flex !important; align-items:center; gap:6px;
	margin:0 !important; padding:6px 11px !important;
	font-size:12.5px !important; font-weight:600 !important; line-height:1 !important;
	letter-spacing:.005em;
	border-radius:20px;
	background:#F1F5FA; color:#5C6A83;
	white-space:nowrap;
}
/* ALL CAPS → cümlə hərfi (mətn dəyişmir, yalnız göstərilir) */
body.tbnew .stock_status_custom .stock_row > span{
	display:inline-block;
	text-transform:lowercase !important;
	line-height:1 !important;
}
body.tbnew .stock_status_custom .stock_row > span::first-letter{ text-transform:uppercase; }
body.tbnew .stock_status_custom .stock_row > span:first-child{ font-weight:600; opacity:.85; }
body.tbnew .stock_status_custom .stock_in,
body.tbnew .stock_status_custom .stock_out{ font-weight:700 !important; }
/* vəziyyət nöqtəsi — pill-in ƏVVƏLİNDƏ (dəyərin ::before-una qoysaq ::first-letter nöqtəyə düşür
   və "Mövcuddur" kiçik hərflə qalır — ölçüldü) */
body.tbnew .stock_status_custom .stock_row::before{
	content:""; display:inline-block; flex:0 0 auto;
	width:6px; height:6px; border-radius:50%;
	background:currentColor;
}
body.tbnew .stock_status_custom .stock_in{ color:#237C53 !important; }
body.tbnew .stock_status_custom .stock_out{ color:#C0392B !important; }
/* pill fonu vəziyyətə görə (:has dəstəkləyən brauzerdə; yoxsa neytral fon qalır — hər halda oxunaqlı) */
body.tbnew .stock_status_custom .stock_row:has(.stock_in){ background:#E8F6EF; color:#237C53; }
body.tbnew .stock_status_custom .stock_row:has(.stock_out){ background:#FDECEC; color:#C0392B; }

/* ═══════════ SKU + BAXIŞ — zərif meta sətri ═══════════ */
body.tbnew .sku_wrapper_custom{
	display:flex !important; flex-direction:row !important;
	align-items:center !important; justify-content:flex-end !important;
	gap:14px !important;
	width:auto !important; margin:0 !important; padding:0 !important;
	font-size:12px !important; line-height:1 !important;
}
body.tbnew .sku_wrapper_custom .sku_left{
	display:inline-flex !important; align-items:center; gap:5px;
	margin:0 !important; padding:0 !important;
}
body.tbnew .sku_wrapper_custom .meta-label{
	font-size:11.5px !important; font-weight:500 !important; color:#A6B2C6 !important;
	text-transform:none !important; letter-spacing:0 !important;
}
body.tbnew .sku_wrapper_custom .sku{
	font-family:ui-monospace,SFMono-Regular,Menlo,monospace !important;
	font-size:11.5px !important; font-weight:600 !important; color:#6B7A93 !important;
	letter-spacing:.01em;
}
body.tbnew .product_views_custom{
	display:inline-flex !important; align-items:center; gap:4px;
	margin:0 !important; padding:0 !important;
	color:#A6B2C6 !important;
}
body.tbnew .product_views_custom .view_icon{
	width:13px !important; height:13px !important;
	stroke:currentColor !important; opacity:.9;
}
body.tbnew .product_views_custom .view_count{
	font-size:11.5px !important; font-weight:600 !important; color:#A6B2C6 !important;
}

/* ═══════════ ÇATDIRILMA BANNERİ — yığcam, sol aksent ═══════════ */
body.tbnew .techbar-product-banner .tb-banner-inner{
	display:flex !important; align-items:center; gap:11px !important;
	background:#F2F7FF !important;
	border-left:3px solid #1A62E7;
	border-radius:9px !important;
	padding:11px 14px !important;
	margin:0 !important;
}
body.tbnew .techbar-product-banner img{
	width:22px !important; height:22px !important;
	flex:0 0 auto; object-fit:contain;
}
body.tbnew .techbar-product-banner .tb-delivery-text{
	font-size:13.5px !important; font-weight:600 !important;
	color:#3D4C66 !important; line-height:1.35 !important;
}

/* ═══════════ SPESİFİKASİYA SƏTRİ — oxunaqlı ritm ═══════════ */
body.tbnew .woocommerce-product-details__short-description,
body.tbnew .woocommerce-product-details__short-description p{
	font-size:13px !important; line-height:1.62 !important;
	color:#5C6A83 !important; margin:0 !important;
	letter-spacing:.002em;
}

/* ═══════════ MOBİL ═══════════ */
@media(max-width:768px){
	body.tbnew .stock_status_custom{ gap:6px !important; }
	body.tbnew .stock_status_custom .stock_row{
		font-size:11.5px !important; padding:5px 9px !important; gap:5px;
	}
	/* mobildə alt-alta (pdp-compact davranışı) — SKU sola hizalanır */
	body.tbnew .sku_wrapper_custom{
		width:100% !important; justify-content:flex-start !important; gap:12px !important;
	}
	body.tbnew .techbar-product-banner .tb-banner-inner{
		gap:9px !important; padding:9px 12px !important; border-radius:8px !important;
	}
	body.tbnew .techbar-product-banner img{ width:19px !important; height:19px !important; }
	body.tbnew .techbar-product-banner .tb-delivery-text{ font-size:12.5px !important; line-height:1.3 !important; }
	body.tbnew .woocommerce-product-details__short-description,
	body.tbnew .woocommerce-product-details__short-description p{ line-height:1.55 !important; }
}

/* ===== 3. Mobil alt panel ===== */
html, body {
            overflow-x: hidden;
        }

        body {
            transform: none !important;
        }

        .wd-page-wrapper,
        .website-wrapper,
        .elementor-section,
        .elementor-container,
        .elementor {
            transform: none !important;
        }

        #mobile-bottom-bar {
            position: fixed !important;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 70px;
            background: #fff;
            border-top: 1px solid #eee;
            display: flex !important;
            align-items: center;
            justify-content: space-around;
            padding: 10px;
            z-index: 999999;

            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }

        #mobile-bottom-bar .price del,
        #mobile-bottom-bar .price ins {
            display: block !important;
        }

        #mobile-bottom-bar .price del {
            opacity: 0.6;
            font-size: 13px;
        }

        #mobile-bottom-bar .price ins {
            font-weight: 600;
            font-size: 16px;
        }

        /* L4: bar daxili yeni elementlər */
        #mobile-bottom-bar {
            justify-content: space-between;
            gap: 8px;
        }

        .tb-bar-kredit {
            display: flex;
            flex-direction: column;
            gap: 1px;
            font-size: 12px;
            line-height: 1.25;
            color: #1d9a06;
            border: 1px solid #36C419;
            border-radius: 6px;
            padding: 5px 8px;
            text-decoration: none;
            white-space: nowrap;
            text-align: center;
            flex: 0 0 auto;
        }

        .tb-bar-kredit small {
            font-size: 10px;
            color: #4caf50;
        }

        #mobile-bottom-bar .tb-bar-atc {
            background: #1A62E7 !important;
            color: #fff !important;
            border: 0 !important;
            border-radius: 6px !important;
            padding: 11px 12px !important;
            font-size: 13px !important;
            font-weight: 600 !important;
            line-height: 1.2 !important;
            white-space: nowrap;
            flex: 1 1 auto;
            max-width: 170px;
            min-height: 0 !important;
            cursor: pointer;
        }
        #mobile-bottom-bar .tb-bar-atc:hover,
        #mobile-bottom-bar .tb-bar-atc:focus {
            background: #1450c8 !important;
            color: #fff !important;
        }

        .price-box{
            display: flex;
            flex-direction: column;
        }

        @media (min-width: 768px) {
            #mobile-bottom-bar {
                display: none !important;
            }
        }

/* ===== 4. TechBar Catalog UI əlavələri ===== */
.tbcu-stock{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:14px;font-weight:600;margin:0 0 10px;color:#1d2433;}
.tbcu-stock .tbcu-dot{width:9px;height:9px;border-radius:50%;background:#16a34a;flex:none;box-shadow:0 0 0 3px rgba(22,163,74,.15);}
.tbcu-stock.is-order .tbcu-dot{background:#1a62e7;box-shadow:0 0 0 3px rgba(26,98,231,.15);}
.tbcu-stock.is-out{color:#b42318;}
.tbcu-stock.is-out .tbcu-dot{background:#dc2626;box-shadow:0 0 0 3px rgba(220,38,38,.15);}
.tbcu-stock .tbcu-stock-alt{font-weight:600;color:#1a62e7;text-decoration:underline;}
.wd-single-price .price:has(.tbcu-pdp-monthly){flex-wrap:wrap;}
.tbcu-pdp-monthly{display:block;order:99;flex:0 0 100%;width:100%;margin-top:4px;font-size:14px;font-weight:500;line-height:1.3;}
.tbcu-stock .tbcu-wa-ask{margin:0;padding:4px 10px;font-size:13px;}
.tbcu-pdp-monthly a{color:#1a62e7;text-decoration:none;}
.tbcu-pdp-monthly a:hover{text-decoration:underline;}
.tbcu-pdp-monthly b{font-weight:700;}
.tbcu-wa-ask{display:inline-flex;align-items:center;gap:8px;margin:10px 0 0;padding:9px 14px;border-radius:8px;border:1px solid #25d366;color:#128c4a;background:#effcf4;font-weight:600;font-size:14px;text-decoration:none;}
.tbcu-wa-ask:hover{background:#dff7e8;color:#0d6e3a;}
