/* STOCKDIVAR_CATEGORY_NAVIGATION_THEME_V821 */

html[data-theme="light"] {
  color-scheme: light;
  --cat-red: #9f1625;
  --cat-red-dark: #7f111a;
  --cat-bg: #f5f7fb;
  --cat-card: #ffffff;
  --cat-panel: #f9fafc;
  --cat-text: #172033;
  --cat-muted: #5c6678;
  --cat-line: #d9dee8;
  --cat-hover: #fff4f5;
  --cat-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --cat-red: #ff8591;
  --cat-red-dark: #e05a68;
  --cat-bg: #0b1220;
  --cat-card: #151d2b;
  --cat-panel: #101826;
  --cat-text: #f8fafc;
  --cat-muted: #c0c8d4;
  --cat-line: #303b4d;
  --cat-hover: #202b3c;
  --cat-shadow: 0 14px 36px rgba(0, 0, 0, .28);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;
    --cat-red: #ff8591;
    --cat-red-dark: #e05a68;
    --cat-bg: #0b1220;
    --cat-card: #151d2b;
    --cat-panel: #101826;
    --cat-text: #f8fafc;
    --cat-muted: #c0c8d4;
    --cat-line: #303b4d;
    --cat-hover: #202b3c;
    --cat-shadow: 0 14px 36px rgba(0, 0, 0, .28);
  }
}

body[data-page="categories-v821"] {
  background:
    radial-gradient(circle at 100% 0, rgba(167, 25, 40, .09), transparent 30%),
    var(--cat-bg) !important;
  color: var(--cat-text) !important;
}

body[data-page="categories-v821"] .categories-header {
  border-color: var(--cat-line);
}

html[data-theme="light"] body[data-page="categories-v821"] .categories-header {
  background: rgba(255, 255, 255, .94);
}

html[data-theme="dark"] body[data-page="categories-v821"] .categories-header {
  background: rgba(15, 23, 42, .94);
}

body[data-page="categories-v821"] .categories-brand strong,
body[data-page="categories-v821"] .categories-close {
  color: var(--cat-text) !important;
}

body[data-page="categories-v821"] .categories-brand small {
  color: var(--cat-muted) !important;
}

body[data-page="categories-v821"] .categories-close {
  border-color: var(--cat-line);
  background: var(--cat-card);
}

body[data-page="categories-v821"] .categories-intro {
  border-color: var(--cat-line);
  background: linear-gradient(135deg, var(--cat-card), var(--cat-hover));
  box-shadow: var(--cat-shadow);
}

body[data-page="categories-v821"] .categories-intro > span {
  background: color-mix(in srgb, var(--cat-red) 11%, var(--cat-card));
  color: var(--cat-red);
}

body[data-page="categories-v821"] .categories-intro h1 {
  color: var(--cat-text) !important;
}

body[data-page="categories-v821"] .categories-intro p {
  color: var(--cat-muted) !important;
}

.category-group-v821 {
  min-width: 0;
  margin: 0;
}

.category-group-v821 > summary {
  list-style: none;
}

.category-group-v821 > summary::-webkit-details-marker {
  display: none;
}

body[data-page="categories-v821"] .category-card {
  width: 100%;
  min-height: 92px;
  margin: 0;
  color: var(--cat-text) !important;
  background: var(--cat-card) !important;
  border-color: var(--cat-line) !important;
  box-shadow: 0 8px 26px rgba(15, 23, 42, .055);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body[data-page="categories-v821"] .category-card strong {
  color: var(--cat-text) !important;
  opacity: 1 !important;
  font-weight: 900;
}

body[data-page="categories-v821"] .category-card small {
  color: var(--cat-muted) !important;
  opacity: 1 !important;
  font-weight: 550;
}

body[data-page="categories-v821"] .category-card > b {
  color: var(--cat-text);
  background: color-mix(in srgb, var(--cat-red) 10%, var(--cat-card));
}

body[data-page="categories-v821"] .category-card:hover,
body[data-page="categories-v821"] .category-card:focus-visible,
.category-group-v821[open] > .category-card {
  border-color: color-mix(in srgb, var(--cat-red) 45%, var(--cat-line)) !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .11);
  outline: none;
}

.category-menu-v821 {
  width: 38px;
  height: 38px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--cat-red) 24%, var(--cat-line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--cat-red) 8%, var(--cat-card));
  transition: transform .18s ease, background-color .18s ease;
}

.category-menu-v821 > span {
  width: 17px;
  height: 2px;
  display: block;
  border-radius: 99px;
  background: var(--cat-red);
}

.category-group-v821[open] .category-menu-v821 {
  transform: rotate(90deg);
  background: color-mix(in srgb, var(--cat-red) 14%, var(--cat-card));
}

.subcategory-panel-v821 {
  margin-top: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  border: 1px solid var(--cat-line);
  border-radius: 18px;
  background: var(--cat-panel);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .045);
}

.subcategory-panel-v821 > a {
  min-height: 42px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--cat-card);
  color: var(--cat-text) !important;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.subcategory-panel-v821 > a::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--cat-red);
  content: "";
}

.subcategory-panel-v821 > a:hover,
.subcategory-panel-v821 > a:focus-visible {
  border-color: color-mix(in srgb, var(--cat-red) 42%, var(--cat-line));
  background: var(--cat-hover);
  outline: none;
}

.subcategory-panel-v821 > a:active {
  transform: scale(.985);
}

.subcategory-panel-v821 > .subcategory-all-v821 {
  grid-column: 1 / -1;
  justify-content: space-between;
  border-color: color-mix(in srgb, var(--cat-red) 26%, var(--cat-line));
  background: color-mix(in srgb, var(--cat-red) 8%, var(--cat-card));
  color: var(--cat-red) !important;
  font-weight: 900;
}

.subcategory-panel-v821 > .subcategory-all-v821::before {
  order: 2;
  width: auto;
  height: auto;
  flex: 0 0 auto;
  border-radius: 0;
  background: transparent;
  content: "←";
  font-size: 17px;
  line-height: 1;
}

html[data-theme="dark"] body[data-page="categories-v821"] .category-card,
html[data-theme="dark"] body[data-page="categories-v821"] .subcategory-panel-v821,
html[data-theme="dark"] body[data-page="categories-v821"] .subcategory-panel-v821 > a {
  box-shadow: none;
}

/* V801's app shell intentionally forced mobile pages to light mode and hid
   the V776 theme control. On this page V821 restores the user's real choice. */
@media (max-width: 900px) {
  html[data-theme="dark"] {
    color-scheme: dark !important;
    --sd-app-bg-v772: #111827 !important;
    --sd-app-text-v772: #f8fafc !important;
    --sd-app-muted-v772: #b4bdca !important;
    --sd-app-line-v772: #2f394a !important;
    --sd-app-shadow-v772: 0 -12px 34px rgba(0, 0, 0, .32) !important;
  }

  body[data-page="categories-v821"].stockdivar-mobile-app-shell-v772 .sd-mobile-theme-v776,
  body[data-page="categories-v821"].stockdivar-mobile-app-shell-v772 [data-sd-theme-v776] {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  html[data-theme="dark"] body[data-page="categories-v821"] .sd-mobile-header-v772,
  html[data-theme="dark"] body[data-page="categories-v821"] .sd-bottom-nav-v772 {
    background: color-mix(in srgb, #111827 96%, transparent) !important;
    color: #f8fafc !important;
    border-color: #2f394a !important;
  }

  html[data-theme="dark"] body[data-page="categories-v821"] .sd-mobile-search-v772,
  html[data-theme="dark"] body[data-page="categories-v821"] .sd-mobile-back-v772,
  html[data-theme="dark"] body[data-page="categories-v821"] .sd-mobile-account-v772,
  html[data-theme="dark"] body[data-page="categories-v821"] .sd-mobile-logo-v772,
  html[data-theme="dark"] body[data-page="categories-v821"] .sd-mobile-theme-v776 {
    background: #182130 !important;
    color: #f8fafc !important;
    border-color: #2f394a !important;
  }

  html[data-theme="dark"] body[data-page="categories-v821"] .sd-mobile-search-v772 input,
  html[data-theme="dark"] body[data-page="categories-v821"] .sd-mobile-search-v772 button,
  html[data-theme="dark"] body[data-page="categories-v821"] .sd-mobile-brand-v772 strong {
    color: #f8fafc !important;
  }

  html[data-theme="dark"] body[data-page="categories-v821"] .sd-mobile-brand-v772 small,
  html[data-theme="dark"] body[data-page="categories-v821"] .sd-bottom-nav-v772 > a {
    color: #b4bdca !important;
  }

  html[data-theme="dark"] body[data-page="categories-v821"] .sd-bottom-create-v772 b {
    border-color: #111827 !important;
  }

  .category-group-v821 > .category-card {
    min-height: 82px;
  }
}

html.sd-native-app-v772 body[data-page="categories-v821"].stockdivar-mobile-app-shell-v772 .sd-mobile-theme-v776,
html.sd-native-app-v772 body[data-page="categories-v821"].stockdivar-mobile-app-shell-v772 [data-sd-theme-v776] {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

@media (max-width: 620px) {
  .subcategory-panel-v821 {
    grid-template-columns: 1fr;
    margin-top: 7px;
    padding: 8px;
    border-radius: 16px;
  }

  .subcategory-panel-v821 > .subcategory-all-v821 {
    grid-column: auto;
  }

  .category-menu-v821 {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .category-card,
  .category-menu-v821,
  .subcategory-panel-v821 > a {
    transition: none !important;
  }
}
