:root {
  color-scheme: light;
  --paper: #fffafa;
  --canvas: #faf1f4;
  --surface: #fffdfd;
  --rose: #fae6ed;
  --rose-strong: #f4d6e1;
  --burgundy: #7e1740;
  --plum: #410d27;
  --text: #21151d;
  --muted: #6d5360;
  --line: #eedbe3;
  --focus: #a52f64;
  --shadow: 0 16px 38px #540e2c0a, 0 2px 6px #540e2c0b;
  --radius: 22px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: radial-gradient(ellipse 65% 23rem at 100% 0, #f3cedb 0%, transparent 78%), var(--canvas);
  font-family: Vazirmatn, Tahoma, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.75;
}

button, input, select { color: inherit; font: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--burgundy); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.container {
  width: min(100% - 32px, 1060px);
  margin-inline: auto;
}

main {
  min-height: 70vh;
  padding-block: 20px calc(108px + env(safe-area-inset-bottom));
  overflow-wrap: anywhere;
}

.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  flex: 0 0 auto;
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.skip-link:focus {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  z-index: 10;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface);
}

.topbar { background: #fff8fbc4; border-block-end: 1px solid #fff; }
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 76px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  direction: ltr;
  color: var(--plum);
  font: 800 clamp(1.5rem, 4vw, 2rem)/1 Arial, sans-serif;
  letter-spacing: -.055em;
}

.brand:hover { color: var(--plum); }
.brand-accent { color: #b90046; }
.brand-mark {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 42px;
  height: 34px;
  overflow: hidden;
  border-radius: 8px;
}

.brand-mark img {
  position: absolute;
  top: -42%;
  left: -40%;
  display: block;
  width: 180%;
  height: auto;
  mix-blend-mode: multiply;
}

.language {
  position: absolute;
  inset-inline-end: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  padding-inline: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff9fb;
  color: var(--burgundy);
}

.language label { display: inline-flex; }
.language select {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--plum);
  cursor: pointer;
  font-size: .75rem;
  font-weight: 700;
}

.page-intro, .business-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 10px;
  margin-block-end: 22px;
  padding: clamp(22px, 5vw, 48px);
  border: 1px solid #fff;
  border-radius: clamp(24px, 4vw, 34px);
  background: linear-gradient(142deg, #fffafc, #fbecf1 58%, #f7dce6);
  box-shadow: var(--shadow);
}

.page-intro::before, .business-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 105% 108%, #eeb1c8aa, transparent 56%);
  content: "";
  pointer-events: none;
}

.page-intro { text-align: center; }
.page-intro > .eyebrow { justify-self: center; }
.page-intro h1, .business-hero h1, .inventory-detail h1, .intro h1 {
  margin: 0;
  color: var(--plum);
  font-size: clamp(1.6rem, 4.8vw, 2.85rem);
  line-height: 1.35;
}

.page-intro p, .intro p { margin: 0; color: var(--muted); }
.intro:not(.page-intro) { padding: 26px; text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  padding: 3px 10px;
  border: 1px solid #f1cfdc;
  border-radius: 999px;
  background: #fff5f8;
  color: var(--burgundy);
  font-size: .78rem;
  font-weight: 700;
}

.searchbar {
  display: flex;
  align-items: stretch;
  width: min(100%, 680px);
  margin: 10px auto 2px;
  border: 1px solid #e8bdce;
  border-radius: 16px;
  background: #fffafd;
  box-shadow: 0 8px 22px #650d2e12;
}

.searchbar:focus-within { border-color: var(--focus); outline: 1px solid var(--focus); }
.searchbar input {
  width: 100%;
  min-inline-size: 0;
  min-height: 50px;
  padding: 9px 15px;
  border: 0;
  border-radius: inherit;
  background: transparent;
}

.searchbar input:focus-visible { outline: none; }
.searchbar input::placeholder, .filter-pill input::placeholder { color: var(--muted); opacity: 1; }
.searchbar button {
  display: grid;
  flex: 0 0 auto;
  min-width: 50px;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--burgundy);
  font-size: 1.3rem;
  cursor: pointer;
}

.searchbar button:hover { background: var(--rose); }
.chips, .directory-filters, .profile-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.chips a, .filter-pill, .fact-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--plum);
  font-size: .82rem;
}

.chips a:hover, a.fact-pill:hover { border-color: #d893af; background: var(--rose); }
.directory-filters { margin-block-start: 12px; }
.filter-pill {
  min-width: 0;
  min-height: 44px;
  flex: 1 1 136px;
  max-width: 220px;
  padding-block: 0;
}

.filter-pill .icon, .fact-pill .icon { color: var(--burgundy); }
.filter-pill input, .filter-pill select {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 3px 0;
  border: 0;
  background: transparent;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin-block: 20px 13px;
}

.section-head h2 { margin: 0; font-size: clamp(1.14rem, 3.4vw, 1.4rem); }
.section-head > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: .8rem;
}

.card-list, .profile-details { display: grid; grid-template-columns: minmax(0, 1fr); gap: 13px; }
.inventory-card, .profile-panel, .inventory-detail, .empty {
  min-width: 0;
  padding: clamp(15px, 3vw, 23px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.inventory-card h2 {
  margin: 7px 0;
  font-size: 1.06rem;
  line-height: 1.7;
}

.inventory-card h2 a, .inventory-detail h1 a { color: var(--plum); }
.inventory-card h2 a:hover, .inventory-detail h1 a:hover { color: var(--burgundy); text-decoration: underline; text-underline-offset: .23em; }
.card-meta, .card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  color: var(--muted);
  font-size: .82rem;
}

.featured {
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--rose);
  color: var(--burgundy);
  font-weight: 700;
}

.card-foot {
  margin-block-start: 13px;
  padding-block-start: 11px;
  border-block-start: 1px solid var(--line);
}

.card-foot > span, .text-link {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.seller a, .text-link { color: var(--burgundy); font-weight: 650; }
.seller a:hover, .text-link:hover { text-decoration: underline; text-underline-offset: .2em; }
.card-foot .icon, .card-meta .icon { color: var(--burgundy); }
.business-card-head {
  display: grid;
  align-items: start;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
}

.business-card h2 { margin: 0; font-size: 1.14rem; }
.business-summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.avatar {
  display: inline-grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(150deg, #fff0f5, var(--rose));
  color: var(--burgundy);
  font-size: 1.25rem;
}

.category h2 a { display: inline-flex; gap: 8px; align-items: center; }
.category ul { margin-block: 6px; padding-inline-start: 23px; color: var(--muted); }
.category li a { display: inline-block; padding-block: 4px; }
.category li a:hover { text-decoration: underline; }
.empty { padding-block: 34px; text-align: center; color: var(--muted); }
.empty p { margin: 10px 0; }
.empty h1 { margin-block: 0 8px; color: var(--plum); font-size: clamp(1.25rem, 4vw, 1.8rem); }
.profile-description {
  max-width: 74ch;
  margin: 0;
  color: var(--muted);
  white-space: pre-wrap;
}

.profile-facts { justify-content: flex-start; margin-block-start: 6px; }
.fact-pill { max-width: 100%; overflow-wrap: anywhere; }
.profile-panel h2 { margin-block: 0 11px; font-size: 1.06rem; }
.profile-links { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 49px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--plum);
}

.contact-link:hover { border-color: #dc9bb3; background: #fff6fa; }
.contact-link .avatar { width: 37px; height: 37px; border-radius: 10px; font-size: 1rem; }
.contact-name { display: grid; min-width: 0; }
.contact-name > bdi { font-size: .9rem; color: var(--muted); }
.business-inventory .searchbar { margin: 0 0 14px; }
.muted { color: var(--muted); }
.primary-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, #a12b5a, var(--burgundy));
  color: white;
  font-weight: 650;
}

.primary-link:hover { background: var(--plum); color: white; }
.inventory-detail h1 { margin-block: 10px 8px; }
.full-message {
  margin-block: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.navigation-shell {
  position: fixed;
  z-index: 5;
  inset: auto 0 0;
  padding: 7px 10px max(7px, env(safe-area-inset-bottom));
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 520px);
  margin-inline: auto;
  padding: 4px;
  border: 1px solid #fff;
  border-radius: 19px;
  background: #fff9fb;
  box-shadow: 0 5px 28px #4d0a2a1a;
}

.nav-item {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 58px;
  padding: 4px 2px;
  border-radius: 13px;
  color: var(--plum);
  font-size: .73rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

.nav-item .icon { width: 21px; height: 21px; }
.nav-item:hover, .nav-item[aria-current="page"] { background: var(--rose); color: var(--burgundy); }
.footer { display: none; }

@media (max-width: 360px) {
  .container { width: calc(100% - 22px); }
  .brand { margin-inline-end: 27px; }
  .brand-mark { width: 36px; height: 29px; }
  .nav-item { font-size: .68rem; }
}

@media (min-width: 660px) {
  .directory-list, .category-list, .profile-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .header-inner { min-height: 79px; justify-content: flex-start; }
  .navigation-shell { position: absolute; inset: 12px 0 auto; padding: 0; pointer-events: none; }
  .bottom-nav {
    display: flex;
    justify-content: center;
    width: max-content;
    max-width: calc(100% - 370px);
    border: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: auto;
  }
  .nav-item { display: flex; align-items: center; gap: 7px; min-height: 44px; padding-inline: 11px; font-size: .84rem; }
  .nav-item .icon { width: 17px; height: 17px; }
  main { padding-block: 30px 40px; }
  .footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 12px;
    padding: 16px;
    border-block-start: 1px solid var(--line);
    color: var(--muted);
    font-size: .82rem;
  }
}
