:root {
  color-scheme: light;
  --wsf-bg: #ffffff;
  --wsf-surface: #f3f4f6;
  --wsf-ink: #1a1a1a;
  --wsf-muted: #666b73;
  --wsf-line: #e9e9ea;
  --wsf-brand: #c2410c;
  --wsf-bar: 56px;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: #fff; overscroll-behavior-y: contain; }
body[data-page="/favorites"] {
  color-scheme: light;
  min-width: 0;
  width: 100%;
  margin: 0;
  background: #fff;
  color: var(--wsf-ink);
  font: 500 15px/1.5 system-ui, "Cairo", "Tajawal", sans-serif;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
  padding-bottom: calc(var(--wsf-bar) + env(safe-area-inset-bottom, 0px));
}
body[data-page="/favorites"] [hidden] { display: none !important; }
body[data-page="/favorites"] :is(button, a, input) {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
body[data-page="/favorites"] :is(button, a) {
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 120ms ease, transform 120ms ease;
}
body[data-page="/favorites"] :is(button, a):active { opacity: .84; transform: scale(.97); }
body[data-page="/favorites"] :is(button, a, input):focus-visible {
  outline: 2px solid var(--wsf-brand);
  outline-offset: 3px;
}
body[data-page="/favorites"] svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.wsf-skip {
  position: fixed;
  top: -100px;
  inset-inline-start: 10px;
  z-index: 100;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--wsf-line);
  border-radius: 10px;
  color: var(--wsf-ink);
}
.wsf-skip:focus { top: 12px; }
.wsf-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 56px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--wsf-line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.wsf-topbar-inner {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) 48px;
  align-items: center;
  height: 100%;
  max-width: 780px;
  margin: auto;
  padding-inline: 12px;
}
.wsf-icon-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--wsf-ink);
  text-decoration: none;
  cursor: pointer;
}
.wsf-icon-button svg { width: 26px; height: 26px; }
.wsf-topbar-title {
  opacity: 0;
  transform: translateY(4px);
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.wsf-topbar.is-compact .wsf-topbar-title { opacity: 1; transform: translateY(0); }
.wsf-main {
  width: 100%;
  max-width: 780px;
  min-height: calc(100dvh - 112px);
  margin-inline: auto;
  padding: 20px 16px 36px;
}
.wsf-page-title { display: flex; align-items: center; min-height: 52px; }
.wsf-page-title h1 { margin: 0; font-size: 30px; line-height: 1.25; font-weight: 700; letter-spacing: -.5px; }
.wsf-title-sentinel { display: block; height: 1px; margin-bottom: 19px; pointer-events: none; }
.wsf-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
  margin-bottom: 17px;
  background: var(--wsf-surface);
  border: 1px solid transparent;
  border-radius: 12px;
}
.wsf-search-wrap:focus-within { border-color: var(--wsf-brand); }
.wsf-search-wrap .wsf-search-icon {
  position: absolute;
  right: 14px;
  width: 23px;
  height: 23px;
  color: var(--wsf-muted);
  pointer-events: none;
}
.wsf-search-wrap input {
  width: 100%;
  height: 48px;
  min-width: 0;
  padding: 0 45px 0 45px;
  border: 0;
  outline: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--wsf-ink);
  direction: rtl;
  font-size: 16px;
}
.wsf-search-wrap input::placeholder { color: #777b81; }
.wsf-search-wrap input::-webkit-search-cancel-button { display: none; }
.wsf-search-clear {
  position: absolute;
  left: 2px;
  top: 1px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--wsf-muted);
  cursor: pointer;
}
.wsf-search-clear svg { width: 20px; height: 20px; }
.wsf-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  min-width: 0;
  overflow: visible;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--wsf-line);
}
.wsf-tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 70px;
  padding: 7px 0 8px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #6e7075;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.wsf-tabs button svg { width: 27px; height: 27px; stroke-width: 1.85; }
.wsf-tabs button[aria-selected="true"] { color: var(--wsf-brand); border-bottom-color: var(--wsf-brand); }
.wsf-results-count {
  margin: 0 0 14px;
  color: var(--wsf-muted);
  font-size: 12px;
  font-weight: 500;
}
.wsf-items-panel { min-width: 0; min-height: 170px; outline: none; }
.wsf-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  column-gap: 14px;
  row-gap: 20px;
  align-content: start;
  animation: wsf-enter 180ms ease-out;
}
.wsf-card { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wsf-card:is([data-wsf-group="stores"],[data-wsf-group="services"],[data-wsf-group="following"]) {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: 60px minmax(0,1fr) 48px;
  align-items: center;
  gap: 12px;
  min-height: 83px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--wsf-line);
}
.wsf-cover {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 12px;
  background: var(--wsf-surface);
}
.wsf-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wsf-cover-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #858992;
}
.wsf-cover-fallback svg { width: 38px; height: 38px; stroke-width: 1.5; }
.wsf-card:is([data-wsf-group="stores"],[data-wsf-group="services"],[data-wsf-group="following"]) .wsf-cover {
  width: 60px;
  height: 60px;
  aspect-ratio: 1;
  border-radius: 14px;
}
.wsf-card:is([data-wsf-group="stores"],[data-wsf-group="following"]) .wsf-cover { border-radius: 50%; }
.wsf-card:is([data-wsf-group="stores"],[data-wsf-group="services"],[data-wsf-group="following"]) .wsf-cover-fallback svg { width: 28px; height: 28px; }
.wsf-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-bottom: 2px; }
.wsf-card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: var(--wsf-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.42;
  text-decoration: none;
}
.wsf-card-subtitle {
  overflow: hidden;
  margin: 0;
  color: var(--wsf-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wsf-price { color: var(--wsf-ink); font-size: 15px; font-weight: 700; }
.wsf-card:is([data-wsf-group="stores"],[data-wsf-group="services"],[data-wsf-group="following"]) .wsf-card-title { font-size: 16px; }
.wsf-remove {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 50%;
  background: rgba(255,255,255,.97);
  color: var(--wsf-brand);
  cursor: pointer;
}
.wsf-remove svg { width: 23px; height: 23px; fill: var(--wsf-brand); stroke: var(--wsf-brand); }
.wsf-card:is([data-wsf-group="stores"],[data-wsf-group="services"],[data-wsf-group="following"]) .wsf-remove {
  position: static;
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
}
.wsf-card[data-wsf-group="following"] .wsf-remove svg { fill: none; }
.wsf-remove:disabled { opacity: .45; cursor: progress; }
.wsf-card.is-unavailable { opacity: .62; }
.wsf-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 360px;
  margin-inline: auto;
  padding: clamp(56px,12vh,100px) 12px 28px;
  text-align: center;
}
.wsf-empty > svg { width: 52px; height: 52px; color: #8b8d92; stroke-width: 1.35; margin-bottom: 8px; }
.wsf-empty h2 { margin: 0; font-size: 18px; font-weight: 700; }
.wsf-empty p { margin: 0; font-size: 14px; color: var(--wsf-muted); line-height: 1.6; }
.wsf-empty a, .wsf-error a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin-top: 12px;
  padding: 9px 18px;
  border: 1px solid var(--wsf-line);
  border-radius: 12px;
  background: #f7f7f7;
  color: var(--wsf-ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.wsf-empty a svg { width: 22px; height: 22px; }
.wsf-error { padding: 65px 12px; text-align: center; }
.wsf-error h2 { margin: 0 0 10px; font-size: 17px; }
.wsf-error p { font-size: 14px; color: var(--wsf-muted); }
.wsf-skeleton { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.wsf-skeleton > div {
  height: 205px;
  border-radius: 12px;
  background: linear-gradient(90deg,#f5f5f5 25%,#ebebeb 40%,#f5f5f5 60%);
  background-size: 240% 100%;
  animation: wsf-shimmer 1s linear infinite;
}
.wsf-toast {
  position: fixed;
  z-index: 80;
  bottom: calc(var(--wsf-bar) + 14px + env(safe-area-inset-bottom,0px));
  right: 50%;
  transform: translateX(50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(420px,calc(100vw - 24px));
  min-height: 52px;
  padding: 6px 12px;
  border-radius: 12px;
  background: #ffffff;
  color: var(--wsf-ink);
  border: 1px solid var(--wsf-line);
  box-shadow: 0 5px 18px rgba(0,0,0,.08);
  font-size: 14px;
}
.wsf-toast button {
  min-width: 70px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--wsf-brand);
  font-weight: 700;
  cursor: pointer;
}
.wsf-bottom {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  align-items: stretch;
  height: calc(var(--wsf-bar) + env(safe-area-inset-bottom,0px));
  padding: 0 4px env(safe-area-inset-bottom,0px);
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--wsf-line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.wsf-bottom a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  min-height: 56px;
  color: #686b70;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 500;
}
.wsf-bottom svg { width: 28px; height: 28px; stroke-width: 1.85; }
.wsf-bottom a[aria-current="page"] { color: var(--wsf-brand); font-weight: 700; }
.wsf-bottom a[aria-current="page"] svg { fill: var(--wsf-brand); stroke: var(--wsf-brand); }
@keyframes wsf-enter { from { opacity: .5; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes wsf-shimmer { to { background-position-x: -240%; } }
@media (min-width: 750px) {
  .wsf-main { padding-inline: 28px; }
  .wsf-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
  .wsf-page-title h1 { font-size: 34px; }
}
@media (max-width: 350px) {
  .wsf-main { padding-inline: 10px; }
  .wsf-tabs button { font-size: 12px; }
  .wsf-tabs button svg { width: 25px; height: 25px; }
  .wsf-grid { column-gap: 9px; }
  .wsf-card:is([data-wsf-group="stores"],[data-wsf-group="services"],[data-wsf-group="following"]) {
    grid-template-columns: 54px minmax(0,1fr) 44px;
    gap: 9px;
  }
  .wsf-card:is([data-wsf-group="stores"],[data-wsf-group="services"],[data-wsf-group="following"]) .wsf-cover { width: 54px; height: 54px; }
}
@media (hover:hover) and (pointer:fine) {
  .wsf-icon-button:hover, .wsf-remove:hover, .wsf-tabs button:hover { background: #f6f6f6; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="/favorites"] :is(button,a), .wsf-topbar-title, .wsf-grid { transition: none !important; animation: none !important; }
  .wsf-skeleton > div { animation: none !important; }
}
