/* Prime — هدر و فوتر حرفه‌ای (بدون وابستگی خارجی) */

/* ---------- نوار اعلان ---------- */
.h-ann { background: var(--header); color: #E9EBEF; font-size: 12.5px; }
.h-ann-row { display: flex; align-items: center; gap: 16px; min-height: 38px; }
.h-ann-text { margin: 0; flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.h-ann-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-ann-cta { color: #fff; font-weight: 800; background: rgba(255,255,255,.14); border-radius: 99px; padding: 3px 11px; white-space: nowrap; }
.h-ann-cta:hover { background: rgba(255,255,255,.24); }
.h-ann-links { display: flex; gap: 18px; }
.h-ann-links a { color: #C7CBD3; white-space: nowrap; }
.h-ann-links a:hover { color: #fff; }
.h-ann-x { background: none; border: 0; color: #C7CBD3; cursor: pointer; font-size: 13px; padding: 4px 6px; border-radius: 6px; }
.h-ann-x:hover { color: #fff; background: rgba(255,255,255,.1); }

/* ---------- هدر اصلی ---------- */
.h-main { background: var(--surface); border-bottom: 1px solid var(--line); z-index: 40; transition: box-shadow .2s; }
.h-main.is-sticky { position: sticky; top: 0; }
.h-main.is-scrolled { box-shadow: 0 6px 20px -12px rgba(21,23,28,.25); }
.h-row { display: flex; align-items: center; gap: 22px; min-height: 74px; }
.h-burger { display: none; width: 40px; height: 40px; border: 0; background: none; border-radius: 10px; color: var(--ink); cursor: pointer; padding: 8px; flex: 0 0 40px; }
.h-burger:hover { background: var(--canvas); }
.h-logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 900; color: var(--ink); white-space: nowrap; flex: 0 0 auto; }
.h-logo img { height: 40px; width: auto; display: block; }
.h-logo .mark { width: 34px; height: 38px; border-radius: 999px 999px 8px 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 17px; }

.h-search { flex: 1; max-width: 620px; position: relative; }
.h-search input { width: 100%; height: 46px; border-radius: 12px; border: 1px solid transparent; background: var(--canvas); padding: 0 16px 0 46px; font: inherit; font-size: 14px; color: var(--ink); transition: border-color .15s, background .15s; }
.h-search input:focus { outline: none; background: #fff; border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.h-search > button { position: absolute; left: 6px; top: 5px; width: 36px; height: 36px; border: 0; background: none; color: var(--slate); cursor: pointer; display: grid; place-items: center; border-radius: 9px; }
.h-search > button svg { width: 19px; height: 19px; }
.h-suggest { position: absolute; top: calc(100% + 6px); right: 0; left: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); z-index: 60; overflow: hidden; max-height: 70vh; overflow-y: auto; }
.h-suggest .grp { padding: 8px 14px 4px; font-size: 11.5px; font-weight: 800; color: var(--muted); }
.h-suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: var(--ink); font-size: 13.5px; }
.h-suggest a:hover, .h-suggest a.is-on { background: var(--canvas); }
.h-suggest img, .h-suggest .ph { width: 42px; height: 42px; object-fit: contain; border-radius: 8px; background: #f6f7f9; flex: 0 0 42px; }
.h-suggest .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-suggest .pr { font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.h-suggest .all { justify-content: center; font-weight: 700; color: var(--accent); border-top: 1px solid var(--line); }
.h-suggest .none { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }

.h-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.h-phone { display: flex; align-items: center; gap: 8px; color: var(--ink); padding: 4px 10px; margin-inline-end: 6px; border-inline-end: 1px solid var(--line); }
.h-phone svg { width: 26px; height: 26px; color: var(--accent); }
.h-phone small { display: block; font-size: 11px; color: var(--muted); }
.h-phone b { display: block; font-size: 14px; font-weight: 800; }
.h-ico { position: relative; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--ink); background: none; border: 0; cursor: pointer; }
.h-ico:hover { background: var(--canvas); }
.h-ico > svg { width: 22px; height: 22px; }
.h-user { width: auto; padding: 0 8px; display: flex; gap: 2px; }
.h-user .chev { width: 14px; height: 14px; color: var(--muted); }
.h-badge { position: absolute; top: 4px; left: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.h-ico > svg { position: relative; left: 3px; top: 2px; }
.h-login { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.h-login:hover { border-color: var(--line-strong); background: var(--canvas); }
.h-login svg { width: 18px; height: 18px; }
.h-account .p-menu-panel { top: calc(100% + 6px); }

/* مینی‌سبد */
.h-cart { position: relative; }
.h-mini { position: absolute; top: calc(100% + 8px); left: 0; width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-pop); padding: 12px; z-index: 60; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .16s; }
.h-cart:hover .h-mini, .h-cart:focus-within .h-mini { opacity: 1; visibility: visible; transform: none; }
.h-mini::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.h-mini-head { font-size: 12.5px; color: var(--muted); padding: 2px 4px 8px; border-bottom: 1px solid var(--line); }
.h-mini ul { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.h-mini li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 4px; border-bottom: 1px dashed var(--line); }
.h-mini li a { display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--ink); }
.h-mini li img, .h-mini li .ph { width: 46px; height: 46px; object-fit: contain; border-radius: 8px; background: #f6f7f9; flex: 0 0 46px; }
.h-mini .nm { font-size: 12.5px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.h-mini .pr { font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--slate); }
.h-mini-more { font-size: 12px; color: var(--muted); padding: 8px 4px 0; }
.h-mini-foot { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; font-size: 13px; }
.h-mini-btn { display: flex; align-items: center; justify-content: center; height: 42px; border-radius: 11px; background: var(--accent); color: #fff; font-weight: 800; white-space: nowrap; }
.h-mini-btn:hover { filter: brightness(.94); }
.h-mini-empty { padding: 22px 8px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- نوار منو + مگامنو ---------- */
.h-nav { border-top: 1px solid var(--line); }
.h-nav-row { display: flex; align-items: center; gap: 2px; min-height: 46px; }
.h-nav-row > a, .h-nav-end a { white-space: nowrap; padding: 8px 12px; border-radius: 9px; font-size: 13.5px; color: var(--slate); font-weight: 600; }
.h-nav-row > a:hover, .h-nav-row > a.is-active, .h-nav-end a:hover { color: var(--accent); background: var(--accent-soft); }
.h-nav-sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }
.h-nav-end { margin-inline-start: auto; display: flex; gap: 2px; }
.h-nav-end a { font-size: 12.5px; }
.h-hl { display: inline-flex; align-items: center; gap: 5px; color: var(--hl) !important; font-weight: 800 !important; }
.h-hl svg { width: 15px; height: 15px; }
.h-hl:hover { background: color-mix(in srgb, var(--hl) 10%, #fff) !important; }

.h-mega { position: relative; }
.h-mega-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 0; background: none; border-radius: 9px; font: inherit; font-size: 13.5px; font-weight: 800; color: var(--ink); cursor: pointer; }
.h-mega-btn svg { width: 18px; height: 18px; }
.h-mega:hover .h-mega-btn, .h-mega.is-open .h-mega-btn { background: var(--canvas); }
.h-mega-panel { position: absolute; top: calc(100% + 4px); right: 0; width: min(960px, 92vw); min-height: 280px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-pop); display: grid; grid-template-columns: 220px 1fr; overflow: hidden; z-index: 55; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .16s; }
.h-mega-panel::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.h-mega:hover .h-mega-panel, .h-mega.is-open .h-mega-panel { opacity: 1; visibility: visible; transform: none; }
.h-mega-roots { list-style: none; margin: 0; padding: 8px; background: #F8F9FB; border-inline-end: 1px solid var(--line); max-height: 70vh; overflow-y: auto; }
.h-mega-roots a { display: block; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--slate); }
.h-mega-roots li.is-on a { background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.h-mega-body { padding: 18px 22px; max-height: 70vh; overflow-y: auto; }
.h-mega-all { display: inline-block; font-size: 13px; font-weight: 800; color: var(--accent); margin-bottom: 14px; }
.h-mega-cols { columns: 3 180px; column-gap: 26px; }
.h-mega-cols > div { break-inside: avoid; margin-bottom: 16px; }
.h-mega-cols .c2 { display: block; font-size: 13.5px; font-weight: 800; color: var(--ink); padding-inline-start: 8px; border-inline-start: 2px solid var(--accent); margin-bottom: 6px; }
.h-mega-cols .c3 { display: block; font-size: 12.5px; color: var(--slate); padding: 4px 10px; }
.h-mega-cols a:hover { color: var(--accent); }
.h-mega-none { color: var(--muted); font-size: 13px; }

/* ---------- منوی کشویی موبایل (ثابت روی صفحه) ---------- */
.h-drawer { position: fixed; inset: 0; z-index: 90; }
.h-drawer[hidden] { display: none; }
.h-drawer-scrim { position: absolute; inset: 0; background: rgba(15,17,22,.5); opacity: 0; transition: opacity .2s; }
.h-drawer-panel { position: absolute; top: 0; bottom: 0; right: 0; width: min(340px, 86vw); background: #fff; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s ease; box-shadow: -10px 0 30px rgba(0,0,0,.15); }
.h-drawer.is-open .h-drawer-scrim { opacity: 1; }
.h-drawer.is-open .h-drawer-panel { transform: none; }
.h-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.h-drawer-head .h-logo { font-size: 18px; }
.h-drawer-head .h-logo img { height: 32px; }
.h-drawer-x { width: 38px; height: 38px; border: 0; border-radius: 10px; background: var(--canvas); cursor: pointer; font-size: 14px; }
.h-drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 10px 16px; }
.h-d-title { font-size: 11.5px; font-weight: 800; color: var(--muted); padding: 14px 8px 6px; }
.h-d-link { display: block; padding: 11px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink); }
.h-d-link:hover { background: var(--canvas); }
.h-d-acc summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 11px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.h-d-acc summary::-webkit-details-marker { display: none; }
.h-d-acc summary::after { content: "‹"; font-size: 18px; color: var(--muted); transition: transform .15s; }
.h-d-acc[open] summary::after { transform: rotate(-90deg); }
.h-d-acc[open] summary { background: var(--canvas); }
.h-d-acc a { display: block; padding: 9px 22px; font-size: 13.5px; color: var(--slate); }
.h-d-acc a.all { color: var(--accent); font-weight: 700; }
.h-drawer-call { display: flex; align-items: center; gap: 8px; margin: 0 12px 12px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.h-drawer-call svg { width: 18px; height: 18px; }
.h-drawer-call b { margin-inline-start: auto; }
html.h-lock, html.h-lock body { overflow: hidden; }

/* ---------- فوتر ---------- */
.f-wrap { margin-top: 64px; background: var(--header); color: #B9BEC8; font-size: 13.5px; }
.f-wrap a { color: #C9CDD5; }
.f-wrap a:hover { color: #fff; }
.f-feat { border-bottom: 1px solid rgba(255,255,255,.08); }
.f-feat-row { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 16px; padding: 24px 20px; }
.f-feat-item { display: flex; align-items: center; gap: 12px; }
.f-feat-item .ic { width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.07); display: grid; place-items: center; color: #fff; flex: 0 0 46px; }
.f-feat-item .ic svg { width: 24px; height: 24px; }
.f-feat-item b { display: block; color: #fff; font-size: 14px; }
.f-feat-item small { display: block; font-size: 12px; color: #9AA1AD; margin-top: 2px; }

.f-main { display: grid; grid-template-columns: 1.6fr repeat(var(--cols, 3), minmax(0, 1fr)) 1.5fr; gap: 32px; padding-top: 44px; padding-bottom: 36px; }
.f-logo { display: inline-flex; align-items: center; gap: 10px; color: #fff !important; font-size: 22px; font-weight: 900; margin-bottom: 12px; }
.f-logo img { height: 40px; width: auto; }
.f-logo .mark { width: 34px; height: 38px; border-radius: 999px 999px 8px 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 17px; }
.f-about { margin: 0 0 16px; line-height: 2; }
.f-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.f-contact li { display: flex; align-items: flex-start; gap: 9px; line-height: 1.8; }
.f-contact svg { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 3px; color: #fff; opacity: .8; }
.f-contact a[dir=ltr] { font-weight: 800; color: #fff; font-size: 15px; }
.f-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.f-social a { width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.07); display: grid; place-items: center; color: #DDE1E7; transition: .15s; }
.f-social a:hover { background: var(--accent); color: #fff; }
.f-social svg { width: 19px; height: 19px; }

.f-col details > summary { list-style: none; color: #fff; font-size: 14.5px; font-weight: 800; margin-bottom: 14px; cursor: default; pointer-events: none; }
.f-col details > summary::-webkit-details-marker { display: none; }
.f-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.f-side { display: flex; flex-direction: column; gap: 18px; }
.f-news b { display: block; color: #fff; font-size: 14.5px; margin-bottom: 6px; }
.f-news p { margin: 0 0 10px; font-size: 12.5px; }
.f-news form { position: relative; display: flex; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 4px; }
.f-news input[name=contact] { flex: 1; min-width: 0; background: none; border: 0; color: #fff; padding: 0 10px; font: inherit; font-size: 13px; height: 40px; }
.f-news input[name=contact]::placeholder { color: #8E95A2; }
.f-news input[name=contact]:focus { outline: none; }
.f-news button { border: 0; border-radius: 9px; background: var(--accent); color: #fff; font: inherit; font-weight: 800; font-size: 13px; padding: 0 16px; cursor: pointer; white-space: nowrap; }
.f-news-ok { background: rgba(18,128,92,.25); color: #C8F2DF; border-radius: 9px; padding: 8px 10px; font-size: 12.5px; margin-bottom: 8px; }
.f-news-err { color: #FFB4AE; font-size: 12px; margin-top: 6px; }
.f-hp { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0; }
.f-apps { display: flex; flex-wrap: wrap; gap: 8px; }
.f-apps a { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; padding: 7px 12px; font-size: 12.5px; font-weight: 700; }
.f-apps svg { width: 16px; height: 16px; }
.f-namad { display: flex; flex-wrap: wrap; gap: 10px; }
.f-namad img { background: #fff; border-radius: 10px; padding: 4px; max-height: 96px; }

.f-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.f-bottom-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: 16px; font-size: 12.5px; color: #8E95A2; }
.f-top { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.16); background: none; color: #C9CDD5; border-radius: 10px; padding: 7px 12px; font: inherit; font-size: 12.5px; cursor: pointer; }
.f-top:hover { color: #fff; border-color: rgba(255,255,255,.35); }
.f-top svg { width: 15px; height: 15px; }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 1180px) {
    .h-phone { display: none; }
    .f-main { grid-template-columns: 1.4fr repeat(var(--cols, 3), minmax(0, 1fr)); }
    .f-side { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
    .f-side > * { flex: 1 1 280px; }
}
@media (max-width: 900px) {
    .h-ann-links { display: none; }
    .h-row { flex-wrap: wrap; gap: 6px 8px; min-height: 0; padding-top: 10px; padding-bottom: 10px; }
    .h-burger { display: grid; place-items: center; }
    .h-logo { font-size: 18px; }
    .h-logo img { height: 32px; }
    .h-search { order: 10; flex: 1 1 100%; max-width: none; }
    .h-search input { height: 42px; }
    .h-hide-sm { display: none; }
    .h-login span { display: none; }
    .h-login { padding: 0 10px; }
    .h-mini { display: none; }
    .h-nav { display: none; }
    .f-feat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px 14px; }
    .f-main { grid-template-columns: 1fr; gap: 0; padding-top: 28px; }
    .f-brand { padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
    .f-col details { border-bottom: 1px solid rgba(255,255,255,.08); }
    .f-col details > summary { pointer-events: auto; cursor: pointer; margin: 0; padding: 14px 0; display: flex; justify-content: space-between; }
    .f-col details > summary::after { content: "+"; font-size: 18px; color: #8E95A2; }
    .f-col details[open] > summary::after { content: "−"; }
    .f-col ul { padding-bottom: 14px; }
    .f-side { padding-top: 22px; flex-direction: column; }
    .f-bottom-row { flex-direction: column-reverse; text-align: center; padding-bottom: 90px; }
}
@media (max-width: 767px) {
    .p-tabbar { grid-template-columns: repeat(5, 1fr) !important; }
    .p-tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; font-size: 11px; font-weight: 600; color: var(--slate); padding: 4px; background: none; border: 0; cursor: pointer; }
    .f-wrap { margin-top: 40px; }
}
@media (min-width: 768px) {
    .p-tabbar button { display: none; }
}
