
/* کانتینر اصلی مشخصات فنی */
.hik-specs-container {
    display: flex;
    flex-direction: row; /* تغییر از row-reverse به row برای رفتن منو به سمت راست */
    gap: 0px;
    background: #ffffff !important;
    border: 1px solid #e1e4e8 !important;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 30px;
    font-family: inherit;
}

/* سایدبار سمت راست منو */
.hik-specs-sidebar {
    width: 25%;
    background-color: #f6f8fa !important;
    border-left: none; /* حذف خط سمت چپ قبلی */
    border-right: 1px solid #e1e4e8; /* اضافه کردن خط جداکننده به سمت راست باکس محتوا */
    padding: 10px 0;
}

.hik-specs-sidebar ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.hik-specs-sidebar ul li {
    padding: 14px 20px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    color: #444;
    border-right: 4px solid transparent;
    transition: all 0.2s ease;
    text-align: right;
    position: relative;
}

.hik-specs-sidebar ul li.active::before {
    content: "";
    position: absolute;
    right: 8px; /* قرارگیری دایره در سمت راست متن فارسی */
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: #d91a1a;
    border-radius: 50%;
}

/* افکت تب فعال */
.hik-specs-sidebar ul li.active, 
.hik-specs-sidebar ul li:hover {
    color: #d91a1a !important;
    background-color: #ffffff !important;
    padding-right: 24px; /* فضا دادن به سمت راست برای قرارگیری نقطه قرمز */
    padding-left: 20px;
}

/* باکس محتوای سمت چپ با اسکرول پویا */
.hik-specs-content {
    width: 75%;
    padding: 30px;
    max-height: 550px; /* تنظیم برای کنترل ارتفاع باکس اسکرولی */
    overflow-y: auto;
    background-color: #ffffff !important;
    position: relative;
    scroll-behavior: smooth;
}

/* پنهان کردن جدول پیش‌فرض ووکامرس */
.hik-specs-content > table.shop_attributes {
    display: none !important;
}

/* سکشن‌های پشت‌سر هم */
.hik-spec-group-section {
    display: block !important; /* همه سکشن‌ها لود می‌شوند تا اسکرول کار کند */
    margin-bottom: 40px;
}

.hik-spec-group-section:last-child {
    margin-bottom: 200px; /* فضای خالی در انتها برای ردیابی صحیح اسکرول آخرین تب */
}

/* عنوان هر سکشن */
.hik-spec-group-section h3 {
    font-size: 16px;
    color: #111;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 700;
    text-align: right;
}

/* کانتینر ردیف‌های بدون جدول */
.hik-rows-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* استایل هر ردیف مشخصه به سبک نمونه هایک‌ویژن */
.hik-spec-row {
    display: flex;
    flex-direction: row; /* ردیفی در دسکتاپ */
    background-color: #f8f9fa; /* بک‌گراند خاکستری ملایم */
    border-radius: 4px;
    padding: 12px 16px;
    align-items: center;
}

/* ستون نام ویژگی */
.hik-label-col {
    width: 30%;
    font-weight: 700;
    font-size: 13px;
    color: #333333;
    text-align: right;
    padding-left: 15px;
}

/* ستون توضیحات ویژگی */
.hik-value-col {
    width: 70%;
    font-size: 13px;
    line-height: 1.8;
    color: #555555;
    text-align: right;
    direction: ltr; /* مقادیر انگلیسی هایک‌ویژن چپ‌چین نمایش داده شوند */
}

/* بهینه‌سازی واکنش‌گرا (موبایل و تبلت) */
@media (max-width: 768px) {
    .hik-specs-container {
        flex-direction: column;
    }
    .hik-specs-sidebar {
        width: 100%;
        border-left: none;
        border-bottom: 1px solid #e1e4e8;
        padding: 0;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    .hik-specs-sidebar ul {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .hik-specs-sidebar ul li {
        border-right: none;
        padding: 12px 18px;
    }
    .hik-specs-sidebar ul li.active::before {
        display: none; /* حذف دایره قرمز روی موبایل جهت شلوغ نشدن */
    }
    .hik-specs-sidebar ul li.active {
        border-bottom: 3px solid #d91a1a !important;
        background-color: #ffffff !important;
        padding-right: 18px;
    }
    .hik-specs-content {
        width: 100%;
        max-height: none; /* اسکرول یکپارچه با خود صفحه در موبایل */
        padding: 20px;
    }
    .hik-spec-row {
        flex-direction: column; /* روی موبایل زیر هم قرار بگیرند */
        align-items: flex-start;
        gap: 6px;
    }
    .hik-label-col {
        width: 100%;
        padding-left: 0;
    }
    .hik-value-col {
        width: 100%;
        text-align: right; /* راست‌چین کردن مجدد توضیحات روی موبایل برای خوانایی بهتر */
    }
}
/* مخفی کردن المان‌های آکاردئون در دسکتاپ */
.hik-accordion-icon {
    display: none;
}

/* ==========================================
   استایل‌های اختصاصی موبایل (آکاردئون هایک‌ویژن)
   ========================================== */
@media (max-width: 768px) {
    /* تغییر ساختار اصلی کانتینر به حالت تک ستونه */
    .hik-specs-container {
        flex-direction: column !important;
        border: none !important;
        background: transparent !important;
    }

    /* پنهان کردن سایدبار دسکتاپ روی موبایل */
    .hik-specs-sidebar {
        display: none !important;
    }

    /* تنظیم باکس محتوا در موبایل */
    .hik-specs-content {
        width: 100% !important;
        max-height: none !important;
        padding: 0 !important;
        overflow-y: visible !important;
        background: transparent !important;
    }

    /* ساختار هر بخش آکاردئون */
    .hik-spec-group-section {
        margin-bottom: 0 !important;
        border-bottom: 1px solid #eee;
        background: #ffffff;
    }

    .hik-spec-group-section:last-child {
        margin-bottom: 0 !important;
    }

    /* هدر کشویی آکاردئون */
    .hik-accordion-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 16px 12px;
        cursor: pointer;
        user-select: none;
    }

    .hik-accordion-header h3 {
        margin: 0 !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #222 !important;
    }

    /* فلش کشویی (Chevron) */
    .hik-accordion-icon {
        display: inline-block !important;
        width: 10px;
        height: 10px;
        border-right: 2px solid #555;
        border-bottom: 2px solid #555;
        transform: rotate(45deg); /* جهت رو به پایین */
        transition: transform 0.3s ease;
        margin-left: 5px;
    }

    /* بدنه محتوا (در حالت عادی مخفی) */
    .hik-accordion-body {
        display: none;
        padding: 0 10px 15px 10px;
    }

    /* حالت باز شده آکاردئون */
    .hik-spec-group-section.hik-open .hik-accordion-body {
        display: block !important;
    }

    /* چرخش فلش به سمت بالا در حالت باز */
    .hik-spec-group-section.hik-open .hik-accordion-icon {
        transform: rotate(-135deg);
    }

    /* استایل ردیف مشخصات داخل آکاردئون */
    .hik-spec-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        background-color: transparent !important;
        border-bottom: 1px dashed #f0f0f0;
        padding: 10px 0 !important;
    }

    .hik-label-col {
        width: 100% !important;
        font-weight: 700 !important;
        color: #222 !important;
        padding-left: 0 !important;
        margin-bottom: 4px;
    }

    .hik-value-col {
        width: 100% !important;
        color: #666 !important;
        text-align: right !important; /* راست‌چین برای موبایل */
        direction: rtl !important;
    }
}