/* ---- استایل‌های فرم فرانت‌اند ---- */
.warranty-inquiry-box {
    max-width: 550px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    direction: rtl;
    text-align: right;
}
.warranty-inquiry-box h3 {
    margin-bottom: 20px;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 700;
}
.warranty-inquiry-box .form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #d19d1e;
    border-radius: 10px;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}
.warranty-inquiry-box .form-group input:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.15);
}
.warranty-inquiry-box button {
    width: 100%;
    padding: 14px;
    background-color: #d19d1e;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.2s ease;
}
.warranty-inquiry-box button:hover {
    background-color: #d19d1e;
}

#warranty-result-container {
    max-width: 800px;
    margin: 20px auto;
    direction: rtl;
}

.warranty-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}
.print-card-btn {
    background: #16a34a;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}
.print-card-btn:hover { background: #15803d; }

/* ---- کارت گارانتی لوکس با ابعاد استاندارد A5 ---- */
.luxury-warranty-card {
    position: relative;
    width: 148mm;
    height: 210mm;
    margin: 0 auto;
    background: #2a1b0f; /* تم تاریک و سلطنتی سورمه‌ای/مشکی */
    color: #f8fafc;
    border: 3px solid #c5a059;
    border-radius: 16px;
    padding: 0 9mm;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    overflow: hidden;
}
.card-overlay-lines {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(197,160,89,0.05) 25%, transparent 25%), 
                linear-gradient(225deg, rgba(197,160,89,0.05) 25%, transparent 25%);
    background-size: 30px 30px;
    pointer-events: none;
}

/* ۱. لوگو بزرگتر و کاملاً در وسط قرار گرفت */
.card-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(197,160,89,0.2);
    padding-bottom: 15px;
}
.brand-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.card-logo {
    max-height: 130px; /* بزرگ‌تر شدن لوگو */
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}
.card-brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: #c5a059;
    letter-spacing: 0.5px;
}
.card-title-badge {
    background: linear-gradient(90deg, transparent, rgba(197,160,89,0.2), transparent);
    color: #ffffff;
    padding: 6px 25px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 30px;
    border-left: 2px solid #c5a059;
    border-right: 2px solid #c5a059;
}

.card-body {
    margin: 15px 0;
}
.card-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    border-bottom: 1px dashed rgba(248,250,252,0.1);
    padding-bottom: 8px;
}
.card-col { font-size: 0.95rem; color: #cbd5e1; }
.card-col strong { color: #ffffff; font-weight: 600; }
.card-col .gold-text { color: #c5a059; font-size: 1.05rem; font-weight: 700; }

.card-footer {
    border-top: 1px solid rgba(197,160,89,0.2);
    padding-top: 12px;
}
.footer-terms {
    font-size: 0.78rem;
    color: #94a3b8;
    text-align: justify;
    line-height: 1.8;
    margin-bottom: 15px;
}
.footer-contact {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #c5a059;
    background: rgba(0,0,0,0.3);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(197,160,89,0.1);
}

/* 🖨️ هندلینگ و جادوی پرینت تک‌صفحه‌ای اختصاصی A5 (حل مشکل صفحات اضافی) */
/* ==========================================================================
   🖨️ معماری مهندسی‌شده و یکپارچه پرینت تک‌صفحه‌ای A5 با کنترل تم هوشمند CSS
   ========================================================================== */
@media print {
    /* ۱. پیکربندی ابعاد فیزیکی کاغذ A5 عمودی و حذف اورفلوهای حاشیه‌ای مرورگر */
    @page {
        size: A5 portrait;
        margin: 0 !important;
    }

    /* ۲. تثبیت رنگ‌ها و لایه‌های پس‌زمینه در موتور رندر پرینتر */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        box-sizing: border-box;
    }

    /* ۳. قفل کردن اسکرول و ساختار اصلی سایت جهت جلوگیری از ساخت صفحات سفید اضافی */
    html, body {
        background: none !important;
        height: 100% !important;
        overflow: hidden !important;
    }
    
    body * { 
        visibility: hidden !important; 
    }
    
    /* ۴. نمایش انحصاری اسکلت کارت طلایی گارانتی */
    .luxury-warranty-card, .luxury-warranty-card * { 
        visibility: visible !important; 
    }
    
    .luxury-warranty-card {
        position: absolute !important;
        left: 0 !important; 
        top: 0 !important;
        width: 148mm !important;
        height: 210mm !important;
        padding: 15mm 12mm !important;
        margin: 0 !important;
        border: 3px solid #c5a059 !important;
        box-shadow: none !important;
        background: #0f172a !important; /* پیش‌فرض: تم لوکس تیره سورمه‌ای */
        overflow: hidden !important;
        page-break-inside: avoid !important;
        page-break-after: avoid !important;
    }
    
    .no-print, .warranty-inquiry-box, .warranty-alert-success, .toggle-theme-btn { 
        display: none !important; 
        visibility: hidden !important;
    }

    /* ==========================================================================
       🎯 جادوی سوییچ تم روشن فقط با CSS (بهینه برای پرینترهای سیاه و سفید)
       ========================================================================== */
    body.print-light-theme .luxury-warranty-card {
        background: #ffffff !important;
        color: #000000 !important;
        border: 3px solid #000000 !important;
    }
    
    body.print-light-theme .card-overlay-lines {
        display: none !important; /* حذف خطوط گرافیکی بک‌گراند برای وضوح متن */
    }
    
    body.print-light-theme .card-brand-name {
        color: #000000 !important;
    }
    
    body.print-light-theme .card-title-badge {
        background: #f1f5f9 !important;
        color: #000000 !important;
        border: 1px solid #000000 !important;
    }
    
    body.print-light-theme .card-col {
        color: #1e293b !important;
    }
    
    body.print-light-theme .card-col strong {
        color: #000000 !important;
    }
    
    body.print-light-theme .card-col .gold-text {
        color: #000000 !important; /* تبدیل رنگ طلایی به مشکی خالص غلیظ */
        font-weight: 800 !important;
    }
    
    body.print-light-theme .card-row {
        border-bottom: 1px dashed #cbd5e1 !important;
    }
    
    body.print-light-theme .rules-block {
        background: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
    }
    
    body.print-light-theme .rules-title {
        color: #000000 !important;
    }
    
    body.print-light-theme .rules-block ul li {
        color: #334155 !important;
    }
    
    body.print-light-theme .footer-terms {
        color: #475569 !important;
    }
    
    body.print-light-theme .footer-contact {
        background: #f1f5f9 !important;
        border: 1px solid #cbd5e1 !important;
        color: #000000 !important;
    }
}

/* نمایش تغییرات لایو تم روشن در محیط خود فرانت‌بک سایت قبل از پرینت */
body.print-light-theme .luxury-warranty-card {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #0f172a !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05) !important;
}
body.print-light-theme .luxury-warranty-card .card-overlay-lines { display: none; }
body.print-light-theme .luxury-warranty-card .card-brand-name { color: #0f172a !important; }
body.print-light-theme .luxury-warranty-card .card-title-badge { background: #f1f5f9 !important; color: #0f172a !important; border-color: #cbd5e1 !important; }
body.print-light-theme .luxury-warranty-card .card-col { color: #334155 !important; }
body.print-light-theme .luxury-warranty-card .card-col strong { color: #0f172a !important; }
body.print-light-theme .luxury-warranty-card .card-col .gold-text { color: #0f172a !important; }
body.print-light-theme .luxury-warranty-card .card-row { border-bottom-color: #f1f5f9 !important; }
body.print-light-theme .luxury-warranty-card .rules-block { background: #f8fafc !important; border-color: #e2e8f0 !important; }
body.print-light-theme .luxury-warranty-card .rules-title { color: #0f172a !important; }
body.print-light-theme .luxury-warranty-card .rules-block ul li { color: #475569 !important; }
body.print-light-theme .luxury-warranty-card .footer-terms { color: #64748b !important; }
body.print-light-theme .luxury-warranty-card .footer-contact { background: #f8fafc !important; border-color: #e2e8f0 !important; color: #0f172a !important; }
/* ---- ۳. استایل‌های مدرن و شکیل بخش مدیریت پیشخوان وردپرس ---- */
.warranty-admin-wrap {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    margin-top: 20px;
    max-width: 1100px;
}
.warranty-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 20px;
    margin-bottom: 25px;
}
.warranty-admin-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2a1b0f;
    margin: 0;
}
.warranty-btn-primary {
    background: #2563eb !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.warranty-btn-primary:hover { background: #1d4ed8 !important; }

.warranty-btn-success {
    background: #10b981 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer;
    text-decoration: none;
}
.warranty-modern-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.warranty-modern-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    padding: 14px;
    text-align: right;
    border-bottom: 2px solid #e2e8f0;
}
.warranty-modern-table td {
    padding: 14px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}
.warranty-badge-active { background: #dcfce7; color: #15803d; padding: 4px 10px; border-radius: 20px; font-weight: 600; font-size: 0.85rem;}
.warranty-badge-expired { background: #fee2e2; color: #b91c1c; padding: 4px 10px; border-radius: 20px; font-weight: 600; font-size: 0.85rem;}