:root {
  --ink: #242321;
  --muted: #5f5c55;
  --paper: #f1efeb;
  --accent: #ff5a1e;
  --accent-text: #a43812;
  --accent-ink: #241914;
  --accent-soft: #fff0e9;
  --accent-soft-hover: #ffdfd0;
  --line: rgba(52,45,39,.13);
  --settle: cubic-bezier(.18,.76,.22,1);
  --sans: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
  color: var(--ink); background: var(--paper); font: 16px/1.7 var(--sans);
}
@font-face { font-family: Vazirmatn; src: url("assets/vazirmatn.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
svg:not(.symbols) { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hero { isolation: isolate; position: relative; min-height: 100svh; display: grid; grid-template-rows: auto 1fr; overflow: clip; background: #e8e5e0; }
.hero-scene { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 69%; }
.hero-picture { display: contents; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(244,242,238,.83), rgba(244,242,238,.34) 31%, transparent 57%, transparent 83%, rgba(244,242,238,.28)); }
.masthead { display: flex; justify-content: flex-end; padding: 35px 52px 0; }
.brand { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1; direction: ltr; width: fit-content; }
.brand-logo { display: block; width: var(--brand-width, clamp(126px, 12vw, 174px)); height: auto; }
.brand-tagline { align-self: flex-end; width: 62.55%; text-align: center; white-space: nowrap; font-size: var(--brand-caption-size, 11px); line-height: 1.35; margin-top: 3px; color: var(--muted); }
.hero-content { justify-self: center; align-self: start; margin-block: clamp(32px, 11svh, 112px) 32px; text-align: center; max-width: 680px; width: calc(100% - 170px); }
h1 { font-size: clamp(2.75rem, 5.2vw, 5rem); line-height: 1.13; font-weight: 820; margin: 0 0 24px; white-space: nowrap; }
h1 em { color: var(--accent); font-style: normal; }
.text-reveal { display: block; overflow: clip; padding-block: .05em .12em; }
.text-reveal > span { display: block; animation: text-rise 360ms var(--settle) both; }
.title-follow { font-size: .48em; font-weight: 650; color: #393632; }
.title-follow > span { animation-delay: 45ms; }
.chat-entry { padding: 8px; border-radius: 24px; margin: auto; max-width: 538px; background: rgba(248,247,245,.56); backdrop-filter: blur(17px); box-shadow: 0 14px 50px #29221c22; animation: home-entry 360ms var(--settle) 60ms both; }
.chat-trigger { width: 100%; display: grid; grid-template-columns: 36px 1fr 44px; gap: 12px; align-items: center; padding: 10px 11px; min-height: 65px; border: 0; border-radius: 17px; background: rgba(253,252,249,.95); text-align: start; font-size: 1rem; color: #403d38; transition: box-shadow 400ms var(--settle), background 400ms var(--settle), transform 400ms var(--settle); }
.chat-trigger:active { transform: scale(.985); }
.chat-trigger-label { transition: transform 420ms var(--settle); }
@media (hover: hover) {
  .chat-trigger:hover { background: #fff; box-shadow: 0 6px 20px #29221c18; transform: translateY(-2px); }
  .chat-trigger:hover .chat-trigger-label { transform: translateX(-4px); }
  .chat-trigger:hover .send svg { transform: translateY(-2px); }
}
.spark-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--accent); }
.spark-icon svg { width: 20px; height: 20px; }
.send { display: grid; place-items: center; color: #fff; width: 44px; height: 44px; background: #272623; border: 0; border-radius: 12px; transition: background .4s ease; }
.send:hover,.chat-trigger:hover .send { background: var(--accent-text); }
.send svg { width: 20px; height: 20px; transition: transform 400ms var(--settle); }
.shortcut-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px auto 0; }
.shortcut-links a { border-radius: 40px; align-items: center; justify-content: center; background: rgba(248,246,241,.92); box-shadow: 0 5px 16px #29221c16; backdrop-filter: blur(9px); color: #34312c; font-size: .8125rem; display: inline-flex; gap: 8px; padding: 7px 14px; min-height: 44px; transition: background 420ms var(--settle), transform 420ms var(--settle); animation: surface-rise 620ms var(--settle) var(--reveal-delay, 260ms) both; }
.shortcut-links a:nth-child(2) { --reveal-delay: 305ms; }
.shortcut-links a:nth-child(3) { --reveal-delay: 350ms; }
.shortcut-links a:nth-child(4) { --reveal-delay: 395ms; }
.shortcut-links a:hover, .shortcut-links a:focus-visible { background: var(--accent); color: #242321; transform: translateY(-2px); }
.shortcut-links svg { width: 15px; height: 15px; }
.rail { position: fixed; top: 50%; right: max(24px, env(safe-area-inset-right)); translate: 0 -50%; display: grid; grid-template-rows: 1fr auto 1fr; gap: 4px; padding: 6px; border-radius: 35px; background: transparent; z-index: 2; animation: rail-side-in 400ms var(--settle) both; }
.rail-group { display: flex; flex-direction: column; gap: 4px; }
.rail-group:first-child { justify-content: flex-end; }
.rail :is(a, button) { position: relative; display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; transition: background .55s ease, color .55s ease; }
.rail :is(a, button)[aria-current],.rail :is(a, button):hover,.rail :is(a, button):focus-visible { background: transparent; color: var(--accent); }
.rail :is(a, button) span { position: absolute; right: 53px; white-space: nowrap; pointer-events: none; opacity: 0; transform: translateX(6px); background: #f8f6f2; box-shadow: 0 5px 16px #29221c14; border-radius: 20px; padding: 4px 12px; color: var(--ink); font-size: 12px; transition: opacity 360ms, transform 360ms var(--settle); }
.rail :is(a, button):hover span,.rail :is(a, button):focus-visible span { opacity: 1; transform: translateX(0); }
.rail .rail-dima { color: var(--accent-text); background: var(--accent-soft); box-shadow: 0 5px 16px #7a452124; width: 52px; height: 52px; margin-inline: -3.5px; }
.rail .rail-dima:hover, .rail .rail-dima:focus-visible { background: var(--accent-soft); color: var(--accent-text); }
.rail .rail-dima svg { width: 27px; height: 27px; animation: dima-wiggle 6s ease-in-out 1.4s 3; }
.rail .rail-dima:is(:hover, :focus-visible) svg { animation-play-state: paused; }
#chat { width: min(630px, calc(100% - 30px)); max-height: min(680px, calc(100dvh - 36px)); border: 0; border-radius: 25px; background: #f9f8f5; color: var(--ink); padding: 0; box-shadow: 0 24px 100px #201e1c45; }
#chat[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; min-height: min(512px, calc(100dvh - 36px)); }
#chat::backdrop { background: #24221e52; backdrop-filter: blur(9px); animation: veil-in 410ms var(--settle) both; }
#chat[data-closing]::backdrop { animation: veil-out 180ms ease both; }
.chat-heading { display: flex; align-items: center; gap: 8px; padding: 16px 24px; }
.chat-heading h2,.chat-heading p { margin: 0; }
.chat-heading h2 { font-size: 19px; }
.chat-heading p { font-size: 11px; color: var(--muted); }
.chat-close { margin-inline-start: auto; border: 0; background: transparent; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.chat-close:hover { background: #eeebe5; }
.chat-history { min-height: 0; overflow: auto; padding: 24px; }
.chat-welcome { text-align: center; padding: 48px 8px; }
.chat-welcome h3 { font-size: clamp(20px,4vw,29px); margin: 0 0 8px; }
.chat-welcome p { margin: 0; color: var(--muted); font-size: 14px; }
.chat-starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.chat-starters button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 13px; border: 0; border-radius: 24px; background: #fff; box-shadow: 0 5px 18px #29221c0c; font-size: 12px; transition: background 380ms var(--settle), transform 380ms var(--settle); }
.chat-starters svg { width: 16px; height: 16px; }
.chat-starters button:hover, .chat-starters button:focus-visible { background: var(--accent); transform: translateY(-2px); }
.chat-starters button:active { transform: scale(.97); }
#chat[open] .chat-starters { animation: none; }
#chat[open] .chat-starters button { animation: surface-rise 420ms var(--settle) 260ms both; }
#chat[open] .chat-starters button:nth-child(2) { animation-delay: 310ms; }
#chat[open] .chat-starters button:nth-child(3) { animation-delay: 360ms; }
.attachment-status:empty { display: none; }
.chat-welcome .attachment-status { margin-top: 12px; font-size: 12px; }
.message-photo { display: block; width: auto; max-width: 100%; max-height: 160px; border-radius: 9px; margin-bottom: 8px; }
.message { padding: 10px 13px; border-radius: 13px; margin: 0 0 10px; max-width: 85%; width: fit-content; overflow-wrap: anywhere; }
.message--user { background: #ebe7df; }
.message--dima { background: #fff; animation-delay: 100ms; }
#demo-chat { margin: 0 16px 16px; display: flex; gap: 8px; padding: 8px; min-width: 0; border-radius: 16px; background: #fff; box-shadow: 0 4px 20px #29221c10; }
#demo-chat input { width: 100%; border: 0; padding: 0 7px; background: transparent; min-width: 0; }
#demo-chat:focus-within { box-shadow: 0 4px 20px #29221c10, 0 0 0 2px var(--accent-text); }
#demo-chat input:focus-visible { outline: 0; }
#demo-chat .send { flex: 0 0 44px; }
#chat[open] .chat-heading,
#chat[open] .chat-welcome > :is(h3, p),
#chat[open] #demo-chat { animation: surface-rise 480ms var(--settle) var(--chat-delay, 100ms) both; }
.chat-welcome h3 { --chat-delay: 170ms; }
.chat-welcome p { --chat-delay: 230ms; }
#demo-chat { --chat-delay: 240ms; }
.message { animation: surface-rise 380ms var(--settle) both; }
.message--dima { animation-delay: 95ms; }
@keyframes text-rise { from { transform: translateY(.22em); opacity: .8; } to { transform: translateY(0); opacity: 1; } }
@keyframes home-entry { from { translate: 0 7px; opacity: .82; } to { translate: 0 0; opacity: 1; } }
@keyframes dima-wiggle { 0%, 14%, 100% { rotate: 0deg; } 4% { rotate: -7deg; } 8% { rotate: 6deg; } 11% { rotate: -3deg; } }
@keyframes surface-rise { from { translate: 0 14px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
@keyframes rail-side-in { from { transform: translateX(18px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes rail-bottom-in { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes veil-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes veil-out { from { opacity: 1; } to { opacity: 0; } }
@media (max-width: 680px) {
  .hero { grid-template-rows: minmax(min-content, 1fr); }
  .masthead { grid-area: 1 / 1; align-self: start; z-index: 1; pointer-events: none; padding: 24px 20px 0; }
  .masthead .brand { pointer-events: auto; }
  .brand-logo { width: var(--brand-mobile-width, 108px); }
  .brand-tagline { font-size: 9px; }
  .hero-content { grid-area: 1 / 1; align-self: stretch; display: grid; grid-template-rows: 1fr auto 1fr; width: min(calc(100% - 40px), 420px); min-height: 100svh; padding-block: max(76px, calc(68px + env(safe-area-inset-bottom))); margin: 0; }
  .hero-primary { grid-row: 2; }
  .hero-scene { inset: 0; height: 100%; object-position: 58% center; }
  .hero::after { background: radial-gradient(ellipse 76% 24% at 50% 45%, #f6f2ead9 0%, #f6f2ea91 43%, transparent 100%); }
  h1 { font-size: clamp(1.9375rem, 8.4vw, 3.625rem); margin-bottom: 16px; }
  .chat-entry { border-radius: 19px; padding: 5px; }
  .chat-trigger { gap: 8px; grid-template-columns: 28px 1fr 38px; min-height: 54px; padding: 6px; font-size: .875rem; border-radius: 14px; }
  .chat-trigger .spark-icon { width: 28px; }
  .chat-trigger .send { width: 38px; height: 38px; border-radius: 10px; }
  .shortcut-links { grid-row: 3; align-self: start; display: flex; flex-wrap: wrap; width: 100%; gap: 6px; margin-top: 12px; }
  .shortcut-links a { font-size: .75rem; padding: 6px 8px; gap: 6px; }
  .shortcut-links svg { width: 13px; height: 13px; }
  .chat-welcome { padding: 24px 0; }
  .chat-heading { padding-inline: 16px; }
  .rail { right: 50%; top: auto; bottom: max(10px, calc(env(safe-area-inset-bottom) + 6px)); translate: 50% 0; grid-template: auto / minmax(0,1fr) 50px minmax(0,1fr); align-items: center; width: min(calc(100% - 14px), 390px); padding: 4px; gap: 2px; background: #fbf8f1de; box-shadow: 0 5px 22px #29221c17; animation-name: rail-bottom-in; }
  @supports (backdrop-filter: blur(1px)) { .rail { background: #fbf8f199; backdrop-filter: blur(13px) saturate(125%); } }
  .rail-group { flex-direction: row; justify-content: space-evenly; gap: 0; }
  .rail-group:first-child { justify-content: space-evenly; }
  .rail-group > * { flex: 1 1 0; min-width: 0; }
  .rail :is(a, button) { width: auto; height: 48px; border-radius: 24px; align-content: center; gap: 2px; }
  .rail .rail-dima { width: 50px; height: 50px; margin: 0; }
  .rail .rail-dima svg { width: 25px; height: 25px; }
  .rail svg { width: 18px; height: 18px; }
  .rail :is(a, button) span, .rail :is(a, button):hover span, .rail :is(a, button):focus-visible span { position: static; opacity: 1; transform: none; padding: 0; box-shadow: none; background: transparent; color: inherit; font-size: .625rem; line-height: 1.4; }
}
@media (max-height: 520px) {
  .masthead { padding-block-start: 14px; }
  .hero-content { margin-block-start: 16px; }
  .chat-welcome { padding-block: 12px; }
}
@media (max-height: 520px) and (max-width: 680px) {
  .hero-content { margin: 0; padding-block: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.rail button { border: 0; padding: 0; background: transparent; font: inherit; }

.brand-tagline {
  margin-block-start: -3px;
  line-height: 1.12;
}

.hero h1 em { color: var(--accent-text); }
.rail :is(a, button)[aria-current],
.rail :is(a, button):is(:hover, :focus-visible) { color: var(--accent-text); }
.rail .rail-dima { background: var(--accent); color: var(--accent-ink); }
.rail .rail-dima:is(:hover, :focus-visible) { background: #ff7040; color: var(--accent-ink); }
.rail .rail-dima svg { color: inherit; }
.spark-icon { color: var(--accent-text); }
.send:hover,
.chat-trigger:hover .send { background: var(--accent); color: var(--accent-ink); }

.skeleton,
img[data-image-loading] {
  background-color: #e9e4dd;
  background-image: linear-gradient(105deg, #e9e4dd 35%, #f4f1ed 47%, #e9e4dd 59%);
  background-size: 240% 100%;
  animation: skeleton-sweep 1.7s ease-in-out infinite;
}
@keyframes skeleton-sweep {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
.skeleton-card {
  min-width: 0;
  padding: 10px;
  border-radius: 20px;
  background: #faf7f3;
}
.skeleton-media {
  display: block;
  width: 100%;
  aspect-ratio: 1.2;
  border-radius: 13px;
}
.skeleton-line {
  display: block;
  width: min(70%, 180px);
  height: .9rem;
  border-radius: 20px;
  margin-block-start: 14px;
}
.skeleton-line + .skeleton-line { width: min(45%, 115px); margin-block-start: 8px; }
.skeleton-order {
  min-height: 62px;
  padding: 4px 14px 12px;
  border-radius: 14px;
  background: #f8f5f1;
  margin-block-start: 8px;
}
.skeleton-product-details { padding: 20px; }
.skeleton-product-details .skeleton-line { width: 78%; }
.skeleton-product-details .skeleton-line + .skeleton-line { width: 51%; }
.skeleton-estimate {
  display: inline-block;
  min-inline-size: 4em;
  border-radius: 8px;
  color: transparent;
}

@media (max-width: 680px) {
  .hero-content { grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr); }
  .hero-primary { position: relative; }
  .hero-primary h1 {
    position: absolute;
    inset-inline: 0;
    inset-block-end: 100%;
    margin: 0 0 14px;
  }
}
@media (max-width: 680px) and (max-height: 440px) {
  .hero-primary h1 { font-size: clamp(1.625rem, 6vw, 2.4rem); margin-block-end: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton, img[data-image-loading] { animation: none; }
}

@media (min-width: 681px) and (hover: hover) and (pointer: fine) {
  :root {
    --accent-ink: #fff;
    --accent-fill: #bd3e14;
  }

  .hero { grid-template-rows: minmax(0, 1fr); }

  .hero-content {
    grid-area: 1 / 1;
    align-self: stretch;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
    margin: 0;
  }

  .hero .masthead {
    grid-area: 1 / 1;
    align-self: start;
    justify-self: end;
    z-index: 1;
    pointer-events: none;
  }

  .hero .brand { pointer-events: auto; }

  .hero-primary { grid-row: 2; position: relative; }
  .hero-primary h1 {
    position: absolute;
    inset-inline: 0;
    inset-block-end: 100%;
    margin: 0 0 16px;
    font-size: clamp(2.35rem, 4.5vw, 4.4rem);
  }

  .hero .shortcut-links { grid-row: 3; align-self: start; }

  :is(.shortcut-links a, .chat-starters button):is(:hover, :focus-visible),
  .send:hover,
  .chat-trigger:hover .send {
    color: var(--accent-ink);
    background: var(--accent-fill);
  }

  .rail .rail-dima,
  .rail .rail-dima:is(:hover, :focus-visible, :active) {
    background: transparent;
    box-shadow: none;
  }

  .rail .rail-dima > svg,
  .spark-icon > svg {
    background: url("/assets/dima-chat-mark.png") center / contain no-repeat;
    stroke: none;
    fill: none;
    animation: none;
    transition: transform 300ms var(--settle);
  }

  .spark-icon > svg { width: 25px; height: 25px; }

  :is(.rail-dima, .chat-trigger):is(:hover, :focus-visible) :is(.rail-dima > svg, .spark-icon > svg) {
    transform: translateY(-2px) scale(1.09);
  }

  :is(.rail-dima, .chat-trigger):active :is(.rail-dima > svg, .spark-icon > svg) {
    transform: scale(.91);
  }

  @media (max-height: 490px) {
    .hero-primary h1 { font-size: clamp(1.8rem, 5svh, 2.35rem); margin-block-end: 8px; }
  }

  @media (prefers-reduced-motion: reduce) {
    .rail .rail-dima > svg,
    .spark-icon > svg { transition: none; }
    :is(.rail-dima, .chat-trigger):is(:hover, :focus-visible, :active) :is(.rail-dima > svg, .spark-icon > svg) { transform: none; }
  }
}


/* ============ P02 closure: eNamad trust seal (shared component) ===
 * One shared snippet (enamad-seal.html) + injector (enamad-seal.js);
 * ALL positioning lives on the EXTERNAL wrapper below — the official
 * inner <a>/<img> element is never styled, resized or altered. */

/* neutral base for every placement */
.enamad-seal { display: inline-block; line-height: 0; }

/* homepage: bottom-left corner, fixed, viewport spacing — no footer
 * is added to the minimalist homepage; the seal sits clear of the
 * floating bottom navigation on mobile (raised above the rail). */
.enamad-seal-fixed { position: fixed; z-index: 2;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
  opacity: .96; }

/* inside the existing shared footer (shop/product/checkout/…) */
.enamad-seal-footer { margin-inline-start: 14px; vertical-align: middle; }

/* checkout trust/payment area (next to the payment instructions) */
.enamad-seal-trust { margin-block: 12px 2px; }

/* mobile: never overlap the floating bottom navigation (the rail
 * docks to the bottom center on small screens — same breakpoint as
 * the rail in this file). Seal stays above it. */
@media (max-width: 680px) {
  .enamad-seal-fixed { bottom: calc(env(safe-area-inset-bottom) + 92px);
    left: max(10px, env(safe-area-inset-left)); }
}
