/*
Theme Name: Astra Child
Theme URI: https://wpastra.com/
Template: astra
Author: Your Name
Version: 1.0.0
Text Domain: astra-child
Description: قالب فرزند مهندسی شده ویژن‌تک - مدیریت متمرکز فونت و رنگ
*/

/* ==================================================
   1. Font Definitions (تعریف متمرکز فونت‌ها)
================================================== */
@font-face {
    font-family: 'alibaba';
    src: url('َassets/fonts/Alibaba-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* برای بهبود سرعت لود سئو */
}

@font-face {
    font-family: 'alibaba';
    src: url('assets/fonts/Alibaba-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

#page{
    margin-top:70px;
}

/* ==================================================
   2. Global Variables (متغیرهای سراسری سایت)
================================================== */
:root {
    --main-font: 'alibaba', sans-serif;

    /* پلت رنگی مرجع برای استفاده در فایل‌های دیگر */
    --brand-blue: #2563eb;    /* مخصوص وبلاگ */
    --brand-yellow: #FEDE00;  /* مخصوص فروشگاه */
    --brand-dark: #1b1b1b;    /* پس‌زمینه صفحات محصول */
}

/* ==================================================
   3. Global Resets & Typography
================================================== */
body, h1, h2, h3, h4, h5, h6, p, a, button, input, select, textarea {
    font-family: var(--main-font) !important;
}

/* تنظیمات کلی لینک‌ها */
a {
    text-decoration: none;
    transition: all 0.3s ease;
    font-family:alibaba;
}

/* رفع فاصله اضافی در بردکرامب‌ها که در فایل قبلی وجود داشت */
.trail-items li::after {
    padding: 0 0.5em;
    content: "/";
    color: #ccc;
}

/* ==================================================
   4. Utility Classes (کلاس‌های کمکی)
================================================== */
/* هر جا خواستی متنی را سریعاً به رنگ برند درآوری */
.text-brand-blue { color: var(--brand-blue); }
.text-brand-yellow { color: var(--brand-yellow); }

/* پنهان‌سازی المان‌های بلااستفاده (مثل فیلد URL در کامنت‌ها) */
.comment-form-url { display: none; }
@media (max-width: 770px) {
    .ksj-tw-wrapper p{
        display: none;
    }
}

/* بهبود فواصل و استایل منوی اصلی */
.main-navigation a {
    font-weight: 500 !important;
    letter-spacing: -0.2px; /* برای فونت‌های فارسی مثل علی‌بابا عالیه */
    padding: 0 15px !important; /* ایجاد فاصله بیشتر بین گزینه‌ها */
    transition: color 0.3s ease;
}

/* حذف کادر سنگین سبد خرید و تبدیل به استایل مینیمال */
.ast-site-header-cart-li a {
    border: none !important;
}

.ast-cart-menu-wrap .count {
    background-color: #f59e0b !important; /* استفاده از رنگ ثانویه برندت */
    font-size: 10px;
    top: -5px;
    right: -5px;
}

/* افکت هاور مهندسی‌شده برای منو */
.main-header-menu .menu-item:hover > a {
    color: #2563eb !important; /* رنگ آبی برند */
    position: relative;
}

.main-header-menu .menu-item:hover > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 15px;
    left: 15px;
    height: 2px;
    background: #2563eb;
    border-radius: 2px;
}
/* ثابت کردن هدر اصلی */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999; /* برای اینکه روی تمام المان‌ها و هیرو قرار بگیرد */
    transition: all 0.3s ease-in-out;
}

/* جلوگیری از پریدن محتوا به زیر هدر */
/* چون هدر Fixed شده، باید به بدنه سایت به اندازه ارتفاع هدر Padding بدیم */
body.ast-header-sticky-active {
    padding-top: 80px; /* این عدد را بر اساس ارتفاع هدر خودت تنظیم کن */
}

/* استایل هدر وقتی اسکرول انجام شده (حالت فشرده و شیک) */
.header-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px); /* افکت شیشه‌ای مدرن */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 5px 0 !important;
}

/* ==================================================
   Footer Specific Styles
================================================== */
.ksj-footer-wrapper {
    /* اطمینان از اعمال فونت اصلی در محیط ایزوله فوتر */
    font-family: var(--main-font, 'alibaba', sans-serif);
}

/* پترن شطرنجی بک‌گراند */
.footer-grid-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 0L0 0 0 40' fill='none' stroke='%23ffffff' stroke-width='1'/%3E%3C/svg%3E");
}

/* استایل و افکت منوهای فوتر */
.footer-link {
    color: #94a3b8; /* slate-400 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: inline-block;
}

/* هاور با حرکت ملایم به سمت راست (چون سایت فارسی است) */
.footer-link:hover {
    color: #f59e0b; /* رنگ زرد/نارنجی برند */
    transform: translateX(-5px);
}

/* استایل دکمه‌های شبکه‌های اجتماعی */
.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background-color: rgba(30, 41, 59, 0.8); /* slate-800 */
    border: 1px solid rgba(51, 65, 85, 0.8); /* slate-700 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1; /* slate-300 */
    transition: all 0.3s ease;
    text-decoration: none !important;
}

/* افکت بالا پریدن و درخشش در هاور شبکه‌های اجتماعی */
.social-btn:hover {
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* رنگ‌های اختصاصی هر شبکه در زمان هاور */
.social-btn.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-btn.telegram:hover {
    background-color: #26a5e4;
}

.social-btn.eitaa:hover {
    background-color: #f97316; /* رنگ نارنجی سازمانی ایتا */
}
/* تمام‌عرض کردن فوتر و خروج از کادر استرا */
.ksj-footer-wrapper {
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    width: 100vw !important;
    max-width: 100vw !important;
}

/* کشتن پدینگ‌ها و مارجین‌های پیش‌فرض فوتر استرا */
.site-footer,
.site-footer .ast-container,
.ast-footer-html-inner {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    border: none !important;
}
.site-below-footer-wrap {
    padding-top: 0px;
    padding-bottom: 0px;
}
/* ==================================================
   KSJ PURE CSS FOOTER (بدون نیاز به تیلویند)
================================================== */

/* کشتن محدودیت‌های استرا و تمام‌عرض کردن فوتر */
.site-footer, .ast-footer-html-inner { padding: 0 !important; margin: 0 !important; max-width: 100% !important; border: none !important; }

/* استایل بدنه اصلی فوتر */
.ksj-footer-wrap {
    background-color: #0f172a;
    color: #cbd5e1;
    border-top: 4px solid #f59e0b;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    width: 100vw !important;
    max-width: 100vw !important;
    direction: rtl;
    padding-top: 60px;
    font-family: var(--main-font, 'alibaba', sans-serif);
}

.ksj-footer-container {
    max-width: 1200px; /* تنظیم عرض محتوای داخلی */
    margin: 0 auto;
    padding: 0 20px;
}

/* گرید‌بندی ستون‌ها */
.ksj-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #1e293b;
}

@media (min-width: 768px) { .ksj-footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ksj-footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }

/* ستون هویت و درباره */
.ksj-footer-logo { font-size: 28px; font-weight: 900; color: #ffffff; margin-bottom: 15px; }
.ksj-footer-logo span { color: #f59e0b; }
.ksj-footer-desc { font-size: 13px; line-height: 1.9; color: #94a3b8; margin-bottom: 20px; }

.ksj-trust-box {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 12px 15px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.ksj-trust-box i { color: #f59e0b; font-size: 18px; margin-top: 2px; }
.ksj-trust-box span { font-size: 12px; font-weight: bold; color: #e2e8f0; line-height: 1.6; }

/* تیترها و لینک‌ها */
.ksj-footer-title { font-size: 16px; font-weight: bold; color: #ffffff; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.ksj-footer-title i { color: #f59e0b; font-size: 14px; }

.ksj-footer-links { list-style: none !important; padding: 0 !important; margin: 0 !important; display: flex; flex-direction: column; gap: 12px; }
.ksj-footer-links a { color: #94a3b8; font-size: 14px; text-decoration: none !important; transition: all 0.3s ease; display: inline-block; }
.ksj-footer-links a:hover { color: #f59e0b; transform: translateX(-5px); }

/* شبکه‌های اجتماعی */
.ksj-socials { display: flex; gap: 12px; }
.ksj-social-btn {
    width: 45px; height: 45px;
    border-radius: 12px;
    background-color: #1e293b;
    border: 1px solid #334155;
    display: flex; align-items: center; justify-content: center;
    color: #cbd5e1; font-size: 20px;
    transition: all 0.3s ease; text-decoration: none !important;
}
.ksj-social-btn.eitaa { font-size: 13px; font-weight: bold; }
.ksj-social-btn:hover { color: #ffffff; border-color: transparent; transform: translateY(-4px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3); }

.ksj-social-btn.instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.ksj-social-btn.telegram:hover { background-color: #26a5e4; }
.ksj-social-btn.eitaa:hover { background-color: #f97316; }

/* نوار کپی‌رایت */
.ksj-footer-bottom { padding: 20px 0; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: space-between; font-size: 12px; color: #64748b; font-weight: 500; }
.ksj-footer-bottom span { color: #cbd5e1; }
.ksj-en-text { font-family: sans-serif; letter-spacing: 1px; }

@media (min-width: 768px) { .ksj-footer-bottom { flex-direction: row; } }

#page .site-content {
    flex-grow: 1;
    background-color: #f8fafc;
}

.entry-meta {
    font-size: 0 !important; 
}

.entry-meta span {
    font-size: 15px !important; /* سایز فونت تاریخ و سایر موارد را برمی‌گرداند */
}


