/* === BRANDYOL Product Page Design v2 — Rey theme === */

/* AI Answer bloki */
.rey-wcPanel-inner .brandyol-ai-answer,
.brandyol-ai-answer {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%) !important;
    border: none !important;
    border-left: 4px solid #10b981 !important;
    border-radius: 12px !important;
    padding: 18px 22px !important;
    margin: 0 0 28px !important;
    font-size: 16px !important;
    line-height: 1.65 !important;
    color: #064e3b !important;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.08) !important;
}
.brandyol-ai-answer::before {
    content: "💡  ";
    font-size: 20px;
}

/* H3 sarlavhalar */
.rey-wcPanel-inner h3 {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 36px 0 18px !important;
    padding: 0 0 12px !important;
    border-bottom: 2px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Spec jadval */
.rey-wcPanel-inner table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 0 0 28px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
    background: #fff !important;
}
.rey-wcPanel-inner table tr { border: none !important; }
.rey-wcPanel-inner table tr:nth-child(odd) { background: #f8fafc !important; }
.rey-wcPanel-inner table tr:nth-child(even) { background: #fff !important; }
.rey-wcPanel-inner table td,
.rey-wcPanel-inner table th {
    padding: 14px 18px !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    font-size: 15px !important;
    vertical-align: top !important;
    text-align: left !important;
}
.rey-wcPanel-inner table tr:last-child td,
.rey-wcPanel-inner table tr:last-child th { border-bottom: none !important; }
.rey-wcPanel-inner table td:first-child,
.rey-wcPanel-inner table th:first-child {
    color: #64748b !important;
    font-weight: 500 !important;
    width: 38% !important;
}
.rey-wcPanel-inner table td:last-child,
.rey-wcPanel-inner table th:last-child {
    color: #0f172a !important;
    font-weight: 600 !important;
}

/* Преимущества — yashil check belgi */
.rey-wcPanel-inner ul:not(.bd-pdp-faq-list) {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 0 28px !important;
}
.rey-wcPanel-inner ul:not(.bd-pdp-faq-list) li {
    position: relative !important;
    padding: 9px 0 9px 36px !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
    color: #1e293b !important;
    border: none !important;
}
.rey-wcPanel-inner ul:not(.bd-pdp-faq-list) li::before {
    content: "✓" !important;
    position: absolute !important;
    left: 0 !important;
    top: 10px !important;
    width: 22px !important;
    height: 22px !important;
    background: #10b981 !important;
    color: white !important;
    border-radius: 50% !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

/* FAQ akkordeon */
.bd-pdp-faq {
    margin: 48px 0 32px !important;
    max-width: 100% !important;
    padding: 0 !important;
    
}
.bd-pdp-faq-title {
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 24px !important;
    text-align: left !important;
    position: relative !important;
}
.bd-pdp-faq-title::after {
    content: "" !important;
    display: block !important;
    width: 60px !important;
    height: 3px !important;
    background: linear-gradient(90deg, #10b981, #34d399) !important;
    margin: 12px 0 0 !important;
    border-radius: 2px !important;
}
.bd-pdp-faq-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding-left: 0 !important;
    list-style: none !important;
}
.bd-pdp-faq-item {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: #fff !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
.bd-pdp-faq-item:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}
.bd-pdp-faq-item[open] {
    border-color: #10b981 !important;
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.1) !important;
}
.bd-pdp-faq-item::before { display: none !important; }
.bd-pdp-faq-q {
    list-style: none !important;
    cursor: pointer !important;
    padding: 18px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    user-select: none !important;
}
.bd-pdp-faq-q::-webkit-details-marker { display: none !important; }
.bd-pdp-faq-q::marker { content: "" !important; display: none !important; }
.bd-pdp-faq-q > span:first-child {
    flex: 1 !important;
    padding-right: 14px !important;
}
.bd-pdp-faq-arrow {
    flex-shrink: 0 !important;
    width: 30px !important;
    height: 30px !important;
    background: #f1f5f9 !important;
    color: #64748b !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    transition: transform 0.25s ease, background 0.2s ease !important;
    line-height: 1 !important;
}
.bd-pdp-faq-item[open] .bd-pdp-faq-arrow {
    transform: rotate(180deg) !important;
    background: #10b981 !important;
    color: #fff !important;
}
.bd-pdp-faq-a {
    padding: 0 24px 20px !important;
    color: #475569 !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    border-top: 1px solid #f1f5f9 !important;
}
.bd-pdp-faq-a > div { padding-top: 16px !important; }

/* Смотрите также */
.km-internal-links {
    margin: 32px 0 0 !important;
    max-width: 100% !important;
    padding: 22px 26px !important;
    background: #f8fafc !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    
}
.km-internal-links p {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 12px !important;
}
.km-internal-links ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.km-internal-links ul li {
    padding: 6px 0 6px 22px !important;
    border: none !important;
    position: relative !important;
}
.km-internal-links ul li::before {
    content: "→" !important;
    position: absolute !important;
    left: 0 !important;
    top: 6px !important;
    color: #10b981 !important;
    font-weight: 700 !important;
    background: none !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
}
.km-internal-links ul li a {
    color: #0c4a6e !important;
    text-decoration: none !important;
    font-size: 15px !important;
    border-bottom: 1px solid transparent !important;
    transition: border-color 0.15s ease !important;
}
.km-internal-links ul li a:hover {
    border-bottom-color: #0c4a6e !important;
}

/* Mobil */
@media (max-width: 640px) {
    .bd-pdp-faq-title { font-size: 22px !important; }
    .bd-pdp-faq-q { padding: 14px 18px !important; font-size: 15px !important; }
    .bd-pdp-faq-a { padding: 0 18px 16px !important; font-size: 14px !important; }
    .rey-wcPanel-inner table td,
    .rey-wcPanel-inner table th { padding: 10px 14px !important; font-size: 14px !important; }
    .rey-wcPanel-inner h3 { font-size: 19px !important; }
}

/* ============================================
   v3 — Konversiya ierarxiyasi (2026-06-11)
   ============================================ */

/* --- 1. ABOVE-THE-FOLD IERARXIYA --- */
/* Cashback: katta blok -> kichik inline pill (narx yonida) */
.bd-cashback--single {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 14px !important;
    margin: 4px 0 10px !important;
    background: #fffbeb !important;
    border: 1px solid #fde68a !important;
    border-radius: 999px !important;
    font-size: 13.5px !important;
    color: #92400e !important;
    box-shadow: none !important;
}
.bd-cashback--single .bd-cashback__icon { font-size: 15px !important; }

/* Scarcity: katta qizil blok -> ingichka matn qatori */
.bd-pdp-stock-alert {
    background: none !important;
    border: none !important;
    padding: 2px 0 !important;
    margin: 2px 0 8px !important;
    font-size: 13.5px !important;
    color: #b91c1c !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: none !important;
}
.bd-pdp-stock-ico { font-size: 14px !important; }

/* Trust grid: kichikroq, engilroq */
.bd-pdp-trust {
    gap: 8px !important;
    padding: 12px 14px !important;
    margin: 10px 0 !important;
    background: #fafafa !important;
    border-radius: 10px !important;
}
.bd-pdp-trust-item { gap: 8px !important; }
.bd-pdp-trust-ico { font-size: 17px !important; }
.bd-pdp-trust-text strong { font-size: 12.5px !important; }
.bd-pdp-trust-text span { font-size: 11.5px !important; color: #94a3b8 !important; }

/* --- 2. TELEGRAM — ASOSIY CTA --- */
/* Ichki Telegram tugma: katta, ko'zga tashlanadigan */
.km-contact-btn.km-contact-tg {
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%) !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    padding: 15px 24px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 14px rgba(42, 171, 238, 0.35) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
    text-transform: none !important;
}
.km-contact-btn.km-contact-tg:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(42, 171, 238, 0.45) !important;
}

/* Floating qizil tugma: product sahifada yashirish (dublikat + kontent ustini yopadi) */
body.single-product a.telegram-btn { display: none !important; }

/* --- 3. DESCRIPTION O'QISH KENGLIGI --- */
/* Matn 880px dan oshmasin — optimal o'qish chizig'i (~75-85 belgi) */
.rey-wcPanel-inner > p,
.rey-wcPanel-inner > h2,
.rey-wcPanel-inner > h3,
.rey-wcPanel-inner > h4,
.rey-wcPanel-inner > ul,
.rey-wcPanel-inner > ol,
.rey-wcPanel-inner > table,
.rey-wcPanel-inner .brandyol-ai-answer {
    max-width: 880px !important;
}
.bd-pdp-faq { max-width: 880px !important; }
.km-internal-links { max-width: 880px !important; }

/* ============================================
   v4 — Summary blok yaxshilash (2026-06-11)
   ============================================ */

/* Narx — kattaroq, urg'uli */
.single-product .product .price,
.single-product .rey-priceWrapper .price {
    font-size: 30px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.5px !important;
}

/* H1 — pastki bo'shliqni kamaytirish */
.single-product .product_title {
    margin-bottom: 10px !important;
}

/* Brand qatori — ko'rinarliroq */
.single-product .rey-brandLink,
.single-product .rey-productBrands {
    margin: 4px 0 8px !important;
}
.single-product .rey-brandLink img,
.single-product .rey-productBrands img {
    max-height: 34px !important;
    width: auto !important;
}
.single-product .rey-brandLink a,
.single-product .rey-productBrands a {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    letter-spacing: 0.5px !important;
}

/* Yashil yetkazish bloki — ixchamroq */
#bd-delivery, .bd-delivery, [id^="bd-delivery"]:not(#bd-delivery-text) {
    padding: 10px 16px !important;
    margin: 8px 0 !important;
    font-size: 14px !important;
    border-radius: 10px !important;
}

/* Summary ichidagi vertikal ritm — zichroq */
.single-product .summary > * { margin-top: 8px !important; margin-bottom: 8px !important; }
.single-product .summary .bd-pdp-trust { margin: 8px 0 10px !important; }

/* Самовывоз kartalari ixchamroq */
.single-product .summary .km-pickup-stores,
.single-product .summary [class*="pickup"] { margin-top: 10px !important; }

/* Быстрый заказ — engilroq (asosiy emas) */
.single-product .rey-requestQuote-btn,
.single-product [class*="quick-order"], 
.single-product [class*="bd-quick"] {
    font-size: 14px !important;
}

/* Артикул/Категория/Метки — kichikroq, xiraroq */
.single-product .product_meta {
    font-size: 12.5px !important;
    color: #94a3b8 !important;
    margin-top: 14px !important;
}

/* ============================================
   v5 — Telegram ASOSIY CTA (2026-06-11)
   ============================================ */

/* Qator: yonma-yon -> ustma-ust (Telegram to'liq kenglikda birinchi) */
.km-contact-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
}

/* Telegram — eng katta, pulsli asosiy CTA */
.km-contact-btn.km-contact-tg {
    padding: 17px 24px !important;
    font-size: 17px !important;
    border-radius: 12px !important;
    animation: bd-tg-pulse 2.4s ease-in-out infinite;
}
@keyframes bd-tg-pulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(42, 171, 238, 0.35); }
    50% { box-shadow: 0 4px 22px rgba(42, 171, 238, 0.6); }
}

/* Telefon — ixcham ikkilamchi */
.km-contact-btn.km-contact-phone {
    padding: 10px 16px !important;
    font-size: 13.5px !important;
    background: #f0fdf4 !important;
    color: #15803d !important;
    border: 1.5px solid #bbf7d0 !important;
    box-shadow: none !important;
}
.km-contact-btn.km-contact-phone svg { fill: #15803d !important; }
.km-contact-btn.km-contact-phone:hover {
    background: #dcfce7 !important;
    transform: none !important;
}

/* "Добавить в корзину" — ikkilamchi darajaga biroz pasaytirish */
.single-product form.cart .single_add_to_cart_button {
    font-size: 14px !important;
}

/* ============================================
   v6 — MOBIL IDEAL (2026-06-11)
   ============================================ */
@media (max-width: 768px) {

    /* Summary zich, toza */
    .single-product .product_title {
        font-size: 20px !important;
        line-height: 1.3 !important;
        text-align: left !important;
        margin-bottom: 6px !important;
    }
    .single-product .product .price,
    .single-product .rey-priceWrapper .price {
        font-size: 26px !important;
    }

    /* Yon floating social ikonkalar — mobilda yashirish (kontent ustini yopadi) */
    .rey-stickySocial, [class*="sticky-social"], [class*="float-social"],
    .km-float-social { display: none !important; }

    /* Trust grid — 2x2 ixcham */
    .bd-pdp-trust {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        padding: 10px !important;
    }
    .bd-pdp-trust-text strong { font-size: 11.5px !important; }
    .bd-pdp-trust-text span { font-size: 10.5px !important; }

    /* Tugmalar — to'liq kenglik, 48px+ tap target */
    .single-product form.cart .single_add_to_cart_button {
        min-height: 48px !important;
        font-size: 15px !important;
    }
    .single-product form.cart .quantity,
    .single-product form.cart .quantity input.qty,
    .single-product form.cart .quantity .rey-qtyField,
    .single-product form.cart .quantity button {
        min-height: 48px !important;
        height: 48px !important;
    }
    .km-contact-btn.km-contact-tg {
        min-height: 52px !important;
        font-size: 16px !important;
        padding: 14px 18px !important;
    }
    .km-contact-btn.km-contact-phone { min-height: 44px !important; }

    /* Description: to'liq kenglik, kichik font */
    .rey-wcPanel-inner > p { font-size: 15px !important; line-height: 1.65 !important; }
    .rey-wcPanel-inner h3 { font-size: 18px !important; margin: 24px 0 12px !important; }

    /* Jadval — gorizontal siqilish, 2 ustun saqlanadi */
    .rey-wcPanel-inner table td,
    .rey-wcPanel-inner table th {
        padding: 9px 12px !important;
        font-size: 13.5px !important;
    }
    .rey-wcPanel-inner table td:first-child { width: 42% !important; }

    /* FAQ — katta tap target */
    .bd-pdp-faq-title { font-size: 20px !important; }
    .bd-pdp-faq-q {
        padding: 14px 16px !important;
        font-size: 14.5px !important;
        min-height: 48px !important;
    }
    .bd-pdp-faq-a { padding: 0 16px 14px !important; font-size: 14px !important; }
    .bd-pdp-faq-arrow { width: 26px !important; height: 26px !important; }

    /* Самовывоз kartalar ustma-ust */
    .km-loc { flex-direction: column !important; }

    /* STICKY PASTKI CTA BAR */
    .bd-sticky-cta {
        display: flex !important;
        position: fixed !important;
        bottom: 0; left: 0; right: 0;
        z-index: 9999;
        background: #fff;
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        gap: 12px;
        align-items: center;
    }
    .bd-sticky-cta .bd-sticky-price {
        font-size: 17px;
        font-weight: 800;
        color: #0f172a;
        white-space: nowrap;
    }
    .bd-sticky-cta .bd-sticky-tg {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
        color: #fff !important;
        font-weight: 700;
        font-size: 15px;
        min-height: 48px;
        border-radius: 12px;
        text-decoration: none !important;
        box-shadow: 0 3px 10px rgba(42,171,238,0.35);
    }
    /* Sahifa pastiga sticky bar uchun joy */
    body.single-product { padding-bottom: 76px !important; }
}

/* Desktop'da sticky bar yashirin */
@media (min-width: 769px) {
    .bd-sticky-cta { display: none !important; }
}

/* Sticky bar — korzina tugmasi */
.bd-sticky-cta .bd-sticky-cart {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-height: 48px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: #0f172a !important;
    text-decoration: none !important;
}
.bd-sticky-cta .bd-sticky-cart.added,
.bd-sticky-cta .bd-sticky-cart.loading { border-color: #10b981; color: #10b981 !important; }
.bd-sticky-cta .added_to_cart { display: none !important; }

/* ============================================
   Yagona 15px yon padding — product sahifa (2026-06-12)
   ============================================ */
.single-product div.product {
    max-width: min(1420px, calc(100vw - 30px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
/* Tavsif paneli — manfiy margin/stretchni bekor qilish */
.single-product .rey-wcPanels {
    max-width: min(1420px, calc(100vw - 30px)) !important;
    width: min(1420px, calc(100vw - 30px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
}

/* wcPanel ichki chap padding olib tashlandi (2026-06-12) */
.single-product .rey-wcPanels .rey-wcPanel {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Title tepadan nafas oladi (2026-06-12) */
.single-product div.product {
    padding-top: 28px !important;
}
@media (max-width: 768px) {
    .single-product div.product {
        padding-top: 12px !important;
    }
}
