/* Orchid v480: authenticated Brand workspace navigation and Shopper Reels
   view boundaries. The Garden renderer and card artwork are untouched. */

/* The workspace menu is the first Brand-dashboard surface and remains directly
   beneath the measured fixed public header while the dashboard scrolls. */
html body.page-brands #brands.brand-dashboard-open {
  padding-top: 0 !important;
  overflow: visible !important;
}

html body.page-brands #brands.brand-dashboard-open > .brand-dashboard:not(.is-hidden) {
  padding-top: 0 !important;
  gap: 0 !important;
}

html body.page-brands #brands.brand-dashboard-open .brand-dashboard-hero,
html body.page-brands #brands.brand-dashboard-open .brand-dashboard-hero[hidden] {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body.page-brands #brands.brand-dashboard-open .brand-dashboard-tabs {
  position: sticky !important;
  top: var(--orchid-public-header-height, 112px) !important;
  z-index: 110 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  border-radius: 0 0 14px 14px !important;
  background: color-mix(in srgb, var(--surface-panel, #fff) 96%, transparent) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .06) !important;
  backdrop-filter: blur(14px);
}

html body.page-brands.dark-mode #brands.brand-dashboard-open .brand-dashboard-tabs,
html[data-orchid-theme="dark"] body.page-brands #brands.brand-dashboard-open .brand-dashboard-tabs {
  background: color-mix(in srgb, #050505 96%, transparent) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .34) !important;
}

html body.page-brands #brands.brand-dashboard-open .brand-dashboard-tabs button {
  cursor: pointer !important;
  pointer-events: auto !important;
}

html body.page-brands #brands.brand-dashboard-open .brand-dashboard-panel {
  padding-top: clamp(14px, 2vw, 26px) !important;
}

/* The full Reels artwork belongs only to the Shopper landing view. A focused
   curator, category or Brand profile keeps its portrait as the sole access
   point; its hidden transport host never reserves layout space. */
html body.page-discover #discover[data-shopper-landing="false"] > .discover-shell > .discover-creator-stories,
html body.page-discover #discover[data-shopper-landing="false"] .discover-creator-stories.orchid-reels-discovery,
html body.page-discover #discover .discover-creator-stories.orchid-reels-discovery[hidden],
html body.page-discover #discover [data-category-reel-host][hidden] {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

@media (max-width: 820px) {
  html body.page-brands #brands.brand-dashboard-open {
    padding-inline: 0 !important;
  }

  html body.page-brands #brands.brand-dashboard-open .brand-dashboard-tabs {
    border-inline: 0 !important;
    border-radius: 0 !important;
  }

  html body.page-brands #brands.brand-dashboard-open .brand-dashboard-panel {
    padding-inline: 10px !important;
  }
}

/* v479 used minmax(0, 380px) for every implicit tablet rail track. With a
   full 20-card rail the zero minimum let Grid compress every column into the
   available row (roughly 12px at 768px). Give the shared rail a definite,
   parent-relative track size so children inherit usable space without any
   card-level sizing patch. */
@media (min-width: 431px) and (max-width: 820px) {
  html body > main > [data-page] [data-commerce-rail],
  html body.page-discover #discover [data-commerce-rail],
  html body.page-brands #brands [data-commerce-rail],
  html body.page-creator-link #shop [data-commerce-rail] {
    grid-auto-columns: min(84%, 380px) !important;
  }
}
