/* تم اولیه — تیره، مینیمال، مناسب RTL */
:root {
  --bg: #0f0e12;
  --bg-elevated: #18161f;
  --bg-muted: #121018;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f1f8;
  --text-muted: #a39bb3;
  --accent: #c084fc;
  --accent-2: #22d3ee;
  --danger: #fb7185;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: "Vazirmatn", system-ui, sans-serif;
  --max: 1120px;
  /* یک ردیف: خانه، وبلاگ، سفارش، دسته‌ها */
  --mobile-tabbar-h: 6rem;
  /* اندازهٔ برچسب «خانه» — برای همهٔ تب‌ها و شبکهٔ کشوی دسته */
  --mobile-tabbar-font-size: 0.64rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

#home,
#categories,
#blog,
#order {
  scroll-margin-top: 4.5rem;
}

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(192, 132, 252, 0.12), transparent),
    radial-gradient(900px 500px at 100% 0%, rgba(34, 211, 238, 0.1), transparent), var(--bg);
  color: var(--text);
  line-height: 1.7;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font-family: inherit;
}

/* جلوگیری از نادیده گرفتن صفت hidden توسط display در کلاس‌ها (مثلاً چت) */
[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  background: var(--accent);
  color: #0f0e12;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(15, 14, 18, 0.75);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.6rem;
}

.burger {
  display: inline-block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
  vertical-align: middle;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.mobile-menu[hidden] {
  display: none !important;
}

.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

.mobile-menu-panel {
  position: absolute;
  inset-inline-end: 0;
  inset-inline-start: auto;
  top: 0;
  bottom: 0;
  width: min(19rem, 88vw);
  background: var(--bg-elevated);
  border-inline-start: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  animation: mobileDrawerIn 0.22s ease-out;
}

@keyframes mobileDrawerIn {
  from {
    transform: translateX(-0.75rem);
    opacity: 0.88;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.mobile-menu-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  gap: 0.25rem;
}

.mobile-menu-link {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.mobile-menu-link:hover,
.mobile-menu-link:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
  outline: none;
}

.mobile-tabbar {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(var(--mobile-tabbar-h) + env(safe-area-inset-bottom, 0px));
  }

  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.5rem 0.75rem;
    flex-wrap: nowrap;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .nav-desktop {
    display: none !important;
  }

  .header-actions {
    display: none !important;
  }

  .logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    min-width: 0;
  }

  .logo-text {
    max-width: min(72vw, 17.5rem);
    font-size: clamp(0.72rem, 3.2vw, 0.9rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-tabbar {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: stretch;
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 70;
    gap: 0.15rem;
    padding: 0.4rem 0.35rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
    background: rgba(10, 9, 12, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.45);
  }

  .mobile-tabbar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.2rem;
    min-width: 0;
    padding: 0.25rem 0.1rem 0.35rem;
    color: var(--text-muted);
    font-size: var(--mobile-tabbar-font-size);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
    position: relative;
  }

  .mobile-tabbar__item:active {
    background: rgba(255, 255, 255, 0.05);
  }

  .mobile-tabbar__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
  }

  .mobile-tabbar__icon svg {
    display: block;
    width: 24px;
    height: 24px;
  }

  .mobile-tabbar__label {
    display: block;
    max-width: 100%;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-tabbar__item.is-active {
    color: #4ade80;
  }

  .mobile-tabbar__item.is-active .mobile-tabbar__icon {
    opacity: 1;
    color: #4ade80;
  }

  .mobile-tabbar__item.is-active::after {
    content: "";
    position: absolute;
    bottom: 0.15rem;
    left: 50%;
    transform: translateX(-50%);
    width: 1.35rem;
    height: 3px;
    border-radius: 999px;
    background: #4ade80;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.45);
  }

  button.mobile-tabbar__item {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: var(--mobile-tabbar-font-size);
    font-weight: 600;
    line-height: 1.2;
    color: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
  }

  .site-footer {
    padding-bottom: calc(2rem + var(--mobile-tabbar-h));
  }

  /* چت وسط عمودی، کنار دست راست؛ بالای نوار پایین از نظر z-index */
  .fab-chat:not([hidden]) {
    z-index: 75;
    top: calc(
      (100vh - var(--mobile-tabbar-h) - env(safe-area-inset-bottom, 0px)) / 2 - 28px
    );
    bottom: auto;
    inset-inline-start: 1rem;
    inset-inline-end: auto;
    animation: chatFabWiggle 2.4s ease-in-out infinite;
  }

}


.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  min-width: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(192, 132, 252, 0.35);
}

.nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.nav a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
  background: transparent;
  color: var(--text);
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #fff;
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.35);
}

.btn.primary:hover {
  filter: brightness(1.05);
}

.btn.secondary {
  background: rgba(34, 211, 238, 0.15);
  border-color: rgba(34, 211, 238, 0.35);
  color: #e0fbff;
}

.btn.outline {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.btn.ghost {
  border-color: var(--border);
  background: transparent;
}

.btn.is-active {
  border-color: rgba(251, 113, 133, 0.55);
  background: rgba(251, 113, 133, 0.12);
  color: var(--text);
}

.btn.sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.btn.lg {
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
}

.btn.icon {
  padding: 0.25rem 0.5rem;
  font-size: 1.25rem;
  line-height: 1;
}

.hero {
  padding: 3rem 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--accent-2);
  margin: 0 0 0.5rem;
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  line-height: 1.25;
  margin: 0 0 1rem;
}

.lead {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 52ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-card {
  position: relative;
  min-height: 220px;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}

.hero-blob {
  position: absolute;
  inset: -40% -20% auto;
  height: 120%;
  background: radial-gradient(circle at 30% 30%, rgba(192, 132, 252, 0.45), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(34, 211, 238, 0.35), transparent 50%);
  filter: blur(2px);
}

.hero-note {
  position: relative;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.section {
  padding: 2.5rem 0;
}

.section.muted {
  background: rgba(255, 255, 255, 0.02);
  border-block: 1px solid var(--border);
}

.section-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.section-desc {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.toolbar .input {
  min-width: min(100%, 280px);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.chip[aria-selected="true"] {
  border-color: rgba(192, 132, 252, 0.6);
  color: var(--text);
  background: rgba(192, 132, 252, 0.12);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.card-media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, #1f1c28, #14121a);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  position: relative;
}

.card-badge {
  position: absolute;
  top: 0.65rem;
  inset-inline-end: 0.65rem;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
}

.card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.card-title {
  margin: 0;
  font-size: 1rem;
}

.card-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.input:focus {
  outline: 2px solid rgba(192, 132, 252, 0.45);
  outline-offset: 1px;
}

.poll {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 800px) {
  .poll {
    grid-template-columns: 1fr;
  }
}

.poll-form fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 0 0 1rem;
}

.poll-form legend {
  padding: 0 0.5rem;
  font-weight: 600;
}

.poll-form label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.35rem 0;
  cursor: pointer;
  color: var(--text-muted);
}

.poll-result {
  margin: 0.75rem 0 0;
  min-height: 1.5em;
  color: var(--accent-2);
}

.compare-bar {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 14, 18, 0.92);
  padding: 1rem;
}

.compare-empty {
  margin: 0;
  color: var(--text-muted);
}

.compare-list {
  display: grid;
  gap: 0.5rem;
}

.compare-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.9rem;
}

.compare-actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
}

.cta-block {
  padding-bottom: 3rem;
}

.cta-inner {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.75rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(192, 132, 252, 0.08));
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.fine-print {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.85;
}

.fab-chat {
  position: fixed;
  top: calc(50% - 28px);
  bottom: auto;
  inset-inline-start: 1.25rem;
  inset-inline-end: auto;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 1px solid rgba(192, 132, 252, 0.55);
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.15s, filter 0.2s;
}

.fab-chat:active {
  transform: scale(0.96);
}

.fab-chat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

@keyframes chatFabWiggle {
  0%,
  100% {
    transform: rotate(0deg) translateY(0);
  }
  15% {
    transform: rotate(-6deg) translateY(-1px);
  }
  30% {
    transform: rotate(6deg) translateY(1px);
  }
  45% {
    transform: rotate(-4deg) translateY(-1px);
  }
  60% {
    transform: rotate(4deg) translateY(0);
  }
  75% {
    transform: rotate(-2deg);
  }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .fab-chat:not([hidden]) {
    animation: none !important;
  }
}

.support-sheet .category-sheet-body.support-sheet-body {
  min-height: 0;
  max-height: min(82vh, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0.35rem;
}

.support-sheet-head-bar {
  align-items: center;
}

.support-sheet-head-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.support-sheet-head-bar .category-sheet-title {
  flex: 1;
  min-width: 0;
}

.support-view-icons {
  flex-shrink: 0;
}

.support-view-chat {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.support-sheet .chat-form {
  flex-shrink: 0;
}

.support-sheet .chat-body {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
}

.chat-support-links {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem 0.85rem;
  flex-shrink: 0;
}

.chat-support-link {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.2rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
  border: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.chat-support-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.chat-support-link__circle {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-support-link--wa .chat-support-link__circle {
  background: #25d366;
  color: #fff;
}

.chat-support-link--tg .chat-support-link__circle {
  background: #229ed9;
  color: #fff;
}

.chat-support-link--inline .chat-support-link__circle {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #fff;
}

.chat-support-link__brand {
  display: block;
}

.chat-support-link__label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-body {
  padding: 0.85rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-msg {
  margin: 0;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  max-width: 92%;
  font-size: 0.9rem;
}

.chat-msg.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.chat-msg.user {
  align-self: flex-end;
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(99, 102, 241, 0.45);
}

.chat-form {
  display: flex;
  gap: 0.4rem;
  padding: 0.65rem;
  border-top: 1px solid var(--border);
}

.chat-form .input {
  flex: 1;
}

/* کشوی دسته‌بندی — بالای نوار پایین (نوار همیشه روشن می‌ماند)؛ انیمیشن نرم به بالا */
.category-sheet {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--mobile-tabbar-h);
  z-index: 65;
  pointer-events: none;
}

.category-sheet.is-open {
  pointer-events: auto;
}

.category-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.32s ease;
}

.category-sheet.is-open .category-sheet-backdrop {
  opacity: 1;
}

.category-sheet-panel {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  max-height: min(78vh, 100%);
  display: flex;
  flex-direction: column;
  background: #121018;
  border-radius: calc(var(--radius) + 6px) calc(var(--radius) + 6px) 0 0;
  border-top: 1px solid var(--border);
  box-shadow: 0 -24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transform: translateY(105%);
  transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}

.category-sheet.is-open .category-sheet-panel {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .category-sheet-panel {
    transition-duration: 0.2s;
  }

  .category-sheet-backdrop {
    transition-duration: 0.2s;
  }
}

.category-sheet-body {
  padding: 0.55rem 0.65rem 0.85rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.category-sheet-body--compare {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.category-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  padding-inline: 0.2rem;
}

.category-sheet-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.category-sheet-close {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* شبکه ۴×۲ (۸ دسته، RTL از راست) — همان استایل دکمهٔ ردیف بالا */
.category-sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(4.25rem, auto));
  gap: 0.45rem 0.3rem;
  padding-top: 0.15rem;
  direction: rtl;
}

.category-sheet-grid__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.28rem 0.12rem 0.4rem;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-family: inherit;
  font-size: var(--mobile-tabbar-font-size);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.category-sheet-grid__btn:active {
  background: rgba(255, 255, 255, 0.08);
}

.category-sheet-grid__btn .mobile-tabbar__icon {
  opacity: 0.85;
  flex-shrink: 0;
}

.category-sheet-grid__label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  hyphens: auto;
  max-width: 100%;
  font-size: inherit;
  line-height: 1.2;
}

.category-sheet .mobile-tabbar__icon svg {
  display: block;
  width: 24px;
  height: 24px;
}

.category-sheet-grid__btn.is-active {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(74, 222, 128, 0.08);
}

.category-sheet-grid__btn.is-active .mobile-tabbar__icon {
  color: #4ade80;
  opacity: 1;
}
