/* =========================================================================
   header-footer.css — پوسته‌ی مشترک (هدر، فوتر، مگا‌منو، دراور موبایل، باتم‌نو)
   پورت‌شده از ui/style.css، اسکوپ‌شده زیر .rey-ui، فونت = var(--rey-font)
   ========================================================================= */

/* Top strip */
/* ---------- Top strip ---------- */
.rey-ui .top-strip {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px;
  background: linear-gradient(90deg, var(--green-dark), var(--green) 50%, var(--green-light));
  color: #fff;
  font: 700 13px var(--rey-font);
}
.rey-ui .top-strip .chip {
  background: var(--yellow); color: var(--navy);
  font: 700 11px var(--rey-font);
  padding: 3px 10px; border-radius: 99px; flex: 0 0 auto;
}
.rey-ui .top-strip .ts-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* حالت تصویری: بنر تمام‌عرض بدون ارتفاع ثابت */
.rey-ui .top-strip--img { height: auto; padding: 0; display: block; overflow: hidden; }
.rey-ui .top-strip--img picture,
.rey-ui .top-strip--img img { display: block; width: 100%; height: auto; }

/* Header */
/* ---------- Header ---------- */
.rey-ui .site-header { background: var(--surface); border-bottom: 1px solid var(--border); }

.rey-ui .header-main {
  display: flex; align-items: center; gap: 26px;
  padding-top: 18px; padding-bottom: 12px;
}
.rey-ui .logo img { height: 46px; width: auto; }

.rey-ui .search-wrap { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.rey-ui .search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--gray-1); border-radius: 999px;
  padding: 5px 18px 5px 5px;
}
.rey-ui .search-box input {
  flex: 1; border: none; background: transparent; outline: none;
  font: 400 14px var(--rey-font); color: var(--text-2);
}
.rey-ui .search-box input::placeholder { color: var(--muted); }
.rey-ui .search-box button {
  background: var(--green); color: #fff; border: none; border-radius: 999px;
  padding: 10px 26px; font: 600 14px var(--rey-font);
}
.rey-ui .popular { display: flex; gap: 8px; align-items: center; padding-right: 6px; flex-wrap: wrap; }
.rey-ui .popular .lbl { font: 400 11px var(--rey-font); color: var(--muted); }
.rey-ui .popular a {
  font: 400 12px var(--rey-font); color: var(--text-2);
  background: var(--gray-1); border-radius: 99px; padding: 3px 12px;
}

.rey-ui .header-actions { display: flex; gap: 20px; align-items: center; }
.rey-ui .action { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; color: var(--text-3); }
.rey-ui .action svg { width: 26px; height: 26px; stroke: var(--text-3); }
.rey-ui .action span { font: 400 11px var(--rey-font); }
.rey-ui .cart-badge {
  position: absolute; top: -6px; left: -8px;
  background: var(--green); color: #fff;
  font: 700 10px var(--rey-font);
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.rey-ui .header-nav { border-top: 1px solid var(--border-2); }
.rey-ui .header-nav .container { display: flex; align-items: center; gap: 24px; padding-top: 10px; padding-bottom: 10px; }
.rey-ui .cats-btn {
  background: var(--green); color: #fff; border: none; border-radius: calc(8px * var(--rey-r));
  padding: 10px 16px; font: 600 13px var(--rey-font);
  display: flex; gap: 9px; align-items: center;
}
.rey-ui .burger { display: inline-flex; flex-direction: column; gap: 3px; }
.rey-ui .burger span { width: 15px; height: 2px; background: #fff; display: block; }
.rey-ui .header-nav a { font: 600 13px var(--rey-font); color: var(--text-2); }
.rey-ui .header-nav a.active { color: var(--green); }
.rey-ui .header-nav .amazing-link { font-weight: 700; color: var(--red); margin-right: auto; }

/* mobile header bits */
.rey-ui .m-only { display: none !important; }

/* Mobile drawer */
/* ---------- منوی کشویی موبایل ---------- */
.rey-ui .m-menu-btn {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: calc(12px * var(--rey-r)); border: 1px solid var(--border); background: #fff;
  align-items: center; justify-content: center; padding: 0; color: var(--navy);
}
.rey-ui .m-menu-btn svg { width: 20px; height: 20px; }
.rey-ui .m-drawer { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1400; pointer-events: none; }
.rey-ui .m-drawer-bg {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(18,48,63,.5);
  opacity: 0; transition: opacity .25s;
}
.rey-ui .m-drawer-panel {
  position: absolute; top: 0; bottom: 0; right: 0; left: auto;
  width: 300px; max-width: 86vw; background: #fff;
  border-radius: calc(22px * var(--rey-r)) 0 0 22px;
  transform: translateX(100%); transition: transform .32s cubic-bezier(.22,.8,.3,1);
  display: flex; flex-direction: column; overflow-y: auto;
}
.rey-ui .m-drawer.open { pointer-events: auto; }
.rey-ui .m-drawer.open .m-drawer-bg { opacity: 1; }
.rey-ui .m-drawer.open .m-drawer-panel { transform: none; }
.rey-ui .m-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border-2);
}
.rey-ui .m-drawer-head img { height: 30px; width: auto; }
.rey-ui .m-close {
  width: 34px; height: 34px; border-radius: calc(10px * var(--rey-r)); border: 1px solid var(--border);
  background: #fff; color: var(--text-3); font: 400 20px/1 var(--rey-font);
}
.rey-ui .m-drawer-nav { display: flex; flex-direction: column; padding: 8px 10px; }
.rey-ui .m-drawer-nav a {
  display: flex; align-items: center; gap: 9px;
  font: 600 13.5px var(--rey-font); color: var(--navy);
  padding: 14px 12px; border-radius: calc(12px * var(--rey-r));
}
.rey-ui .m-drawer-nav a:active, .rey-ui .m-drawer-nav a:hover { background: #f4f8f6; color: var(--green); }
.rey-ui .m-drawer-nav a.hot { color: var(--red); }
.rey-ui .m-drawer-nav a.hot svg { width: 15px; height: 15px; }
.rey-ui .m-drawer-foot {
  margin-top: auto; padding: 16px 18px 22px;
  border-top: 1px solid var(--border-2);
  display: flex; flex-direction: column; gap: 10px;
}
.rey-ui .m-drawer-foot a { width: 100%; }

/* Footer */
/* ---------- Footer ---------- */
.rey-ui .site-footer { background: var(--surface); border-top: 1px solid var(--border); }
.rey-ui .trust { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border-2); }
.rey-ui .trust > div { display: flex; align-items: center; gap: 12px; }
.rey-ui .trust .ico { width: 44px; height: 44px; border-radius: 50%; background: var(--gray-1); flex: 0 0 44px; display: flex; align-items: center; justify-content: center; }
.rey-ui .trust .ico svg { width: 22px; height: 22px; stroke: var(--green); }
.rey-ui .trust span { font: 500 13px var(--rey-font); color: var(--text-2); }

.rey-ui .footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; padding-top: 30px; padding-bottom: 30px; }
.rey-ui .footer-about { display: flex; flex-direction: column; gap: 12px; }
.rey-ui .footer-about img { height: 40px; width: auto; align-self: flex-start; }
.rey-ui .footer-about p { font: 400 12px/2 var(--rey-font); color: var(--muted); max-width: 260px; margin: 0; }
.rey-ui .socials { display: flex; gap: 10px; margin-top: 4px; }
.rey-ui .socials a { width: 34px; height: 34px; border-radius: calc(9px * var(--rey-r)); background: var(--gray-1); display: flex; align-items: center; justify-content: center; }
.rey-ui .socials svg { width: 17px; height: 17px; stroke: var(--text-3); }
.rey-ui .footer-col { display: flex; flex-direction: column; gap: 14px; }
.rey-ui .footer-col .head { font: 700 14px var(--rey-font); color: var(--navy); display: flex; align-items: center; justify-content: space-between; }
.rey-ui .footer-col .links { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.rey-ui .footer-col a {
  font: 400 13px var(--rey-font); color: var(--text-3);
  position: relative; padding-right: 14px; transition: color .2s;
}
.rey-ui .footer-col a::before {
  content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 2px; background: #d7dee2; transition: background .2s, transform .2s;
}
.rey-ui .footer-col a:hover { color: var(--green); }
.rey-ui .footer-col a:hover::before { background: var(--green); transform: translateY(-50%) rotate(45deg); }
.rey-ui .footer-col .head .sign { display: none; }

.rey-ui .badges { display: flex; gap: 14px; align-items: center; padding-top: 18px; padding-bottom: 18px; border-top: 1px solid var(--border-2); }
.rey-ui .badges .lbl { font: 400 12px var(--rey-font); color: var(--muted); margin-left: 6px; }
.rey-ui .badge-ph {
  width: 72px; height: 72px; border-radius: calc(12px * var(--rey-r));
  background: repeating-linear-gradient(45deg, var(--border), var(--border) 6px, #f6f7f8 6px, #f6f7f8 12px);
  display: flex; align-items: center; justify-content: center;
  font: 10px ui-monospace, Menlo, monospace; color: var(--muted);
}

/* ---------- SEO block ---------- */
.rey-ui .seo-block { background: var(--gray-1); padding: 24px 0; }
.rey-ui .seo-block .container { display: flex; flex-direction: column; gap: 10px; }
.rey-ui .seo-block h3 { font: 700 14px var(--rey-font); color: var(--text-2); margin: 0; }
.rey-ui .seo-block p { font: 400 12px/2 var(--rey-font); color: var(--muted); margin: 0; }

/* Bottom nav (base) */
/* ---------- Bottom nav (mobile) ---------- */
.rey-ui .bottom-nav { display: none; }

/* SEO block toggle */
.rey-ui .seo-head { width: 100%; display: flex; align-items: center; justify-content: space-between; background: none; border: none; padding: 0; cursor: pointer; text-align: right; }
.rey-ui .seo-head h3 { margin: 0; font: 700 14px var(--rey-font); color: var(--text-2); }
.rey-ui .seo-head .sign { width: 26px; height: 26px; border-radius: calc(8px * var(--rey-r)); background: #e6e9ec; color: var(--green); display: flex; align-items: center; justify-content: center; font: 600 16px var(--rey-font); transition: transform .3s; flex: 0 0 26px; }
.rey-ui .seo-body { display: none; }
.rey-ui .seo-body p { font: 400 12px/2.3 var(--rey-font); color: var(--muted); margin: 12px 0 0; }
.rey-ui .seo-block.open .seo-body { display: block; }
.rey-ui .seo-block.open .sign { transform: rotate(45deg); }

/* Mega menu (desktop) */
.rey-ui .header-nav { position: relative; }
.rey-ui .header-nav .container { position: relative; }
.rey-ui .cats-btn.mega-on { background: var(--green-dark); }
.rey-ui .mega {
  position: absolute; top: calc(100% + 8px); right: 20px;
  width: 940px; max-width: calc(100vw - 40px);
  display: grid; grid-template-columns: 262px minmax(0, 1fr);
  background: #fff; border: 1px solid var(--border); border-radius: calc(18px * var(--rey-r));
  box-shadow: 0 24px 60px rgba(18,48,63,.18);
  overflow: hidden; z-index: 90;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.rey-ui .mega.open { opacity: 1; visibility: visible; transform: none; }

/* ---------- ریلِ دسته‌های اصلی (راست) — بدون آیکون ---------- */
.rey-ui .mega-rail { border-inline-end: 1px solid var(--border-2); padding: 6px 0;
  max-height: min(72vh, 560px); overflow-y: auto; scrollbar-width: none; }
.rey-ui .mega-rail::-webkit-scrollbar { display: none; }
.rey-ui .mg-cat {
  display: flex; align-items: center; gap: 10px;
  font: 500 13px var(--rey-font); color: var(--text-2);
  padding: 12px 18px; position: relative;
  transition: background .15s, color .15s;
}
.rey-ui .mg-cat + .mg-cat { box-shadow: 0 -1px 0 var(--border-2); }
.rey-ui .mg-cat > span { min-width: 0; }
.rey-ui .mg-caret { width: 15px; height: 15px; flex: 0 0 15px; margin-inline-start: auto;
  color: #c3ccd3; transition: color .15s, transform .2s; }
.rey-ui .mg-cat.active { background: var(--green-050); color: var(--green); font-weight: 700; }
.rey-ui .mg-cat.active .mg-caret { color: var(--green); transform: translateX(-2px); }
.rey-ui .mg-cat.active::before {
  content: ""; position: absolute; inset-inline-end: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 99px 0 0 99px; background: var(--green);
}

/* ---------- پنلِ زیرشاخه‌ها (چپ) ---------- */
.rey-ui .mega-body { padding: 22px 24px; min-height: 330px; max-height: min(72vh, 560px); overflow-y: auto; scrollbar-width: thin; }
.rey-ui .mega-body::-webkit-scrollbar { width: 6px; }
.rey-ui .mega-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
.rey-ui .mg-panel { display: none; }
.rey-ui .mg-panel.active { display: block; }

/* ستون‌های هم‌عرض و هم‌تراز از بالا */
.rey-ui .mg-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 28px; align-items: start; }
.rey-ui .mg-group { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rey-ui .mg-gt {
  font: 700 13px var(--rey-font); color: var(--navy);
  padding: 0 0 9px; margin-bottom: 5px; border-bottom: 1px solid var(--border-2);
  transition: color .15s;
}
.rey-ui .mg-gt:hover { color: var(--green); }
.rey-ui .mg-group > a:not(.mg-gt) {
  font: 400 12.5px var(--rey-font); color: var(--text-3);
  padding: 5.5px 0; line-height: 1.7; transition: color .15s;
}
.rey-ui .mg-group > a:not(.mg-gt):hover { color: var(--green); }

/* دسته‌ی بدونِ زیرشاخه: پنل خالی نماند */
.rey-ui .mg-only { display: inline-flex; align-items: center; gap: 7px;
  font: 700 12.5px var(--rey-font); color: var(--green);
  background: var(--green-100); border-radius: 99px; padding: 10px 20px; }
.rey-ui .mg-only span { transition: transform .2s; display: inline-block; }
.rey-ui .mg-only:hover span { transform: translateX(-3px); }

@media (max-width: 1100px) {
  .rey-ui .mega { width: 760px; grid-template-columns: 220px minmax(0, 1fr); }
  .rey-ui .mg-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mega mobile head (hidden on desktop) */
.rey-ui .mega-mhead { display: none; }

/* دکمه دسته‌بندی موبایل */
/* دکمه دسته‌بندی کنار جستجو (موبایل) */
.rey-ui .m-cats-btn {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: calc(13px * var(--rey-r)); border: none; background: var(--green); color: #fff;
  align-items: center; justify-content: center; padding: 0;
}
.rey-ui .m-cats-btn svg { width: 20px; height: 20px; }

/* Trust badges + copyright */
/* نمادهای اعتماد + کپی‌رایت */
.rey-ui .badge-box {
  height: 72px; width: 72px; border-radius: calc(12px * var(--rey-r));
  background: #fff; border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center; padding: 9px;
  transition: border-color .2s, transform .2s;
}
.rey-ui .badge-box:hover { border-color: var(--green-300); transform: translateY(-2px); }
.rey-ui .badge-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.rey-ui .copyright {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--border-2);
  padding-top: 16px; padding-bottom: 18px;
  font: 400 12px var(--rey-font);
}
.rey-ui .copyright a { color: var(--muted); transition: color .2s; }
.rey-ui .copyright a:hover { color: var(--green); }
.rey-ui .by-seetoo { font: 600 11px ui-monospace, Menlo, monospace; direction: ltr; color: var(--green) !important; }

/* Tablet header (<=1140) */
@media (max-width: 1140px) {
  /* هدر در تبلت */
.rey-ui .popular { display: none; }
.rey-ui .header-main { gap: 16px; }
.rey-ui .header-nav .container { overflow-x: auto; scrollbar-width: none; }
.rey-ui .header-nav .container::-webkit-scrollbar { display: none; }
.rey-ui .header-nav a { white-space: nowrap; flex: 0 0 auto; }
.rey-ui .cats-btn { white-space: nowrap; flex: 0 0 auto; }
}
@media (max-width: 1024px) {
  .rey-ui .footer-cols { grid-template-columns: 1fr 1fr; }
  .rey-ui .trust { flex-wrap: wrap; }
  .rey-ui .trust > div { flex: 1 1 40%; }
}

/* موبایل (<=860): هدر، فوتر، باتم‌نو، مگا */
@media (max-width: 860px) {
.rey-ui { padding-bottom: 62px; } /* room for bottom nav */
.rey-ui .m-only { display: flex !important; }
.rey-ui .d-only { display: none !important; }
.rey-ui .container { padding: 10px 14px; }

.rey-ui .top-strip { height: 38px; font-size: 10.5px; padding: 0 12px; gap: 8px; }
.rey-ui .top-strip .chip { font-size: 9.5px; padding: 2px 8px; }
.rey-ui .site-header { position: sticky; top: 0; z-index: 50; }
.rey-ui .header-main { gap: 10px; padding-top: 10px; padding-bottom: 8px; flex-wrap: wrap; }
.rey-ui .logo { margin-left: auto; }
.rey-ui .logo img { height: 28px; }
.rey-ui .header-actions { gap: 8px; }
.rey-ui .action {
    width: 40px; height: 40px; border: 1px solid var(--border); border-radius: calc(12px * var(--rey-r));
    justify-content: center;
  }
.rey-ui .action svg { width: 20px; height: 20px; }
.rey-ui .action span { display: none; }
.rey-ui .cart-badge { top: -5px; left: -5px; width: 16px; height: 16px; font-size: 9px; }
.rey-ui .search-wrap { flex: 1 1 100%; order: 3; }
.rey-ui .search-box { padding: 4px 14px 4px 4px; }
.rey-ui .search-box input { font-size: 12.5px; }
.rey-ui .search-box button { padding: 9px 18px; font-size: 12px; }
  /* ناوبری دسکتاپ در موبایل خالی می‌شود (مگامنو داخل آن می‌ماند) */
.rey-ui .header-nav { border-top: none; }
.rey-ui .header-nav .container { padding: 0; }
.rey-ui .header-nav .container > *:not(.mega) { display: none; }
.rey-ui .trust { flex-wrap: wrap; }
.rey-ui .trust > div { flex: 1 1 45%; }
.rey-ui .trust span { font-size: 12px; }

.rey-ui .footer-cols { grid-template-columns: 1fr; gap: 0; }
.rey-ui .footer-about { padding-bottom: 16px; }
.rey-ui .footer-col { gap: 0; border-top: 1px solid var(--border-2); }
.rey-ui .footer-col .head { padding: 14px 2px; cursor: pointer; user-select: none; }
.rey-ui .footer-col .head .sign {
    display: flex; width: 22px; height: 22px; border-radius: calc(6px * var(--rey-r));
    background: var(--gray-1); align-items: center; justify-content: center;
    font: 600 15px var(--rey-font); color: var(--green); line-height: 1;
  }
.rey-ui .footer-col .links { display: none; flex-direction: column; gap: 12px; padding: 2px 2px 16px; }
.rey-ui .footer-col.open .links { display: flex; }
.rey-ui .badge-ph { width: 56px; height: 56px; border-radius: calc(9px * var(--rey-r)); }
.rey-ui .bottom-nav {
    position: fixed; bottom: 0; right: 0; left: 0; z-index: 60;
    background: #fff; border-top: 1px solid var(--border);
    display: flex; justify-content: space-around; padding: 8px 0 10px;
  }
.rey-ui .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; font: 400 10px var(--rey-font); color: var(--muted); }
.rey-ui .bottom-nav a svg { width: 22px; height: 22px; stroke: var(--muted); }
.rey-ui .bottom-nav a.active { color: var(--green); font-weight: 600; }
.rey-ui .bottom-nav a.active svg { stroke: var(--green); }
.rey-ui .search-wrap { flex-direction: row; gap: 8px; align-items: center; }
.rey-ui .search-box { flex: 1; }

  /* ===== مگای موبایل: ریلِ دسته‌ها + پنلِ زیرشاخه ===== */
.rey-ui .mega-rail { padding: 4px 0 24px; }
.rey-ui .mg-cat { padding: 13px 14px; font-size: 12.5px; }
.rey-ui .mg-cat:active { background: var(--green-100); }
.rey-ui .mega-body { padding: 16px 16px 34px; background: #fbfcfc; min-height: 0; }
.rey-ui .mg-groups { grid-template-columns: 1fr; gap: 18px; }
}

/* Mega mobile layout */
@media (max-width: 860px) {
.rey-ui .mega {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0;
    width: auto; max-width: none; border: none; border-radius: 0;
    grid-template-columns: 148px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "head head" "rail body";
    transform: translateY(14px); z-index: 130;
  }
.rey-ui .mega.open { transform: none; }
.rey-ui .mega-mhead {
    grid-area: head;
    display: flex !important; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--border-2);
    font: 800 15px var(--rey-font); color: var(--navy);
  }
.rey-ui .mega-rail { grid-area: rail; max-height: none; min-height: 0; overflow-y: auto; }
.rey-ui .mega-body { grid-area: body; max-height: none; min-height: 0; overflow-y: auto; }
.rey-ui .mg-cat { padding: 13px 11px; font-size: 11.5px; gap: 6px; }
.rey-ui .mg-cat > span { line-height: 1.7; }
.rey-ui .mg-caret { width: 13px; height: 13px; flex: 0 0 13px; }
}

/* Badges/copyright mobile */
@media (max-width: 860px) {
.rey-ui .badges { flex-wrap: wrap; }
.rey-ui .badge-box { height: 62px; width: 62px; }
.rey-ui .copyright { flex-direction: column; gap: 8px; text-align: center; font-size: 11px; padding-bottom: 14px; }
}

/* ---------- override‌های چایلد تم (سمت‌سرور) ---------- */
/* منوی وردپرس با display:contents مثل لینک‌های مستقیم UI در فلکس می‌نشیند */
.rey-ui .header-nav .rey-mainmenu,
.rey-ui .header-nav .rey-mainmenu > li,
.rey-ui .m-drawer-nav .rey-mainmenu,
.rey-ui .m-drawer-nav .rey-mainmenu > li { display: contents; }
.rey-ui .header-nav .rey-mainmenu > li > a { font: 600 13px var(--rey-font); color: var(--text-2); }
.rey-ui .header-nav .current-menu-item > a,
.rey-ui .header-nav .rey-mainmenu > li > a.active { color: var(--green); }

/* اسکیپ‌لینک دسترس‌پذیری */
.rey-ui .rey-skip-link { position: absolute; right: -9999px; }
.rey-ui .rey-skip-link:focus { right: 12px; top: 12px; z-index: 200; background: #fff; padding: 8px 14px; border-radius: calc(8px * var(--rey-r)); }

/* ===========================================================
   کشوی سبد خرید (مینی‌کارت) — پاپ‌آپ از بغل، همه‌ی صفحات (پورت از ui)
   =========================================================== */
.rey-ui .c-drawer { position: fixed; inset: 0; z-index: 1400; pointer-events: none; }
.rey-ui .c-drawer-bg { position: absolute; inset: 0; background: rgba(18,48,63,.5); opacity: 0; transition: opacity .25s; }
.rey-ui .c-drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; right: auto;
  width: 340px; max-width: 88vw; background: #fff; border-radius: 0 22px 22px 0;
  transform: translateX(-100%); transition: transform .32s cubic-bezier(.22,.8,.3,1);
  display: flex; flex-direction: column; }
.rey-ui .c-drawer.open { pointer-events: auto; }
.rey-ui .c-drawer.open .c-drawer-bg { opacity: 1; }
.rey-ui .c-drawer.open .c-drawer-panel { transform: none; }
.rey-ui .c-drawer-contents { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.rey-ui .c-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border-2); font: 800 14px var(--rey-font); color: var(--navy); }
.rey-ui .c-head span { font: 400 11px var(--rey-font); color: var(--muted); }
.rey-ui .c-head .m-close { border: none; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.rey-ui .c-items { flex: 1; overflow-y: auto; padding: 6px 14px; }
.rey-ui .c-item { display: flex; gap: 8px; align-items: center; padding: 12px 4px;
  border-bottom: 1px dashed var(--border-2); transition: opacity .2s; }
.rey-ui .c-item.removing { opacity: .4; pointer-events: none; }
.rey-ui .c-link { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; text-decoration: none; }
.rey-ui .c-item img { width: 56px; height: 56px; border-radius: calc(12px * var(--rey-r)); object-fit: cover; border: 1px solid var(--border); flex: 0 0 56px; }
.rey-ui .c-item .t { flex: 1; min-width: 0; font: 500 12px/1.9 var(--rey-font); color: var(--navy); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rey-ui .c-item .p { font: 700 12px var(--rey-font); color: var(--navy); white-space: nowrap; }
.rey-ui .c-item .p small { display: block; font: 400 9.5px var(--rey-font); color: var(--muted); text-align: left; }
/* دکمه‌ی حذف (ضربدر) */
.rey-ui .c-del { flex: 0 0 28px; width: 28px; height: 28px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: calc(9px * var(--rey-r));
  background: #fff; color: var(--muted); cursor: pointer;
  transition: color .2s, border-color .2s, background .2s; }
.rey-ui .c-del svg { width: 13px; height: 13px; }
.rey-ui .c-del:hover { color: var(--red); border-color: #f4c2cd; background: #fdeef0; }
.rey-ui .c-del:disabled { opacity: .5; cursor: default; }
.rey-ui .c-foot { padding: 14px 18px 20px; border-top: 1px solid var(--border-2); display: flex; flex-direction: column; gap: 10px; }
.rey-ui .c-foot .sum { display: flex; align-items: center; justify-content: space-between; font: 600 12.5px var(--rey-font); color: var(--text-2); }
.rey-ui .c-foot .sum b { font: 900 16px var(--rey-font); color: var(--green); }

/* ===== نوار چسبان موبایل: مالِ ما بالاتر، و نوار پیش‌فرضِ وودمارت مخفی ===== */
.rey-ui .bottom-nav { z-index: 1300; }
.wd-nav-mobile-wrapper,
.wd-nav-mobile,
.whb-mobile-nav,
.woodmart-nav-mobile,
#wd-nav-mobile,
.wd-header-mobile-nav,
.wd-sticky-nav-mobile { display: none !important; }

/* ===== همه‌ی صفحات فروشگاه تمام‌عرض: حذف سایدبار/ویجت‌های پیش‌فرضِ قالب مادر ===== */
body.woocommerce-page .sidebar-container,
body.woocommerce-page .widget-area,
body.woocommerce-page aside.sidebar-container,
body.woocommerce-page .wd-sidebar,
body.woocommerce-page #secondary { display: none !important; }
body.woocommerce-page .content-area,
body.woocommerce-page [class*="col-lg-"].content-area,
body.woocommerce-page .wd-content-area,
body.woocommerce-page main.site-main { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; }

/* ===== دراپ‌داون جستجوی زنده (AJAX) ===== */
.rey-ui .search-wrap.has-live-search { position: relative; }
.rey-ui .rey-search-results { position: absolute; right: 0; left: 0; top: 52px; z-index: 300;
  background: #fff; border: 1px solid var(--border); border-radius: calc(16px * var(--rey-r));
  box-shadow: 0 18px 44px rgba(15,27,45,.14); padding: 6px; display: none;
  max-height: 74vh; overflow-y: auto; }
.rey-ui .rey-search-results.open { display: block; }
.rey-ui .rs-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: calc(12px * var(--rey-r)); text-decoration: none; }
.rey-ui .rs-item:hover { background: var(--gray-1); }
.rey-ui .rs-item img { width: 46px; height: 46px; border-radius: calc(10px * var(--rey-r)); object-fit: contain; background: var(--gray-1); border: 1px solid var(--border); flex: 0 0 46px; }
.rey-ui .rs-item .rs-t { flex: 1; min-width: 0; font: 500 12.5px/1.7 var(--rey-font); color: var(--navy);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rey-ui .rs-item .rs-p { font: 700 12px var(--rey-font); color: var(--green); white-space: nowrap; flex: 0 0 auto; }
.rey-ui .rs-item .rs-p del { color: var(--muted); font-weight: 400; font-size: 10.5px; margin-inline-end: 5px; }
.rey-ui .rs-item .rs-p ins { text-decoration: none; }
.rey-ui .rs-more { display: block; text-align: center; padding: 12px; margin-top: 4px; border-top: 1px solid var(--border-2);
  font: 700 12.5px var(--rey-font); color: var(--green); text-decoration: none; }
.rey-ui .rs-more:hover { background: var(--green-050); border-radius: 0 0 12px 12px; }
.rey-ui .rs-empty, .rey-ui .rs-loading { padding: 24px; text-align: center; font: 500 12.5px var(--rey-font); color: var(--muted); }
@media (max-width: 860px) {
  .rey-ui .rey-search-results { max-height: 68vh; }
}


/* ===========================================================
   وقتی دراور (سبد یا منو) باز است، نوار چسبانِ پایین نباید
   روی آن بیفتد. z-index دراورها از نوار بالاتر برده شد و
   خودِ نوار هم مخفی می‌شود تا هم‌پوشانی نماند.
   =========================================================== */
body.rey-drawer-open .rey-ui .bottom-nav,
body.rey-drawer-open .bottom-nav { opacity: 0; pointer-events: none; transition: opacity .2s; }
