/* Header icon buttons, global search overlay, mobile drawer, copy buttons, unified tracking */

.ltr-num { direction: ltr; unicode-bidi: isolate; display: inline-block; white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.ft-noscroll { overflow: hidden; }

/* —— Header icon buttons (bigger, glossy) —— */
.hicon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  flex-shrink: 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface), color-mix(in srgb, var(--surface) 80%, var(--bg)));
  color: var(--text);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
  box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .35);
}
.hicon svg { width: 1.45rem; height: 1.45rem; }
.hicon:hover, .hicon.is-active {
  transform: translateY(-2px);
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  box-shadow: 0 10px 22px -12px rgba(238, 31, 37, .55);
}
.hicon--cart {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(140deg, #ff5a3c, #EE1F25 55%, #b3141a);
  box-shadow: 0 10px 24px -10px rgba(238, 31, 37, .7);
}
.hicon--cart:hover, .hicon--cart.is-active { color: #fff; box-shadow: 0 14px 28px -10px rgba(238, 31, 37, .85); }
.hicon--club { color: #7c5cff; }
.hicon--club svg { filter: drop-shadow(0 0 6px rgba(124, 92, 255, .45)); }
.hicon__badge {
  position: absolute;
  top: -0.4rem;
  inset-inline-start: -0.4rem;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #fff;
  color: #EE1F25;
  font-size: 0.75rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px #EE1F25;
}
.hicon--menu { display: none; }
.nav__tools { gap: 0.4rem; }
@media (max-width: 900px) {
  .hicon--menu { display: inline-grid; }
  .hicon { width: 2.4rem; height: 2.4rem; border-radius: 12px; }
  .nav__item:not(.nav__item--keep) { display: none; }
  .nav__tools { border-inline-start: 0; margin-inline-start: auto; }
}
@media (max-width: 560px) {
  .theme-toggle, .nav__link--admin { display: none; }
  .hicon { width: 2.25rem; height: 2.25rem; }
  .hicon svg { width: 1.3rem; height: 1.3rem; }
}

/* —— Global search overlay —— */
.ft-search {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(0.75rem, 8vh, 5rem) 0.75rem 1rem;
  background: rgba(8, 10, 16, .55);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .18s ease;
}
.ft-search.is-open { opacity: 1; }
.ft-search[hidden], .ft-drawer[hidden] { display: none !important; }
.ft-search:not(.is-open), .ft-drawer:not(.is-open) { pointer-events: none; }
.ft-search__panel {
  width: min(44rem, 100%);
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6);
  transform: translateY(-10px) scale(.98);
  transition: transform .2s ease;
  overflow: hidden;
}
.ft-search.is-open .ft-search__panel { transform: none; }
.ft-search__bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--brand);
}
.ft-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 1.05rem;
  color: var(--text);
}
.ft-search__input::-webkit-search-cancel-button { display: none; }
.ft-search__close {
  border: 0;
  background: color-mix(in srgb, var(--text) 7%, transparent);
  color: var(--text-muted);
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  cursor: pointer;
}
.ft-search__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.7rem 1rem 0.2rem; }
.ft-search__chips a {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
}
.ft-search__chips a:hover { color: var(--brand); border-color: var(--brand); }
.ft-search__results { overflow-y: auto; padding: 0.5rem 0.6rem 0.9rem; min-height: 2rem; }
.ft-search__results.is-loading { opacity: .55; }
.ft-search__group { margin-top: 0.5rem; }
.ft-search__gtitle { margin: 0.4rem 0.5rem; font-size: 0.78rem; font-weight: 700; color: var(--text-muted); }
.ft-search__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
}
.ft-search__item:hover, .ft-search__item:focus { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.ft-search__item img, .ft-search__ph {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--text) 6%, transparent);
}
.ft-search__ph { display: grid; place-items: center; font-weight: 800; color: var(--brand); }
.ft-search__txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ft-search__txt b { font-weight: 600; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-search__txt small { color: var(--text-muted); font-size: 0.76rem; }
.ft-search__price { font-size: 0.82rem; font-weight: 700; color: var(--brand); white-space: nowrap; }
.ft-search__empty { padding: 1.25rem; text-align: center; color: var(--text-muted); }
.ft-search__all {
  display: block;
  margin: 0.6rem 0.5rem 0;
  padding: 0.65rem;
  text-align: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}
@media (max-width: 640px) {
  .ft-search { padding: 0; align-items: stretch; }
  .ft-search__panel { width: 100%; max-height: none; border-radius: 0; height: 100%; }
}

/* —— Home hero search box —— */
.home-search {
  position: relative;
  max-width: 46rem;
  margin: 1.25rem auto 0.25rem;
  padding: 0 1rem;
}
.home-search__box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.45rem 0.45rem 0.45rem;
  padding-inline-start: 1.1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px -22px rgba(238, 31, 37, .45), 0 0 0 6px color-mix(in srgb, var(--brand) 6%, transparent);
  color: var(--brand);
}
.home-search__box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  padding: 0.55rem 0;
  cursor: text;
}
.home-search__box button {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.3rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(140deg, #ff5a3c, #EE1F25 60%, #b3141a);
  cursor: pointer;
}
.home-search__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin-top: 0.7rem; }
.home-search__tags a { font-size: 0.8rem; color: var(--text-muted); padding: 0.2rem 0.6rem; border-radius: 999px; border: 1px dashed var(--border); text-decoration: none; }
.home-search__tags a:hover { color: var(--brand); border-color: var(--brand); }
@media (max-width: 560px) {
  .home-search__box button span { display: none; }
  .home-search__box button { padding: 0.6rem 0.9rem; }
}

/* —— Mobile drawer —— */
.ft-drawer {
  position: fixed;
  inset: 0;
  z-index: 1150;
  background: rgba(8, 10, 16, .5);
  opacity: 0;
  transition: opacity .2s ease;
}
.ft-drawer.is-open { opacity: 1; }
.ft-drawer__panel {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: min(20rem, 86vw);
  overflow-y: auto;
  padding: 1rem;
  background: var(--surface);
  border-inline-start: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform .22s ease;
}
[dir="rtl"] .ft-drawer__panel { inset-inline-end: auto; inset-inline-start: 0; transform: translateX(100%); }
.ft-drawer.is-open .ft-drawer__panel { transform: none; }
.ft-drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.9rem; }
.ft-drawer__close { border: 0; background: transparent; font-size: 1.1rem; color: var(--text-muted); cursor: pointer; }
.ft-drawer__search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--text) 4%, transparent);
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
}
.ft-drawer__club {
  display: block;
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  color: #fff;
  text-decoration: none;
  background: radial-gradient(120% 140% at 0% 0%, #7c5cff 0%, #3b2aa8 45%, #12131c 100%);
}
.ft-drawer__club b { display: block; }
.ft-drawer__club small { opacity: .8; }
.ft-drawer__nav { display: flex; flex-direction: column; margin-top: 0.75rem; }
.ft-drawer__nav p { margin: 0.9rem 0 0.25rem; font-size: 0.76rem; font-weight: 700; color: var(--text-muted); }
.ft-drawer__nav a { padding: 0.55rem 0.5rem; border-radius: 10px; color: var(--text); text-decoration: none; }
.ft-drawer__nav a:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); color: var(--brand); }

/* —— Copyable codes —— */
.copy-wrap { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0.5rem 0 1rem; }
.copy-wrap .tracking-code { margin: 0 !important; cursor: copy; user-select: all; word-break: break-all; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.copy-btn:hover { border-color: var(--brand); color: var(--brand); }
[data-copy] { cursor: copy; }
.ft-toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  z-index: 1300;
  max-width: calc(100vw - 2rem);
  padding: 0.6rem 1rem;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font-size: 0.88rem;
  direction: rtl;
  transform: translate(-50%, 1.5rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  overflow-wrap: anywhere;
}
.ft-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* —— Unified tracking page —— */
.track-hero { text-align: center; margin-bottom: 1.25rem; }
.track-hero__icon {
  display: inline-grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(140deg, #ff5a3c, #EE1F25 60%, #b3141a);
  box-shadow: 0 18px 36px -18px rgba(238, 31, 37, .8);
}
.track-hero h1 { margin: 0.75rem 0 0.25rem; }
.track-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.45rem;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px -26px rgba(0, 0, 0, .5);
}
.track-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  padding: 0.6rem 0.75rem;
  color: var(--text);
  text-align: left;
}
.track-form .btn { display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 14px; }
.track-prefixes {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  padding: 0;
  margin: 0.9rem 0 1.25rem;
}
.track-prefixes li {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.track-prefixes code { font-size: 0.74rem; color: var(--brand); }
.track-result__kind { margin: 0; color: var(--text-muted); font-weight: 600; }
.track-result__title { margin: 0 0 0.75rem; }

/* —— Search results page —— */
.search-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.search-form { display: flex; gap: 0.5rem; flex: 1; max-width: 34rem; }
.search-form input { flex: 1; min-width: 0; }
.search-group { margin-top: 1.5rem; }
.search-group h2 { font-size: 1.05rem; display: flex; align-items: center; gap: 0.4rem; }
.search-group h2 small { color: var(--text-muted); font-weight: 500; }
.search-list { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.search-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.search-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.search-card img, .search-card .ft-search__ph { width: 3.5rem; height: 3.5rem; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.search-card b { display: block; font-weight: 600; }
.search-card small { color: var(--text-muted); }
.search-card .price { color: var(--brand); font-weight: 700; font-size: 0.85rem; }

/* —— Club promo on the home page —— */
.club-cta {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: clamp(1.1rem, 3vw, 1.75rem);
  border-radius: 26px;
  color: #F3F4F6;
  text-decoration: none;
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(124, 92, 255, .55), transparent 60%),
    radial-gradient(50% 100% at 0% 100%, rgba(56, 189, 248, .35), transparent 60%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    #0D1017;
  background-size: auto, auto, 30px 30px, 30px 30px, auto;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 30px 60px -36px rgba(76, 29, 149, .9);
}
.club-cta__gem { width: clamp(4rem, 9vw, 6.5rem); filter: drop-shadow(0 0 18px rgba(96, 165, 250, .8)); animation: club-float 4s ease-in-out infinite; }
.club-cta h2 { margin: 0 0 0.35rem; color: #fff; font-size: clamp(1.1rem, 2.6vw, 1.5rem); }
.club-cta p { margin: 0; color: rgba(243, 244, 246, .8); font-size: 0.92rem; }
.club-cta__chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.club-cta__chips span { font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); }
.club-cta__btn {
  padding: 0.75rem 1.3rem;
  border-radius: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #7c5cff, #4f46e5);
  box-shadow: 0 12px 28px -12px rgba(124, 92, 255, .9);
  white-space: nowrap;
}
.club-cta:hover { color: #fff; }
.club-cta:hover .club-cta__btn { filter: brightness(1.1); }
@keyframes club-float { 50% { transform: translateY(-6px) rotate(-3deg); } }
@media (max-width: 640px) {
  .club-cta { grid-template-columns: auto 1fr; }
  .club-cta__btn { grid-column: 1 / -1; text-align: center; }
}

/* —— Parts shop —— */
.parts-hero {
  border-radius: 24px;
  padding: clamp(1.1rem, 3vw, 1.75rem);
  margin-bottom: 1rem;
  color: #F3F4F6;
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(245, 158, 11, .45), transparent 60%),
    radial-gradient(50% 100% at 0% 100%, rgba(238, 31, 37, .35), transparent 60%),
    #11131a;
}
.parts-hero h1 { color: #fff; margin: 0 0 0.35rem; }
.parts-hero p { margin: 0; opacity: .85; }
.parts-hero__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.85rem; }
.parts-hero__actions a { padding: 0.55rem 1rem; border-radius: 12px; font-weight: 700; text-decoration: none; }
.parts-hero__actions .is-primary { background: #f59e0b; color: #111; }
.parts-hero__actions .is-ghost { border: 1px solid rgba(255,255,255,.3); color: #fff; }
.part-meta { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.25rem 0; }
.part-chip { font-size: 0.72rem; padding: 0.12rem 0.5rem; border-radius: 999px; background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text-muted); }
.part-chip--q-original { background: rgba(16, 185, 129, .14); color: #059669; }
.part-chip--q-service { background: rgba(59, 130, 246, .14); color: #2563eb; }
.part-chip--q-highcopy { background: rgba(245, 158, 11, .16); color: #b45309; }
.part-chip--q-copy { background: rgba(107, 114, 128, .16); color: #4b5563; }
.part-chip--q-used { background: rgba(139, 92, 246, .14); color: #7c3aed; }
.part-specs { width: 100%; border-collapse: collapse; margin: 0.75rem 0; font-size: 0.9rem; }
.part-specs th, .part-specs td { padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--border); text-align: start; }
.part-specs th { color: var(--text-muted); font-weight: 600; width: 38%; }

/* —— Product: blurb, colors, out-of-stock message —— */
.pd-blurb { margin: 0.55rem 0 0.25rem; padding: 0.6rem 0.8rem; border-radius: 12px; font-size: 0.95rem; line-height: 1.9; color: var(--text); background: color-mix(in srgb, var(--brand, #ee1f25) 6%, transparent); border-inline-start: 3px solid var(--brand, #ee1f25); }
.color-pick { border: 0; padding: 0; margin: 0 0 0.9rem; }
.color-pick legend { padding: 0; margin-bottom: 0.45rem; }
.color-pick__list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.color-pick__item { position: relative; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.65rem 0.3rem 0.4rem; border-radius: 999px; border: 1.5px solid var(--border); cursor: pointer; font-size: 0.85rem; transition: border-color .15s, box-shadow .15s; }
.color-pick__item input { position: absolute; opacity: 0; pointer-events: none; }
.color-pick__dot { position: relative; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18), 0 1px 3px rgba(0,0,0,.18); }
.color-pick__dot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0;
  background: rgba(0, 0, 0, .28);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='m9.55 17.6-5.1-5.1 1.4-1.4 3.7 3.7 9.1-9.1 1.4 1.4z'/%3E%3C/svg%3E") center / 60% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='m9.55 17.6-5.1-5.1 1.4-1.4 3.7 3.7 9.1-9.1 1.4 1.4z'/%3E%3C/svg%3E") center / 60% no-repeat;
  background-color: #fff;
  transition: opacity .15s;
}
.color-pick__item:hover { border-color: color-mix(in srgb, var(--brand, #ee1f25) 45%, var(--border)); }
.color-pick__item:has(input:checked) { border-color: var(--brand, #ee1f25); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #ee1f25) 18%, transparent); font-weight: 700; }
.color-pick__item:has(input:checked) .color-pick__dot::after { opacity: 1; background: #fff; }
.color-pick__item:has(input:checked) .color-pick__dot { box-shadow: inset 0 0 0 1px rgba(0,0,0,.18), 0 0 0 2px #fff, 0 0 0 3px var(--brand, #ee1f25); }
.color-pick__item:has(input:focus-visible) { outline: 2px solid var(--brand, #ee1f25); outline-offset: 2px; }

/* —— Buy box (single-seller, Digikala-style card) —— */
.pd-buybox {
  margin-top: 1rem; padding: 1.1rem; border: 1px solid var(--border); border-radius: var(--radius, 16px);
  background: var(--surface); box-shadow: var(--shadow-soft, 0 1px 2px rgba(0,0,0,.04));
}
.pd-buybox .price-row { margin: 0 0 0.4rem !important; }
.pd-buybox__stock { margin: 0 0 0.85rem; color: var(--text-muted); font-size: 0.9rem; }
/* sticky removed — whole page scrolls together (no nested sticky pane) */

/* —— Diamond earn banner (club) —— */
.pd-diamond-banner {
  display: flex; align-items: center; gap: 0.65rem; margin: 0 0 0.9rem; padding: 0.7rem 0.9rem;
  border-radius: 14px; text-decoration: none; color: var(--text); font-size: 0.84rem; line-height: 1.85;
  background: linear-gradient(135deg, rgba(124, 92, 255, .12), rgba(56, 189, 248, .08));
  border: 1px solid rgba(124, 92, 255, .35); transition: border-color .15s, transform .15s;
}
.pd-diamond-banner:hover { border-color: #7c5cff; color: var(--text); transform: translateY(-1px); }
.pd-diamond-banner b { color: #7c5cff; }
.pd-diamond-banner u { text-decoration: none; color: #7c5cff; font-weight: 700; white-space: nowrap; }
.pd-diamond-banner__icon {
  flex: 0 0 auto; width: 2.15rem; height: 2.15rem; display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(135deg, #8b6cff, #5b3cf0); color: #fff; font-size: 1.05rem;
  box-shadow: 0 6px 16px -6px rgba(124, 92, 255, .7);
}

/* —— Related products column beside the gallery —— */
.pd-related { display: grid; gap: 0.75rem; align-content: start; grid-column: 1 / -1; }
.pd-related h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.pd-related__list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 0.65rem; overflow-x: auto; padding-bottom: 0.3rem; }
.pd-related__card {
  display: flex; flex-direction: column; gap: 0.4rem; padding: 0.6rem; border: 1px solid var(--border);
  border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.pd-related__card:hover { border-color: var(--brand, #ee1f25); transform: translateY(-2px); color: var(--text); }
.pd-related__card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--bg); }
.pd-related__name {
  font-size: 0.82rem; line-height: 1.5; min-height: 2.4em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pd-related__price-row { display: flex; align-items: baseline; gap: 0.35rem; margin-top: auto; }
.pd-related__price { font-size: 0.86rem; font-weight: 700; }
.pd-related__compare { font-size: 0.72rem; color: var(--text-muted); text-decoration: line-through; }
@media (min-width: 1100px) {
  .product-detail { grid-template-columns: 1.15fr 1fr minmax(190px, 230px); gap: 1.5rem; align-items: start; }
  .pd-related { grid-column: auto; }
  .pd-related__list { grid-auto-flow: row; grid-auto-columns: unset; overflow-x: visible; }
}

/* —— Product cards: whole card clickable (Digikala-style), price emphasis —— */
.product-card { position: relative; }
.product-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.product-card__title a:focus-visible { outline: 2px solid var(--brand, #ee1f25); outline-offset: 2px; border-radius: 4px; }
.product-card__media,
.product-card__cta,
.product-card .card-swatches { position: relative; z-index: 2; }
.product-card .price-row { margin-top: 0.3rem; }
.product-card .price { font-size: 1.08rem; font-weight: 800; }
.product-card .price--compare { font-size: 0.78rem; }
.product-card__stock {
  margin: 0.25rem 0 0.45rem; font-size: 0.78rem; font-weight: 600;
  color: #0f766e;
}
.product-card__stock.is-oos { color: var(--brand, #ee1f25); }
.product-card__actions {
  position: relative; z-index: 2; display: flex; justify-content: flex-start; margin-top: 0.55rem;
}
.product-card__buy {
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.product-card__qty input {
  width: 2.85rem; box-sizing: border-box; text-align: center;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  color: var(--text); font: inherit; font-size: 0.84rem; padding: 0.4rem 0.15rem;
}
.product-card__cart-btn {
  display: inline-grid; place-items: center; width: 2.45rem; height: 2.45rem;
  border-radius: 12px; border: 1px solid color-mix(in srgb, var(--brand, #ee1f25) 45%, var(--border));
  background: color-mix(in srgb, var(--brand, #ee1f25) 10%, var(--surface));
  color: var(--brand, #ee1f25); cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s, transform .15s;
}
.product-card__cart-btn:hover {
  background: var(--brand, #ee1f25); color: #fff; transform: translateY(-1px);
}
.product-card__cart-btn--oos {
  border-color: var(--border); background: var(--bg-accent, #f3f4f6); color: var(--text-muted); opacity: .85;
}
a.svc-card--link { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
a.svc-card--link .svc-card__cta {
  margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center;
  padding: 0.45rem 0.95rem; border-radius: 999px; font-size: 0.85rem; font-weight: 700;
  color: #fff; background: var(--brand, #ee1f25);
}
a.svc-card--link:hover .svc-card__cta { filter: brightness(1.06); }
.color-tag { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--text-muted); }
.color-tag i { width: 0.85rem; height: 0.85rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.card-swatches { display: flex; gap: 0.25rem; align-items: center; margin: 0.15rem 0 0.4rem; }
.card-swatches i { width: 0.9rem; height: 0.9rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.card-swatches small { font-size: 0.72rem; color: var(--text-muted); }
.oos-ask { margin-top: 0.9rem; padding: 0.9rem; border-radius: 16px; border: 1px dashed color-mix(in srgb, var(--brand, #ee1f25) 45%, var(--border)); background: color-mix(in srgb, var(--brand, #ee1f25) 4%, transparent); }
.oos-ask__lead { margin: 0 0 0.7rem; font-size: 0.9rem; line-height: 1.9; }
.oos-ask__btn { display: flex; align-items: center; justify-content: center; gap: 0.45rem; list-style: none; cursor: pointer; }
.oos-ask__btn::-webkit-details-marker { display: none; }
.oos-ask__box[open] .oos-ask__btn { opacity: .85; }
.oos-ask__form { display: grid; gap: 0.5rem; margin-top: 0.7rem; }
.oos-ask__form input:not([type=hidden]):not(.review-form__hp), .oos-ask__form textarea {
  width: 100%; box-sizing: border-box; padding: 0.7rem 0.85rem; border-radius: 12px; border: 1px solid var(--border, #d9dce3);
  background: var(--surface, #fff); color: inherit; font: inherit; font-size: 0.92rem; line-height: 1.7;
}
.oos-ask__form textarea { min-height: 84px; resize: vertical; }
.oos-ask__form input:focus, .oos-ask__form textarea:focus { outline: none; border-color: var(--brand, #ee1f25); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #ee1f25) 18%, transparent); }
.oos-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.oos-actions .btn { min-width: 0; padding-inline: 0.4rem; white-space: normal; line-height: 1.35; text-align: center; }
.supply-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; font-size: 0.8rem; font-weight: 700;
  color: #3b2a00; background: linear-gradient(135deg, #ffd84d, #f5b700); border: 1px solid #e5a800;
  box-shadow: 0 6px 16px rgba(245, 183, 0, 0.28);
}
.supply-cta:hover { color: #2b1f00; filter: brightness(1.05); box-shadow: 0 8px 20px rgba(245, 183, 0, 0.38); }
.supply-cta--lg { width: 100%; margin-top: 0.6rem; padding: 0.8rem 1rem; font-size: 0.95rem; border-radius: 12px; }
.oos-cta { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; font-size: 0.8rem; color: var(--brand, #ee1f25); border-color: color-mix(in srgb, var(--brand, #ee1f25) 35%, var(--border)); }
/* ---------- Home: 6 newest products / 6 latest parts ---------- */
.home-six { padding-block: 1.1rem; }
.home-six__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.home-six__head h2 { display: inline-flex; align-items: center; gap: 0.55rem; margin: 0; font-size: clamp(1.05rem, 2.2vw, 1.3rem); }
.home-six__ico { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #ef4056, #b91c1c); box-shadow: 0 8px 18px -8px rgba(239, 64, 86, 0.8); }
.home-six__ico svg { width: 1.25rem; height: 1.25rem; }
.home-six__head--parts .home-six__ico { background: linear-gradient(135deg, #3b82f6, #4338ca); box-shadow: 0 8px 18px -8px rgba(59, 130, 246, 0.8); }
.home-six__links { display: inline-flex; gap: 0.5rem; flex-wrap: wrap; }
.home-six__more { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.4rem 0.85rem; border-radius: 999px; font-size: 0.85rem; font-weight: 700; text-decoration: none; color: var(--text, #1f2430); border: 1px solid var(--border, #e3e5ea); background: var(--surface, #fff); }
.home-six__more:hover { border-color: var(--brand, #ee1f25); color: var(--brand, #ee1f25); }
.home-six__more--supply { color: #3b2a00; border-color: #e5a800; background: linear-gradient(135deg, #ffd84d, #f5b700); }
.home-six__more--supply:hover { color: #2b1f00; border-color: #c99400; filter: brightness(1.05); }
.product-grid--six { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.product-grid--six .product-card__title { font-size: 0.9rem; }
.product-grid--six .oos-actions { grid-template-columns: 1fr; }
@media (min-width: 720px) { .product-grid--six { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } }
@media (min-width: 1180px) { .product-grid--six { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---------- Hero: partner market button (academy promo style, emerald neon) ---------- */
.gold-promo + .gold-promo--market { margin-inline-start: 0.6rem; }
.gold-promo--market {
  --gold-a: #d1fff4;
  --gold-b: #5ff5cf;
  --gold-c: #14c8a0;
  --gold-d: #0b6f7a;
  background:
    linear-gradient(135deg, rgba(4, 30, 32, 0.94), rgba(6, 18, 28, 0.94)) padding-box,
    linear-gradient(120deg, var(--gold-d), var(--gold-a) 30%, var(--gold-c) 55%, var(--gold-a) 75%, var(--gold-d)) border-box;
  box-shadow: 0 0 0 4px rgba(46, 230, 184, 0.07), 0 18px 40px -18px rgba(20, 200, 160, 0.7);
  animation-delay: -2.2s;
}
.gold-promo--market:hover { box-shadow: 0 0 0 5px rgba(46, 230, 184, 0.14), 0 22px 48px -16px rgba(20, 200, 160, 0.9); }
.gold-promo--market .gold-promo__glow::after { background: linear-gradient(100deg, transparent, rgba(160, 255, 230, 0.22), transparent); }
.gold-promo--market .gold-promo__icon { filter: drop-shadow(0 4px 10px rgba(20, 200, 160, 0.6)); }
.gold-promo--market .gold-promo__text strong { text-shadow: 0 0 22px rgba(95, 245, 207, 0.3); }
.gold-promo--market .gold-promo__text small { color: #b4f1e2; }
.gold-promo--market .gold-promo__arrow { color: #032a26; }
.gold-promo--market .gold-promo__spark { text-shadow: 0 0 8px rgba(95, 245, 207, 0.9); }
@media (max-width: 640px) { .gold-promo + .gold-promo--market { margin-inline-start: 0; } }
/* ---------- Floating back-to-top (left, large, clear) ---------- */
.to-top-btn {
  position: fixed;
  left: 1.25rem;
  right: auto;
  inset-inline-start: auto;
  bottom: 1.35rem;
  z-index: 90;
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  gap: 0;
  border-radius: 999px;
  border: 2px solid var(--brand, #EE1F25);
  background: var(--brand, #EE1F25);
  color: #fff;
  box-shadow: 0 10px 28px rgba(238, 31, 37, 0.45), 0 2px 8px rgba(0,0,0,.18);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(16px) scale(0.92);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, filter .18s ease;
}
.to-top-btn svg { width: 22px; height: 22px; }
.to-top-btn.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.to-top-btn:hover { filter: brightness(1.08); transform: translateY(-2px) scale(1.04); }
.to-top-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, #fff); outline-offset: 3px; }
@media (max-width: 560px) {
  .to-top-btn { left: 0.85rem; bottom: 1rem; width: 3.1rem; height: 3.1rem; }
  .to-top-btn svg { width: 20px; height: 20px; }
}

/* ---------- Mega menu: viewport-safe clamp (zoom-safe) ---------- */
.mega {
  max-width: calc(100vw - 1.25rem);
  box-sizing: border-box;
}

/* ---------- Admin inline edit pencil (admin_signed_in only) ---------- */
.admin-edit-pencil {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: var(--brand, #EE1F25);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, .45);
  text-decoration: none;
  transition: transform .15s ease, background .15s ease;
  vertical-align: middle;
}
.admin-edit-pencil:hover { background: var(--brand-hover, #C4181E); transform: scale(1.08); color: #fff; }
.admin-edit-pencil--overlay {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 3;
}
.admin-edit-pencil--inline { margin-inline-start: 0.5rem; width: 1.65rem; height: 1.65rem; }

/* ---------- AJAX shop results: loading dim ---------- */
[data-shop-results].is-loading { opacity: .55; transition: opacity .15s ease; pointer-events: none; }

/* ---------- Instructors (معرفی مدرسان) ---------- */
.instr-profile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.5rem 1.75rem;
  margin-top: 1.5rem;
  display: grid;
  gap: 1.5rem;
}
.instr-profile + .instr-profile { margin-top: 1.75rem; }
.instr-section-title {
  margin: 0 0 1rem;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.instr-section-title::before {
  content: "";
  width: 4px;
  height: 1.15rem;
  border-radius: 4px;
  background: linear-gradient(var(--brand), var(--gold, var(--brand)));
}
.instr-intro {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.instr-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--brand-tint);
  flex-shrink: 0;
}
.instr-avatar--ph {
  display: grid;
  place-items: center;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 2rem;
  font-weight: 800;
}
.instr-intro__text { min-width: 0; flex: 1 1 14rem; }
.instr-name { margin: 0; font-size: 1.2rem; color: var(--text); }
.instr-specialty { margin: 0.3rem 0 0; color: var(--brand); font-weight: 700; font-size: 0.92rem; }
.instr-bio { margin: 0.6rem 0 0; color: var(--text-muted); line-height: 1.9; font-size: 0.94rem; }

.instr-creds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.instr-cred-card {
  background: var(--bg-accent);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
}
.instr-cred-card h4 { margin: 0 0 0.6rem; font-size: 0.92rem; color: var(--text); }
.instr-list { margin: 0; padding-inline-start: 1.1rem; display: grid; gap: 0.45rem; color: var(--text); font-size: 0.9rem; line-height: 1.6; }
.instr-list li::marker { color: var(--brand); }

.instr-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
}
.instr-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease;
}
.instr-gallery img:hover { transform: scale(1.03); }

@media (max-width: 560px) {
  .instr-profile { padding: 1.15rem 1rem 1.4rem; }
  .instr-intro { gap: 1rem; }
  .instr-avatar { width: 78px; height: 78px; }
}
