@font-face {
  font-family: "Vazirmatn"; font-style: normal; font-weight: 100 900;
  font-display: swap; src: url("/assets/fonts/vazirmatn.woff2") format("woff2");
}

/* Structure shared by the three brand sites. All directional spacing uses logical
   properties so the same rules serve both the Persian (RTL) and English (LTR) trees. */

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

:root {
  --shell: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --step: clamp(3rem, 7vw, 6rem);
  --radius: 0;
  --line: 1.9;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: var(--line);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

/* A select sizes to its longest option unless told otherwise; with long Persian option
   text that is enough to stretch the whole document past the viewport. */
select, input, textarea, button { max-width: 100%; min-width: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3 { font-family: var(--font-display); font-weight: var(--display-weight, 400); line-height: 1.18; margin: 0; overflow-wrap: break-word; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; inset-block-start: -100%; inset-inline-start: 0; z-index: 100;
  background: var(--ink); color: var(--bg); padding: .75rem 1.25rem;
}
.skip-link:focus { inset-block-start: 0; }

.shell { width: min(var(--shell), 100% - var(--gutter) * 2); margin-inline: auto; }

/* ---------- masthead ---------- */

.masthead {
  position: sticky; inset-block-start: 0; z-index: 40;
  background: var(--bg-elevated); border-block-end: 1px solid var(--rule);
  backdrop-filter: saturate(140%) blur(8px);
}
.masthead__inner {
  width: min(var(--shell), 100% - var(--gutter) * 2); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--masthead-h, 76px); max-width: 100%;
}
.masthead__brand { display: inline-flex; align-items: center; }
.wordmark {
  font-family: var(--font-display); font-size: var(--wordmark-size, 1.15rem);
  letter-spacing: var(--wordmark-tracking, .18em); text-transform: uppercase;
  color: var(--ink); white-space: nowrap;
}
.masthead__nav ul { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.25rem); list-style: none; margin: 0; padding: 0; }
.masthead__nav a { font-size: .9rem; letter-spacing: .03em; padding-block: .35rem; border-block-end: 1px solid transparent; }
.masthead__nav a:hover, .masthead__nav a[aria-current="page"] { border-block-end-color: var(--accent); }
.masthead__lang a { opacity: .62; font-size: .82rem; }
.masthead__lang a:hover { opacity: 1; }

.masthead__toggle { display: none; background: none; border: 0; padding: .6rem; cursor: pointer; }
.masthead__bars { display: block; width: 22px; }
.masthead__bars i { display: block; height: 1px; background: var(--ink); margin-block: 5px; transition: transform .25s ease, opacity .25s ease; }

@media (max-width: 860px) {
  .masthead__toggle { display: block; }
  .masthead__nav {
    position: fixed; inset: var(--masthead-h, 76px) 0 auto 0;
    background: var(--bg-elevated); border-block-end: 1px solid var(--rule);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .masthead__nav.is-open { max-height: 70vh; }
  .masthead__nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1.25rem; }
  .masthead__nav li { border-block-end: 1px solid var(--rule); }
  .masthead__nav li:last-child { border-block-end: 0; }
  .masthead__nav a { display: block; padding-block: .95rem; border: 0; }
}

/* ---------- shared blocks ---------- */

.eyebrow {
  font-size: .74rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 1rem;
}

.section-title {
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  margin-block-end: clamp(1.5rem, 3vw, 2.5rem);
}

.button {
  display: inline-block; padding: .85rem 1.9rem;
  border: 1px solid var(--ink); color: var(--ink);
  font-size: .85rem; letter-spacing: .1em; text-transform: uppercase;
  transition: background .2s ease, color .2s ease;
}
.button:hover { background: var(--ink); color: var(--bg); }
.button--primary { background: var(--ink); color: var(--bg); }
.button--primary:hover { background: transparent; color: var(--ink); }
.button--small { padding: .6rem 1.2rem; font-size: .78rem; }

.link-underline { border-block-end: 1px solid var(--accent); padding-block-end: .2rem; font-size: .9rem; letter-spacing: .06em; }

.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0 0 1.5rem; padding: 0; font-size: .8rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "—"; margin-inline-end: .5rem; opacity: .5; }
.breadcrumbs a:hover { color: var(--ink); }

.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head__title { font-size: clamp(1.9rem, 5vw, 3.1rem); }
.page-head__meta, .page-head__lede { color: var(--muted); margin: .9rem 0 0; max-width: 56ch; }

/* ---------- product grid ---------- */

.grid { display: grid; gap: clamp(1.25rem, 2.6vw, 2.25rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid > * { min-width: 0; }
@media (min-width: 700px)  { .grid--three, .grid--four { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid--duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .grid--duo { grid-template-columns: 1fr; } }

.card { position: relative; }
.card__media {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  background: var(--card-bg); display: grid; place-items: center;
}
.card__media img {
  width: 100%; height: 100%; object-fit: contain; padding: clamp(.75rem, 3%, 1.75rem);
  transition: transform .5s ease;
}
.card__link:hover .card__media img { transform: scale(1.045); }
.card__placeholder { width: 46%; aspect-ratio: 1; border: 1px solid var(--rule); }
.card__body { padding-block-start: 1rem; }
.card__title { font-family: var(--font-body); font-size: .95rem; font-weight: 500; line-height: 1.65; margin: 0; overflow-wrap: anywhere; }
.card__ref { font-size: .78rem; color: var(--muted); letter-spacing: .06em; margin: .35rem 0 0; }
.card__price { font-size: .88rem; margin: .5rem 0 0; }
.card__currency { font-size: .74rem; color: var(--muted); }

.catalog__showing { font-size: .82rem; color: var(--muted); margin: 0 0 1.5rem; }

/* ---------- catalogue layout ---------- */

.catalog { display: grid; gap: clamp(1.5rem, 3vw, 3rem); padding-block-end: var(--step); }
.catalog > * { min-width: 0; }
@media (min-width: 900px) { .catalog { grid-template-columns: 240px minmax(0, 1fr); align-items: start; } }

.catalog__filters { display: grid; gap: 1.1rem; }
@media (min-width: 900px) { .catalog__filters { position: sticky; inset-block-start: calc(var(--masthead-h, 76px) + 1.5rem); } }
@media (max-width: 899px) { .catalog__filters { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); align-items: end; } }
.catalog__filters-title { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0; grid-column: 1 / -1; }
.facet { border: 0; margin: 0; padding: 0; min-width: 0; }
.facet__legend { font-size: .78rem; color: var(--muted); margin-block-end: .4rem; padding: 0; }
.facet__select {
  width: 100%; min-width: 0; padding: .6rem .7rem; font: inherit; font-size: .85rem;
  background: var(--bg); color: var(--ink); border: 1px solid var(--rule);
  text-overflow: ellipsis;
}
.catalog__clear { font-size: .82rem; color: var(--muted); border-block-end: 1px solid var(--rule); justify-self: start; }

.empty { text-align: center; padding-block: clamp(3rem, 8vw, 6rem); border: 1px solid var(--rule); }
.empty__title { font-size: 1.1rem; margin: 0 0 .5rem; }
.empty__hint { color: var(--muted); margin: 0 0 1.75rem; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-block-start: clamp(2.5rem, 5vw, 4rem); }
.pagination__link {
  min-width: 2.6rem; padding: .55rem .7rem; text-align: center;
  border: 1px solid var(--rule); font-size: .85rem;
}
.pagination__link:hover { border-color: var(--ink); }
.pagination__link.is-current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pagination__gap { align-self: end; padding: .55rem .2rem; color: var(--muted); }

/* ---------- product detail ---------- */

.product { padding-block: clamp(1.5rem, 4vw, 3rem) var(--step); }
.product__layout { display: grid; gap: clamp(1.75rem, 4vw, 3.5rem); }
@media (min-width: 900px) { .product__layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: start; } }

.product__frame { margin: 0; background: var(--card-bg); aspect-ratio: 1 / 1; display: grid; place-items: center; }
.product__frame img { width: 100%; height: 100%; object-fit: contain; padding: clamp(1rem, 4%, 2.5rem); }
.product__frame--empty { border: 1px solid var(--rule); }
.product__thumbs { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; margin: .75rem 0 0; padding: 0; }
.product__thumb { width: 72px; aspect-ratio: 1; padding: 0; border: 1px solid var(--rule); background: var(--card-bg); cursor: pointer; }
.product__thumb.is-active { border-color: var(--accent); }
.product__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }

@media (min-width: 900px) { .product__detail { position: sticky; inset-block-start: calc(var(--masthead-h, 76px) + 2rem); } }
.product__eyebrow { font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 .8rem; }
.product__title { font-size: clamp(1.4rem, 3.2vw, 2.1rem); }
.product__reference { display: flex; gap: .6rem; align-items: baseline; font-size: .85rem; color: var(--muted); margin: .9rem 0 0; }
.product__reference span[dir="ltr"] { letter-spacing: .08em; color: var(--ink); }
.product__stock { font-size: .8rem; letter-spacing: .08em; margin: 1rem 0 0; }
.product__stock.is-in { color: var(--in-stock); }
.product__stock.is-out { color: var(--muted); }
.product__price { font-size: 1.3rem; margin: .6rem 0 1.75rem; }
.product__price--request { font-size: 1rem; color: var(--muted); }
.product__currency { font-size: .8rem; color: var(--muted); }

.specs { margin-block-start: clamp(2rem, 4vw, 3rem); }
.specs__title { font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; margin-block-end: 1rem; }
.specs__list { margin: 0; }
.specs__row { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 1rem; padding-block: .7rem; border-block-end: 1px solid var(--rule); }
.specs__row dd { overflow-wrap: anywhere; }
.specs__row dt { color: var(--muted); font-size: .84rem; }
.specs__row dd { margin: 0; font-size: .88rem; }

.related { margin-block-start: var(--step); }

/* ---------- heritage, contact, messages ---------- */

.heritage-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }
.heritage-head__title { font-size: clamp(2rem, 5.5vw, 3.4rem); }
.heritage-head__lede { color: var(--muted); font-size: 1.05rem; max-width: 52ch; margin: 1rem 0 0; }
.heritage { padding-block: clamp(2rem, 5vw, 3.5rem) var(--step); max-width: 68ch; }
.heritage__chapter { margin-block-end: clamp(1.75rem, 4vw, 2.75rem); }
.heritage__chapter-title { font-size: 1.15rem; margin-block-end: .6rem; }
.heritage__chapter-body { margin: 0; color: var(--ink-soft); }
.heritage__sources { font-size: .8rem; color: var(--muted); border-block-start: 1px solid var(--rule); padding-block-start: 1.25rem; }
.heritage__cta { margin-block-start: 2rem; }

.contact { padding-block-end: var(--step); max-width: 60ch; }
.contact__list { margin: 0; }
.contact__row { display: grid; grid-template-columns: minmax(0, 30%) minmax(0, 1fr); gap: 1rem; padding-block: .95rem; border-block-end: 1px solid var(--rule); }
.contact__row dd { overflow-wrap: anywhere; }
.contact__row dt { color: var(--muted); font-size: .85rem; }
.contact__row dd { margin: 0; }
.contact__row a:hover { border-block-end: 1px solid var(--accent); }
.contact__map { margin-block-start: 2rem; }
.contact__pending { color: var(--muted); }

.message { display: grid; place-items: center; min-height: 58vh; text-align: center; padding: var(--step) var(--gutter); }
.message__code { font-family: var(--font-display); font-size: clamp(3rem, 12vw, 6rem); margin: 0; color: var(--rule); }
.message__heading { font-size: clamp(1.3rem, 3vw, 1.9rem); margin-block: .5rem 1rem; }
.message__body { color: var(--muted); margin: 0 0 2rem; }

/* ---------- footer ---------- */

.footer { border-block-start: 1px solid var(--rule); margin-block-start: var(--step); background: var(--bg-elevated); }
.footer__inner {
  width: min(var(--shell), 100% - var(--gutter) * 2); margin-inline: auto;
  display: grid; gap: 2rem; padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
@media (min-width: 760px) { .footer__inner { grid-template-columns: 1.2fr 1fr 1.3fr; } }
.footer__role { color: var(--muted); font-size: .85rem; margin: .9rem 0 0; max-width: 30ch; }
.footer__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; font-size: .88rem; }
.footer__nav a:hover, .footer__contact a:hover { color: var(--accent); }
.footer__contact p { margin: 0 0 .6rem; font-size: .88rem; }
.footer__address { color: var(--muted); line-height: 1.9; }
.footer__legal {
  border-block-start: 1px solid var(--rule);
}
.footer__legal p {
  width: min(var(--shell), 100% - var(--gutter) * 2); margin-inline: auto;
  padding-block: 1.25rem; font-size: .78rem; color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
