/* ==================== DESCRIPTION ==================== */
#description > p {
    line-height: 40px !important;
}

/* ==================== SLIDER ==================== */
#slider-container {
    transition: opacity 0.7s ease-in-out;
}

.opacity-0 {
    opacity: 0;
}

/* ==================== PHONE BOX ==================== */
.compact-phone-box {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    min-width: 0;
}

.compact-phone-box:hover {
    background: #e3f2fd;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.phone-icon {
    color: #3498db;
    margin-left: 10px;
    font-size: 16px;
    flex-shrink: 0;
}

.phone-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
    min-width: 0;
    gap: 8px;
}

.phone-title {
    color: #7f8c8d;
    font-size: 14px;
    white-space: nowrap;
}

.phone-number {
    color: #2c3e50;
    font-weight: 700;
    font-size: 16px;
    direction: ltr;
    white-space: nowrap;
}

.compact-phone-box:hover .phone-number {
    color: #2980b9;
}

.action-btn {
    background: transparent;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    padding: 5px;
    margin-right: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.compact-phone-box:hover .action-btn {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

@media (max-width: 650px) {
    .compact-row { flex-direction: column; }
    .compact-phone-box { width: 100%; }
    .phone-content { flex-wrap: wrap; justify-content: center; }
}

/* ==================== TABLE (CKEditor-ready) ==================== */
/* چون جدول از CKEditor می‌آید و wrapper نداریم، خود جدول را مهار می‌کنیم */
#description table {
    width: 100% !important;
    max-width: 100% !important;
    margin: 22px auto !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    table-layout: fixed !important;
    direction: rtl;
    font-size: 14px;
    line-height: 1.9;
    text-align: center;
    background: #fff;
    border: 1px solid #e8ecef !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    word-break: break-word;
    overflow-wrap: anywhere;
}

#description table th {
    background: linear-gradient(135deg, #54be73, #3ea85c) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 14px 12px !important;
    text-align: center !important;
    border: none !important;
    border-bottom: 2px solid #3ea85c !important;
    font-size: 14px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

#description table td {
    padding: 12px !important;
    background-color: #ffffff !important;
    color: #2c3e50 !important;
    border: none !important;
    border-bottom: 1px solid #e8ecef !important;
    vertical-align: middle !important;
    word-break: break-word;
    overflow-wrap: anywhere;
}

#description table tr:last-child td {
    border-bottom: none !important;
}

#description table tr:nth-child(even) td {
    background-color: #f8fbf9 !important;
}

#description table tr:hover td {
    background-color: #eef7f1 !important;
    transition: background-color 0.2s ease;
}

/* ستون اول: برچسب‌ها راست‌چین و متمایز */
#description table th:first-child,
#description table td:first-child {
    font-weight: 600 !important;
    text-align: right !important;
    background-color: #f1f8f4 !important;
    white-space: normal;
}

#description table tr:nth-child(even) td:first-child {
    background-color: #e8f4ec !important;
}

/* خنثی کردن استایل‌های inline خود CKEditor روی سلول‌ها */
#description table td[style],
#description table th[style] {
    background-clip: padding-box;
}

/* اگر CKEditor جدول را بدون thead آورد، سطر اول را هدر فرض نمی‌کنیم
   و رنگ سبز به کل سطر اول نمی‌خورد مگر th باشد — رفتار درست است */

@media (max-width: 768px) {
    #description table {
        font-size: 13px;
        margin: 16px auto !important;
        border-radius: 10px;
    }
    #description table th,
    #description table td {
        padding: 10px 8px !important;
    }
    #description table th { font-size: 13px; }
}

@media (max-width: 480px) {
    #description table { font-size: 12px; }
    #description table th,
    #description table td { padding: 8px 6px !important; }
}

/* ==================== UPDATE BADGE ==================== */
.update-badge {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dde1e6;
    border-radius: 50px;
    padding: 6px 16px 6px 12px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.update-badge:hover {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-color: #0c88a2;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(12, 136, 162, 0.2);
}

.update-badge .spinning-icon {
    display: inline-block;
    animation: spin 3s linear infinite;
    font-size: 14px;
    color: #0c88a2;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.update-badge .update-text {
    font-size: 12px;
    color: #4a5568;
    font-weight: 500;
}

.update-badge .update-date {
    font-size: 12px;
    color: #0c88a2;
    font-weight: 700;
}

@media (max-width: 768px) {
    .update-badge {
        padding: 4px 12px 4px 8px;
        gap: 5px;
        margin-bottom: 15px !important;
    }
    .update-badge .spinning-icon { font-size: 12px; }
    .update-badge .update-text,
    .update-badge .update-date { font-size: 11px; }
}

/* ==================== H1 ==================== */
h1.product-main-title {
    font-size: 18px !important;
    line-height: 1.6 !important;
    margin-top: 6px;
    font-weight: 700;
    color: #2c3e50;
}

@media (max-width: 768px) {
    h1.product-main-title { font-size: 20px !important; }
}