/**
 * C4-AI Products Page Styles
 * نسخه 3.0.0 - با فیلتر، نمای لیستی و واردکردن از وردپرس
 */

/* ========== صفحه لیست محصولات ========== */
.products-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.products-header-info h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
}

.products-header-info h2 svg {
    width: 28px;
    height: 28px;
    stroke: var(--primary);
    fill: none;
    stroke-width: 2;
}

.products-header-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.products-header-stats {
    display: flex;
    gap: 16px;
}

.mini-stat {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 20px;
    text-align: center;
    min-width: 80px;
}

.mini-stat.active {
    background: var(--primary-50);
    border-color: var(--primary);
}

.mini-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.mini-stat.active .mini-stat-value {
    color: var(--primary);
}

.mini-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* تولبار جدید */
.products-toolbar-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.products-search-box {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0 16px;
    flex: 1;
    max-width: 400px;
    transition: var(--transition-base);
}

.products-search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-50);
}

.products-search-box svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
}

.products-search-box input {
    border: none;
    background: transparent;
    padding: 12px;
    flex: 1;
    font-size: 14px;
    outline: none;
}

.products-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
    fill: none;
    stroke-width: 2;
}

.btn-icon:hover {
    background: var(--primary-50);
    border-color: var(--primary);
}

.btn-icon:hover svg {
    stroke: var(--primary);
}

.btn-icon.warning:hover {
    background: #fef3c7;
    border-color: #f59e0b;
}

.btn-icon.warning:hover svg {
    stroke: #f59e0b;
}

/* گرید محصولات */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-base);
    position: relative;
}

.product-card:hover {
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.12);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.product-card.inactive {
    opacity: 0.6;
}

.product-card-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-50) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.product-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    margin-bottom: 12px;
}

.product-status.active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.product-card-header h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-price .current {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.product-price .original {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.status-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.closed {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.status-badge.open {
    background: rgba(34, 197, 94, 0.9);
    color: white;
}

.product-card-body {
    padding: 16px 20px;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-feature {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: var(--content-bg);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.product-card-footer {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--content-bg);
}

.product-card-footer .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    transition: var(--transition-base);
}

.product-card-footer .btn:hover {
    background: var(--primary-50);
    border-color: var(--primary);
}

.product-card-footer .btn svg {
    width: 18px;
    height: 18px;
}

.product-card-footer .btn-danger:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

.product-card-footer .btn-success {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

.product-card-footer .btn-success:hover {
    background: #16a34a;
}

.product-card-footer .btn-warning {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.product-card-footer .btn-warning:hover {
    background: #d97706;
}

/* Empty State */
.products-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
}

.products-empty svg {
    width: 80px;
    height: 80px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 1.5;
    margin-bottom: 20px;
}

.products-empty h3 {
    margin: 0 0 8px;
    color: var(--text-dark);
}

.products-empty p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Loading */
.products-loading {
    text-align: center;
    padding: 60px;
}

.products-loading .loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== صفحه ویرایشگر محصول ========== */
.product-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.btn-back:hover {
    background: var(--primary-50);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-back svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.product-editor-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

.product-editor-header .btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-editor-header .btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* لایوت ویرایشگر */
.product-editor-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    min-height: calc(100vh - 250px);
}

.product-editor-nav {
    background: var(--content-bg);
    padding: 20px 12px;
    border-left: 1px solid var(--border-color);
}

.product-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-base);
    margin-bottom: 4px;
    font-size: 14px;
}

.product-nav-item:hover {
    background: var(--card-bg);
    color: var(--text-dark);
}

.product-nav-item.active {
    background: var(--primary);
    color: white;
}

.product-nav-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}

.product-editor-content {
    padding: 24px;
    overflow-y: auto;
}

/* پنل‌ها */
.product-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.product-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-panel-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.product-panel-header h4 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.product-panel-header p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.product-panel-body {
    max-width: 700px;
}

/* فرم‌های مدرن */
.form-group-modern {
    margin-bottom: 20px;
}

.form-group-modern label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group-modern input,
.form-group-modern select,
.form-group-modern textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    background: var(--card-bg);
    transition: var(--transition-base);
}

.form-group-modern input:focus,
.form-group-modern select:focus,
.form-group-modern textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-50);
}

.form-group-modern textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group-modern .help-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-left: 80px;
}

.input-suffix {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--text-muted);
}

/* تاگل مدرن */
.toggle-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 20px;
}

.toggle-info h5 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.toggle-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.switch-modern {
    position: relative;
    width: 52px;
    height: 28px;
}

.switch-modern input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-modern {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.3s;
    border-radius: 28px;
}

.slider-modern:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.switch-modern input:checked + .slider-modern {
    background-color: var(--primary);
}

.switch-modern input:checked + .slider-modern:before {
    transform: translateX(24px);
}

/* کارت تنظیمات */
.settings-card-modern {
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.settings-card-modern h5 {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.settings-card-modern .hint-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ========== Time Picker جدید ========== */
.time-picker-container {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.time-picker-box {
    flex: 1;
    min-width: 140px;
}

.time-picker-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.time-picker-label svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.time-picker-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8fafc, #fff);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-picker-display:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, #eef2ff, #fff);
}

.time-picker-display .time-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    font-family: 'Roboto Mono', monospace;
    letter-spacing: 2px;
}

.time-picker-display svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
    transition: transform 0.2s;
}

.time-picker-display:hover svg {
    transform: translateY(2px);
    stroke: var(--primary);
}

.time-picker-arrow {
    display: flex;
    align-items: center;
    padding-top: 28px;
}

.time-picker-arrow svg {
    width: 28px;
    height: 28px;
    stroke: var(--primary);
    fill: none;
    stroke-width: 2;
}

.time-clear-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #fee2e2;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 28px;
    transition: all 0.2s;
}

.time-clear-btn svg {
    width: 18px;
    height: 18px;
    stroke: #ef4444;
    fill: none;
    stroke-width: 2;
}

.time-clear-btn:hover {
    background: #ef4444;
}

.time-clear-btn:hover svg {
    stroke: white;
}

.time-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    font-size: 13px;
    color: #047857;
}

.time-preview svg {
    width: 18px;
    height: 18px;
    stroke: #10b981;
    fill: none;
    stroke-width: 2;
}

/* ساعت ایران */
.iran-time-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 25px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #92400e;
}

.iran-time-box .iran-flag {
    font-size: 16px;
}

.iran-time-box .iran-time-now {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 16px;
    color: #78350f;
}

/* انتخاب ساعت ساده */
.simple-time-picker {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 16px;
    border: 2px solid var(--border-color);
    margin-bottom: 16px;
}

.time-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.time-input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.time-input-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 4px;
    transition: all 0.2s;
}

.time-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.time-input-wrap input {
    width: 50px;
    padding: 10px 8px;
    border: none;
    background: transparent;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
    text-align: center;
    color: var(--text-dark);
    outline: none;
}

.time-input-wrap input::placeholder {
    color: #cbd5e1;
}

.time-input-wrap input::-webkit-outer-spin-button,
.time-input-wrap input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.time-input-wrap input[type=number] {
    -moz-appearance: textfield;
}

.time-colon {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.time-arrow {
    font-size: 24px;
    color: var(--text-secondary);
    padding: 0 8px;
}

.simple-time-picker .time-clear-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #fecaca;
    background: #fef2f2;
    border-radius: 10px;
    color: #ef4444;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.simple-time-picker .time-clear-btn:hover {
    background: #fee2e2;
    border-color: #f87171;
}

/* ساعت‌های پیشنهادی */
.quick-times {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.quick-times button {
    padding: 8px 14px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.quick-times button:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* پیش‌نمایش ساده */
.time-preview-simple {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

@media (max-width: 500px) {
    .simple-time-picker {
        padding: 16px;
    }
    
    .time-input-wrap input {
        width: 40px;
        font-size: 18px;
        padding: 8px 6px;
    }
    
    .time-arrow {
        font-size: 20px;
        padding: 0 4px;
    }
    
    .quick-times button {
        padding: 6px 12px;
        font-size: 12px;
    }
}


/* انتخاب روزهای هفته */
.weekdays-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.weekday-item {
    position: relative;
}

.weekday-item input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.weekday-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-base);
    background: var(--card-bg);
}

.weekday-item:hover span {
    border-color: var(--primary);
    color: var(--primary);
}

.weekday-item input:checked + span {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Empty state mini */
.empty-state-mini {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.empty-state-mini svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 1.5;
    margin-bottom: 12px;
}

.terms-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

/* ========== ترم‌ها و جلسات ========== */
.terms-loading {
    text-align: center;
    padding: 40px;
}

.terms-loading .loader {
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: auto;
}

.terms-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.terms-empty svg {
    width: 48px;
    height: 48px;
    stroke: var(--border-color);
    fill: none;
    stroke-width: 1.5;
    margin-bottom: 16px;
}

.terms-empty p {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.terms-empty span {
    font-size: 13px;
}

/* لیست ترم‌ها */
.terms-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.term-item {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.2s;
}

.term-item:hover {
    border-color: var(--primary-light);
}

.term-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    background: var(--content-bg);
    transition: background 0.2s;
}

.term-header:hover {
    background: #f1f5f9;
}

.term-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.term-number {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.term-title h4 {
    margin: 0;
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 600;
}

.term-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.term-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.term-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.term-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-secondary);
    fill: none;
    stroke-width: 2;
}

.term-btn:hover {
    background: #eef2ff;
}

.term-btn:hover svg {
    stroke: var(--primary);
}

.term-btn.danger:hover {
    background: #fef2f2;
}

.term-btn.danger:hover svg {
    stroke: #ef4444;
}

.term-expand-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.term-expand-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
    fill: none;
    stroke-width: 2;
}

.term-expand-icon.expanded {
    transform: rotate(180deg);
}

/* جلسات */
.term-sessions {
    border-top: 1px solid var(--border-color);
    padding: 16px 20px;
    background: white;
}

.sessions-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 13px;
}

.sessions-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

.sessions-empty p {
    margin: 0;
    font-size: 13px;
}

.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.session-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: var(--content-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.15s;
}

.session-card:hover {
    border-color: var(--primary-light);
    background: #f8fafc;
}

.session-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.session-content {
    flex: 1;
    min-width: 0;
}

.session-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.session-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.session-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.session-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
}

.session-link svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke-width: 2;
}

.session-link.video {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.session-link.video svg {
    stroke: #dc2626;
    fill: #dc2626;
}

.session-link.video:hover {
    background: #fee2e2;
}

.session-link.file {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.session-link.file svg {
    stroke: #2563eb;
}

.session-link.file:hover {
    background: #dbeafe;
}

.session-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.session-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    border: 1px solid var(--border-color);
}

.session-btn svg {
    width: 14px;
    height: 14px;
    stroke: var(--text-secondary);
    fill: none;
    stroke-width: 2;
}

.session-btn:hover {
    background: #eef2ff;
    border-color: var(--primary);
}

.session-btn:hover svg {
    stroke: var(--primary);
}

.session-btn.danger:hover {
    background: #fef2f2;
    border-color: #f87171;
}

.session-btn.danger:hover svg {
    stroke: #ef4444;
}

.add-session-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    background: white;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.add-session-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.add-session-btn:hover {
    background: #eef2ff;
    border-color: var(--primary);
    color: var(--primary);
}

/* مودال جلسه */
.session-modal {
    max-width: 520px;
}

.session-modal .form-group {
    margin-bottom: 20px;
}

.session-modal label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.session-modal label .required {
    color: #ef4444;
}

.session-modal input,
.session-modal textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
}

.session-modal input:focus,
.session-modal textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.session-modal .form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* Old term styles - keeping for compatibility */
.term-card-old {
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-base);
}

.term-header-old h4 {
    margin: 0 0 4px;
    font-size: 15px;
    color: var(--text-dark);
}

.term-sessions-old {
    font-size: 13px;
    color: var(--text-secondary);
}

.term-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 992px) {
    .product-editor-layout {
        grid-template-columns: 1fr;
    }
    
    .product-editor-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        border-left: none;
        border-bottom: 1px solid var(--border-color);
        padding: 12px;
    }
    
    .product-nav-item {
        padding: 10px 14px;
    }
    
    .product-nav-item span {
        display: none;
    }
}

@media (max-width: 768px) {
    .products-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .products-toolbar-new {
        flex-direction: column;
    }
    
    .products-search-box {
        max-width: 100%;
    }
    
    .products-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row-2 {
        grid-template-columns: 1fr;
    }
    
    .time-picker-modern {
        flex-direction: column;
    }
    
    .time-separator {
        transform: rotate(90deg);
        padding: 0;
    }
    
    .product-editor-header {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .product-editor-header h2 {
        order: -1;
        width: 100%;
    }
}

/* ========== بهبود ویرایشگر محصول v2.6.0 ========== */

/* بهبود هدر ویرایشگر */
.product-editor-header {
    background: linear-gradient(135deg, var(--primary-50) 0%, transparent 100%);
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.product-editor-header h2 {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* بهبود کارت‌های محصول در لیست */
.product-card {
    position: relative;
    overflow: visible;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    border-radius: 0 16px 16px 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover::before {
    opacity: 1;
}

/* بهبود انتخابگر روز هفته */
.weekday-item span {
    position: relative;
    overflow: hidden;
}

.weekday-item span::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.weekday-item input:checked + span::after {
    opacity: 1;
}

/* بهبود تب‌های ویرایشگر */
.product-nav-item {
    position: relative;
}

.product-nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
    transition: height 0.2s;
}

.product-nav-item.active::before {
    height: 70%;
}

/* بهبود انتخاب ساعت */
.time-box {
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s;
}

.time-box:hover {
    border-color: var(--primary);
}

.time-inputs select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 4px center;
    padding-left: 20px;
}

/* بهبود پنل‌های محصول */
.product-panel-header {
    background: linear-gradient(135deg, var(--primary-50) 0%, transparent 100%);
    border-radius: 12px 12px 0 0;
    padding: 24px;
    margin: -24px -24px 24px;
    border-bottom: 1px solid var(--border-color);
}

/* انیمیشن برای تغییر تب */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.product-panel.active {
    animation: slideIn 0.3s ease;
}

/* بهبود Empty State */
.products-empty {
    background: linear-gradient(135deg, var(--content-bg) 0%, var(--card-bg) 100%);
}

.products-empty svg {
    animation: float 3s ease-in-out infinite;
}

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

/* بهبود دکمه‌های عملیات محصول */
.product-card-footer .btn {
    position: relative;
    overflow: hidden;
}

.product-card-footer .btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.2));
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card-footer .btn:hover::after {
    opacity: 1;
}

/* ========== استایل‌های جدید v3.0.0 ========== */

/* Mini Stats قابل کلیک */
.mini-stat {
    cursor: pointer;
    transition: all 0.2s ease;
}

.mini-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* نوار فیلتر */
.products-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--card-bg);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--content-bg);
    padding: 4px;
    border-radius: 8px;
}

.view-btn {
    padding: 8px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
}

.view-btn:hover svg {
    stroke: var(--primary);
}

.view-btn.active {
    background: var(--primary);
}

.view-btn.active svg {
    stroke: white;
}

/* نمای لیستی مدرن */
.products-list-modern {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.products-list-header-modern {
    display: grid;
    grid-template-columns: 40px 2fr 1fr 1fr 90px 110px 120px;
    gap: 12px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--content-bg) 0%, #f8fafc 100%);
    border-bottom: 2px solid var(--border-color);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.products-list-row {
    display: grid;
    grid-template-columns: 40px 2fr 1fr 1fr 90px 110px 120px;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    align-items: center;
    position: relative;
}

.products-list-row::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.products-list-row:hover {
    background: linear-gradient(135deg, var(--primary-50) 0%, rgba(99, 102, 241, 0.03) 100%);
}

.products-list-row:hover::before {
    opacity: 1;
}

.products-list-row:last-child {
    border-bottom: none;
}

.products-list-row.inactive-row {
    opacity: 0.6;
}

.products-list-row.inactive-row:hover {
    opacity: 0.9;
}

/* چک‌باکس */
.col-select {
    display: flex;
    align-items: center;
    justify-content: center;
}

.col-select input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* سلول محصول */
.col-product {
    display: flex;
    align-items: center;
}

.product-info-cell {
    display: flex;
    align-items: center;
    gap: 14px;
}

.product-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-50), rgba(99, 102, 241, 0.15));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.products-list-row:hover .product-avatar {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    transform: scale(1.05);
}

.product-avatar svg {
    width: 22px;
    height: 22px;
    stroke: var(--primary);
    fill: none;
    stroke-width: 2;
    transition: stroke 0.2s ease;
}

.products-list-row:hover .product-avatar svg {
    stroke: white;
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
}

.product-badges-row {
    display: flex;
    gap: 6px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
}

.badge-wp {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.badge-sales {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.badge-draft {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* وضعیت وردپرس */
.wp-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    margin-top: 4px;
}

.wp-status-badge.wp-published {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.wp-status-badge.wp-draft {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

/* ردیف پیش‌نویس */
.products-list-row.draft-row {
    background: rgba(245, 158, 11, 0.05);
    border-right: 3px solid #f59e0b;
}

/* ستون دسته‌بندی */
.col-category {
    display: flex;
    align-items: center;
    min-width: 120px;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.category-tag {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
}

.category-more {
    display: inline-block;
    padding: 3px 6px;
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
    border-radius: 4px;
    font-size: 10px;
}

.no-category {
    color: #9ca3af;
    font-size: 12px;
}

/* سلول قیمت */
.col-price {
    display: flex;
    align-items: center;
}

.price-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.current-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.old-price {
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* سلول وضعیت */
.col-status {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.status-badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.status-badge-modern.active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.status-badge-modern.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: statusPulse 2s infinite;
}

.status-badge-modern.active .status-dot {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.status-badge-modern.inactive .status-dot {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.3);
    animation: none;
}

@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

/* سلول ویژگی‌ها */
.col-features {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.feature-tag {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: help;
    transition: all 0.2s ease;
}

.feature-tag:hover {
    background: var(--primary-50);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.feature-tag svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-secondary);
    fill: none;
    stroke-width: 2;
    transition: stroke 0.2s ease;
}

.feature-tag:hover svg {
    stroke: var(--primary);
}

.feature-tag.feature-lock {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.feature-tag.feature-lock svg {
    stroke: var(--primary);
}

.feature-tag.feature-time {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.feature-tag.feature-time svg {
    stroke: #f59e0b;
}

.feature-tag.feature-closed {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    animation: warningPulse 1.5s infinite;
}

.feature-tag.feature-closed svg {
    stroke: #ef4444;
}

.feature-tag.feature-open {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

.feature-tag.feature-open svg {
    stroke: #22c55e;
}

@keyframes warningPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* سلول عملیات */
.col-actions {
    display: flex;
    align-items: center;
}

.action-buttons {
    display: flex;
    gap: 6px;
}

.action-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-secondary);
    fill: none;
    stroke-width: 2;
    transition: stroke 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-btn.action-edit:hover {
    background: var(--primary-50);
    border-color: var(--primary);
}

.action-btn.action-edit:hover svg {
    stroke: var(--primary);
}

.action-btn.action-open:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
}

.action-btn.action-open:hover svg {
    stroke: #22c55e;
}

.action-btn.action-close:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
}

.action-btn.action-close:hover svg {
    stroke: #f59e0b;
}

.action-btn.action-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.action-btn.action-delete:hover svg {
    stroke: #ef4444;
}

/* =============== نمای لیستی قدیمی (fallback) =============== */
.products-list {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.products-list-header {
    display: grid;
    grid-template-columns: 2fr 1fr 100px 120px 140px;
    gap: 16px;
    padding: 14px 20px;
    background: var(--content-bg);
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.products-list-item {
    display: grid;
    grid-template-columns: 2fr 1fr 100px 120px 140px;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s ease;
    align-items: center;
}

.products-list-item:last-child {
    border-bottom: none;
}

.products-list-item:hover {
    background: var(--primary-50);
}

.col-name strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.price-discount {
    color: var(--primary);
    font-weight: 600;
}

.price-original {
    color: var(--text-muted);
    text-decoration: line-through;
    font-size: 12px;
    margin-right: 8px;
}

.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-pill.active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.status-pill.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.feature-icon {
    font-size: 14px;
}

.feature-icon.warn {
    animation: pulse 1.5s infinite;
}

.feature-icon.success {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.btn-mini {
    padding: 6px 8px;
    border: none;
    background: var(--content-bg);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-mini:hover {
    background: var(--primary-50);
    transform: scale(1.1);
}

.btn-mini.danger:hover {
    background: #fef2f2;
}

/* بج وردپرس */
.wp-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    margin-right: 8px;
}

.wp-badge-sm {
    font-size: 10px;
    padding: 2px 4px;
    background: #3b82f6;
    color: white;
    border-radius: 3px;
    margin-right: 6px;
}

.product-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

/* بهبود ویژگی‌های کارت */
.product-feature {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.product-feature svg {
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.product-feature.highlight {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.product-feature.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

/* ========== مودال واردکردن از وردپرس ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999 !important; /* بالاترین z-index */
    backdrop-filter: blur(4px);
    opacity: 1 !important;
    visibility: visible !important;
    padding: 20px; /* فاصله از لبه‌ها */
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: auto; /* تغییر از hidden به auto برای اسکرول */
    animation: modalSlide 0.3s ease;
    position: relative;
    z-index: 10000 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-content.modal-lg {
    max-width: 800px;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--content-bg);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #fef2f2;
    color: #ef4444;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
}

/* وضعیت اتصال وردپرس */
.wp-status-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.wp-status-box.checking {
    background: #fef3c7;
    border: 1px solid #fcd34d;
}

.wp-status-box.connected {
    background: #dcfce7;
    border: 1px solid #86efac;
}

.wp-status-box.disconnected,
.wp-status-box.error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
}

.wp-status-icon {
    font-size: 24px;
}

.wp-status-text {
    flex: 1;
    font-size: 14px;
}

/* راهنمای نصب */
.wp-guide-box {
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.wp-guide-box h4 {
    margin: 0 0 12px;
    font-size: 16px;
}

.wp-guide-box ol {
    padding-right: 20px;
    margin: 0 0 16px;
}

.wp-guide-box li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* لیست محصولات وردپرس */
.wp-products-header {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.wp-products-header input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
}

.wp-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.wp-product-item {
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.2s ease;
}

.wp-product-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.wp-product-item.imported {
    opacity: 0.6;
}

.wp-product-img {
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    background: var(--card-bg);
}

.wp-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wp-product-info h4 {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.3;
}

.wp-product-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.wp-product-actions {
    display: flex;
    justify-content: center;
}

.imported-badge {
    color: #22c55e;
    font-size: 12px;
    font-weight: 600;
}

/* اتصال محصول به وردپرس */
.wp-product-linked {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f0fdf4;
    border-radius: 8px;
    margin-top: 12px;
}

.wp-linked-badge {
    padding: 4px 8px;
    background: #22c55e;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

/* دیباگ */
.debug-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

.debug-section summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 12px;
}

.debug-section pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 8px;
    font-size: 11px;
    overflow-x: auto;
    margin-top: 8px;
}

/* Loading & Empty states */
.loading-box,
.empty-box,
.error-box {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.error-box {
    color: #ef4444;
}

.loading-box .loader {
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

/* ========== بخش درون‌ریزی از وردپرس ========== */
.wp-import-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.wp-summary-item {
    flex: 1;
    text-align: center;
    padding: 20px;
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.wp-summary-item.success {
    background: #f0fdf4;
    border-color: #86efac;
}

.wp-summary-item.primary {
    background: var(--primary-50);
    border-color: var(--primary);
}

.wp-summary-num {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.wp-summary-item.success .wp-summary-num {
    color: #22c55e;
}

.wp-summary-item.primary .wp-summary-num {
    color: var(--primary);
}

.wp-summary-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.wp-import-actions {
    text-align: center;
    margin-bottom: 24px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
}

.btn-lg svg {
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.wp-all-imported {
    text-align: center;
    padding: 20px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 12px;
    color: #22c55e;
    font-weight: 600;
    margin-bottom: 24px;
}

.wp-all-imported span {
    font-size: 24px;
    margin-left: 8px;
}

.wp-products-list-preview {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.wp-products-list-preview h4 {
    margin: 0;
    padding: 14px 16px;
    background: var(--content-bg);
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.wp-products-table {
    max-height: 300px;
    overflow-y: auto;
}

.wp-product-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.wp-product-row:last-child {
    border-bottom: none;
}

.wp-product-row.imported {
    background: #f0fdf4;
}

.wp-row-status {
    width: 20px;
    text-align: center;
    font-size: 14px;
}

.wp-product-row.imported .wp-row-status {
    color: #22c55e;
}

.wp-row-name {
    flex: 1;
    font-weight: 500;
}

.wp-row-price {
    color: var(--primary);
    font-weight: 600;
    min-width: 100px;
    text-align: left;
}

.wp-row-id {
    color: var(--text-muted);
    font-size: 12px;
    min-width: 60px;
}

.wp-import-progress {
    text-align: center;
    padding: 60px 20px;
}

.wp-import-progress .loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.wp-import-progress p {
    font-size: 16px;
    color: var(--text-dark);
}

.wp-import-result {
    text-align: center;
    padding: 40px 20px;
}

.wp-result-icon {
    width: 60px;
    height: 60px;
    background: #22c55e;
    color: white;
    font-size: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.wp-import-result h3 {
    margin: 0 0 8px;
    color: var(--text-dark);
}

.wp-import-result p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.wp-import-result p.error {
    color: #ef4444;
}

/* Responsive */
@media (max-width: 1024px) {
    .products-list-header-modern,
    .products-list-row {
        grid-template-columns: 40px 1.5fr 1fr 1fr 80px 90px 100px;
        gap: 10px;
        padding: 14px 16px;
    }
    
    .col-category {
        min-width: 90px;
    }
    
    .category-tag {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .product-avatar {
        width: 38px;
        height: 38px;
    }
    
    .product-avatar svg {
        width: 18px;
        height: 18px;
    }
    
    .feature-tag {
        width: 28px;
        height: 28px;
    }
    
    .feature-tag svg {
        width: 14px;
        height: 14px;
    }
    
    .action-btn {
        width: 30px;
        height: 30px;
    }
    
    .action-btn svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 768px) {
    .products-filter-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-chips {
        width: 100%;
        justify-content: center;
    }
    
    /* لیست مدرن - موبایل */
    .products-list-header-modern {
        display: none;
    }
    
    .products-list-row {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        border-bottom: 1px solid var(--border-color);
        position: relative;
    }
    
    .products-list-row .col-select {
        position: absolute;
        top: 16px;
        left: 16px;
    }
    
    .products-list-row .col-product {
        width: 100%;
        padding-left: 40px;
    }
    
    .products-list-row .col-price {
        position: absolute;
        top: 16px;
        right: 16px;
    }
    
    .products-list-row .col-category {
        width: 100%;
        margin-top: 8px;
    }
    
    .products-list-row .col-status,
    .products-list-row .col-features,
    .products-list-row .col-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .products-list-row .col-features {
        padding-top: 8px;
        border-top: 1px solid var(--border-color);
    }
    
    .products-list-row .col-actions {
        justify-content: flex-end;
    }
    
    .action-buttons {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    /* لیست قدیمی - موبایل */
    .products-list-header,
    .products-list-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .products-list-header {
        display: none;
    }
    
    .products-list-item {
        display: flex;
        flex-wrap: wrap;
    }
    
    .col-name {
        width: 100%;
    }
    
    .wp-products-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .products-list-row .col-product {
        padding-left: 0;
    }
    
    .products-list-row .col-select {
        position: static;
        align-self: flex-start;
    }
    
    .product-info-cell {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .product-avatar {
        width: 50px;
        height: 50px;
    }
    
    .product-avatar svg {
        width: 24px;
        height: 24px;
    }
    
    .feature-tag {
        width: 36px;
        height: 36px;
    }
    
    .action-btn {
        width: 40px;
        height: 40px;
    }
}

/* ========== WordPress Import - New Modern UI ========== */

/* Header */
.wp-import-header {
    text-align: center;
    margin-bottom: 24px;
}

.wp-import-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--text-dark);
}

/* Empty State */
.wp-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.wp-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.wp-empty-state h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--text-dark);
}

.wp-empty-state p {
    margin: 0;
    color: var(--text-muted);
}

/* Stats Cards */
.wp-stats-cards {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.wp-stat-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--content-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.wp-stat-card.total { border-right: 4px solid #3b82f6; }
.wp-stat-card.success { border-right: 4px solid #22c55e; }
.wp-stat-card.pending { border-right: 4px solid #f59e0b; }

.wp-stat-icon {
    font-size: 28px;
}

.wp-stat-info {
    display: flex;
    flex-direction: column;
}

.wp-stat-num {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.wp-stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Import Action Box */
.wp-import-action-box {
    text-align: center;
    margin-bottom: 24px;
}

.wp-import-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.wp-import-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.wp-import-btn-icon {
    font-size: 20px;
}

/* All Done Message */
.wp-all-done {
    text-align: center;
    padding: 32px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 16px;
    margin-bottom: 24px;
}

.wp-done-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.wp-done-text {
    font-size: 18px;
    font-weight: 600;
    color: #16a34a;
}

/* Products List */
.wp-products-list {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.wp-products-list-header {
    padding: 14px 16px;
    background: var(--content-bg);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 14px;
}

.wp-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.wp-product-item:last-child {
    border-bottom: none;
}

.wp-product-item.imported {
    background: #f0fdf4;
}

.wp-product-item.pending {
    background: #fffbeb;
}

.wp-product-status {
    font-size: 18px;
}

.wp-product-info {
    flex: 1;
}

.wp-product-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.wp-product-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
}

.wp-product-price {
    color: var(--primary);
    font-weight: 500;
}

.wp-product-id {
    color: var(--text-muted);
}

/* Progress Container */
.wp-progress-container {
    padding: 40px 24px;
    text-align: center;
}

.wp-progress-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.wp-progress-icon {
    font-size: 24px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.wp-progress-bar-wrapper {
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}

.wp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #22c55e 100%);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.wp-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.wp-progress-current {
    padding: 12px 16px;
    background: var(--content-bg);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.wp-progress-results {
    max-height: 200px;
    overflow-y: auto;
    text-align: right;
}

.wp-result-item {
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 13px;
}

.wp-result-item.success {
    background: #f0fdf4;
    color: #16a34a;
}

.wp-result-item.error {
    background: #fef2f2;
    color: #dc2626;
}

/* Final Result */
.wp-final-result {
    text-align: center;
    padding: 48px 24px;
}

.wp-final-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.wp-final-result h3 {
    margin: 0 0 16px;
    font-size: 22px;
    color: var(--text-dark);
}

.wp-final-stats {
    font-size: 16px;
    margin: 8px 0;
}

.wp-final-stats.success {
    color: #16a34a;
}

.wp-final-stats.error {
    color: #dc2626;
}

.wp-close-btn {
    margin-top: 24px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wp-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Responsive */
@media (max-width: 600px) {
    .wp-stats-cards {
        flex-direction: column;
    }
    
    .wp-stat-card {
        padding: 12px;
    }
    
    .wp-stat-num {
        font-size: 20px;
    }
}
