/* V51 — Persian-friendly mobile header order
   Physical order on small screens:
   left: site logo | center: theme | right: categories */
@media (max-width: 920px) {
  .site-header .header-inner {
    direction: ltr !important;
    grid-template-columns: minmax(0, 1fr) 42px 42px !important;
    grid-template-areas:
      "brand theme category"
      "search search search" !important;
  }

  .site-header .header-start {
    grid-area: brand !important;
    direction: rtl;
    justify-self: start;
    justify-content: flex-start;
    min-width: 0;
  }

  .site-header .header-start .brand {
    direction: rtl;
  }

  .site-header .theme-toggle {
    grid-area: theme !important;
    direction: rtl;
    justify-self: center;
  }

  .site-header .header-category-btn {
    grid-area: category !important;
    direction: rtl;
    justify-self: end;
  }

  .site-header .header-search {
    grid-area: search !important;
    direction: rtl;
  }
}

@media (max-width: 640px) {
  .site-header .header-inner {
    grid-template-columns: minmax(0, 1fr) 40px 40px !important;
  }
}

/* V52 — keep category control compact and physically on the right on every responsive public header */
@media (max-width: 920px) {
  .site-header .header-category-btn {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
  }

  .site-header .header-category-btn > span:last-child {
    display: none !important;
  }
}
