/**
 * استایل اختصاصی صفحه‌ی محصول (single-product.php) — نسخه‌ی متمرکز روی خود محصول
 * مکمل single-company.css است (کلاس‌های qc-* از اونجا میان: qc-breadcrumb, qc-box, qc-catalog-btn, qc-about-text)
 */

/* ===================== هیرو محصول (گالری + اطلاعات) ===================== */
.qp-hero {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 24px;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(20,30,60,0.06);
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0 24px;
}
@media (max-width: 900px) {
    .qp-hero {
        grid-template-columns: 1fr;
        padding: 16px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    /* رفع سرریز عکس/گالری از قاب: بدون این، گرید/فلکس چایلدها یه min-width
       نامرئی دارن که نمی‌ذاره درست جمع بشن تو عرض‌های کوچیک */
    .qp-hero > * {
        min-width: 0 !important;
        max-width: 100% !important;
    }
    .qp-gallery-main {
        width: 100% !important;
        max-width: 100% !important;
    }
    .qp-gallery-thumbs-track {
        min-width: 0 !important;
    }

    /* رفع سرریز تگ‌های بلند مثل «حوزه فناوری شرکت: ...» */
    .qp-hero-badges {
        min-width: 0 !important;
        max-width: 100% !important;
    }
    .qp-chip {
        max-width: 100% !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        white-space: normal !important;
    }
}

/* --- گالری --- */
.qp-gallery-main {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #0a1330;
}
.qp-gallery-main-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .25s ease;
}
.qp-gallery-main-img.is-active { opacity: 1; }
.qp-gallery-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255,255,255,0.4);
    font-size: 14px;
}
.qp-gallery-count {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
}
.qp-view360-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #042C53;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(4, 44, 83, 0.45);
    animation: qpView360Bounce 2.2s ease-in-out infinite;
}
.qp-view360-btn svg { width: 16px; height: 16px; }
.qp-view360-btn:hover {
    background: #0C447C;
    animation-play-state: paused;
}

@keyframes qpView360Bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@media (prefers-reduced-motion: reduce) {
    .qp-view360-btn { animation: none; }
}

.qp-gallery-thumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}
.qp-gallery-thumbs-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex: 1;
}
.qp-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    background: none;
}
.qp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qp-thumb.is-active { border-color: #26C094; }
.qp-thumb-nav {
    width: 28px;
    height: 28px;
    box-sizing: border-box;
    padding: 0;
    border-radius: 50%;
    background: #F3F5F9;
    border: 1px solid #E4E2DA;
    color: #042C53;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.qp-thumb-nav:hover { background: #185FA5; color: #fff; border-color: #185FA5; }

/* --- اطلاعات محصول --- */
.qp-hero-info { color: #042C53; display: flex; flex-direction: column; }
.qp-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.qp-hero-info h1 { font-size: 22px; font-weight: 700; margin: 0 0 8px; line-height: 1.5; }

.qp-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #8A8D97;
}
.qp-meta-sep { color: #C9CBD3; }
.qp-company-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #185FA5;
    text-decoration: none;
}
.qp-company-link svg { width: 15px; height: 15px; }
.qp-company-link:hover { color: #042C53; }

.qp-trl-row { margin-bottom: 14px; }
.qp-trl-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #E8F8F1;
    border: 1px solid #B9EBD8;
    color: #1FA983;
    font-size: 12px;
    font-weight: 700;
    border-radius: 10px;
    padding: 7px 12px;
    white-space: nowrap;
}
.qp-trl-badge small {
    font-weight: 400;
    font-size: 11.5px;
    color: #4C8A76;
    white-space: normal;
}

.qp-hero-badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.qp-chip {
    font-size: 12px;
    background: #F3F5F9;
    color: #33363F;
    padding: 4px 12px;
    border-radius: 20px;
}
.qp-chip-green {
    background: #E8F8F1;
    color: #1FA983;
}

.qp-hero-desc {
    font-size: 14px;
    line-height: 2;
    color: #5F5E5A;
    margin-bottom: 14px;
}

.qp-tags-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.qp-tag {
    font-size: 12px;
    color: #8A8D97;
}

.qp-catalog-btn { align-self: flex-start; margin-top: auto; }

/* ===================== مشخصات فنی ===================== */
.qp-specs-box h3, .qp-full-desc-box h3 {
    font-size: 17px;
    font-weight: 700;
    color: #042C53;
    margin: 0 0 18px;
}
.qp-specs-box, .qp-full-desc-box { margin-bottom: 24px; }

.qp-specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 24px;
}
@media (max-width: 700px) {
    .qp-specs-grid { grid-template-columns: 1fr; }
}
.qp-spec-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #F3F5F9;
    border-radius: 10px;
    font-size: 13.5px;
}
.qp-spec-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
}
.qp-spec-icon svg { width: 100%; height: 100%; }
.qp-spec-label { color: #5F5E5A; flex: 1; }
.qp-spec-value { color: #042C53; font-weight: 700; }

/* ===================== پاپ‌آپ نمای ۳۶۰ درجه ===================== */
.qp-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.qp-modal.is-open { display: flex; }
.qp-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6,16,49,0.75);
}
.qp-modal-box {
    position: relative;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    width: min(92vw, 700px);
    height: min(92vh, 700px);
}
.qp-modal-close {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #042C53;
}
.qp-modal-close:hover { background: #fff; }
.qp-modal-body { width: 100%; height: 100%; overflow: hidden; }
.qp-modal-body iframe {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border: 0;
    display: block;
}

.qp-updated-date {
    text-align: right;
    direction: rtl;
    font-size: 12px;
    color: #8A8D97;
    margin: 6px 0 4px;
}