/* Component-local aliases only. The existing desktop/mobile settings and
   their 1180px breakpoint remain independent and are never overwritten. */
html.fs-category-scrollbar { scrollbar-gutter: stable; }
/* Lock the root through syncBodyLock, but keep the document's content height.
   Locking both 100%-high elements clips the page and resets scrollY to zero. */
body.fs-shop.fs-ui-lock:has(.fs-category-drawer[open]) { overflow: visible; }
body.fs-shop .fs-category-toggle,
body.fs-shop .fs-category-drawer {
  --fs-cat-menu-bg: var(--fs-category-chip-bg);
  --fs-cat-menu-text: var(--fs-category-chip-text);
  --fs-cat-menu-hover-bg: var(--fs-category-chip-hover-bg);
  --fs-cat-menu-hover-text: var(--fs-category-chip-hover-text);
  --fs-cat-menu-active-bg: var(--fs-category-chip-active-bg);
  --fs-cat-menu-active-text: var(--fs-category-chip-active-text);
  --fs-cat-menu-border: var(--fs-category-chip-border-color);
  --fs-cat-menu-border-width: var(--fs-category-chip-border-width);
  --fs-cat-menu-panel: var(--fs-category-sticky-bg);
  --fs-cat-menu-heading: var(--fs-category-sticky-label-text);
  --fs-cat-menu-divider: var(--fs-category-chip-border-color);
}

body.fs-shop .fs-category-toggle,
body.fs-shop .fs-category-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: var(--fs-cat-menu-border-width) solid var(--fs-cat-menu-border);
  border-radius: 50% !important;
  background: var(--fs-cat-menu-bg);
  color: var(--fs-cat-menu-text);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body.fs-shop .fs-category-toggle { order: 3; }
body.fs-shop .fs-category-toggle[aria-expanded="true"] {
  background: var(--fs-cat-menu-active-bg);
  color: var(--fs-cat-menu-active-text);
}

body.fs-shop .fs-category-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  padding: 0;
  width: 400px;
  max-width: calc(100vw - 20px);
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  background: linear-gradient(var(--fs-cat-menu-panel), var(--fs-cat-menu-panel)) var(--fs-bg);
  color: var(--fs-cat-menu-text);
  overflow: hidden;
  overscroll-behavior: contain;
  font: inherit;
}

body.fs-shop .fs-category-drawer[open] {
  display: flex;
  flex-direction: column;
  animation: fs-category-enter 260ms var(--fs-ease) both;
}
body.fs-shop .fs-category-drawer::backdrop {
  background: rgb(var(--fs-category-overlay-rgb) / .55);
  animation: fs-category-backdrop-enter 260ms var(--fs-ease) both;
}
body.fs-shop .fs-category-drawer.is-closing {
  animation: fs-category-leave 240ms var(--fs-ease) both;
}
body.fs-shop .fs-category-drawer.is-closing::backdrop {
  animation: fs-category-backdrop-leave 240ms var(--fs-ease) both;
}
body.fs-shop .fs-category-drawer-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(20px + env(safe-area-inset-top, 0px)) calc(20px + env(safe-area-inset-right, 0px)) 20px 20px;
  border-bottom: 1px solid var(--fs-cat-menu-divider);
}
body.fs-shop .fs-category-drawer-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  color: var(--fs-cat-menu-heading) !important;
}
body.fs-shop .fs-category-drawer-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 8px calc(12px + env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) calc(12px + env(safe-area-inset-left, 0px));
  scrollbar-width: thin;
  scrollbar-color: var(--fs-cat-menu-border) transparent;
}
body.fs-shop .fs-category-drawer-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 80px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--fs-cat-menu-divider);
  border-radius: 0;
  background: var(--fs-cat-menu-bg);
  color: var(--fs-cat-menu-text);
  text-decoration: none;
  touch-action: manipulation;
}
body.fs-shop .fs-category-drawer-row:last-child { border-bottom: 0; }
body.fs-shop .fs-category-drawer-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 650;
}
body.fs-shop .fs-category-drawer-image {
  display: flex;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--fs-radius-card);
  overflow: hidden;
}
body.fs-shop .fs-category-drawer-image img { width: 100%; height: 100%; object-fit: cover; }
body.fs-shop .fs-category-drawer-arrow { flex: 0 0 20px; color: currentColor; }
body.fs-shop .fs-category-drawer-row[aria-current="true"] {
  background: var(--fs-cat-menu-active-bg);
  color: var(--fs-cat-menu-active-text);
}
body.fs-shop .fs-category-drawer-row[aria-current="true"] .fs-category-drawer-arrow { color: currentColor; }
body.fs-shop :is(.fs-category-toggle, .fs-category-close, .fs-category-drawer-row):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -3px;
}
@media (hover: hover) and (pointer: fine) {
  body.fs-shop :is(.fs-category-toggle, .fs-category-close, .fs-category-drawer-row):hover {
    background: var(--fs-cat-menu-hover-bg);
    color: var(--fs-cat-menu-hover-text);
  }
  body.fs-shop .fs-category-drawer-row:hover .fs-category-drawer-arrow { color: currentColor; }
}
body.fs-shop :is(.fs-category-toggle, .fs-category-close, .fs-category-drawer-row):active {
  background: var(--fs-cat-menu-hover-bg);
  color: var(--fs-cat-menu-hover-text);
}

@media (max-width: 1180px) {
  body.fs-shop .fs-category-toggle,
  body.fs-shop .fs-category-drawer {
    --fs-cat-menu-bg: var(--fs-mobile-category-chip-bg);
    --fs-cat-menu-text: var(--fs-mobile-category-chip-text);
    --fs-cat-menu-hover-bg: var(--fs-mobile-category-chip-hover-bg);
    --fs-cat-menu-hover-text: var(--fs-mobile-category-chip-hover-text);
    --fs-cat-menu-active-bg: var(--fs-mobile-category-chip-active-bg);
    --fs-cat-menu-active-text: var(--fs-mobile-category-chip-active-text);
    --fs-cat-menu-border: var(--fs-mobile-category-chip-border-color);
    --fs-cat-menu-border-width: var(--fs-mobile-category-chip-border-width);
    --fs-cat-menu-panel: var(--fs-mobile-category-sticky-bg);
    --fs-cat-menu-heading: var(--fs-mobile-category-chip-text);
    --fs-cat-menu-divider: var(--fs-mobile-category-chip-border-color);
  }
  /* The category drawer replaces the old swipe hint. */
  body.fs-shop .fs-cat-chips-wrap:has(.fs-category-toggle) { padding-right: 8px !important; }
}
@media (max-width: 600px) {
  body.fs-shop .fs-category-drawer { width: calc(100vw - 20px); }
  body.fs-shop .fs-category-toggle { flex-basis: 44px; width: 44px; height: 44px; }
}
@keyframes fs-category-enter { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes fs-category-leave { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes fs-category-backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes fs-category-backdrop-leave { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  body.fs-shop .fs-category-drawer[open],
  body.fs-shop .fs-category-drawer::backdrop { animation: none; }
}

body.fs-shop .fs-category-drawer-image img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
