.container2 {
    display: flex;
    direction: rtl;
    min-width: 100%;
    margin: 0 auto; 
    padding: 10px;
    box-sizing: border-box;
}

.sidebar {
    height: 100vh; 
    overflow-y: auto;
    position: sticky; 
    top: 0;
    flex-shrink: 0; 
    margin: 0 auto;
}

.sidebar .sidebar-content {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-content {
    flex-grow: 1; 
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
        
.product-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
}
        
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0,0,0,0.15);
}

.product-card-header {
    background-color: #f8f9fa;
    padding: 18px 25px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    gap: 20px;
}

.product-card-header .header-left {
    display: flex;
    align-items: center;
    gap: 15px; 
}
        
.product-card-header h4 {
    margin: 0;
    color: var(--primary);
    font-size: 1.25em;
}

.product-card-header .view-more {
    position: relative; 
    display: inline-flex; 
    align-items: center;
    gap: 8px;
    text-decoration: none; 
    color: #dd2900; 
    font-weight: bold;
    font-size: 1.0em;
    overflow: hidden; 
    transition: color 0.3s ease;
    margin-right: 30px;
    padding: 5px;
}

.product-card-header .view-more .wave-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #dd2900;
    background-size: 200% 100%; 
    animation: wave 2s linear infinite; 
    z-index: 1; 
    mix-blend-mode: screen; 
}

@keyframes wave {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%); 
    }
}

.product-card-header .view-more .arrow-icon {
    display: inline-block;
    font-size: 1.2em;
    transform: scaleX(-1); 
    transition: transform 0.3s ease; 
}

.product-card-header .view-more:hover {
    color: #b92200; 
}

.product-card-header .view-more:hover .arrow-icon {
    transform: scaleX(-1) translateX(5px); 
}

.product-card-header .header-right {
    display: flex;
    align-items: center;
}
        
.product-card-header .last-updated {
    font-size: 0.9em;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
}
        
.product-card-header .last-updated i {
    font-size: 1.1em;
    color: #007bff;
}

.product-card-header .last-updated .update-label {
    color: #666; 
}

.product-card-header .last-updated .update-date {
    color: #dc3545; 
    font-weight: bold; 
}

.product-table-container {
    padding: 25px;
    overflow-x: auto; 
}

.product-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px; 
    /* table-layout: fixed; */
    text-align: center;
}

.product-table th, .product-table td {
    padding: 12px;
    text-align: center;
    border: none;
    white-space: nowrap;
    width: max-content;
}

.product-table thead th {
    width: 100%;
    background-color: var(--primary-light); 
    color: #ffffff; 
    font-weight: bold;
    font-size: 0.9em;
    position: sticky; 
    top: 0;
    z-index: 10; 
    text-align: center;
}

.product-table tbody tr {
    background-color: #ffffff;
    box-shadow: 0 2px 7px rgba(0,0,0,0.08);
    border-radius: 6px;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
    width: fit-content;
    cursor: pointer;
}

.product-table tbody tr:nth-child(even) {
    background-color: #f8f9fa; 
}
        
.product-table tbody tr:nth-child(odd) {
    background-color: #f4f1f1; 
}

.product-table td {
    vertical-align: top; 
}

.product-table td.attribute-name-cell { 
    font-weight: 550;
    color: #333;
    background-color: #e0f2ff; 
    border-radius: 6px;
    position: sticky; 
    left: 0; 
    z-index: 5; 
}
         
.product-table td.attribute-name-cell::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #cce5ff;
}

.product-table td.value-cell {
    color: #555;
    background-color: inherit; 
}

.show-all-row {
    background: none !important;
    box-shadow: none !important;
}

.show-all-button-container {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
        
.show-all-button {
    width: 80%;
    background-color: var(--primary);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    font-family: 'Peyda';
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
        
.show-all-button:hover {
    background-color: var(--primary-hover-color);
    transform: translateY(-2px);
}

@media (max-width: 992px) {
    .container2 {
        flex-direction: column; 
    }           
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        box-shadow: 0 2px 7px rgba(0,0,0,0.1);
        border-left: none;
        border-bottom: 1px solid #e0e0e0;
    }
    .main-content {
        padding: 20px 15px;
    }
    .product-card-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    .product-card-header .header-left {
        margin-bottom: 10px; 
        width: 100%; 
        justify-content: space-between;
    }
    .product-card-header h4 {
        font-size: 1.1em;
    }
    .product-card-header .view-more {
        font-size: 0.8em;
    }
    .product-card-header .header-right {
        width: 100%;
    }
    .product-card-header .last-updated {
        margin-top: 10px;
        font-size: 0.8em;
    }
    .product-table-container {
        padding: 15px;
    }
    .product-table {
        min-width: 100%; 
    }
    .product-table th, .product-table td {
        white-space: normal; 
        padding: 10px 12px;
        font-size: 0.9em;
    }
    .product-table th {
        position: sticky; 
        top: 0;
    }
    .product-table td.attribute-name-cell {
        position: static; 
        width: 100%;
        display: block; 
        margin-bottom: 5px; 
        border-radius: 4px;
    }
    .product-table td.attribute-name-cell::after {
        display: none; 
    }
    .product-table td.value-cell {
        display: block;
        width: 100%;
    }
}

th, td {
    padding: 12px; 
    white-space: nowrap; 
    width: max-content;
}

.product-page {
    max-width: 90%;
    margin: 20px auto;
    padding: 0 15px;
}

/* سکشن بالای صفحه */
.product-hero {
    display: flex;
    gap: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    align-items: flex-start;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* ستون راست: تصویر */
.product-hero__image {
    flex: 0 0 30%;
    max-width: 30%;
}
.product-hero__image img {
    width: 90%;
    height: auto;
    border-radius: 6px;
    object-fit: none;
    background: #eee;
}

/* ستون وسط: اطلاعات اصلی */
.product-hero__main-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.product-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
}
.product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #00796b;
    margin-top: 30px;
}
.product-updated-at {
    font-size: 0.9rem;
    color: #777;
}

/* ستون چپ: مشخصات */
.product-hero__specs {
    flex: 0 0 30%;
    max-width: 30%;
    background: #fafafa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #eee;
}
.specs-title {
    margin-top: 0;
    font-size: 1.1rem;
    margin-bottom: 10px;
}
.specs-list {
    margin: 0;
    padding: 0;
}
.specs-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}
.specs-row:last-child {
    border-bottom: none;
}
.specs-row dt {
    font-weight: 600;
    color: #555;
}
.specs-row dd {
    margin: 0;
    font-weight: 400;
    color: #333;
}

/* سکشن دکمه‌ها */
.product-actions {
    margin-top: 20px;
    display: flex;
    gap: 30px;
}

.btn {
    border: none;
    cursor: pointer;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}

.btn-half {
    width: 50%;
}

/* دکمه راست: سفارش تلفنی */
.btn-primary {
    background: var(--primary);
    color: #fff;
    border-radius: 8px; /* چون راست به چپه */
}

/* دکمه چپ: پیش فاکتور */
.btn-secondary {
    background: #ffffff;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 8px;
}

/* سکشن نوسانات قیمت */
.product-price-history {
    margin-top: 25px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.section-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
}
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.tab-button {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'Peyda';
}
.tab-button.active {
    background: var(--primary-light);
    color: #fff;
    border-color: var(--primary-light);
}
.chart-container {
    width: 100%;
    height: 300px;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .product-hero {
        flex-direction: column;
    }
    .product-hero__image,
    .product-hero__specs {
        max-width: 100%;
        flex: 0 0 auto;
    }
    .product-actions {
        flex-direction: column;
        gap: 10px;
    }
    .btn-half {
        width: 100%;
        border-radius: 8px;
    }
    .btn-primary {
        border-radius: 8px;
    }
    .btn-secondary {
        border-radius: 8px;
    }
}

/* ===========================
   Responsive - Mobile
=========================== */
@media (max-width: 768px) {

    .product-hero {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    /* تصویر */
    .product-hero__image {
        flex: 100%;
        max-width: 100%;
        text-align: center;
    }

    .product-hero__image img {
        width: 100%;
        max-width: 280px;
        object-fit: contain;
    }

    /* اطلاعات */
    .product-hero__main-info {
        width: 100%;
        gap: 8px;
    }

    .product-title {
        font-size: 1.3rem;
        line-height: 1.7;
    }

    .product-price {
        margin-top: 5px;
        font-size: 1.2rem;
    }

    /* مشخصات */
    .product-hero__specs {
        flex: 100%;
        max-width: 100%;
        width: 90%;
    }

    .specs-title {
        font-size: 1rem;
    }

    .specs-row {
        font-size: 0.9rem;
        padding: 8px 0;
    }

    .specs-row dt {
        max-width: 45%;
    }

    .specs-row dd {
        max-width: 55%;
        text-align: left;
        word-break: break-word;
    }

     /* مخفی شدن سایدبار */
    .sidebar{
        display:none;
    }

    /* محتوای اصلی تمام عرض */
    .main-content{
        width:95%;
        padding:0;
        margin: 0 auto;
    }

    .container2{
        display:block;
        padding:5px;
    }

    /* هدر کارت */
    .product-card-header{
        flex-direction:column;
        align-items:flex-start;
        gap:10px;
        padding:12px;
    }

    .product-card-header .header-left{
        width:100%;
        display:block;
    }

    .product-card-header .view-more{
        display:inline-block;
        margin-right:0;
        margin-top:8px;
    }

    .product-card-header .header-right{
        width:100%;
    }

    /* جدول */

    .product-table-container{
        overflow-x:hidden;
        padding:5px;
    }

    .product-table{
        width:100%;
        table-layout:auto;
        border-collapse:collapse;
    }

    .product-table th,
    .product-table td{
        width:auto !important;
        white-space:normal !important;
        word-break:break-word;
        overflow-wrap:break-word;
        padding:10px 3px;
        text-align:center;
        font-size:12px;
        display:table-cell !important;
    }

    .product-table thead th{
        position:static;
        font-size: 10px;
    }

    .product-table td.value-cell{
        display:table-cell !important;
        width:auto !important;
    }

    .product-table td.attribute-name-cell{
        display:table-cell !important;
        width:auto !important;
    }

    .product-card-header{
        display:flex;
        flex-direction:column;
        align-items:stretch;
    }

    .product-card-header .header-left{
        width:100%;
        display:flex;
        justify-content:space-between;
        align-items:center;
        gap:10px;
    }

    .product-card-header .header-right{
        width:100%;
        margin-top:-12px;
    }

    .product-card-header h4{
        margin:0;
        font-size:16px;
    }

    .product-card-header .view-more{
        margin:0;
        white-space:nowrap;
    }

}

/*====================================
            FILTER
====================================*/

.filter-card{
    margin-top:20px;
    width:100%;
    box-sizing:border-box;
    margin-bottom:30px;
}

.filter-card form{
    display:block;
    width:100%;
}

.filter-card *{
    box-sizing:border-box;
}

#product-filter-form{
    width:100%;
}

/*==============================*/

.filter-group{
    border-radius:8px;
    overflow:hidden;
    background:#fff;
    display:block !important;
    width:100%;
}

/*==============================*/

.filter-toggle{
    width:100%;
    border:none;
    background:transparent;
    padding:14px 0;
    display:flex;
    justify-content:space-between;
    align-items:center;
    cursor:pointer;
    font-size:.95rem;
    font-weight:600;
    color:#222;
}

.filter-toggle:hover{
    color:#003d91;
    background:transparent;
}

.filter-toggle i{
    font-size:13px;
    transition:.3s;
}

/*==============================*/

.filter-content{
    display:none;
    border-top:1px solid #ececec;
    padding:12px;
    max-height:250px;
    overflow-y:auto;
}

/*==============================*/

.filter-content::-webkit-scrollbar{
    width:6px;
}

.filter-content::-webkit-scrollbar-thumb{
    background:#d0d0d0;
    border-radius:10px;
}

/*==============================*/

.filter-item{
    display:flex;
    align-items:center;
    cursor:pointer;
    margin-bottom:10px;
    font-size:.9rem;
    color:#333;
}

.filter-item:last-child{
    margin-bottom:0;
}

/*==============================*/

.filter-item input{
    margin-left:8px;
    width:16px;
    height:16px;
    cursor:pointer;
}

/*==============================*/

.filter-submit{
    width:100%;
    height:46px;
    border:none;
    border-radius:8px;
    background:#003d91;
    color:#fff;
    font-size:.95rem;
    font-weight:700;
    cursor:pointer;
    transition:.3s;
    margin-top:30px;
}

.filter-submit:hover{
    background:#0b57c5;
}

/*==============================*/

.filter-reset{
    display:block;
    margin-top:12px;
    text-align:center;
    text-decoration:none;
    color:#666;
    font-size:.9rem;
    transition:.3s;
}

.filter-reset:hover{
    color:#003d91;
}

/*==============================*/

.filter-toggle.active{
    color:#003d91;
}

.filter-toggle.active i{
    transform:rotate(180deg);
}

/*==============================*/

@media(max-width:768px){

    .filter-card{
        margin-top:15px;
    }

    .filter-content{
        max-height:180px;
    }

}

.sidebar{
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar::-webkit-scrollbar{
    display: none;
}

.price-cell{
    font-weight: 700;
}



