/* ==========================================================================
   ESSPIANO — لایه پویا
   --------------------------------------------------------------------------
   هر چیزی که در قالب استاتیک وجود نداشت و برای اتصال به پنل مدیریت لازم شد:
   نوار اعلان، زیرمنوها، سوییچ زبان، مگامنوی چند پنله، وضعیت های خالی،
   صفحه بندی، فرم ها و مودال عمومی.
   ========================================================================== */

/* ------------------------------------------------------------ نوار اعلان */
.es-topbar {
  position: relative;
  display: block;
  padding: 9px var(--shell);
  background: var(--brand-red);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  letter-spacing: .01em;
  z-index: 810;
}

.es-topbar:hover { color: #fff; }

.es-topbar.is-marquee {
  display: flex;
  gap: 60px;
  overflow: hidden;
  white-space: nowrap;
  padding-inline: 0;
}

.es-topbar.is-marquee .es-topbar-in {
  flex-shrink: 0;
  animation: esTopbar 22s linear infinite;
}

@keyframes esTopbar {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

html[dir="rtl"] .es-topbar.is-marquee .es-topbar-in { animation-direction: reverse; }

/* هدر وقتی نوار اعلان هست، بالای آن نمی چسبد */
.es-topbar + .header.is-sticky { top: 0; }

/* ------------------------------------------------------- زیرمنوی معمولی */
.nav-item.has-drop > .nav-drop,
.nav-drop-sub {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  min-width: 210px;
  padding: 10px 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius, 3px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  z-index: 60;
}

.nav-item.has-drop:hover > .nav-drop {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.nav-drop li { position: relative; }

.nav-drop a {
  display: block;
  padding: 9px 18px;
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: color .3s, background .3s, padding .35s var(--ease);
}

.nav-drop a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, .04);
  padding-inline-start: 24px;
}

.nav-drop-sub { top: 0; inset-inline-start: 100%; }
.nav-drop li:hover > .nav-drop-sub { opacity: 1; visibility: visible; transform: none; }

/* --------------------------------------------------------- مگامنوی چندتایی */
.mega-sub { padding: 2px 0 10px; }

.mega-sub a {
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 5px 18px;
}

.mega-sub a:hover { color: var(--warm-accent); background: none; padding-inline-start: 24px; }

.mega-all { color: var(--brand-red) !important; font-weight: 700; }

.mega-feature { grid-template-columns: 1fr; }
@media (min-width: 900px) { .mega-feature { grid-template-columns: repeat(3, 1fr); } }

/* ------------------------------------------------------------ سوییچ زبان */
.lang-switch { position: relative; }

.lang-btn .lang-cur {
  font-family: var(--f-num);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.lang-drop {
  position: absolute;
  top: 100%;
  inset-inline-end: 0;
  min-width: 130px;
  padding: 8px 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius, 3px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
  z-index: 60;
}

.lang-switch:hover .lang-drop { opacity: 1; visibility: visible; transform: none; }

.lang-drop a { display: block; padding: 8px 16px; font-size: 13px; color: var(--text-secondary); }
.lang-drop a:hover, .lang-drop a.is-on { color: var(--text-primary); background: rgba(255, 255, 255, .04); }

/* ------------------------------------------------------------ لوگوی متنی */
.brand-word,
.f-logo-word,
.mnav-brand span {
  font-family: var(--f-num);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-primary);
  direction: ltr;
}

.f-logo { height: 46px; width: auto; }

/* --------------------------------------------------------------- فوتر */
.f-in { padding-block: clamp(64px, 8vw, 110px) 30px; }

.f-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 42px;
  padding-top: 26px;
  border-top: 1px solid var(--border-dark);
}

.f-badges img { max-height: 90px; width: auto; border-radius: 4px; }

.f-bottom-links { display: flex; flex-wrap: wrap; gap: 18px; }
.f-bottom-links a { font-size: 12.5px; color: var(--text-muted); transition: color .3s; }
.f-bottom-links a:hover { color: var(--text-primary); }

/* ------------------------------------------------------- منوی موبایل */
.mnav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 22px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-dark);
}

.mnav-brand img { height: 32px; width: auto; }
.mnav-brand span { font-size: 16px; }

.mnav-item > a,
.mnav-item > button { width: 100%; }

.mnav-group.open .chev { transform: rotate(180deg); }
.mnav-group .chev { transition: transform .35s var(--ease); }
.mnav-group.open .mnav-sub { display: block; }

.mnav-foot .row { text-decoration: none; }
.mnav-social { margin-top: 22px; }

/* ------------------------------------------------------- سبد کشویی */
.ci-img { display: grid; }
.ci-n { display: block; }
.ci-variant { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.ci-line { font-size: 13px; font-weight: 700; margin-top: 6px; color: var(--warm-accent); }
.cart-free span { font-size: 12.5px; color: var(--warm-accent); }
.cart-view-link { display: flex; justify-content: center; margin-top: 16px; }
.cart-empty-cta { margin-top: 22px; }
.cart-items { display: flex; flex-direction: column; }

.p-add.is-busy,
.btn.is-busy { opacity: .55; pointer-events: none; }

/* --------------------------------------------------------------- جستجو */
.search-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}

.search-loading { padding-block: 60px; text-align: center; color: var(--text-muted); font-size: 13.5px; }
.search-all { margin-top: 26px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.chip {
  padding: 8px 16px;
  border: 1px solid var(--border-dark);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: color .3s, border-color .3s, background .3s;
}

.chip:hover { color: var(--text-primary); border-color: var(--border-hover); background: rgba(255, 255, 255, .04); }

/* ------------------------------------------------------------- مودال عمومی */
.es-modal {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vw, 46px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s var(--ease), visibility .4s;
}

.es-modal.on { opacity: 1; visibility: visible; }

.es-modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: clamp(24px, 3vw, 38px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius, 4px);
  transform: translateY(20px) scale(.985);
  transition: transform .5s var(--ease);
}

.es-modal.on .es-modal-panel { transform: none; }
.es-modal-panel.is-loading { text-align: center; color: var(--text-muted); }
.qv-loading { padding-block: 40px; }

/* --------------------------------------------------------- وضعیت خالی */
.empty .btn { margin-top: 22px; display: inline-flex; }

/* ------------------------------------------------------------ صفحه بندی */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: clamp(40px, 5vw, 70px);
}

.pager a,
.pager span {
  min-width: 42px;
  height: 42px;
  padding-inline: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-num);
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius, 2px);
  transition: color .3s, border-color .3s, background .3s;
}

.pager a:hover { color: var(--text-primary); border-color: var(--border-hover); background: rgba(255, 255, 255, .04); }
.pager .is-on { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.pager .is-off { opacity: .35; pointer-events: none; }
.pager svg { width: 15px; height: 15px; }

/* --------------------------------------------------------------- تب ها */
.tab-pane { display: none; }
.tab-pane.on { display: block; }

/* ------------------------------------------------------------ نان و مسیر */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.crumbs a { color: var(--text-muted); transition: color .3s; }
.crumbs a:hover { color: var(--brand-red); }
.crumbs svg { width: 12px; height: 12px; opacity: .5; }

/* ------------------------------------------------------- فرم های سرور */
.form-error {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  color: var(--brand-red);
}

.alert {
  padding: 14px 18px;
  border-radius: var(--radius, 3px);
  font-size: 13.5px;
  border: 1px solid var(--border-dark);
  background: var(--bg-card);
  margin-bottom: 18px;
}

.alert-error { border-color: rgba(237, 27, 36, .4); color: #ffb4b8; }
.alert-success { border-color: rgba(47, 168, 122, .4); color: #9fe3c7; }

.toast.is-error { border-color: rgba(237, 27, 36, .45); }

/* -------------------------------------------------------- ابزارک ها */
.es-widget { position: relative; }
.es-widget + .es-widget { margin-top: 0; }

.dt-only-desktop { display: none; }
.dt-only-mobile { display: none; }

@media (min-width: 992px) { .dt-only-desktop { display: block; } }
@media (max-width: 991px) { .dt-only-mobile { display: block; } }

.es-spacer { display: block; width: 100%; }

.es-html-widget img { max-width: 100%; height: auto; }

/* ------------------------------------------------------- ریسپانسیو کمکی */
@media (max-width: 1100px) {
  .f-grid { grid-template-columns: 1fr 1fr 1fr; }
  .f-about { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .f-grid { grid-template-columns: 1fr 1fr; }
  .f-bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
  .es-topbar { font-size: 11.5px; }
}

/* ------------------------------------------------------------- شبکه ابزارک */
.es-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 20px);
}

@media (max-width: 1280px) { .es-grid { grid-template-columns: repeat(min(var(--cols, 4), 4), minmax(0, 1fr)); } }
@media (max-width: 1024px) { .es-grid { grid-template-columns: repeat(min(var(--cols, 4), 3), minmax(0, 1fr)); } }
@media (max-width: 760px)  { .es-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px)  { .es-grid { grid-template-columns: repeat(var(--cols-sm, 1), minmax(0, 1fr)); } }

/* سربرگ مشترک ابزارک ها */
.sec-head .right { text-align: start; }
.sec-head .head-actions { display: flex; align-items: center; gap: 12px; }

.sw-nav { display: flex; gap: 8px; }

.sw-btn {
  width: 44px; height: 44px; border-radius: var(--radius, 2px);
  display: grid; place-items: center;
  border: 1px solid var(--border-dark); color: var(--text-secondary);
  transition: color .3s, border-color .3s, background .3s;
}

.sw-btn:hover { color: var(--text-primary); border-color: var(--border-hover); background: rgba(255, 255, 255, .04); }
.sw-btn svg { width: 17px; height: 17px; }
.sw-btn.swiper-button-disabled { opacity: .3; pointer-events: none; }

.sw-prog { height: 2px; background: rgba(255, 255, 255, .07); margin-top: 26px; }
.sw-prog i { display: block; height: 100%; width: 10%; background: var(--brand-red); transition: width .4s var(--ease); }

/* کارت «مشاهده همه» انتهای شبکه محصولات */
.more-card {
  display: grid; place-items: center; gap: 12px; min-height: 220px;
  border: 1px dashed var(--border-hover); border-radius: var(--radius, 4px);
  color: var(--text-secondary); text-align: center; padding: 24px;
  transition: color .3s, border-color .3s, background .3s;
}

.more-card:hover { color: var(--text-primary); border-color: var(--brand-red); background: rgba(255, 255, 255, .02); }
.more-card svg { width: 26px; height: 26px; }

/* بنر و تصویر ابزارک ها */
.es-banner { display: block; overflow: hidden; border-radius: var(--radius, 4px); position: relative; }
.es-banner img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .9s var(--ease); }
.es-banner:hover img { transform: scale(1.05); }

.es-banner-body {
  position: absolute; inset-inline-start: 0; bottom: 0; padding: clamp(18px, 2vw, 32px);
  z-index: 2;
}

.es-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .8), transparent 62%);
  opacity: .9;
}

.es-banner-body { position: absolute; z-index: 3; }
.es-banner-body h3 { font-size: clamp(1rem, 1.6vw, 1.5rem); font-weight: 800; }
.es-banner-body p { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }

/* اسلایدر تمام عرض */
.es-hero-slider { position: relative; }
.es-hero-slide { position: relative; min-height: clamp(340px, 60vh, 720px); display: grid; }
.es-hero-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.es-hero-slide .es-hero-body { position: relative; z-index: 3; align-self: center; padding: var(--shell); max-width: 620px; }
.es-hero-slide::after {
  content: ''; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to inline-start, rgba(0, 0, 0, .82), transparent 70%);
}

/* شمارش معکوس */
.count { display: flex; gap: 10px; }
.count-cell {
  min-width: 66px; padding: 12px 8px; text-align: center;
  border: 1px solid var(--border-dark); border-radius: var(--radius, 3px);
  background: var(--bg-card);
}
.count-cell .n { font-family: var(--f-num); font-size: 22px; font-weight: 800; direction: ltr; }
.count-cell .l { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.count.is-over { opacity: .45; }

/* آمار و ویژگی ها */
.feat-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 22px;
  border: 1px solid var(--border-dark); border-radius: var(--radius, 4px);
  background: var(--bg-card); height: 100%;
  transition: border-color .4s, background .4s, transform .5s var(--ease);
}
.feat-card:hover { border-color: var(--border-hover); background: var(--bg-elevated); transform: translateY(-3px); }
.feat-card h5 { font-size: 15px; font-weight: 700; }
.feat-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.9; margin-top: 6px; }
.feat-card .ic { width: 34px; height: 34px; flex-shrink: 0; color: var(--brand-red); }
.feat-card .ic svg, .feat-card .ic img { width: 100%; height: 100%; object-fit: contain; }
.feat-card .ic i { font-size: 30px; line-height: 1; }


/* ------------------------------------------------------------- بدون js */
html:not(.js) .loader { display: none !important; }
html:not(.js) .rv { opacity: 1 !important; transform: none !important; }
html:not(.js) .cursor,
html:not(.js) .cursor-ring { display: none !important; }
html:not(.js) body.cur-hide { cursor: auto; }

/* لودر هرگز نباید بیش از چند ثانیه بماند */
.loader { animation: esLoaderBail 0s linear 8s forwards; }

@keyframes esLoaderBail {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* ------------------------------------------------------------ عمومی */
/* بعضی بخش ها با ویژگی hidden مخفی می شوند؛ display فلکس نباید بر آن غلبه کند */
[hidden] { display: none !important; }

/* کد امنیتی */
.captcha-box { display: flex; align-items: center; gap: 10px; }
.captcha-box .input { flex: 1; }
.captcha-box .captcha-img img { height: 48px; width: auto; border-radius: var(--radius, 3px); }

/* دیدگاه پاسخ داده شده */
.comment-reply {
  margin-top: 16px;
  padding-inline-start: 18px;
  border-inline-start: 2px solid var(--border-dark);
}

/* امتیاز دادن با ستاره */
.rate-pick { display: inline-flex; flex-direction: row-reverse; gap: 6px; margin-top: 8px; }
.rate-pick input { position: absolute; opacity: 0; }
.rate-pick svg { width: 24px; height: 24px; color: rgba(255, 255, 255, .16); transition: color .25s; cursor: pointer; }
.rate-pick label:hover svg,
.rate-pick label:hover ~ label svg,
.rate-pick label:has(input:checked) svg,
.rate-pick label:has(input:checked) ~ label svg { color: var(--warm-accent); }

/* نقد ها */
.rv-acts { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; }
.rev-stars { display: inline-flex; gap: 3px; margin-bottom: 14px; }
.rev-stars svg { width: 14px; height: 14px; color: var(--warm-accent); }
.rev-stars svg.off { color: rgba(255, 255, 255, .16); }
.rev-foot { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-dark); }
.rev-who { font-size: 13px; font-weight: 700; }
.rev-who em { display: block; font-style: normal; font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.rev-av { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.rev-prod { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto; font-size: 11.5px; color: var(--text-muted); }
.rev-prod img { width: 34px; height: 34px; object-fit: contain; }

/* صفحه محصول */
.pd-info .panel { padding: clamp(18px, 2vw, 26px); }
.pd-title-en { font-family: var(--f-num); font-size: 12.5px; color: var(--text-muted); margin-top: 8px; direction: ltr; }
.pd-suggest { display: inline-flex; align-items: center; gap: 5px; color: #57c98a; }
.pd-suggest svg { width: 14px; height: 14px; }
.pd-unit { font-size: 12.5px; color: var(--text-muted); margin-top: 8px; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.pd-variant + .pd-variant { margin-top: 18px; }
.pd-variant .lab b { color: var(--text-primary); font-weight: 700; margin-inline-start: 6px; }
.pd-variants { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; list-style: none; padding: 0; }
.pd-variant-item input { position: absolute; opacity: 0; }
.pd-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 54px; height: 42px; padding-inline: 14px;
  border: 1px solid var(--border-dark); border-radius: var(--radius, 3px);
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
  transition: color .3s, border-color .3s, background .3s;
}
.pd-swatch {
  display: block; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid transparent; box-shadow: 0 0 0 1px var(--border-dark); cursor: pointer;
  transition: border-color .3s, transform .3s;
}
.pd-variant-item label:has(input:checked) .pd-chip { color: var(--text-primary); border-color: var(--brand-red); background: rgba(237, 27, 36, .1); }
.pd-variant-item label:has(input:checked) .pd-swatch { border-color: var(--brand-red); transform: scale(1.08); }
.pd-variant-item.is-out { opacity: .35; pointer-events: none; }
.pd-buy-block.is-busy { opacity: .5; pointer-events: none; }
.pd-qty input { width: 62px; background: none; border: 0; color: var(--text-primary); text-align: center; font-size: 15px; }
.pd-qty input::-webkit-outer-spin-button,
.pd-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pd-qty input[type=number] { -moz-appearance: textfield; }

/* فروشگاه */
.filter-color { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-inline-start: 6px; vertical-align: middle; }
.shop-bar { flex-wrap: wrap; gap: 14px; }

/* مجله */
.bl-wrap { display: grid; grid-template-columns: 1fr 320px; gap: clamp(20px, 3vw, 44px); align-items: start; }
.bl-side { position: sticky; top: 100px; }
.bl-side .panel + .panel { margin-top: 14px; }

@media (max-width: 900px) {
  .bl-wrap { grid-template-columns: minmax(0, 1fr); }
  .bl-side { position: static; }
}

/* تماس با ما و نقشه */
.es-contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(20px, 3vw, 40px); align-items: start; }
.es-map { overflow: hidden; border-radius: var(--radius, 4px); border: 1px solid var(--border-dark); }
.es-map iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 900px) { .es-contact-grid { grid-template-columns: minmax(0, 1fr); } }

/* ویدیو */
.es-video { position: relative; overflow: hidden; border-radius: var(--radius, 4px); background: #000; }
.es-video.ratio-16-9 { aspect-ratio: 16 / 9; }
.es-video.ratio-4-3  { aspect-ratio: 4 / 3; }
.es-video.ratio-1-1  { aspect-ratio: 1 / 1; }
.es-video iframe, .es-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* نسبت تصویر بنرها */
.es-banner.ratio-1-1 { aspect-ratio: 1 / 1; }
.es-banner.ratio-4-3 { aspect-ratio: 4 / 3; }
.es-banner.ratio-16-9 { aspect-ratio: 16 / 9; }
.es-banner.is-rounded { border-radius: 6px; }
.es-banner.no-zoom:hover img { transform: none; }

/* اسلایدر اصلی و بنر کناری */
.es-slider-row { display: grid; gap: 14px; }
.es-slider-row.has-banners { grid-template-columns: 1.55fr .45fr; }
.es-slider-banners { display: grid; gap: 14px; }
.es-hero-slider.is-rounded { border-radius: 6px; overflow: hidden; }
.es-hero-slide.is-tall { min-height: clamp(420px, 78vh, 860px); }
.es-slider-dots { position: absolute; bottom: 18px; inset-inline-start: 0; width: 100%; z-index: 5; }

@media (max-width: 900px) {
  .es-slider-row.has-banners { grid-template-columns: minmax(0, 1fr); }
  .es-slider-banners { grid-template-columns: 1fr 1fr; }
}

/* بلوک هیرو ابزارکی */
.es-hero-block { position: relative; display: flex; align-items: center; overflow: hidden; }
.es-hero-block.is-rounded { border-radius: 6px; }
.es-hero-block-bg { position: absolute; inset: 0; }
.es-hero-block-bg img { width: 100%; height: 100%; object-fit: cover; }
.es-hero-block-tint { position: absolute; inset: 0; background: #000; }
.es-hero-block-body { position: relative; z-index: 3; padding: clamp(24px, 4vw, 56px); max-width: 620px; }
.es-hero-block.align-center { justify-content: center; text-align: center; }
.es-hero-block.align-center .es-hero-block-body { margin-inline: auto; }
.es-hero-block.align-left { justify-content: flex-end; }

/* نوار اعلان ابزارکی */
.es-announce { position: relative; display: flex; align-items: center; overflow: hidden; padding: 10px 0; }
.es-announce-track { display: flex; gap: 46px; width: max-content; padding-inline: var(--shell); }
.es-announce-marquee .es-announce-track { animation: slide var(--speed, 18s) linear infinite; }
.es-announce-item { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.es-announce-x { position: absolute; inset-inline-end: 14px; color: inherit; }
.es-announce-x svg { width: 15px; height: 15px; }

/* استوری */
.es-stories { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 6px; }
.es-story { flex-shrink: 0; text-align: center; }
.es-story-ring {
  display: grid; place-items: center; border-radius: 50%; padding: 3px;
  background: linear-gradient(135deg, var(--ring, var(--brand-red)), transparent);
}
.es-story-ring img { border-radius: 50%; object-fit: cover; display: block; background: var(--bg-card); }
.es-stories.size-small .es-story-ring img { width: 58px; height: 58px; }
.es-stories.size-medium .es-story-ring img { width: 76px; height: 76px; }
.es-stories.size-large .es-story-ring img { width: 96px; height: 96px; }
.es-story-t { display: block; margin-top: 8px; font-size: 12px; color: var(--text-secondary); max-width: 96px; }

/* مراحل */
.es-steps { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px); position: relative; }
.es-step { position: relative; padding: 24px; border: 1px solid var(--border-dark); border-radius: var(--radius, 4px); background: var(--bg-card); }
.es-step-n { display: block; font-size: 12px; color: var(--accent, var(--brand-red)); }
.es-step-ic { display: block; width: 32px; height: 32px; margin-top: 12px; font-size: 28px; color: var(--accent, var(--brand-red)); }
.es-step h4 { font-size: 15px; font-weight: 700; margin-top: 14px; }
.es-step p { font-size: 13px; color: var(--text-secondary); line-height: 1.9; margin-top: 8px; }

@media (max-width: 860px) { .es-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .es-steps { grid-template-columns: minmax(0, 1fr); } }

/* کوپن */
.es-coupon { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.es-coupon-code {
  display: inline-block; padding: 14px 26px; letter-spacing: .28em;
  border: 1px dashed var(--border-hover); border-radius: var(--radius, 4px);
  font-size: 17px; font-weight: 700; direction: ltr;
}

/* شبکه اجتماعی */
.es-social-ic { position: absolute; inset-block-end: 12px; inset-inline-end: 12px; z-index: 4; color: #fff; font-size: 20px; }

/* نمایشگاه دسته */
.es-showcase { display: grid; grid-template-columns: .32fr .68fr; gap: 14px; align-items: start; }
.es-showcase-art { aspect-ratio: 3 / 4; }
@media (max-width: 900px) { .es-showcase { grid-template-columns: minmax(0, 1fr); } }

/* برند بدون تصویر */
.mq-item.is-static { animation: none; }
.mq-name { font-family: var(--f-num); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-secondary); }
.mq.is-gray .mq-item img { filter: grayscale(1); }

/* متن غنی ابزارک ها */
.es-rich { font-size: 14px; line-height: 2.1; color: var(--text-secondary); }
.es-rich h2, .es-rich h3 { color: var(--text-primary); margin-top: 22px; }
.es-rich a { color: var(--brand-red); }
.es-rich.is-collapsible { max-height: 220px; overflow: hidden; }
.es-rich.is-collapsible.is-open { max-height: none; }
.es-rich-more { margin-top: 14px; }

/* پاپ آپ */
.es-popup {
  position: fixed; inset: 0; z-index: 960; display: grid; place-items: center;
  padding: clamp(14px, 4vw, 46px); background: rgba(0, 0, 0, .72);
  opacity: 0; transition: opacity .4s var(--ease);
}
.es-popup.on { opacity: 1; }
.es-popup-panel { position: relative; width: min(680px, 100%); background: var(--bg-elevated); border: 1px solid var(--border-dark); border-radius: var(--radius, 5px); overflow: hidden; }
.es-popup-media img { width: 100%; height: auto; display: block; }
.es-popup-text { padding: clamp(22px, 3vw, 36px); font-size: 14px; line-height: 2; color: var(--text-secondary); }

/* جدول مقایسه */
.cmp-table th, .cmp-table td { text-align: center; min-width: 180px; }
.cmp-table th:first-child, .cmp-table td:first-child { text-align: start; min-width: 140px; color: var(--text-muted); }

/* شبکه ابزارک بدون شکاف در موبایل */
@media (max-width: 520px) {
  .shop { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; }
  .cart-page { grid-template-columns: minmax(0, 1fr); }
  .acc { grid-template-columns: minmax(0, 1fr); }
  .acc-side { position: static; }
  .pd { grid-template-columns: minmax(0, 1fr); }
  .pd-media { position: static; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  /* form first on phones, but keep the logo and the way back to the shop */
  .auth-art { min-height: 0; }
  .auth-art-mid { display: none; }
}

/* ------------------------------------------------- فاصله محتوا از هدر ثابت */
/* هدر روی صفحه شناور است؛ فقط هیرو و اسلایدر تمام صفحه زیر آن می روند */
body[data-chrome="full"] main { padding-top: var(--h-header); }

body[data-chrome="full"] main:has(> .hero:first-child),
body[data-chrome="full"] main:has(> .es-w-fullscreen-slider:first-child),
body[data-chrome="full"] main:has(> .es-widget:first-child > .hero) { padding-top: 0; }

/* ---------------------------------------------------------- پیام های نشست */
.es-flash { padding-top: 24px; }
.es-flash .alert:last-child { margin-bottom: 0; }


/* ==========================================================================
   پروفایل طعم قهوه — صفحه محصول
   Four scores out of ten. The segmented meter reads at a glance, the words
   say what the number means, and with three or more scores a small radar
   shows the shape of the cup. Cells and radar fill when the block reveals.
   ========================================================================== */
.pd-taste {
  margin-top: 24px; padding: clamp(18px, 2.2vw, 26px);
  border: 1px solid var(--border-dark); border-radius: 4px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(237, 27, 36, .07), transparent 60%),
    var(--bg-elevated);
}
.pd-taste-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pd-taste-h h2 { font-size: 15.5px; font-weight: 800; }
.pd-taste-h .eyebrow { order: 2; }
.pd-taste-body { margin-top: 18px; }
.pd-taste-body.has-radar { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: clamp(16px, 2.4vw, 28px); align-items: center; }

.pd-taste-radar { width: 100%; height: auto; overflow: visible; }
.pd-taste-radar .ring { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: .6; }
.pd-taste-radar .ring:first-child { stroke: rgba(255, 255, 255, .16); }
.pd-taste-radar .axis { stroke: rgba(255, 255, 255, .08); stroke-width: .6; }
.pd-taste-radar .shape {
  fill: rgba(237, 27, 36, .2); stroke: var(--brand-red); stroke-width: 1.4; stroke-linejoin: round;
  transform: scale(0); transform-origin: 0 0; transition: transform 1.1s var(--ease) .2s;
}
.pd-taste-radar .dot { fill: var(--warm-accent); opacity: 0; transition: opacity .5s ease .9s; }
.rv-in .pd-taste-radar .shape { transform: scale(1); }
.rv-in .pd-taste-radar .dot { opacity: 1; }

.pd-taste-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pd-taste-row { display: grid; grid-template-columns: auto minmax(84px, auto) minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.pd-taste-row .ic {
  width: 32px; height: 32px; border-radius: 3px; display: grid; place-items: center;
  background: rgba(237, 27, 36, .09); color: var(--brand-red); --ic-a: var(--warm-accent);
}
.pd-taste-row .ic svg { width: 17px; height: 17px; }
.pd-taste-row .txt b { display: block; font-size: 13px; font-weight: 700; }
.pd-taste-row .txt .lvl { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.pd-taste-row .cells { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; direction: ltr; }
[dir="rtl"] .pd-taste-row .cells { direction: rtl; }
.pd-taste-row .cells i {
  display: block; height: 8px; border-radius: 2px; background: rgba(255, 255, 255, .07);
  transition: background .45s ease calc(var(--i, 0) * 55ms), box-shadow .45s ease calc(var(--i, 0) * 55ms);
}
.rv-in .pd-taste-row .cells i.on { background: linear-gradient(180deg, var(--brand-red), var(--brand-red-deep)); }
.rv-in .pd-taste-row .cells i.on:nth-child(n+7) { background: linear-gradient(180deg, #f0443b, var(--brand-red)); box-shadow: 0 0 10px rgba(237, 27, 36, .28); }
.pd-taste-row .val { font-size: 15px; font-weight: 700; white-space: nowrap; direction: ltr; }
.pd-taste-row .val small { font-size: 11px; font-weight: 500; color: var(--text-muted); margin-inline-start: 2px; }

@media (max-width: 520px) {
  .pd-taste-body.has-radar { grid-template-columns: minmax(0, 1fr); }
  .pd-taste-radar { max-width: 150px; margin-inline: auto; }
  .pd-taste-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .pd-taste-row .cells { grid-column: 1 / -1; order: 4; }
}
@media (prefers-reduced-motion: reduce) {
  .pd-taste-radar .shape, .pd-taste-radar .dot, .pd-taste-row .cells i { transition: none; }
}

/* ==========================================================================
   سازنده‌ی میکس (قهوه‌ات را بساز)
   ========================================================================== */
/* estimated taste of the blend, in the recipe card */
.blend-taste { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border-dark); }
.blend-taste-h span { display: block; font-size: 13px; font-weight: 700; }
.blend-taste-h small { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.blend-taste-rows { display: grid; gap: 11px; margin-top: 14px; }
.blend-taste-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.blend-taste-row .k { display: inline-flex; align-items: center; font-size: 12.5px; color: var(--text-secondary); }
.blend-taste-row .k .tic { width: 18px; height: 18px; margin-inline-end: 8px; --ic-a: var(--warm-accent); color: var(--text-secondary); }
.blend-taste-row .meter { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.blend-taste-row .meter i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(270deg, var(--brand-red), var(--warm-accent)); transition: width .5s var(--ease);
}
.blend-taste-row .v { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.blend-taste-row .v small { font-size: 11px; font-weight: 500; color: var(--text-muted); margin-inline-start: 6px; }

/* a bean that can't be bought right now stays listed, dimmed */
.mixrow.is-out { opacity: .55; }
.mixrow.is-out .t b { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .3); }
.origin.is-out { opacity: .6; }
.origin .c a { color: inherit; transition: color .3s; }
.origin .c a:hover { color: var(--warm-accent); }
.mix-cols.one-col { grid-template-columns: minmax(0, 1fr); }

/* scores under a bean card */
.origin-taste { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.origin-taste span {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px;
  border: 1px solid var(--border-dark); border-radius: 99px; font-size: 11.5px; color: var(--text-secondary);
}
.origin-taste svg { width: 13px; height: 13px; color: var(--text-muted); --ic-a: var(--brand-red); }
.origin-taste b { font-weight: 600; }

/* four items fill two rows of two instead of 3 + 1 */
.bento[data-n="4"] { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1181px) {
  .daily[data-n="4"] { grid-template-columns: repeat(4, 1fr); }
  .daily[data-n="3"] { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1180px) and (min-width: 661px) {
  .daily[data-n="4"] { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 660px) {
  .bento[data-n="4"] { grid-template-columns: 1fr; }
}

/* a custom blend in the cart, the drawer and the order pages */
.blend-line { display: grid; gap: 6px; margin-top: 6px; }
.blend-line .code {
  display: inline-block; justify-self: start; font-family: var(--f-num); direction: ltr;
  font-size: 10.5px; letter-spacing: .14em; color: var(--warm-accent);
  padding: 3px 8px; border: 1px solid rgba(200, 155, 99, .3); border-radius: 2px;
}
.blend-line .mix { font-size: 12px; color: var(--text-secondary); line-height: 1.8; }
.blend-line .meta { font-size: 11.5px; color: var(--text-muted); }
.blend-line .edit { font-size: 12px; color: var(--warm-accent); justify-self: start; }
.blend-line .edit:hover { color: var(--text-primary); }
.blend-line .warn { font-size: 12px; color: var(--brand-red); }