/**
 * مشخصات فنی محصول - استایل شیشه‌ای
 * Version: 1.0.1
 * Compatible with: LiteSpeed Cache, WP Rocket, W3 Total Cache
 */

/* ===== متغیرهای CSS ===== */
:root {
    --wc-specs-glass-bg: rgba(255, 255, 255, 0.15);
    --wc-specs-glass-border: rgba(255, 255, 255, 0.25);
    --wc-specs-glass-shadow: rgba(0, 0, 0, 0.1);
    --wc-specs-primary: #667eea;
    --wc-specs-secondary: #764ba2;
    --wc-specs-text-dark: #1a1a2e;
    --wc-specs-text-light: #4a4a6a;
}

/* ===== Wrapper اصلی ===== */
.wc-specs-table-wrapper {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.wc-specs-table-wrapper *,
.wc-specs-table-wrapper *::before,
.wc-specs-table-wrapper *::after {
    box-sizing: border-box;
}

.wc-specs-table-wrapper::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.wc-specs-table-wrapper::after {
    content: "";
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* ===== عنوان ===== */
.wc-specs-title {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--wc-specs-text-dark);
    margin: 0 0 20px 0;
    padding: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    line-height: 1.4;
}

.wc-specs-title::before {
    content: "📋";
    font-size: 1.2em;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.wc-specs-title::after {
    content: "";
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--wc-specs-primary), transparent);
    border-radius: 2px;
}

/* ===== جدول شیشه‌ای ===== */
.wc-specs-glass-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    position: relative;
    z-index: 1;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    background: var(--wc-specs-glass-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 8px 32px var(--wc-specs-glass-shadow),
        inset 0 1px 0 var(--wc-specs-glass-border);
    border: 1px solid var(--wc-specs-glass-border);
    table-layout: fixed;
}

.wc-specs-glass-table tbody {
    display: table-row-group;
}

.wc-specs-glass-table tr {
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    display: table-row;
}

.wc-specs-glass-table tr:hover {
    background: rgba(102, 126, 234, 0.08);
}

.wc-specs-glass-table tr:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wc-specs-glass-table th,
.wc-specs-glass-table td {
    padding: 16px 20px;
    text-align: right;
    vertical-align: middle;
    display: table-cell;
}

/* ===== ستون نام ویژگی ===== */
.wc-specs-glass-table td.spec-name {
    width: 35%;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.2) 0%, 
        rgba(118, 75, 162, 0.15) 100%
    );
    font-weight: 600;
    color: var(--wc-specs-text-dark);
    position: relative;
    font-size: 0.95em;
}

.wc-specs-glass-table td.spec-name::before {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, var(--wc-specs-primary), var(--wc-specs-secondary));
    border-radius: 0 4px 4px 0;
}

/* ===== ستون مقدار ===== */
.wc-specs-glass-table td.spec-value {
    background: rgba(255, 255, 255, 0.05);
    color: var(--wc-specs-text-light);
    font-size: 0.95em;
    line-height: 1.6;
}

/* ===== ردیف‌های زوج ===== */
.wc-specs-glass-table tr:nth-child(even) td.spec-name {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.25) 0%, 
        rgba(118, 75, 162, 0.2) 100%
    );
}

.wc-specs-glass-table tr:nth-child(even) td.spec-value {
    background: rgba(255, 255, 255, 0.08);
}

/* ===== آیکون تزئینی ===== */
.wc-specs-glass-table .spec-icon {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--wc-specs-primary), var(--wc-specs-secondary));
    border-radius: 8px;
    margin-left: 10px;
    font-size: 14px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

/* ===== پیام خالی ===== */
.wc-specs-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--wc-specs-text-light);
    font-size: 1.1em;
}

.wc-specs-empty::before {
    content: "📭";
    display: block;
    font-size: 3em;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* ===== ریسپانسیو - تبلت ===== */
@media screen and (max-width: 768px) {
    .wc-specs-table-wrapper {
        padding: 15px;
        margin: 20px 0;
        border-radius: 16px;
    }
    
    .wc-specs-glass-table,
    .wc-specs-glass-table tbody {
        display: block;
        width: 100%;
    }
    
    .wc-specs-glass-table tr {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        margin-bottom: 12px;
        border-radius: 12px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--wc-specs-glass-border);
    }
    
    .wc-specs-glass-table tr:not(:last-child) {
        border-bottom: 1px solid var(--wc-specs-glass-border);
    }
    
    .wc-specs-glass-table tr:last-child {
        margin-bottom: 0;
    }
    
    .wc-specs-glass-table td.spec-name,
    .wc-specs-glass-table td.spec-value {
        width: 100%;
        display: block;
        padding: 12px 15px;
    }
    
    .wc-specs-glass-table td.spec-name {
        border-radius: 0;
        font-size: 0.9em;
    }
    
    .wc-specs-glass-table td.spec-name::before {
        display: none;
    }
    
    .wc-specs-glass-table td.spec-value {
        padding-top: 8px;
    }
    
    .wc-specs-title {
        font-size: 1.2em;
    }
}

/* ===== ریسپانسیو - موبایل ===== */
@media screen and (max-width: 480px) {
    .wc-specs-table-wrapper {
        padding: 12px;
        margin: 15px 0;
        border-radius: 12px;
    }
    
    .wc-specs-title {
        font-size: 1.1em;
        gap: 8px;
    }
    
    .wc-specs-title::before {
        font-size: 1em;
    }
    
    .wc-specs-glass-table td.spec-name,
    .wc-specs-glass-table td.spec-value {
        padding: 10px 12px;
        font-size: 0.9em;
    }
    
    .wc-specs-glass-table .spec-icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
        margin-left: 8px;
    }
}

/* ===== تم تیره - سیستم ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --wc-specs-glass-bg: rgba(30, 30, 50, 0.6);
        --wc-specs-glass-border: rgba(255, 255, 255, 0.1);
        --wc-specs-text-dark: #f0f0f5;
        --wc-specs-text-light: #b0b0c0;
    }
}

/* ===== تم تیره - وودمارت ===== */
.dark-theme .wc-specs-table-wrapper,
[data-theme="dark"] .wc-specs-table-wrapper,
body.dark .wc-specs-table-wrapper,
.wd-dark .wc-specs-table-wrapper {
    --wc-specs-glass-bg: rgba(30, 30, 50, 0.6);
    --wc-specs-glass-border: rgba(255, 255, 255, 0.1);
    --wc-specs-text-dark: #f0f0f5;
    --wc-specs-text-light: #b0b0c0;
}

/* ===== انیمیشن ورود ===== */
.wc-specs-glass-table tr {
    -webkit-animation: wc-spec-fade-in 0.5s ease forwards;
    animation: wc-spec-fade-in 0.5s ease forwards;
    opacity: 0;
}

.wc-specs-glass-table tr:nth-child(1) { -webkit-animation-delay: 0.1s; animation-delay: 0.1s; }
.wc-specs-glass-table tr:nth-child(2) { -webkit-animation-delay: 0.15s; animation-delay: 0.15s; }
.wc-specs-glass-table tr:nth-child(3) { -webkit-animation-delay: 0.2s; animation-delay: 0.2s; }
.wc-specs-glass-table tr:nth-child(4) { -webkit-animation-delay: 0.25s; animation-delay: 0.25s; }
.wc-specs-glass-table tr:nth-child(5) { -webkit-animation-delay: 0.3s; animation-delay: 0.3s; }
.wc-specs-glass-table tr:nth-child(6) { -webkit-animation-delay: 0.35s; animation-delay: 0.35s; }
.wc-specs-glass-table tr:nth-child(7) { -webkit-animation-delay: 0.4s; animation-delay: 0.4s; }
.wc-specs-glass-table tr:nth-child(8) { -webkit-animation-delay: 0.45s; animation-delay: 0.45s; }
.wc-specs-glass-table tr:nth-child(9) { -webkit-animation-delay: 0.5s; animation-delay: 0.5s; }
.wc-specs-glass-table tr:nth-child(10) { -webkit-animation-delay: 0.55s; animation-delay: 0.55s; }

@-webkit-keyframes wc-spec-fade-in {
    from {
        opacity: 0;
        -webkit-transform: translateX(-20px);
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateX(0);
        transform: translateX(0);
    }
}

@keyframes wc-spec-fade-in {
    from {
        opacity: 0;
        -webkit-transform: translateX(-20px);
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateX(0);
        transform: translateX(0);
    }
}

/* ===== غیرفعال کردن انیمیشن برای کاربران حساس ===== */
@media (prefers-reduced-motion: reduce) {
    .wc-specs-glass-table tr {
        -webkit-animation: none;
        animation: none;
        opacity: 1;
    }
}
