/* =========================
   1. فونت‌ها (حرفه‌ای و استاندارد)
   ========================= */
@font-face {
    font-family: 'BYekan';
    src: url('/fonts/BYekan.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'IranSans';
    src: url('/fonts/IranSans.woff2') format('woff2');
    font-display: swap;
}

/* فونت پایه سایت – زیاد گلوبال خراب نکنه */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'BYekan', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.8;
    color: #222;
    background-color: #f5f7fb;
}

/* بخشی که باید IranSans باشه */
.item_date span.smaller,
span.float-end,
.main_content .page_date {
    font-family: 'IranSans', sans-serif;
}

/* =========================
   2. لینک‌ها و حالت‌ها
   ========================= */
a {
    color: #0d6efd;
    text-decoration: none;
    transition: color .2s ease;
}
a:hover {
    color: #0b5ed7;
}
a.btn_product {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #262283;
    color: #fff;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    transition: background .2s ease, box-shadow .2s ease, transform .15s ease;
}
a.btn_product:hover {
    background: #1e1c6a;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

/* =========================
   3. رنگ‌های اصلی (برای هماهنگی با باقی قالب)
   ========================= */
.bg-primary { background: #0d6efd !important; }
.text-primary { color: #0d6efd !important; }
.border-primary { border-color: #0d6efd !important; }

.bg-secondary { background: #6c757d !important; }
.text-secondary { color: #6c757d !important; }
.border-secondary { border-color: #6c757d !important; }

/* =========================
   4. محتوای اصلی فکت‌پلاست
   ========================= */

/* ظرف عمومی محتوا */
.main_content {
    padding: 20px 0 40px;
}
.main_content .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 12px;
}

/* متن مقاله‌ها */
.main_content .container p {
    text-align: justify;
    margin: 6px 0 10px;
    font-size: 0.95rem;
}

/* تیتر صفحات و زیرتیتر */
.page_title, .page-title, .main_content h1 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: #222;
}
.page_subtitle,
.category_subtitle {
    background: #0498d81f;
    border-radius: 15px;
    padding: 6px 12px;
    font-size: 0.9rem;
    color: #555;
    display: inline-block;
    margin-bottom: 12px;
}

/* عکس صفحه/دسته */
.page_image img,
.category_image img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px;
}

/* =========================
   5. کارت محصولات / نوشته‌ها
   ========================= */
.main_content .card {
    margin-bottom: 18px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
    border: 1px solid #e3e7f0;
    overflow: hidden;
    background: #fff;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.main_content .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    border-color: #c8d2ea;
}

.main_content .card .card-img-top {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

.main_content .card .card-header {
    padding: 8px 12px;
    text-align: right;
    color: #fff;
    background: linear-gradient(110deg, #0197db 0%, #262283 80%);
    font-size: 0.9rem;
}
.main_content .card .card-header a {
    color: #fff;
}

.main_content .card .card-body {
    padding: 12px 14px 14px;
}

/* قیمت محصول */
.main_content .card .product_price {
    margin-top: 12px;
    font-weight: 700;
    font-size: 1rem;
    color: #262283;
}

/* شبکه کارت‌ها در لیست‌ها */
.main_content .card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
@media (max-width: 991px) {
    .main_content .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 575px) {
    .main_content .card-grid {
        grid-template-columns: 1fr;
    }
    .main_content .card .card-img-top {
        height: 170px;
    }
}

/* =========================
   6. فوتر
   ========================= */
footer {
    background: #fff;
    color: #7b7b7b;
    padding: 14px 0;
    border-top: 1px solid #e5e5e5;
    font-size: 0.85rem;
}
footer a {
    color: #ff7200;
    transition: color .2s ease;
}
footer a:hover {
    color: #ff9a3a;
}
footer .btn {
    border-radius: 999px;
    background: #a3a3a3;
    border: 0;
    font-size: 11px;
    padding: 4px 10px;
}

/* =========================
   7. انتخاب متن – کمی برندسازی
   ========================= */
::selection {
    color: #000;
    background: #ffeb3b;
}
::-moz-selection {
    color: #000;
    background: #ffeb3b;
}

/* =========================
   8. حالت Dark Mode (اگر کلاس darkmode به body یا html بخوره)
   ========================= */
.darkmode {
    background: #111827;
    color: #cbd5f5;
}
.darkmode .main_content .card,
.darkmode .page_subtitle,
.darkmode .category_subtitle {
    background: #1f2933;
    color: #e5e7eb;
    border-color: #334155;
}
.darkmode a {
    color: #38bdf8;
}
.darkmode a:hover {
    color: #0ea5e9;
}
.darkmode footer {
    background: #020617;
    border-top-color: #111827;
    color: #9ca3af;
}
