/* تم روشن/تاریک + پالت رنگی سراسری — اعمال کامل */
:root {
  --brand: #100DD1;
  --brand-rgb: 16, 13, 209;
  --brand-soft: #eef0ff;
  --brand-contrast: #ffffff;
  --surface: #eff0f6;
  --card: #ffffff;
  --text: #1d2433;
  --muted: #747794;
  --border: #e5e7ef;
  --success: #10b981;
  --danger: #ea4c62;
  --warning: #f59e0b;
  /* کارد بالای صفحات */
  --hero-bg: linear-gradient(135deg, var(--brand-soft) 0%, var(--card) 55%);
  --hero-fg: var(--text);
  --hero-muted: var(--muted);
  --hero-chip-bg: rgba(var(--brand-rgb), .12);
  --hero-chip-fg: var(--brand);
  --hero-border: 1px solid rgba(var(--brand-rgb), .16);
  --hero-shadow: 0 10px 26px rgba(15, 15, 40, .07);
  --hero-accent: var(--brand);
}

html[data-accent="indigo"] { --brand: #100DD1; --brand-rgb: 16, 13, 209; --brand-soft: #eef0ff; }
html[data-accent="teal"] { --brand: #0f766e; --brand-rgb: 15, 118, 110; --brand-soft: #ecfdf8; }
html[data-accent="emerald"] { --brand: #059669; --brand-rgb: 5, 150, 105; --brand-soft: #ecfdf5; }
html[data-accent="amber"] { --brand: #d97706; --brand-rgb: 217, 119, 6; --brand-soft: #fffbeb; }
html[data-accent="rose"] { --brand: #e11d48; --brand-rgb: 225, 29, 72; --brand-soft: #fff1f2; }
html[data-accent="slate"] { --brand: #334155; --brand-rgb: 51, 65, 85; --brand-soft: #f1f5f9; }

html[theme-color="dark"] {
  --surface: #12162a;
  --card: #1a2035;
  --text: #f3f4f8;
  --muted: #a1a6bd;
  --border: #2a3148;
  --brand-soft: rgba(var(--brand-rgb), .2);
  --hero-bg: linear-gradient(135deg, rgba(var(--brand-rgb), .28) 0%, var(--card) 60%);
  --hero-fg: var(--text);
  --hero-muted: var(--muted);
  --hero-chip-bg: rgba(var(--brand-rgb), .22);
  --hero-chip-fg: #c7d2fe;
  --hero-border: 1px solid rgba(var(--brand-rgb), .28);
  --hero-shadow: 0 12px 28px rgba(0, 0, 0, .32);
}

/* پایه‌ها */
body { background: var(--surface); color: var(--text); }
.page-content-wrapper { background: transparent; color: var(--text); }

html[theme-color="dark"] body,
html[theme-color="dark"] #preloader,
html[theme-color="dark"] .page-content-wrapper,
html[theme-color="dark"] .cart-pro-page {
  background: var(--surface) !important;
  color: var(--text) !important;
}

html[theme-color="dark"] .card,
html[theme-color="dark"] .product-card,
html[theme-color="dark"] .cart-summary-card,
html[theme-color="dark"] .checkout-form-card,
html[theme-color="dark"] .cart-items-card,
html[theme-color="dark"] .shop-filter-panel,
html[theme-color="dark"] .pd-panel,
html[theme-color="dark"] .pd-buybox,
html[theme-color="dark"] .pd-gallery--pro,
html[theme-color="dark"] .pd-panel--pro,
html[theme-color="dark"] .live-price-chip,
html[theme-color="dark"] .settings-card,
html[theme-color="dark"] .st-card,
html[theme-color="dark"] .profile-pro-card,
html[theme-color="dark"] .profile-pro-stat,
html[theme-color="dark"] .modal-content,
html[theme-color="dark"] .my-order-card,
html[theme-color="dark"] .od-status-card,
html[theme-color="dark"] .flash-sale-card--uniform,
html[theme-color="dark"] .catagory-card,
html[theme-color="dark"] .price-live-card,
html[theme-color="dark"] .price-chart-card,
html[theme-color="dark"] .calc-card,
html[theme-color="dark"] .notif-card,
html[theme-color="dark"] .club-card,
html[theme-color="dark"] .profile-edit-card,
html[theme-color="dark"] .address-manage-card {
  background: var(--card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .28) !important;
}
html[theme-color="dark"] .my-order-card .small,
html[theme-color="dark"] .my-order-mid,
html[theme-color="dark"] .text-muted,
html[theme-color="dark"] .product-meta { color: var(--muted) !important; }
html[theme-color="dark"] .my-order-status {
  background: rgba(var(--brand-rgb), .22) !important;
  color: #c7d2fe !important;
}
html[theme-color="dark"] .flash-sale-thumb {
  background: linear-gradient(180deg, #232942 0%, #1a2035 100%) !important;
}
html[theme-color="dark"] .flash-sale-card--uniform .progress {
  background: #2a3148 !important;
}
html[theme-color="dark"] .form-control,
html[theme-color="dark"] .form-select,
html[theme-color="dark"] .form-control:focus,
html[theme-color="dark"] .form-select:focus {
  background: #121627 !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* برند روی همه کنترل‌های اصلی */
.btn-primary,
.btn-success,
.btn-info,
.pd-add-btn,
.sf-input:checked + .sf-chip,
.shop-chip.is-active,
.nc-launcher,
.nc-send,
.nc-guest-start,
.nc-bubble.is-staff,
.badge-primary,
.bg-primary,
.progress-bar,
.od-status-badge {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
  color: var(--brand-contrast, #fff) !important;
}

/* لانچر شیشه‌ای چت — پس‌زمینه برند فقط وقتی باز است */
.nc-launcher:not(.is-open) {
  background: rgba(255, 255, 255, 0.72) !important;
  color: var(--brand) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}
html[theme-color="dark"] .nc-launcher:not(.is-open) {
  background: rgba(18, 22, 42, 0.78) !important;
  color: #e8ebf7 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* منوی پایین موبایل — حالت غیرشیشه‌ای (fallback) */
.footer-nav-area:not(.nav-glass-tabbar) {
  background: var(--brand) !important;
  background-color: var(--brand) !important;
  box-shadow: 0 -6px 24px rgba(var(--brand-rgb), .28) !important;
}
.footer-nav-area:not(.nav-glass-tabbar) .suha-footer-nav ul li a,
.footer-nav-area:not(.nav-glass-tabbar) .suha-footer-nav ul li a:hover,
.footer-nav-area:not(.nav-glass-tabbar) .suha-footer-nav ul li a:focus {
  color: #fff !important;
}
.footer-nav-area:not(.nav-glass-tabbar) .suha-footer-nav ul li.active a {
  color: #fff !important;
  opacity: 1;
}
.footer-nav-area:not(.nav-glass-tabbar) .suha-footer-nav ul li:not(.active) a {
  opacity: .88;
}
.footer-nav-area:not(.nav-glass-tabbar) .suha-footer-nav li.active a i {
  background-color: rgba(255, 255, 255, .22) !important;
  border-color: transparent !important;
  color: #fff !important;
  border-radius: .55rem;
  padding: .2rem;
}
.sidenav-nav a.active {
  background-color: rgba(255, 255, 255, .16) !important;
  border-color: transparent !important;
  color: #fff !important;
}

/* آف‌کنوس / منوی همبرگری — ظاهر شیشه‌ای در nav-glass.css */
.suha-offcanvas-wrap.offcanvas:not(.nav-glass-menu),
.suha-offcanvas-wrap:not(.nav-glass-menu) {
  background: linear-gradient(160deg, var(--brand), #0f172a) !important;
}
.sidenav-profile {
  background: transparent !important;
}
.btn-outline-primary {
  color: var(--brand) !important;
  border-color: var(--brand) !important;
}
.btn-outline-primary:hover {
  background: var(--brand) !important;
  color: #fff !important;
}
.btn-primary:hover,
.btn-success:hover,
.btn-info:hover {
  filter: brightness(.92);
}

.text-primary,
.sale-price,
.product-card--uniform .sale-price,
.price-live-value,
.chip-val,
.chip-dot,
.pd-price,
.od-total,
.profile-pro-stat strong,
.my-order-price,
a:hover {
  color: var(--brand) !important;
}
.cart-icon-wrap a i {
  color: var(--brand) !important;
}
.cart-icon-wrap a span:not(.header-cart-label) {
  background-color: var(--brand) !important;
  color: #fff !important;
}
.header-area .header-cart-btn .header-cart-label {
  background: transparent !important;
  color: inherit !important;
}
.chip-dot { background: var(--brand) !important; box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .14) !important; }

.header-area .suha-navbar-toggler div span,
.filter-option,
.form-check-input:checked {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
}
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(var(--brand-rgb), .25) !important; }

.page-link.active,
.active > .page-link {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
}

/* کارد بالای صفحات — هماهنگ با تم روشن/تاریک و پالت */
.profile-pro-hero,
.shop-hero,
.shop-hero--melted,
.shop-hero--bar,
.shop-hero--jewelry,
.prices-hero,
.alerts-hero,
.wallet-hero,
.club-hero,
.od-hero,
.budget-hero,
.nc-head {
  background: var(--card) !important;
  background: var(--hero-bg) !important;
  color: var(--hero-fg) !important;
  border: var(--hero-border) !important;
  box-shadow: var(--hero-shadow) !important;
  position: relative;
  overflow: hidden;
}
.profile-pro-hero::before,
.shop-hero::before,
.prices-hero::before,
.alerts-hero::before,
.wallet-hero::before,
.club-hero::before,
.od-hero::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: auto;
  right: 0;
  width: 4px;
  background: var(--hero-accent, var(--brand));
  border-radius: 4px 0 0 4px;
}
html[dir="ltr"] .profile-pro-hero::before,
html[dir="ltr"] .shop-hero::before,
html[dir="ltr"] .prices-hero::before,
html[dir="ltr"] .alerts-hero::before,
html[dir="ltr"] .wallet-hero::before,
html[dir="ltr"] .club-hero::before,
html[dir="ltr"] .od-hero::before {
  left: 0;
  right: auto;
  border-radius: 0 4px 4px 0;
}
.profile-pro-hero > *,
.shop-hero > *,
.prices-hero > *,
.alerts-hero > *,
.wallet-hero > *,
.club-hero > *,
.od-hero > * {
  position: relative;
  z-index: 1;
}
.profile-pro-hero h5,
.shop-hero h5,
.shop-hero h4,
.shop-hero h6,
.prices-hero h5,
.alerts-hero h5,
.wallet-hero strong,
.club-hero .club-points,
.od-hero h5,
.nc-head strong {
  color: var(--hero-fg) !important;
}
.shop-hero .small,
.shop-hero .opacity-90,
.prices-hero .opacity-90,
.prices-hero .text-muted,
.alerts-hero .small,
.wallet-hero-copy span,
.od-hero-label,
.od-hero .opacity-90,
.od-hero .small,
.nc-head span,
.club-hero .small,
.profile-pro-hero .small {
  color: var(--hero-muted) !important;
  opacity: 1 !important;
}
.shop-hero-meta,
.alerts-hero-meta > div,
.club-hero-badge {
  background: var(--hero-chip-bg) !important;
  color: var(--hero-chip-fg) !important;
}
.shop-hero-meta strong,
.alerts-hero-meta strong {
  color: var(--hero-chip-fg) !important;
}
.shop-hero-meta span,
.alerts-hero-meta span {
  color: var(--hero-muted) !important;
  opacity: 1 !important;
}
.prices-hero-actions .btn-light,
.wallet-hero-actions .btn-light {
  color: var(--brand) !important;
  background: var(--card) !important;
  border: 1px solid rgba(var(--brand-rgb), .25) !important;
}
.nc-head {
  border-radius: 0 !important;
  border: 0 !important;
  background: linear-gradient(135deg, var(--brand), #0b1220) !important;
  color: #fff !important;
}
.nc-head::before { display: none !important; }
.nc-head strong,
.nc-head span { color: #fff !important; }

.ship-option.is-active,
.address-card.is-active {
  background: rgba(var(--brand-rgb), .06) !important;
  border-color: rgba(var(--brand-rgb), .45) !important;
  color: var(--text) !important;
}
.ship-option.is-active strong,
.address-card.is-active strong { color: var(--text) !important; }

.wishlist-btn,
.wishlist-round.is-active { color: var(--danger) !important; }
.wishlist-btn:not(.is-active) { color: inherit; }
.product-card .wishlist-btn:not(.is-active) { color: #9aa3b5 !important; }

.star-rating-input { display: flex; gap: .2rem; }
.star-rating-input .star-btn {
  border: 0;
  background: transparent;
  color: #f59e0b;
  font-size: 1.35rem;
  padding: 0 .1rem;
  cursor: pointer;
}
.star-rating-input .star-btn:not(.is-on) { color: #d1d5db; }

.theme-swatches { display: flex; flex-wrap: wrap; gap: .5rem; }
.theme-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.92);
}
.theme-swatch.is-active {
  border-color: #111827;
  transform: scale(1.08);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.95), 0 0 0 2px rgba(17,24,39,.25);
}
html[theme-color="dark"] .theme-swatch {
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}
html[theme-color="dark"] .theme-swatch.is-active {
  border-color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.5), 0 0 0 2px rgba(255,255,255,.35);
}
.theme-swatch[data-accent="indigo"] { background: #100DD1; }
.theme-swatch[data-accent="teal"] { background: #0f766e; }
.theme-swatch[data-accent="emerald"] { background: #059669; }
.theme-swatch[data-accent="amber"] { background: #d97706; }
.theme-swatch[data-accent="rose"] { background: #e11d48; }
.theme-swatch[data-accent="slate"] { background: #334155; }

.home-palette-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .45rem;
}
.home-palette-label {
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  opacity: .92;
}
.home-theme-switch .form-check-input {
  background-color: rgba(255,255,255,.25) !important;
  border-color: rgba(255,255,255,.55) !important;
}
.home-theme-switch .form-check-input:checked {
  background-color: var(--brand, #100DD1) !important;
  border-color: var(--brand, #100DD1) !important;
}
html[theme-color="dark"] .dark-mode-wrapper .home-theme-switch .form-check-input:not(:checked) {
  background-color: rgba(255,255,255,.2) !important;
  border-color: rgba(255,255,255,.55) !important;
}

.profile-pro-hero {
  border-radius: 1.25rem;
  padding: 1.4rem 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  /* رنگ از قوانین مشترک hero در همین فایل */
}
.profile-pro-avatar {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(var(--brand-rgb), .35);
  flex-shrink: 0;
}
.profile-pro-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-pro-hero h5 { margin: 0 0 .2rem; }
.profile-pro-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .55rem;
  margin-bottom: 1rem;
}
.profile-pro-stat {
  background: var(--card);
  border-radius: 1rem;
  padding: .85rem .7rem;
  text-align: center;
  box-shadow: 0 8px 20px rgba(15,15,40,.05);
}
.profile-pro-stat span { font-size: .72rem; color: var(--muted); }
.profile-pro-card {
  background: var(--card);
  border-radius: 1.15rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 20px rgba(15,15,40,.05);
  margin-bottom: .85rem;
}
.profile-pro-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  text-decoration: none;
  color: inherit;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}
.profile-pro-link:last-child { border-bottom: 0; }
.profile-pro-link .title {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.profile-pro-link .title i {
  width: 34px;
  height: 34px;
  border-radius: .7rem;
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.settings-pro .settings-card { margin-bottom: .65rem; }
.settings-pro .single-settings .title span span {
  display: block;
  font-size: .72rem;
  color: var(--muted);
  font-weight: 400;
}
