/* ==============================================================
   قالب مشترک هدر و فوتر سایت (خَط‌وخال)
   بر اساس طرح صفحه‌ی اصلی (home.php) - منبع اصلی طراحی
   این فایل در تمام صفحاتی که هدر/فوتر عمومی سایت را دارند
   (صفحه اصلی، فروشگاه، صفحه محصول، تسویه‌حساب، صفحات ایستا) لود می‌شود
   تا ظاهر هدر و فوتر در همه‌ی آن‌ها یکسان بماند.
   ============================================================== */

/* فرم‌کنترل‌ها (button/input/select/textarea) به‌صورت پیش‌فرض مرورگر فونت
   سیستم را می‌گیرند نه فونت سایت را؛ این قانون آن را اصلاح می‌کند */
button, input, select, textarea, optgroup { font-family: inherit; }

/* ===== متغیرهای پالت مشترک هدر/فوتر (در صورتی که در :root خود صفحه تعریف نشده باشند) ===== */
:root {
    --accent: #F41860;
    --accent-dark: #D10E4E;
    --accent-light: #FDEAF0;
    --navy: #1E2A6E;
    --navy-dark: #161F52;
    --topbar-bg: #F4F5FA;
    --accent-gradient: linear-gradient(135deg, #6D3FE0 0%, #F41860 100%);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.08);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ===== نوار پیام مهم بالای هدر ===== */
.announcement-bar {
    background: #4C2FE4;
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
}

/* ===== HEADER (نوار بالا + هدر اصلی) ===== */
.header {
    background: var(--surface) !important;
    box-shadow: var(--shadow);
    padding: 16px 0 14px;
    position: relative;
    z-index: 10;
}
.hk-header-row1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}
.header .logo { display: flex; flex-direction: column; align-items: flex-start; }
.header .logo small { color: var(--text-muted); font-weight: 500; font-size: 11px; }
.hk-nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
}
.hk-nav-links a:hover { color: var(--accent); }
@media (max-width: 900px) { .hk-nav-links { display: none; } }

/* ===== ردیف دوم هدر: جستجو + تلفن ===== */
.hk-header-row2 { display: flex; align-items: center; gap: 14px; }
.hk-search-form {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1.5px solid var(--border-color);
    border-radius: 50px;
    padding: 5px;
    gap: 8px;
}
.hk-search-form input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 13.5px;
    padding: 0 6px;
    outline: none;
    color: var(--text-primary);
}
.hk-search-form button {
    border: none;
    background: var(--navy);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    font-size: 14px;
    transition: background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hk-search-form button:hover { background: var(--accent); }
.hk-header-phone {
    display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px;
    color: var(--navy); flex-shrink: 0; white-space: nowrap;
}
.hk-header-phone i { color: var(--accent); }
@media (max-width: 700px) { .hk-header-phone { display: none; } }

.logo {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo-img {
    height: 58px;
    width: auto;
    display: block;
}
.logo span { color: var(--text-primary); }
.logo small {
    font-size: 11px;
    font-weight: 300;
    color: var(--text-muted);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== دکمه‌ها (مشترک هدر/فوتر) ===== */
.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 20px rgba(76,47,228,0.28);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(76,47,228,0.38);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.btn-gold {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px rgba(233,32,61,0.25);
}
.btn-gold:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(233,32,61,0.35);
}

.cart-btn {
    position: relative;
    background: var(--bg);
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--navy);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.cart-btn:hover { transform: scale(1.05); background: var(--accent-light); color: var(--accent); }
.cart-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

@media (max-width: 768px) {
    .header .container { flex-direction: column; text-align: center; }
    .header-actions { justify-content: center; }
}

/* ==============================================================
   فوتر
   ============================================================== */
.footer {
    background: var(--navy);
    padding: 44px 0 20px;
    margin-top: 40px;
    width: 100%;
    border-top: none;
    color: rgba(255,255,255,.85);
    position: relative;
    overflow: visible;
}
body > .footer { align-self: stretch; }
.footer h4 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}
.footer p, .footer a {
    color: rgba(255,255,255,.7);
    font-size: 14px;
    line-height: 1.8;
}
.footer a:hover { color: var(--accent); }
.footer-copy {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.55);
    font-size: 12px;
}
.footer #enamad-placeholder { filter: grayscale(0) brightness(1.05); }

/* ===== روبان شبکه‌های اجتماعی فوتر (گوشه‌ی بالا-راست) ===== */
.hk-social-ribbon {
    position: absolute;
    top: -34px;
    right: calc(max(0px, (100% - 1200px) / 2) + 30px);
    display: flex;
    gap: 4px;
    background: linear-gradient(160deg, var(--page-bg-1, #3B4DB8), var(--page-bg-2, #2E3FA0));
    padding: 10px 18px;
    border-radius: 14px 14px 0 0;
    clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
}
.hk-social-ribbon a {
    width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.14);
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px;
    transition: var(--transition);
}
.hk-social-ribbon a:hover { background: #fff; color: var(--navy); }
@media (max-width: 640px) { .hk-social-ribbon { right: 14px; top: -28px; padding: 7px 12px; } .hk-social-ribbon a { width: 24px; height: 24px; font-size: 12px; } }

/* ===== بخش لوگو و توضیحات، وسط‌چین بالای فوتر ===== */
.hk-footer-about { text-align: center; max-width: 640px; margin: 0 auto 34px; padding-top: 14px; }
.hk-footer-about h4 { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.hk-footer-logo {
    display: block !important;
    width: auto !important;
    max-width: 130px !important;
    height: 38px !important;
    object-fit: contain !important;
    margin: 0 auto 10px !important;
}
.hk-footer-about p { color: rgba(255,255,255,.65); font-size: 13.5px; line-height: 2; }

/* ===== سه ستون فوتر ===== */
.hk-footer-cols { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 26px; border-bottom: 1px solid rgba(255,255,255,.12); flex-wrap: wrap; }
.hk-footer-col { flex: 1; min-width: 220px; }
.hk-footer-col h4 { font-size: 15px; font-weight: 800; color: #fff; margin-bottom: 16px; }
.hk-footer-link-groups { display: flex; gap: 40px; }
.hk-footer-link-group { display: flex; flex-direction: column; gap: 12px; }
.hk-footer-link-group a { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: rgba(255,255,255,.75); }
.hk-footer-link-group a:hover { color: var(--accent); }
.hk-footer-link-group a .dot { width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid currentColor; flex-shrink: 0; }

.hk-footer-trust-col { display: flex; align-items: center; justify-content: center; }
.hk-trust-seal-placeholder { display: flex; gap: 18px; }
.hk-trust-seal-placeholder .hk-seal {
    width: 70px; height: 70px; border-radius: 50%; background: rgba(255,255,255,.08);
    border: 1.5px solid rgba(255,255,255,.2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    color: rgba(255,255,255,.7); font-size: 18px;
}
.hk-trust-seal-placeholder .hk-seal span { font-size: 9px; text-align: center; }

.hk-footer-contact-col { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hk-footer-phone {
    display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08);
    padding: 10px 18px; border-radius: 50px; color: #fff; font-weight: 700; font-size: 14px;
}
.hk-footer-phone:hover { background: rgba(255,255,255,.16); }
.hk-footer-track-widget { background: rgba(255,255,255,.06); border-radius: 14px; padding: 16px; width: 100%; }
.hk-footer-track-widget h5 { font-size: 13.5px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.hk-footer-track-widget p { font-size: 11.5px; color: rgba(255,255,255,.55); line-height: 1.8; margin-bottom: 10px; }
.hk-footer-track-form { display: flex; gap: 6px; }
.hk-footer-track-form input { flex: 1; min-width: 0; border: none; border-radius: 8px; padding: 8px 10px; font-family: inherit; font-size: 12px; }
.hk-footer-track-form button { border: none; background: var(--accent); color: #fff; font-weight: 700; font-size: 12px; padding: 8px 14px; border-radius: 8px; cursor: pointer; }
@media (max-width: 900px) { .hk-footer-cols { flex-direction: column; } .hk-footer-link-groups { gap: 60px; } }
@media (max-width: 640px) { .hk-footer-logo { max-width: 130px; height: 38px; } }

/* ============================================================
   اسکرول‌بار سفارشی سبز شناور (شبیه اسلایدر گرد با فلش‌های کوچک بالا/پایین)
   این صفحه ممکن است modern-effects.css را لود نکرده باشد (مثل تسویه‌حساب)،
   پس همین قانون اینجا هم تکرار شده تا اسکرول‌بار سراسر سایت یکدست بماند.
   ============================================================ */
html { scrollbar-width: thin; scrollbar-color: #34D399 transparent; }
/* حس اپلیکیشن‌گونه در موبایل: بدون کش‌کش رفتن صفحه هنگام اسکرول در لبه‌ها، بدون هایلایت آبی روی تپ */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-corner { background: transparent; }
*::-webkit-scrollbar-thumb {
    background-color: #34D399;
    border-radius: 20px;
    border: 3px solid transparent;
    background-clip: padding-box;
    min-height: 42px;
}
*::-webkit-scrollbar-thumb:hover { background-color: #10B981; }

/* توجه: قبلاً اینجا فلش‌های بالا/پایین روی اسکرول‌بار با ::-webkit-scrollbar-button
   و سلکتور سراسری «*» ساخته می‌شد. این ترکیب یک باگ شناخته‌شده‌ی Chromium/Blink را
   فعال می‌کند: با display:block روی ::-webkit-scrollbar-button با سلکتور سراسری،
   مرورگر یک ناحیه‌ی هیت‌تست «دکمه‌ی اسکرول‌بار» را در کل صفحه لحاظ می‌کند که
   رویدادهای wheel (چرخ ماوس) و touch scroll (اسکرول لمسی موبایل) را در همه‌جای
   صفحه می‌قاپد؛ فقط کشیدن دستیِ thumb با ماوس یا کلیک سالم می‌ماند - دقیقاً همان
   رفتاری که باعث «اسکرول نکردن با چرخ موس/تاچ موبایل ولی کارکردن کلیک و درگ» می‌شد.
   برای همین این دکمه‌ها را کاملاً غیرفعال (none) نگه می‌داریم و دیگر برنمی‌گردانیم. */
*::-webkit-scrollbar-button {
    display: none;
}
