/* =====================================================
   blog.css — بلاگ و مقالات
   ===================================================== */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--paper-050);
    border: 1px solid var(--paper-line);
    box-shadow: var(--shadow-card);
    transition: transform var(--duration-med) var(--ease-out), box-shadow var(--duration-med) ease;
}
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}
.blog-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}
.blog-card-thumb {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--paper-100);
}
.blog-card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}
.blog-card:hover .blog-card-thumb img { transform: scale(1.06); }

.blog-card-body {
    padding: 22px 24px 26px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.blog-date {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--magenta-600);
    margin-bottom: 10px;
    display: block;
}
.blog-card-body h2 {
    font-size: 17px;
    line-height: 1.45;
    margin-bottom: 10px;
}
.blog-card-body p {
    font-size: 14px;
    color: var(--ink-700);
    margin: 0 0 14px;
    line-height: 1.65;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-read-more {
    font-size: 13px;
    font-weight: 700;
    color: var(--magenta-600);
    margin-top: auto;
}

/* ---- Article detail ---- */
.blog-article { max-width: 780px; }
.blog-article-head { margin-bottom: 28px; }
.blog-article-head h1 {
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.3;
    margin: 8px 0 14px;
}
.blog-article-excerpt {
    font-size: 17px;
    color: var(--ink-700);
    line-height: 1.75;
    margin: 0;
}

.blog-article-image {
    margin: 0 0 32px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}
.blog-article-image img { width: 100%; display: block; }

.blog-prose {
    font-size: 16px;
    line-height: 1.9;
    color: var(--ink-700);
}
.blog-prose h2, .blog-prose h3 {
    color: var(--ink-900);
    margin: 32px 0 14px;
}
.blog-prose h2 { font-size: 22px; }
.blog-prose h3 { font-size: 18px; }
.blog-prose p { margin: 0 0 18px; }
.blog-prose ul, .blog-prose ol {
    margin: 0 0 18px;
    padding-inline-start: 24px;
}
.blog-prose li { margin-bottom: 8px; }
.blog-prose a {
    color: var(--magenta-600);
    text-decoration: underline;
}
.blog-prose img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: 20px 0;
}

.blog-article-footer {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--paper-line);
}

/* ---- کارت محصول داخل مقاله ---- */
.blog-product-embed-card {
    margin: 28px 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--paper-line);
    background: var(--paper-050);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: box-shadow var(--duration-med) ease, transform var(--duration-med) var(--ease-out);
}
.blog-product-embed-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.blog-product-embed-card.is-inline { margin: 22px 0; }

.blog-embed-link {
    display: flex;
    align-items: stretch;
    gap: 0;
    color: inherit;
}
.blog-embed-thumb {
    flex: 0 0 120px;
    background: var(--paper-100);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.blog-embed-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 100px;
}
.blog-embed-ph {
    font-size: 28px;
    font-weight: 800;
    color: var(--magenta-600);
    opacity: .5;
}
.blog-embed-info {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}
.blog-embed-info strong {
    font-size: 15px;
    line-height: 1.4;
    color: var(--ink-900);
}
.blog-embed-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--magenta-600);
}
.blog-embed-cta {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-700);
    margin-top: 4px;
}

.blog-linked-products-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--paper-line);
}
.blog-linked-products-section h2 {
    font-size: 20px;
    margin: 0 0 20px;
    color: var(--ink-900);
}
.blog-linked-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.blog-linked-products-grid .blog-product-embed-card { margin: 0; }
@media (max-width: 640px) {
    .blog-linked-products-grid { grid-template-columns: 1fr; }
    .blog-embed-thumb { flex-basis: 96px; }
}

/* بلاگ — هم‌خانواده با ویترین سرمه‌ای/طلایی */
body.page-blog {
    --blog-bg: #070811;
    --blog-surface: #111621;
    --blog-text: #f6f2e9;
    --blog-muted: #a9adba;
    --blog-gold: #e8c45e;
    --blog-line: rgba(255,255,255,.11);
    background: var(--blog-bg);
    color: var(--blog-text);
}
body.page-blog .site-header { background: rgba(7,11,19,.88); border-bottom: 1px solid var(--blog-line); box-shadow: none; }
body.page-blog .brand-name, body.page-blog .nav-icon-btn { color: var(--blog-text); }
body.page-blog .brand-tag, body.page-blog .nav-link { color: var(--blog-muted); }
body.page-blog .brand-mark { background: linear-gradient(135deg, #f7d775, #aa8126); box-shadow: 0 0 0 5px rgba(232,196,94,.1); }
body.page-blog .brand-mark::before, body.page-blog .brand-mark::after { display: none; }
body.page-blog .nav-panel { background: rgba(255,255,255,.04); border-color: var(--blog-line); }
body.page-blog .nav-actions { border-color: var(--blog-line); }
body.page-blog .nav-link:hover, body.page-blog .nav-link.is-active { color: #f7d775; background: rgba(232,196,94,.1); }
body.page-blog .nav-cta, body.page-blog .btn-primary { color: #17130b; background: linear-gradient(135deg, #f7d775, var(--blog-gold)); box-shadow: 0 10px 28px rgba(232,196,94,.17); }
body.page-blog .page-hero { background: linear-gradient(125deg, #152436, #101018 65%, #352b1b); }
body.page-blog .page-hero .ink-heading { color: var(--blog-text); }
body.page-blog .page-hero .ink-heading::before,
body.page-blog .page-hero .ink-heading::after { display: none; }
body.page-blog .breadcrumb-bar { background: #0d111b; border-color: var(--blog-line); }
body.page-blog .breadcrumb-light, body.page-blog .breadcrumb-light a { color: var(--blog-muted); }
body.page-blog .breadcrumb-light a:hover { color: #f7d775; }
body.page-blog .blog-category-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
body.page-blog .filter-pill { padding: 9px 17px; border: 1px solid var(--blog-line); border-radius: 999px; color: var(--blog-muted); background: rgba(255,255,255,.035); font-size: 13px; font-weight: 700; }
body.page-blog .filter-pill:hover { color: var(--blog-text); border-color: rgba(232,196,94,.45); }
body.page-blog .filter-pill.is-active { color: #17130b; background: var(--blog-gold); border-color: var(--blog-gold); }
body.page-blog .blog-card { background: linear-gradient(145deg, #151a27, #0c0f18); border-color: var(--blog-line); box-shadow: none; border-radius: 20px; }
body.page-blog .blog-card:hover { border-color: rgba(232,196,94,.52); box-shadow: 0 18px 42px rgba(0,0,0,.26); }
body.page-blog .blog-card-thumb { background: #171c29; }
body.page-blog .blog-date, body.page-blog .blog-read-more, body.page-blog .blog-card-category, body.page-blog .blog-article-category { color: #f7d775; }
body.page-blog .blog-card-body h2, body.page-blog .blog-article-head h1, body.page-blog .blog-prose h2, body.page-blog .blog-prose h3, body.page-blog .blog-linked-products-section h2, body.page-blog .blog-embed-info strong { color: var(--blog-text); }
body.page-blog .blog-card-body p, body.page-blog .blog-article-excerpt, body.page-blog .blog-prose, body.page-blog .blog-embed-cta { color: var(--blog-muted); }
body.page-blog .blog-article-image { border: 1px solid var(--blog-line); box-shadow: 0 20px 45px rgba(0,0,0,.25); }
body.page-blog .blog-prose a, body.page-blog .blog-embed-price { color: #f7d775; }
body.page-blog .blog-article-footer, body.page-blog .blog-linked-products-section { border-color: var(--blog-line); }
body.page-blog .blog-product-embed-card { background: var(--blog-surface); border-color: var(--blog-line); box-shadow: none; }
body.page-blog .blog-product-embed-card:hover { border-color: rgba(232,196,94,.52); box-shadow: 0 14px 34px rgba(0,0,0,.23); }
body.page-blog .blog-embed-thumb { background: #171c29; }
body.page-blog .btn-outline { color: var(--blog-text); border-color: var(--blog-line); }
body.page-blog .btn-outline:hover { color: #f7d775; border-color: var(--blog-gold); }

/* حالت روشنِ همین زبان بصری */
html[data-theme="light"] body.page-blog { --blog-bg: #f6f3ec; --blog-surface: #fff; --blog-text: #192031; --blog-muted: #627083; --blog-line: rgba(25,32,49,.13); background: var(--blog-bg); }
html[data-theme="light"] body.page-blog .site-header { background: rgba(255,255,255,.88); }
html[data-theme="light"] body.page-blog .nav-panel { background: rgba(25,32,49,.035); }
html[data-theme="light"] body.page-blog .brand-name, html[data-theme="light"] body.page-blog .nav-icon-btn { color: var(--blog-text); }
html[data-theme="light"] body.page-blog .page-hero { background: linear-gradient(125deg, #e9eff1, #f8f5ed 65%, #f5e5bc); color: var(--blog-text); }
html[data-theme="light"] body.page-blog .page-hero .ink-heading { color: var(--blog-text); }
html[data-theme="light"] body.page-blog .page-hero p { color: var(--blog-muted); }
html[data-theme="light"] body.page-blog .breadcrumb-bar { background: #eeece6; }
html[data-theme="light"] body.page-blog .blog-card { background: #fff; }
html[data-theme="light"] body.page-blog .blog-card-thumb, html[data-theme="light"] body.page-blog .blog-embed-thumb { background: #ece8df; }
