/* =========================================================
   KarlyCollection — Components
   کتابخانه‌ی کامپوننت‌های قابل‌استفاده‌ی مجدد. هر کامپوننت یک بلوک
   مستقل با کلاس ثابت است؛ در صفحات جدید همین کلاس‌ها را استفاده کن،
   استایل تازه‌ی جدا نساز.

   فهرست: دکمه/آیکون‌دکمه، شیشه (.glass)، تیتر سکشن، بج‌ها،
   کارت دسته‌بندی، کارت محصول + فیلتر، جزئیات محصول (رنگ/سایز/تعداد)،
   فرم‌ها، پنل جستجو، دراور سبد خرید، مودال، توست.
   ========================================================= */

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn:disabled {
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  padding: 10px 20px;
}
.btn-whatsapp { background: var(--color-whatsapp); color: #fff; }
.btn-telegram { background: var(--color-telegram); color: #fff; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  color: var(--color-text);
  border-radius: 50%;
  position: relative;
  transition: background-color .2s var(--ease);
}
.icon-btn:hover { background: var(--color-bg-alt); }

/* ---------- شیشه‌ی مایع (Liquid Glass) ----------
   یوتیلیتی مشترک: هر عنصر شناور روی محتوا (هدر، پنل، دراور، مودال،
   دراپ‌داون) این کلاس را می‌گیرد؛ رنگ/سایز خودش را جدا تعریف کند. */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}
.glass-strong { background: var(--glass-bg-strong); }

/* ---------- تیتر سکشن ---------- */
.section-heading { text-align: center; margin-bottom: 40px; }
.section-heading h2 { font-size: 32px; font-weight: 700; color: var(--color-text); }
.section-heading p { color: var(--color-text-muted); margin-top: 8px; font-size: 15px; }
.section-eyebrow {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  display: block;
}

/* ---------- پنل جستجوی محصولات ---------- */
.search-panel {
  position: fixed;
  top: var(--header-h);
  right: 0; left: 0;
  border-radius: 0;
  border-width: 0 0 1px;
  box-shadow: var(--shadow-md);
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  z-index: 150;
  max-height: 75vh;
  overflow-y: auto;
}
.search-panel.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
#search-overlay { z-index: 140; }
.search-panel-inner { display: flex; align-items: center; gap: 10px; padding: 14px 0; color: var(--color-text-muted); }
.search-panel-inner input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--color-text);
  outline: none;
}
.search-panel-inner input::placeholder { color: var(--color-text-muted); }
.search-panel-inner input::-webkit-search-cancel-button,
.search-panel-inner input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search-panel-inner input::-ms-clear { display: none; }
.search-close-btn { flex-shrink: 0; width: 34px; height: 34px; }
.search-results { padding-bottom: 8px; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--color-border);
  transition: background-color .2s var(--ease);
  position: relative;
}
.search-result-item:hover { background: var(--color-bg-alt); }
.search-result-media { width: 48px; height: 60px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--color-bg-alt); }
.search-result-media img { width: 100%; height: 100%; object-fit: cover; }
.search-result-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.search-result-name { font-size: 14px; font-weight: 600; color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-price { font-size: 13px; color: var(--color-primary); font-weight: 600; }
.search-result-stock { font-size: 11px; font-weight: 600; color: #c0374a; flex-shrink: 0; }
.search-hint, .search-empty { padding: 18px 0; text-align: center; color: var(--color-text-muted); font-size: 14px; }

/* ---------- کارت دسته‌بندی ---------- */
.category-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.category-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.category-card img { width: 100%; height: 100%; object-fit: cover; }
.category-card .img-placeholder { position: absolute; inset: 0; border-radius: var(--radius-lg); }
.category-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(var(--color-primary-rgb), .78), transparent 65%);
  display: flex; align-items: flex-end;
  padding: 20px;
  z-index: 2;
}
.category-overlay h3 { color: #fff; font-size: 19px; font-weight: 700; }

/* ---------- فیلتر دسته‌بندی ---------- */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: all .2s var(--ease);
}
.filter-btn i { font-size: 12px; }
.filter-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.filter-btn.active {
  background: var(--gradient-brand);
  border-color: transparent;
  color: #fff;
}

/* ---------- کارت محصول ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
@media (min-width: 1000px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}


.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
  display: flex;
  flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
[data-theme="dark"] .product-card { border-color: var(--color-border); }
[data-theme="dark"] .product-card:hover { border-color: var(--color-primary); }
.product-media { position: relative; aspect-ratio: 3 / 4; background: var(--color-bg-alt); }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media .img-placeholder { position: absolute; inset: 0; }

.product-badges {
  position: absolute; top: 10px; left: 10px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  z-index: 2;
}
.badge-pill {
  font-size: 11px; font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
}
.badge-promo { background: var(--gradient-brand); }
.badge-bestseller { background: linear-gradient(135deg, #e0a52c, #b8791f); }
.badge-discount {
  background: linear-gradient(135deg, #ff4d6d, #c0374a);
  box-shadow: 0 3px 10px rgba(192, 55, 74, .35);
  font-weight: 700;
}

.out-of-stock-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 16, 20, .55);
  color: #fff;
  font-size: 15px; font-weight: 700;
  letter-spacing: .3px;
  z-index: 3;
}
.is-out-of-stock .product-media img { filter: grayscale(.5); }

.media-color-swatches {
  position: absolute; bottom: 10px; left: 10px;
  display: flex; flex-direction: column; gap: 5px;
  z-index: 2;
}
.media-color-swatch {
  width: 16px; height: 16px;
  border-radius: 5px;
  border: 1.5px solid rgba(255, 255, 255, .85);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.product-category-icon {
  position: absolute; bottom: 10px; right: 10px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}

.stock-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  width: fit-content;
}
.stock-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.stock-status.in-stock { color: #2f8a4e; }
.stock-status.in-stock .stock-dot { background: #2f8a4e; }
.stock-status.out-of-stock { color: #c0374a; }
.stock-status.out-of-stock .stock-dot { background: #c0374a; }

.product-info { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-category { font-size: 12px; color: var(--color-text-muted); }
.product-name { font-size: 15px; font-weight: 600; line-height: 1.4; }
.product-price { font-size: 15px; font-weight: 700; color: var(--color-primary); margin-top: auto; }
.product-price .old-price {
  text-decoration: line-through;
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: 13px;
  margin-inline-start: 6px;
}
.add-to-cart-btn {
  margin-top: 6px;
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--color-primary-rgb), .25);
  background: rgba(var(--color-primary-rgb), .12);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.add-to-cart-btn:hover { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.add-to-cart-btn.is-disabled {
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  border-color: var(--color-border);
  cursor: not-allowed;
  pointer-events: none;
}

.no-results { text-align: center; color: var(--color-text-muted); padding: 40px 0; grid-column: 1 / -1; }
.product-media-link { display: block; }

/* ---------- جزئیات محصول ---------- */
.product-detail { padding: 32px 0 90px; }
.back-link {
  display: flex;
  width: fit-content;
  margin-inline-start: auto;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
  padding: 9px 16px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.back-link:hover { color: var(--color-primary); border-color: var(--color-primary); }

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 800px) {
  .product-detail-grid { grid-template-columns: 1fr 1fr; align-items: start; gap: 48px; }
}

.product-detail-media {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-md);
}
.product-detail-media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-media .img-placeholder { position: absolute; inset: 0; border-radius: var(--radius-lg); }
.product-detail-media .product-badges { top: 16px; left: 16px; }
.product-detail-media .media-color-swatches { bottom: 16px; left: 16px; gap: 7px; }
.product-detail-media .media-color-swatch { width: 20px; height: 20px; border-radius: 6px; }
.product-detail-media .product-category-icon { bottom: 16px; right: 16px; width: 38px; height: 38px; font-size: 16px; }

.pdp-zoom-lens {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: var(--shadow-lg);
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s var(--ease);
  z-index: 5;
}
@media (hover: none), (pointer: coarse) {
  .pdp-zoom-lens { display: none; }
}

.product-detail-info { display: flex; flex-direction: column; }
.pd-name { font-size: 26px; font-weight: 700; margin: 8px 0 12px; line-height: 1.4; }
.product-detail-info .stock-status { margin-bottom: 12px; font-size: 13px; }
.product-detail-info .stock-progress { margin-bottom: 20px; max-width: 260px; }
.pd-price { font-size: 22px; font-weight: 700; color: var(--color-primary); margin-bottom: 24px; }
.pd-price .old-price {
  text-decoration: line-through;
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: 16px;
  margin-inline-start: 10px;
}

.pd-option-group { margin-bottom: 22px; }
.pd-option-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; color: var(--color-text-muted); margin-bottom: 10px; }
.pd-option-label strong {
  display: inline-flex;
  align-items: center;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 12.5px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(var(--color-primary-rgb), .12);
}

.pd-saved-size-btn {
  background: none; border: none; color: var(--color-primary);
  font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0;
}
.pd-saved-size-btn:hover { text-decoration: underline; }
.pd-size-help-link {
  display: block; background: none; border: none; color: var(--color-primary);
  font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0; margin-top: 10px;
  text-align: right;
}
.pd-size-help-link:hover { text-decoration: underline; }
.pd-saved-size-panel[hidden] { display: none; }
.pd-saved-size-panel {
  margin-top: 10px;
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px; border-radius: var(--radius-sm);
  background: var(--color-bg-alt); box-shadow: var(--shadow-sm);
}
.pd-saved-size-option {
  text-align: right; padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--color-surface); border: 1px solid var(--color-border);
  color: var(--color-text); font-size: 13px; cursor: pointer;
  transition: background-color .15s var(--ease);
}
.pd-saved-size-option:hover { background: rgba(var(--color-primary-rgb), .1); }
.pd-saved-size-empty { font-size: 12.5px; color: var(--color-text-muted); margin: 0; }

.color-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.color-swatch {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  padding: 0;
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.color-swatch:hover { transform: translateY(-2px); }
.color-swatch.active { border-color: var(--color-primary); }
.color-swatch.active::after {
  content: '';
  position: absolute; inset: -5px;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
}

.size-options { display: flex; gap: 8px; flex-wrap: wrap; }
.size-option {
  min-width: 44px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  transition: all .2s var(--ease);
}
.size-option:hover { border-color: var(--color-primary); }
.size-option.active { background: var(--gradient-brand); border-color: transparent; color: #fff; }

.qty-stepper { display: inline-flex; align-items: center; gap: 14px; }
.qty-stepper .qty-btn { width: 34px; height: 34px; font-size: 17px; }
.qty-stepper .qty-value { font-size: 16px; min-width: 24px; }

.pd-add-btn { margin-top: 6px; margin-bottom: 22px; }
.pd-description { color: var(--color-text-muted); font-size: 14px; line-height: 1.9; }

.product-not-found { text-align: center; padding: 80px 0; display: flex; flex-direction: column; align-items: center; gap: 18px; color: var(--color-text-muted); }

/* ---------- اورلی مشترک (پشت پنل/دراور/مودال) ---------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(10, 6, 10, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
  z-index: 200;
}
.overlay.active { opacity: 1; pointer-events: auto; }

/* ---------- درور سبد خرید (باز شدن از سمت راست، منطبق با RTL) ---------- */
.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(420px, 100%);
  z-index: 210;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  border-width: 0 0 0 1px;
  transform: translateX(100%);
  transition: transform .35s var(--ease);
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--color-border);
}
.cart-header h2 { font-size: 19px; font-weight: 700; }
.cart-body { flex: 1; overflow-y: auto; padding: 16px 22px; }
.cart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 100%; color: var(--color-text-muted); }
.cart-empty svg { opacity: .4; }

.cart-items { display: flex; flex-direction: column; gap: 16px; }
.cart-item { display: flex; gap: 12px; align-items: center; }
.cart-item-media {
  width: 68px; height: 84px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  background: var(--color-bg-alt);
}
.cart-item-media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-media .img-placeholder { position: absolute; inset: 0; }
.cart-item-media .img-placeholder svg { width: 24px; height: 24px; }
.cart-item-media .img-placeholder span { display: none; }
.cart-item-media .img-spinner::after { width: 16px; height: 16px; border-width: 2px; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.cart-item-variant { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--color-text-muted); margin-bottom: 4px; }
.color-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--color-border); flex-shrink: 0; }
.cart-item-price { font-size: 13px; color: var(--color-primary); font-weight: 600; }
.cart-item-controls { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
  color: var(--color-text);
}
.qty-btn:hover { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.qty-value { font-size: 14px; font-weight: 600; min-width: 20px; text-align: center; }
.remove-item-btn {
  margin-inline-start: auto;
  background: transparent; border: none;
  color: var(--color-text-muted);
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
}
.remove-item-btn:hover { color: #e14f4f; }

.cart-footer { padding: 18px 22px 22px; border-top: 1px solid var(--color-border); }
.cart-total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.cart-total span:last-child { color: var(--color-primary); }

/* ---------- مودال (عمومی؛ چک‌اوت از همین کامپوننت استفاده می‌کند) ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(30, 12, 28, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease);
  z-index: 220;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 34px 28px 28px;
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateY(28px) scale(.94);
  opacity: 0;
  transition: transform .45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity .3s var(--ease);

  /* اسکرول اختصاصی مودال، جدا از اسکرول صفحه */
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary-light) transparent;
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); opacity: 1; }
.checkout-modal { border-radius: 1px; }
.modal::-webkit-scrollbar { width: 6px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb {
  background: var(--gradient-brand);
  border-radius: 999px;
}

.modal::before {
  content: '';
  position: absolute;
  top: 0; right: 24px; left: 24px;
  height: 4px;
  border-radius: 0 0 999px 999px;
  background: var(--gradient-brand);
  opacity: .9;
}

.modal-close {
  position: absolute;
  top: 16px; left: 16px;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  box-shadow: var(--shadow-sm);
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}
.modal-close:hover {
  background: var(--gradient-brand);
  color: #fff;
  transform: rotate(90deg);
}
.modal-subtitle { color: var(--color-text-muted); font-size: 14px; margin: 8px 0 22px; }
#checkout-title, .modal-title { font-size: 22px; font-weight: 700; }

/* ---------- فرم‌ها ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--color-text-muted); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  transition: border-color .2s var(--ease);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
}
.form-group.has-error input, .form-group.has-error textarea { border-color: #e14f4f; }
.form-error { display: block; font-size: 12px; color: #e14f4f; margin-top: 4px; min-height: 14px; }
.form-hint { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }

/* ---------- گروه انتخاب گزینه (چیپ رادیویی) — روش ارسال/پرداخت و مشابه ---------- */
.option-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.option-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.option-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.option-chip:has(input:checked), .option-chip.active {
  background: var(--gradient-brand);
  border-color: transparent;
  color: #fff;
}
.option-chip:has(input:focus-visible) { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.checkout-summary {
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 13px;
}
.checkout-summary-row { display: flex; justify-content: space-between; padding: 4px 0; color: var(--color-text-muted); }
.checkout-summary-row.total { font-weight: 700; color: var(--color-text); border-top: 1px solid var(--color-border); margin-top: 6px; padding-top: 10px; }
.checkout-discount-row { display: flex; gap: 8px; margin-top: 10px; }
.checkout-discount-row input {
  flex: 1; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--color-border);
  background: var(--color-surface); color: var(--color-text); font-size: 13px; font-family: inherit;
}
.checkout-discount-row .btn { padding: 8px 14px; font-size: 13px; }

.checkout-success { text-align: center; padding: 6px 0 4px; }
.success-icon {
  width: 92px; height: 92px;
  margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--color-success);
  background: radial-gradient(circle, rgba(46, 158, 91, .16), rgba(46, 158, 91, .03) 70%);
  animation: success-pop .55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.success-icon svg path { animation: success-check .4s ease .25s both; }
@keyframes success-pop {
  from { transform: scale(.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes success-check {
  from { stroke-dasharray: 40; stroke-dashoffset: 40; }
  to { stroke-dasharray: 40; stroke-dashoffset: 0; }
}
.checkout-success h2 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.checkout-success p { color: var(--color-text-muted); font-size: 14px; margin-bottom: 24px; }
.success-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.success-actions .btn { transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .25s var(--ease); }
.success-actions .btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: var(--shadow-md); }

/* ---------- منوی حساب کاربری (دراپ‌داون ساده، نه داشبورد) ---------- */
.account-menu { position: relative; }
.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  min-width: 250px;
  border-radius: var(--radius-md);
  padding: 8px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: 160;
}
.account-dropdown.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.account-dropdown-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px 12px; border-bottom: 1px solid var(--color-border); margin-bottom: 6px; }
.account-dropdown-header strong { display: block; font-size: 14px; }
.account-dropdown-header span { font-size: 12px; color: var(--color-text-muted); }
.account-dropdown-avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--color-bg-alt);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted); font-size: 17px;
}
.account-dropdown-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  background: transparent;
  border: none;
  text-align: right;
  transition: background-color .2s var(--ease);
}
.account-menu-item:hover { background: rgba(var(--color-primary-rgb), .12); color: var(--color-primary); }
.account-menu-item i { width: 18px; text-align: center; color: var(--color-primary); }
.account-menu-item.logout { color: #c0374a; }
.account-menu-item.logout i { color: #c0374a; }
.account-login-prompt { padding: 16px 12px 12px; text-align: center; }
.account-login-prompt p { font-size: 13px; color: var(--color-text-muted); margin-bottom: 12px; }

/* ---------- صفحات حساب کاربری (سایز/سفارش/پروفایل/پیگیری) ---------- */
.account-page { padding: 40px 0 90px; }
.account-page-intro { max-width: 640px; margin: 0 auto 28px; text-align: center; }
.account-guard {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 24px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.account-guard p { color: var(--color-text-muted); margin-bottom: 18px; }

.size-form, .profile-form {
  max-width: 520px;
  margin: 0 auto 32px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.admin-form-card {
  width: 100%;
  margin: 0 0 24px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }

.size-live-preview {
  text-align: center;
  padding: 10px;
  margin: 4px 0 14px;
  border-radius: var(--radius-sm);
  background: rgba(var(--color-primary-rgb), .1);
  color: var(--color-primary);
  font-size: 14px;
}
.size-live-preview strong { font-size: 16px; }

.size-profile-list, .order-list { display: flex; flex-direction: column; gap: 14px; max-width: 640px; margin: 0 auto; }
.size-profile-card, .order-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.size-profile-info strong, .order-card-info strong { display: block; font-size: 15px; margin-bottom: 4px; }
.size-profile-info span, .order-card-info span { font-size: 12.5px; color: var(--color-text-muted); }
.size-profile-badge {
  font-size: 13px; font-weight: 700; color: #fff;
  background: var(--gradient-brand);
  padding: 6px 14px; border-radius: 999px; flex-shrink: 0;
}
.size-profile-delete { flex-shrink: 0; color: var(--color-text-muted); }
.size-profile-delete:hover { color: #c0374a; background: rgba(192, 55, 74, .1); }

.order-status-badge {
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  background: rgba(var(--color-primary-rgb), .12); color: var(--color-primary);
  flex-shrink: 0;
}

.avatar-upload { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.avatar-preview {
  width: 72px; height: 72px; border-radius: 50%; overflow: hidden;
  background: var(--color-bg-alt); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted); font-size: 24px;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }

.upload-progress { margin-top: 10px; }
.upload-progress-bar { height: 6px; border-radius: 999px; background: var(--color-bg-alt); overflow: hidden; }
.upload-progress-bar span { display: block; height: 100%; background: var(--gradient-brand); border-radius: 999px; transition: width .15s linear; }
.upload-progress-label { font-size: 11.5px; color: var(--color-text-muted); margin-top: 4px; display: block; }

.track-form { max-width: 440px; margin: 0 auto 32px; padding: 24px; border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.track-timeline { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 4px; }
.track-step { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.track-step-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--color-border); flex-shrink: 0; }
.track-step.done .track-step-dot { background: var(--gradient-brand); }
.track-step span { font-size: 14px; color: var(--color-text-muted); }
.track-step.done span { color: var(--color-text); font-weight: 600; }
.track-not-found { text-align: center; color: var(--color-text-muted); padding: 20px 0; }

.track-order-card {
  max-width: 480px; margin: 0 auto 22px; padding: 20px;
  border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-sm);
}
.track-order-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--color-border); }
.track-order-header strong { font-size: 14.5px; }
.track-order-header span { font-size: 12.5px; color: var(--color-text-muted); }

.track-step-reveal { opacity: 0; transform: translateX(10px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.track-step-reveal.is-visible { opacity: 1; transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
  .track-step-reveal { opacity: 1; transform: none; transition: none; }
}

.track-step-dot.is-current { animation: track-step-pulse 1.6s ease-out infinite; }
@keyframes track-step-pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb), .5); }
  100% { box-shadow: 0 0 0 10px rgba(var(--color-primary-rgb), 0); }
}
@media (prefers-reduced-motion: reduce) {
  .track-step-dot.is-current { animation: none; }
}

/* ---------- پنل ادمین: chrome سبک (سایدبار + جدول‌ها)، جدا از هدر مشتری ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-radius: 0;
  border-width: 0 1px 0 0;
}
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 20px; }
.admin-brand strong { font-size: 15px; flex: 1; }
.admin-sidebar-close-btn, .admin-menu-toggle-btn { display: none; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 14px;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.admin-nav-link i { width: 16px; text-align: center; }
.admin-nav-link:hover, .admin-nav-link.active { background: rgba(var(--color-primary-rgb), .12); color: var(--color-primary); }
.admin-sidebar-footer { border-top: 1px solid var(--color-border); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.admin-sidebar-footer .admin-name { font-size: 13px; font-weight: 600; color: var(--color-text); }

.admin-main { flex: 1; padding: 32px; overflow-x: auto; min-width: 0; }
.admin-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-header-row h1 { font-size: 22px; font-weight: 700; }

.admin-table-wrap { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--color-surface); font-size: 13.5px; }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--color-border); white-space: nowrap; vertical-align: middle; }
.admin-table th { color: var(--color-text-muted); font-weight: 600; background: var(--color-bg-alt); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-badge { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(var(--color-primary-rgb), .12); color: var(--color-primary); }
.admin-empty { padding: 40px; text-align: center; color: var(--color-text-muted); }
.admin-table-actions { display: flex; align-items: center; gap: 6px; height: 100%; }

.order-status-select {
  padding: 9px 30px 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 13px;
  min-width: 150px;
  transition: border-color .2s var(--ease);
}
.order-status-select:hover { border-color: var(--color-primary); }
.admin-table-actions .icon-btn { width: 32px; height: 32px; }

.permission-grid { display: flex; flex-wrap: wrap; gap: 10px; }

.color-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.color-row { display: flex; align-items: center; gap: 8px; }
.color-row .color-name { flex: 1; }
.color-row .color-hex {
  width: 42px; height: 38px; padding: 2px;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-surface); cursor: pointer; flex-shrink: 0;
}
.color-row .icon-btn { width: 36px; height: 36px; flex-shrink: 0; }

.admin-image-upload { display: flex; align-items: center; gap: 16px; }
.admin-image-preview {
  width: 72px; height: 88px; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--color-bg-alt); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted); font-size: 22px;
}
.admin-image-preview img { width: 100%; height: 100%; object-fit: cover; }

.admin-login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.admin-login-card { max-width: 380px; width: 100%; padding: 32px 26px; border-radius: var(--radius-lg); }

.admin-sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 998;
}

@media (max-width: 860px) {
  .admin-menu-toggle-btn { display: inline-flex; flex-shrink: 0; }
  .admin-sidebar-close-btn { display: inline-flex; flex-shrink: 0; }

  .admin-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 82vw;
    max-width: 300px;
    height: 100vh;
    z-index: 999;
    border-width: 0 0 0 1px;
    transform: translateX(100%);
    transition: transform .25s var(--ease);
    overflow-y: auto;
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar-overlay.open { display: block; }

  .admin-nav { overflow-x: visible; }
  .admin-sidebar-footer { flex-direction: column; border-top: 1px solid var(--color-border); padding-top: 14px; }
  .admin-main { padding: 18px; }
  .admin-header-row { flex-wrap: nowrap; gap: 10px; }
  .admin-header-row h1 { font-size: 18px; }
}

@media (max-width: 560px) {
  .admin-form-card { padding: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .admin-table-actions { gap: 8px; }
  .admin-table-actions .icon-btn { width: 36px; height: 36px; }
  .admin-image-upload { flex-wrap: wrap; }
  .color-preset-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important; }
  .admin-header-row { gap: 8px; }
  .admin-header-row .btn { font-size: 13px; padding: 9px 14px; }
}

/* ---------- سایدبار فیلتر محصولات (دسته‌بندی/موجودی/رنگ) ---------- */
.filter-mobile-open-btn { display: inline-flex; margin-bottom: 16px; }
@media (min-width: 900px) { .filter-mobile-open-btn { display: none; } }

.filter-sidebar {
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-self: start;
}
.filter-sidebar-header { display: none; align-items: center; justify-content: space-between; }
.filter-sidebar-header h3 { font-size: 16px; font-weight: 700; }

.filter-group h4 { font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); margin-bottom: 12px; letter-spacing: .3px; }
.filter-checkbox-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; cursor: pointer; }
.filter-checkbox-row input { accent-color: var(--color-primary); width: 16px; height: 16px; cursor: pointer; }

.filter-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.filter-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.filter-switch-track { width: 38px; height: 22px; border-radius: 999px; background: var(--color-border); position: relative; transition: background-color .2s var(--ease); flex-shrink: 0; }
.filter-switch-track::after {
  content: ''; position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.filter-switch input:checked + .filter-switch-track { background: var(--gradient-brand); }
.filter-switch input:checked + .filter-switch-track::after { transform: translateX(-16px); }

.filter-color-list { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-color-swatch {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--color-border);
  cursor: pointer; position: relative; padding: 0;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.filter-color-swatch:hover { transform: translateY(-2px); }
.filter-color-swatch.active { border-color: var(--color-primary); }
.filter-color-swatch.active::after {
  content: ''; position: absolute; inset: -4px; border: 2px solid var(--color-primary); border-radius: 50%;
}

.filter-empty-hint { font-size: 13px; color: var(--color-text-muted); }

@media (max-width: 899px) {
  .filter-sidebar {
    position: fixed; top: 0; right: 0; height: 100%; width: min(320px, 85%);
    z-index: 230; border-radius: 0;
    transform: translateX(100%);
    transition: transform .3s var(--ease);
    overflow-y: auto;
  }
  .filter-sidebar.open { transform: translateX(0); }
  .filter-sidebar-header { display: flex; }
  #filter-overlay { z-index: 225; }
}

/* ---------- آکاردئون سوالات متداول ---------- */
.faq-page { padding: 40px 0 90px; }
.faq-intro { max-width: 760px; margin: 0 auto 32px; text-align: center; }
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
}
.faq-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  text-align: right;
  background: transparent;
  border: none;
  color: var(--color-text);
}
.faq-question i { transition: transform .25s var(--ease); color: var(--color-primary); flex-shrink: 0; }
.faq-item.open .faq-question i { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.faq-item.open .faq-answer { max-height: 600px; }
.faq-answer-inner { padding: 0 20px 18px; color: var(--color-text-muted); font-size: 14px; line-height: 1.9; }
.faq-empty { text-align: center; color: var(--color-text-muted); padding: 30px 0; }

/* ---------- نوار شناور تماس سریع (تلگرام/واتساپ/تماس) ---------- */
.contact-bar {
  --contact-bar-h: 62px;
  position: fixed;
  right: 0; left: 0; bottom: 0;
  z-index: 250;
  display: flex;
  height: var(--contact-bar-h);
  padding-bottom: env(safe-area-inset-bottom, 0);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-width: 1px 1px 0 1px;
  overflow: hidden;
}
.contact-bar-item {
  flex: 1 1 0;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  position: relative;
  color: var(--color-text);
  font-size: 14.5px; font-weight: 600;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.contact-bar-item + .contact-bar-item::before {
  content: '';
  position: absolute; right: 0; top: 18%; bottom: 18%;
  width: 1px;
  background: var(--glass-border);
}
.contact-bar-icon {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 16px; color: #fff;
  transition: transform .2s var(--ease);
  flex-shrink: 0;
}
.contact-bar-item:hover .contact-bar-icon { transform: scale(1.1); }
.contact-bar-item:hover { background: var(--color-bg-alt); }
.contact-bar-item--telegram .contact-bar-icon { background: var(--color-telegram); }
.contact-bar-item--whatsapp .contact-bar-icon { background: var(--color-whatsapp); }
.contact-bar-item--phone .contact-bar-icon { background: var(--gradient-brand); }
@media (max-width: 560px) {
  .contact-bar { --contact-bar-h: 56px; }
  .contact-bar-item { font-size: 13px; gap: 7px; }
  .contact-bar-icon { width: 28px; height: 28px; font-size: 14px; }
  .toast { bottom: calc(56px + 14px + env(safe-area-inset-bottom, 0)); }
}

/* ---------- اسکلت لودینگ ---------- */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
}
.skeleton::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(var(--color-surface-rgb), .55), transparent);
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton::after { animation: none; }
}

.skeleton-card { display: flex; flex-direction: column; gap: 8px; }
.skeleton-card .skeleton-image { aspect-ratio: 3 / 4; }
.skeleton-card .skeleton-line { height: 12px; border-radius: 999px; }
.skeleton-category { aspect-ratio: 4 / 3; }
.skeleton-hero { width: 100%; aspect-ratio: 21 / 9; border-radius: var(--radius-lg); }
.skeleton-pdp { width: 100%; max-width: 480px; aspect-ratio: 3 / 4; border-radius: var(--radius-lg); margin: 24px auto; }

/* ---------- نوار پیشرفت بارگذاری صفحه ---------- */
#page-load-bar {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0;
  background: var(--gradient-brand);
  z-index: 9999;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
#page-load-bar.is-loading {
  width: 70%;
  opacity: 1;
  transition: width 8s cubic-bezier(.1, .9, .1, 1), opacity .2s ease;
}

/* ---------- fade/reveal پلکانی هنگام اسکرول ---------- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll { opacity: 1; transform: none; transition: none; }
}

/* ---------- توست ---------- */
.toast {
  position: fixed;
  bottom: calc(62px + 16px + env(safe-area-inset-bottom, 0));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-black);
  color: #fff;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  z-index: 300;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
