/*
  StockDivar Modern UI Layer — v63
  Typeface: Vazirmatn (open web font) with resilient system fallbacks.
  The font is loaded from Google Fonts; no font binaries are bundled in this package.
*/
/* STOCKDIVAR_LOCAL_VAZIRMATN_V810
 * Self-hosted Vazirmatn Variable 5.3.0 (OFL-1.1).
 * No Google Fonts request is required.
 */
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('./fonts/vazirmatn-v810-arabic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('./fonts/vazirmatn-v810-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('./fonts/vazirmatn-v810-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --font-main: "Vazirmatn", "Segoe UI", Tahoma, Arial, sans-serif;
  --brand-950: #4d0b11;
  --brand-900: #6f1018;
  --brand-800: #8f1821;
  --brand-700: #ad2029;
  --brand-600: #c52b34;
  --brand-100: #fde8ea;
  --brand-50: #fff5f6;
  --pro-bg: #f6f7f9;
  --pro-surface: rgba(255, 255, 255, .94);
  --pro-surface-solid: #fff;
  --pro-text: #17202d;
  --pro-muted: #687384;
  --pro-line: #e4e8ee;
  --pro-line-strong: #d7dde6;
  --pro-radius-xs: 10px;
  --pro-radius-sm: 14px;
  --pro-radius: 18px;
  --pro-radius-lg: 24px;
  --pro-shadow-xs: 0 2px 8px rgba(15, 23, 42, .045);
  --pro-shadow-sm: 0 8px 24px rgba(15, 23, 42, .065);
  --pro-shadow: 0 18px 48px rgba(15, 23, 42, .09);
  --pro-shadow-brand: 0 14px 30px rgba(173, 32, 41, .23);
  --red-950: var(--brand-950);
  --red-900: var(--brand-900);
  --red-800: var(--brand-800);
  --red-700: var(--brand-700);
  --red-600: var(--brand-600);
  --red-100: var(--brand-100);
  --red-50: var(--brand-50);
  --bg: var(--pro-bg);
  --surface: var(--pro-surface-solid);
  --text: var(--pro-text);
  --muted: var(--pro-muted);
  --line: var(--pro-line);
  --line-strong: var(--pro-line-strong);
  --radius-xs: var(--pro-radius-xs);
  --radius-sm: var(--pro-radius-sm);
  --radius: var(--pro-radius);
  --radius-lg: var(--pro-radius-lg);
  --shadow-sm: var(--pro-shadow-sm);
  --shadow: var(--pro-shadow);
  --shadow-red: var(--pro-shadow-brand);
}

html {
  font-family: var(--font-main) !important;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body,
button,
input,
textarea,
select,
option,
optgroup,
table,
dialog {
  font-family: var(--font-main) !important;
}

input, textarea, select, button {
  font-size: 1rem;
}

input::placeholder, textarea::placeholder {
  color: #8a94a3;
  opacity: 1;
  font-weight: 400;
}

:where(.brand strong, h1, h2, h3, h4) {
  font-feature-settings: "ss01" 1, "kern" 1;
}

:where(.price, [data-price], .stat-value, .metric-value, td, th) {
  font-variant-numeric: tabular-nums;
}

body {
  color: var(--pro-text);
  background-color: var(--pro-bg);
  letter-spacing: -.006em;
  font-size: 16px;
  line-height: 1.75;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 90% -5%, rgba(197, 43, 52, .10), transparent 26rem),
    radial-gradient(circle at 0% 35%, rgba(31, 111, 235, .055), transparent 25rem),
    linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(246, 247, 249, .98) 30rem);
}

::selection {
  color: #fff;
  background: var(--brand-700);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(107, 114, 128, .45) transparent;
}

*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(107, 114, 128, .38);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 3px solid rgba(197, 43, 52, .22) !important;
  outline-offset: 2px;
}

:where(h1, h2, h3, h4, strong, b, th) {
  letter-spacing: -.018em;
}

:where(p, li, small, .meta, .muted) {
  letter-spacing: 0;
}

/* Header and navigation */
.site-header,
.category-header,
.panel-header {
  background: rgba(255, 255, 255, .84) !important;
  border-color: rgba(218, 223, 231, .88) !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .025), 0 10px 30px rgba(15, 23, 42, .035);
  backdrop-filter: saturate(155%) blur(18px);
  -webkit-backdrop-filter: saturate(155%) blur(18px);
}

.brand-mark,
.profile-avatar,
.seller-avatar {
  background: linear-gradient(145deg, var(--brand-600), var(--brand-900)) !important;
  box-shadow: 0 10px 22px rgba(143, 24, 33, .22) !important;
}

.brand strong {
  font-weight: 900;
  letter-spacing: -.04em;
}

.brand small,
.header-search,
.desktop-nav,
.breadcrumb,
.eyebrow {
  letter-spacing: -.018em;
}

.header-search,
.hero-global-search,
.hero-search,
.drawer-search-box,
.search-page-header-form {
  border: 1px solid var(--pro-line) !important;
  background: rgba(247, 248, 250, .92) !important;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, .025);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
}

.header-search:focus-within,
.hero-global-search:focus-within,
.hero-search:focus-within,
.drawer-search-box:focus-within,
.search-page-header-form:focus-within {
  border-color: rgba(173, 32, 41, .46) !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(173, 32, 41, .08), var(--pro-shadow-xs) !important;
}

.desktop-nav a,
.desktop-nav button,
.drawer-links a,
.mobile-bottom-nav a,
.mobile-bottom-nav button {
  font-weight: 600;
}

/* Unified buttons */
.primary-btn,
.secondary-btn,
.outline-btn,
.ghost-btn,
.login-btn,
.signup-btn,
.card-action,
.filter-mobile-btn,
.header-category-btn,
.nav-category-btn,
.theme-toggle,
[data-apply-filters],
[type="submit"] {
  border-radius: 12px !important;
  font-weight: 700;
  letter-spacing: -.018em;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease !important;
}

.primary-btn,
.signup-btn,
.drawer-post,
.mobile-post {
  background: linear-gradient(145deg, var(--brand-600), var(--brand-800)) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: var(--pro-shadow-brand) !important;
}

.primary-btn:hover,
.signup-btn:hover,
.drawer-post:hover,
.mobile-post:hover {
  transform: translateY(-1px);
  background: linear-gradient(145deg, var(--brand-700), var(--brand-900)) !important;
  box-shadow: 0 17px 34px rgba(143, 24, 33, .28) !important;
}

.secondary-btn,
.outline-btn,
.ghost-btn,
.login-btn,
.theme-toggle,
.header-category-btn,
.nav-category-btn,
.filter-mobile-btn {
  border-color: var(--pro-line) !important;
  box-shadow: var(--pro-shadow-xs);
}

.secondary-btn:hover,
.outline-btn:hover,
.ghost-btn:hover,
.login-btn:hover,
.theme-toggle:hover,
.header-category-btn:hover,
.nav-category-btn:hover,
.filter-mobile-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(173, 32, 41, .25) !important;
  box-shadow: var(--pro-shadow-sm);
}

button:active,
.primary-btn:active,
.secondary-btn:active,
.outline-btn:active,
.ghost-btn:active {
  transform: translateY(0) scale(.985) !important;
}

/* Cards, panels, lists */
.card-surface,
.notice-card,
.stat-card,
.action-card,
.product-card,
.job-card,
.resume-card,
.category-card,
.path-card,
.about-card,
.gallery-card,
.product-info-card,
.content-card,
.product-card-mini,
.search-type-tabs,
.search-filter-panel,
.search-toolbar,
.search-result-card,
.form-card,
.store-card,
.order-card,
.ticket-card,
.wallet-card,
.report-card,
.panel-card,
.dashboard-sidebar,
.mobile-bottom-nav,
.drawer,
.app-modal,
.location-modal,
.public-account-dropdown,
.sd-modal {
  border-color: var(--pro-line) !important;
  box-shadow: var(--pro-shadow-sm) !important;
}

.card-surface,
.notice-card,
.stat-card,
.action-card,
.product-card,
.job-card,
.resume-card,
.category-card,
.path-card,
.about-card,
.gallery-card,
.product-info-card,
.content-card,
.product-card-mini,
.search-filter-panel,
.search-toolbar,
.search-result-card,
.form-card,
.store-card,
.order-card,
.ticket-card,
.wallet-card,
.report-card,
.panel-card {
  border-radius: var(--pro-radius) !important;
  background: var(--pro-surface) !important;
}

:where(.product-card, .job-card, .resume-card, .category-card, .path-card, .action-card, .stat-card, .search-result-card, .product-card-mini, .store-card) {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease !important;
}

:where(.product-card, .job-card, .resume-card, .category-card, .path-card, .action-card, .search-result-card, .product-card-mini, .store-card):hover {
  transform: translateY(-3px);
  border-color: rgba(173, 32, 41, .20) !important;
  box-shadow: var(--pro-shadow) !important;
}

.eyebrow,
.badge,
.status-pill,
.stat-trend,
.job-tags span,
.resume-tags span,
.category-chip,
.active-filter-chips button,
.search-result-badge {
  border-radius: 999px !important;
  font-weight: 700;
}

/* Inputs and forms */
input,
textarea,
select {
  border-radius: 11px !important;
}

:where(input:not([type="checkbox"]):not([type="radio"]), textarea, select) {
  border-color: var(--pro-line) !important;
  background-color: rgba(250, 251, 252, .96) !important;
  color: var(--pro-text) !important;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease !important;
}

:where(input:not([type="checkbox"]):not([type="radio"]), textarea, select):focus {
  border-color: rgba(173, 32, 41, .48) !important;
  background-color: #fff !important;
  box-shadow: 0 0 0 4px rgba(173, 32, 41, .075) !important;
  outline: 0 !important;
}

input::placeholder,
textarea::placeholder {
  color: #9aa3b2 !important;
  opacity: 1;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--brand-700);
}

/* Dashboard refinement */
.layout-shell {
  gap: 22px !important;
}

.dashboard-sidebar {
  background: rgba(255, 255, 255, .88) !important;
  backdrop-filter: blur(16px);
}

.sidebar-nav a,
.panel-nav a {
  border-radius: 11px !important;
  font-weight: 600;
}

.sidebar-nav a:hover,
.sidebar-nav a.active,
.panel-nav a:hover,
.panel-nav a.active {
  background: linear-gradient(135deg, var(--brand-50), rgba(255, 255, 255, .9)) !important;
  color: var(--brand-800) !important;
}

.page-intro h1 {
  max-width: 820px;
  line-height: 1.42;
}

.stats-grid,
.quick-actions-grid,
.products-grid,
.search-results-grid {
  gap: 16px !important;
}

.stat-card strong,
.price,
.price-box strong,
.wallet-balance,
.order-total {
  font-variant-numeric: tabular-nums;
}

/* Search and filter polish */
.search-hero {
  border-bottom: 1px solid rgba(228, 232, 238, .8);
}

.search-type-tabs {
  background: rgba(255, 255, 255, .86) !important;
  backdrop-filter: blur(16px);
  padding: 7px !important;
}

.search-type-tabs button {
  border-radius: 11px !important;
  min-height: 44px;
  font-weight: 700;
}

.search-type-tabs button.is-active {
  color: #fff !important;
  background: linear-gradient(145deg, var(--brand-600), var(--brand-800)) !important;
  box-shadow: 0 10px 22px rgba(143, 24, 33, .20) !important;
}

.search-filter-panel {
  position: sticky;
  top: 92px;
  overflow: hidden;
}

.search-filter-panel::before {
  content: "";
  display: block;
  height: 4px;
  margin: -1px -1px 14px;
  background: linear-gradient(90deg, var(--brand-900), var(--brand-600), #ee7b82);
}

.search-result-card {
  overflow: hidden;
}

.search-result-card img,
.product-thumb img,
.main-image img,
.thumb img,
.media-preview img,
.media-preview video {
  object-fit: cover;
}

/* Professional modal/drawer surfaces */
.drawer,
.app-modal,
.location-modal,
.sd-modal {
  background: rgba(255, 255, 255, .97) !important;
  backdrop-filter: blur(22px);
}

.drawer-head,
.modal-head,
.filter-panel-head {
  border-color: var(--pro-line) !important;
}

/* Dark theme — public pages and panel pages */
html[data-theme="dark"],
body.dark-mode {
  --pro-bg: #0c111a;
  --pro-surface: rgba(20, 28, 41, .94);
  --pro-surface-solid: #141c29;
  --pro-text: #eef3f8;
  --pro-muted: #9ca8b8;
  --pro-line: #2a3545;
  --pro-line-strong: #364355;
  --brand-50: rgba(197, 43, 52, .12);
  --brand-100: rgba(197, 43, 52, .18);
  --bg: var(--pro-bg);
  --surface: var(--pro-surface-solid);
  --text: var(--pro-text);
  --muted: var(--pro-muted);
  --line: var(--pro-line);
  --line-strong: var(--pro-line-strong);
  color-scheme: dark;
}

html[data-theme="dark"] body,
body.dark-mode {
  color: var(--pro-text) !important;
  background: var(--pro-bg) !important;
}

html[data-theme="dark"] body::before,
body.dark-mode::before {
  background:
    radial-gradient(circle at 92% -8%, rgba(197, 43, 52, .17), transparent 28rem),
    radial-gradient(circle at -8% 38%, rgba(37, 99, 235, .10), transparent 24rem),
    linear-gradient(180deg, #0b1018, #0c111a 30rem);
}

html[data-theme="dark"] :where(.site-header, .category-header, .panel-header),
body.dark-mode :where(.site-header, .category-header, .panel-header) {
  background: rgba(12, 17, 26, .82) !important;
  border-color: rgba(42, 53, 69, .9) !important;
}

html[data-theme="dark"] :where(.card-surface, .notice-card, .stat-card, .action-card, .product-card, .job-card, .resume-card, .category-card, .path-card, .about-card, .gallery-card, .product-info-card, .content-card, .product-card-mini, .search-type-tabs, .search-filter-panel, .search-toolbar, .search-result-card, .form-card, .store-card, .order-card, .ticket-card, .wallet-card, .report-card, .panel-card, .dashboard-sidebar, .mobile-bottom-nav, .drawer, .app-modal, .location-modal, .public-account-dropdown, .sd-modal),
body.dark-mode :where(.card-surface, .notice-card, .stat-card, .action-card, .product-card, .job-card, .resume-card, .category-card, .path-card, .about-card, .gallery-card, .product-info-card, .content-card, .product-card-mini, .search-type-tabs, .search-filter-panel, .search-toolbar, .search-result-card, .form-card, .store-card, .order-card, .ticket-card, .wallet-card, .report-card, .panel-card, .dashboard-sidebar, .mobile-bottom-nav, .drawer, .app-modal, .location-modal, .public-account-dropdown, .sd-modal) {
  background: var(--pro-surface) !important;
  border-color: var(--pro-line) !important;
  color: var(--pro-text) !important;
}

html[data-theme="dark"] :where(h1, h2, h3, h4, strong, b, label, dt, dd, .brand strong, .price, .price-box strong),
body.dark-mode :where(h1, h2, h3, h4, strong, b, label, dt, dd, .brand strong, .price, .price-box strong) {
  color: var(--pro-text) !important;
}

html[data-theme="dark"] :where(p, small, .meta, .muted, .brand small, .breadcrumb, .search-toolbar span),
body.dark-mode :where(p, small, .meta, .muted, .brand small, .breadcrumb, .search-toolbar span) {
  color: var(--pro-muted) !important;
}

html[data-theme="dark"] :where(.header-search, .hero-global-search, .hero-search, .drawer-search-box, .search-page-header-form),
body.dark-mode :where(.header-search, .hero-global-search, .hero-search, .drawer-search-box, .search-page-header-form) {
  background: rgba(19, 27, 40, .92) !important;
  border-color: var(--pro-line) !important;
}

html[data-theme="dark"] :where(input:not([type="checkbox"]):not([type="radio"]), textarea, select),
body.dark-mode :where(input:not([type="checkbox"]):not([type="radio"]), textarea, select) {
  color: var(--pro-text) !important;
  background: #111927 !important;
  border-color: var(--pro-line) !important;
}

html[data-theme="dark"] :where(input:not([type="checkbox"]):not([type="radio"]), textarea, select):focus,
body.dark-mode :where(input:not([type="checkbox"]):not([type="radio"]), textarea, select):focus {
  background: #151f2f !important;
  border-color: rgba(232, 95, 103, .55) !important;
  box-shadow: 0 0 0 4px rgba(197, 43, 52, .13) !important;
}

html[data-theme="dark"] .sidebar-nav a:hover,
html[data-theme="dark"] .sidebar-nav a.active,
body.dark-mode .sidebar-nav a:hover,
body.dark-mode .sidebar-nav a.active {
  background: rgba(197, 43, 52, .14) !important;
  color: #ffb3b8 !important;
}

html[data-theme="dark"] .search-type-tabs button.is-active,
body.dark-mode .search-type-tabs button.is-active {
  color: #fff !important;
}

/* Responsive refinement */
@media (max-width: 940px) {
  body::before { background-attachment: scroll; }

  .site-header,
  .panel-header {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .search-filter-panel {
    position: fixed;
    top: auto;
  }

  .card-surface,
  .notice-card,
  .stat-card,
  .action-card,
  .product-card,
  .job-card,
  .resume-card,
  .search-result-card,
  .form-card,
  .content-card {
    border-radius: 16px !important;
  }
}

@media (max-width: 640px) {
  :root {
    --pro-radius: 15px;
    --pro-radius-lg: 19px;
  }

  body {
    letter-spacing: 0;
  }

  .primary-btn,
  .secondary-btn,
  .outline-btn,
  .ghost-btn,
  .login-btn,
  .signup-btn,
  .card-action,
  .filter-mobile-btn,
  .header-category-btn,
  .theme-toggle {
    border-radius: 10px !important;
  }

  .search-type-tabs {
    padding: 5px !important;
  }

  .search-type-tabs button {
    min-height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}


/* v63 modern typography and density refinements */
.desktop-nav { gap: 8px !important; }
.desktop-nav .nav-category-btn { padding-inline: 16px !important; }

:where(.card, .panel-card, .content-card, .product-card, .search-result-card, .store-card, .listing-card) {
  text-wrap: pretty;
}

:where(.primary-btn, .secondary-btn, .outline-btn, .ghost-btn, .header-category-btn, .nav-category-btn) {
  min-height: 44px;
}

@media (max-width: 640px) {
  body { font-size: 15.5px; line-height: 1.72; }
  input, textarea, select { font-size: 16px; }
  .brand strong { letter-spacing: -.025em; }
}
