/* ==========================================================================
   jwan.css
   -------------------------------------------------------------------------
   سیستەمی ڕەنگ و فۆنت (design tokens) لە سەرەوەی فایلەکەدان.
   ئەگەر ڕەنگێک بتەوێت بگۆڕیت، تەنها ئەم گۆڕاوانە بگۆڕە.
   ========================================================================== */

:root{
  /* ---- ڕەنگەکان (light) ---- */
  --ink:        #0E211D;   /* دەقی سەرەکی */
  --ink-soft:   #45635A;   /* دەقی لاوەکی */
  --paper:      #F6FAF7;   /* باکگراوندی سەرەکی */
  --surface:    #FFFFFF;   /* کارتەکان */
  --surface-2:  #EAF3EE;   /* کارتی لاوەکی */
  --line:       #DCE8E2;   /* هێڵی جیاکەرەوە */

  --teal:       #0F766E;   /* ڕەنگی سەرەکی — متمانەی پزیشکی */
  --teal-deep:  #0A4F49;
  --teal-soft:  #E3F1EE;

  --gold:       #C9A227;   /* ڕەنگی لاوەکی — دەرمانخانەی کۆن */
  --gold-soft:  #FBF3DC;

  --sage:       #6FA287;

  --whatsapp:   #22A45D;
  --viber:      #6E5ACB;
  --danger:     #C24545;

  /* ---- فۆنت ---- */
  --font-display-latin: 'Fraunces', serif;
  --font-body-latin:    'Inter', sans-serif;
  --font-display-arab:  'Reem Kufi', sans-serif;
  --font-body-arab:     'Vazirmatn', sans-serif;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;

  --shadow-s: 0 2px 10px rgba(14,33,29,.06);
  --shadow-m: 0 12px 34px rgba(14,33,29,.10);
  --shadow-glow: 0 0 0 1px rgba(15,118,110,.14), 0 18px 40px rgba(15,118,110,.14);

  color-scheme: light;
}

html[data-theme="dark"]{
  --ink:        #EAF3EF;
  --ink-soft:   #9FBBB0;
  --paper:      #0A1815;
  --surface:    #0F231F;
  --surface-2:  #132C26;
  --line:       #1D3B33;

  --teal:       #2FBFAE;
  --teal-deep:  #1C8F82;
  --teal-soft:  #12332C;

  --gold:       #E4C158;
  --gold-soft:  #241D0E;

  --sage:       #8FCBAB;
  --shadow-s: 0 2px 10px rgba(0,0,0,.30);
  --shadow-m: 0 16px 40px rgba(0,0,0,.45);
  --shadow-glow: 0 0 0 1px rgba(47,191,174,.2), 0 18px 44px rgba(47,191,174,.16);
  color-scheme: dark;
}

/* ==========================================================================
   بنچینە
   ========================================================================== */
*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body-arab);
  line-height: 1.7;
  transition: background .4s ease, color .4s ease;
  overflow-x: hidden;
}
html[lang="en"] body{ font-family: var(--font-body-latin); }

h1,h2,h3{
  font-family: var(--font-display-arab);
  font-weight: 600;
  margin: 0 0 .4em;
  line-height: 1.25;
}
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3{
  font-family: var(--font-display-latin);
}
p{ margin: 0 0 1em; color: var(--ink-soft); }
a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }
button{ font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input{ font: inherit; }
ul{ list-style: none; margin: 0; padding: 0; }
.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: .6em;
}
.eyebrow::before{
  content: "";
  width: 18px; height: 2px;
  background: var(--gold);
  display: inline-block;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

:focus-visible{
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   پەردەی هەڵبژاردنی زمان
   ========================================================================== */
.lang-gate{
  position: fixed; inset: 0; z-index: 500;
  background:
    radial-gradient(circle at 20% 20%, var(--teal-soft), transparent 55%),
    radial-gradient(circle at 80% 80%, var(--gold-soft), transparent 55%),
    var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; padding: 24px; text-align: center;
  transition: opacity .5s ease, visibility .5s ease;
}
.lang-gate.is-hidden{ opacity: 0; visibility: hidden; pointer-events: none; }

.lang-gate__mark{ width: 84px; height: 84px; animation: float 5s ease-in-out infinite; }
.mark-svg{ width: 100%; height: 100%; }
.mark-ring{ fill: none; stroke: var(--teal); stroke-width: 2.5; opacity: .5; }
.mark-snake{ fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw 2.2s ease forwards .2s; }
.mark-bowl{ fill: none; stroke: var(--teal); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 90; stroke-dashoffset: 90; animation: draw 1.4s ease forwards 1.4s; }
.mark-ring.big{ stroke-width: 1.6; }
.mark-snake.big{ stroke-width: 4; stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 2.6s ease forwards .3s; }
.mark-bowl.big{ stroke-width: 4; stroke-dasharray: 120; stroke-dashoffset: 120; animation: draw 1.6s ease forwards 1.8s; }

@keyframes draw{ to{ stroke-dashoffset: 0; } }
@keyframes float{ 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-8px);} }

.lang-gate__label{ font-size: 1rem; color: var(--ink-soft); letter-spacing: .02em; }
.lang-gate__options{ display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.lang-option{
  padding: 18px 30px;
  border-radius: var(--radius-m);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
  display: flex; flex-direction: column; gap: 4px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  min-width: 140px;
}
.lang-option:hover{ transform: translateY(-4px); box-shadow: var(--shadow-glow); border-color: var(--teal); }
.lang-option__name{ font-family: var(--font-display-arab); font-size: 1.15rem; font-weight: 600; }
.lang-option__sub{ font-size: .78rem; color: var(--ink-soft); }

/* ==========================================================================
   ھێدەر / ناڤیگەیشن
   ========================================================================== */
.site-root{ opacity: 0; animation: fadeIn .6s ease forwards; }
@keyframes fadeIn{ to{ opacity: 1; } }

.topbar{
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner{
  max-width: 1180px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand{ display: flex; align-items: center; gap: 10px; }
.brand__mark{ width: 38px; height: 38px; flex-shrink: 0; }
.brand__text{ display: flex; flex-direction: column; line-height: 1.1; }
.brand__name{ font-family: var(--font-display-arab); font-size: 1.3rem; font-weight: 700; color: var(--teal-deep); }
html[data-theme="dark"] .brand__name{ color: var(--teal); }
.brand__tag{ font-size: .68rem; color: var(--ink-soft); letter-spacing: .04em; }

.nav{ display: flex; gap: 28px; }
.nav a{ font-size: .92rem; font-weight: 500; position: relative; padding: 6px 0; color: var(--ink); }
.nav a::after{
  content: ""; position: absolute; bottom: 0; inset-inline-start: 0;
  width: 0; height: 2px; background: var(--gold); transition: width .25s ease;
}
.nav a:hover::after{ width: 100%; }

.topbar__actions{ display: flex; align-items: center; gap: 10px; }
.icon-btn{
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color .2s ease, transform .2s ease;
}
.icon-btn:hover{ transform: rotate(12deg); border-color: var(--teal); }
.icon-btn svg{ width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.icon-sun{ display: block; }
.icon-moon{ display: none; }
html[data-theme="dark"] .icon-sun{ display: none; }
html[data-theme="dark"] .icon-moon{ display: block; }

.lang-switch{ position: relative; }
.lang-switch__current{
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
  background: var(--surface); font-size: .85rem;
}
.chev{ width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s ease; }
.lang-switch.is-open .chev{ transform: rotate(180deg); }
.lang-switch__menu{
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s);
  box-shadow: var(--shadow-m); overflow: hidden; min-width: 140px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .2s ease;
}
.lang-switch.is-open .lang-switch__menu{ opacity: 1; visibility: visible; transform: translateY(0); }
.lang-switch__menu button{ display: block; width: 100%; padding: 10px 14px; text-align: start; }
.lang-switch__menu button:hover{ background: var(--teal-soft); }

.nav-toggle{ display: none; flex-direction: column; gap: 4px; width: 30px; }
.nav-toggle span{ height: 2px; background: var(--ink); border-radius: 2px; }
.nav-mobile{
  display: none; flex-direction: column; padding: 8px 24px 18px;
  border-top: 1px solid var(--line);
}
.nav-mobile a{ padding: 10px 0; font-size: .95rem; }

@media (max-width: 860px){
  .nav{ display: none; }
  .nav-toggle{ display: flex; }
  .nav-mobile.is-open{ display: flex; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero{
  position: relative; overflow: hidden;
  padding: 70px 24px 120px;
}
.hero__bg{ position: absolute; inset: 0; z-index: 0; }
.hero__blob{
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .35;
  animation: drift 14s ease-in-out infinite;
}
.hero__blob--1{ width: 420px; height: 420px; background: var(--teal); top: -140px; inset-inline-end: -100px; }
.hero__blob--2{ width: 340px; height: 340px; background: var(--gold); bottom: -120px; inset-inline-start: -80px; animation-delay: -6s; }
@keyframes drift{ 0%,100%{ transform: translate(0,0);} 50%{ transform: translate(30px,-20px);} }
.hero__grid{
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black, transparent 75%);
  opacity: .5;
}

.hero__inner{
  position: relative; z-index: 1;
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px; align-items: center;
}
.hero__title{ font-size: clamp(2.1rem, 4vw, 3.2rem); color: var(--teal-deep); }
html[data-theme="dark"] .hero__title{ color: var(--teal); }
.hero__desc{ max-width: 46ch; font-size: 1.02rem; }
.hero__cta{ display: flex; gap: 14px; flex-wrap: wrap; margin: 22px 0 40px; }

.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: .92rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn--primary{ background: var(--teal); color: #fff; box-shadow: var(--shadow-glow); }
.btn--primary:hover{ transform: translateY(-2px); }
.btn--ghost{ border: 1px solid var(--line); background: var(--surface); }
.btn--ghost:hover{ border-color: var(--teal); transform: translateY(-2px); }
.btn--whatsapp{ background: var(--whatsapp); color: #fff; }
.btn--viber{ background: var(--viber); color: #fff; }
.btn--whatsapp:hover, .btn--viber:hover{ transform: translateY(-2px); }

.hero__stats{ display: flex; gap: 40px; flex-wrap: wrap; }
.stat{ display: flex; flex-direction: column; }
.stat__num{ font-family: var(--font-display-arab); font-size: 1.8rem; font-weight: 700; color: var(--gold); }
html[lang="en"] .stat__num{ font-family: var(--font-display-latin); }
.stat__label{ font-size: .78rem; color: var(--ink-soft); }

.hero__visual{ display: flex; justify-content: center; }
.apothecary-card{
  width: min(320px, 80vw); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--teal-soft), var(--surface) 70%);
  border: 1px solid var(--line); box-shadow: var(--shadow-m);
  display: flex; align-items: center; justify-content: center;
  animation: float 6s ease-in-out infinite;
}
.apothecary-card__mark{ width: 62%; height: 62%; }
.apothecary-card__leaves path{
  fill: none; stroke: var(--sage); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 1.2s ease forwards 2.4s;
}

.slogan-box{
  position: relative; z-index: 1;
  max-width: 640px; margin: 60px auto 0;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: #fff; border-radius: var(--radius-l); padding: 30px 36px;
  text-align: center; box-shadow: var(--shadow-m);
  animation: pulseBox 5s ease-in-out infinite;
}
@keyframes pulseBox{ 0%,100%{ transform: scale(1);} 50%{ transform: scale(1.015);} }
.slogan-box__main{ font-family: var(--font-display-arab); font-size: 1.3rem; font-weight: 600; margin-bottom: 6px; color: #fff; }
html[lang="en"] .slogan-box__main{ font-family: var(--font-display-latin); }
.slogan-box__sub{ font-size: .85rem; opacity: .85; margin: 0; color: #fff; }

@media (max-width: 900px){
  .hero__inner{ grid-template-columns: 1fr; text-align: center; }
  .hero__cta{ justify-content: center; }
  .hero__stats{ justify-content: center; }
  .hero__desc{ margin-inline: auto; }
  .hero__visual{ order: -1; }
}

/* ==========================================================================
   کاتالۆگ / بەشەکان
   ========================================================================== */
.section-head{ max-width: 1180px; margin: 0 auto; padding: 0 24px; text-align: center; }
.section-head h2{ font-size: clamp(1.6rem, 3vw, 2.2rem); }

.catalog{ padding: 90px 0 40px; }
.catalog__search{
  max-width: 520px; margin: 30px auto 40px; padding: 0 24px;
  display: flex; align-items: center; gap: 10px;
  position: relative;
}
.catalog__search input{
  width: 100%; padding: 14px 44px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.catalog__search input:focus{ border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); outline: none; }
.catalog__search-icon{
  position: absolute; inset-inline-start: 40px; width: 18px; height: 18px;
  fill: none; stroke: var(--ink-soft); stroke-width: 2;
}

.catalog__categories{
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 12px;
  margin-bottom: 50px;
}
.category-chip{
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 10px; border-radius: var(--radius-m);
  background: var(--surface); border: 1px solid var(--line);
  font-size: .78rem; font-weight: 500; text-align: center;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.category-chip__icon{ font-size: 1.5rem; }
.category-chip:hover{ transform: translateY(-3px); border-color: var(--teal); }
.category-chip.is-active{ background: var(--teal); color: #fff; border-color: var(--teal); }

.catalog__results{
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 20px;
}
.med-card{
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
  overflow: hidden; box-shadow: var(--shadow-s);
  transition: transform .25s ease, box-shadow .25s ease;
  opacity: 0; transform: translateY(16px); animation: cardIn .5s ease forwards;
}
@keyframes cardIn{ to{ opacity: 1; transform: translateY(0); } }
.med-card:hover{ transform: translateY(-5px); box-shadow: var(--shadow-glow); }
.med-card__img{ aspect-ratio: 4/3; background: var(--surface-2); overflow: hidden; }
.med-card__img img{ width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.med-card:hover .med-card__img img{ transform: scale(1.06); }
.med-card__body{ padding: 16px 18px 20px; }
.med-card__cat{ font-size: .7rem; color: var(--teal); font-weight: 600; margin-bottom: 4px; }
.med-card__name{ font-family: var(--font-display-arab); font-size: 1.02rem; font-weight: 600; margin-bottom: 4px; }
html[lang="en"] .med-card__name{ font-family: var(--font-display-latin); }
.med-card__desc{ font-size: .82rem; margin-bottom: 10px; }
.med-card__meta{ display: flex; justify-content: space-between; align-items: center; font-size: .82rem; }
.med-card__price{ color: var(--gold); font-weight: 700; }

.catalog__empty{ text-align: center; padding: 40px; color: var(--ink-soft); }

/* ==========================================================================
   گەلەری
   ========================================================================== */
.gallery{ padding: 90px 0; background: var(--surface-2); margin-top: 40px; }
.gallery__grid{
  max-width: 1180px; margin: 40px auto 0; padding: 0 24px;
  columns: 3 220px; column-gap: 18px;
}
.gallery__item{
  break-inside: avoid; margin-bottom: 18px; border-radius: var(--radius-m);
  overflow: hidden; position: relative; box-shadow: var(--shadow-s);
  opacity: 0; transform: translateY(16px); animation: cardIn .5s ease forwards;
}
.gallery__item img{ width: 100%; display: block; transition: transform .4s ease; }
.gallery__item:hover img{ transform: scale(1.05); }
.gallery__caption{
  position: absolute; inset-inline: 0; bottom: 0; padding: 14px 16px;
  background: linear-gradient(to top, rgba(10,24,21,.85), transparent);
  color: #fff; font-size: .82rem; font-weight: 600;
}
@media (max-width: 720px){ .gallery__grid{ columns: 2 160px; } }
@media (max-width: 460px){ .gallery__grid{ columns: 1; } }

/* ==========================================================================
   پەیوەندی
   ========================================================================== */
.contact{ padding: 90px 0 60px; }
.contact__inner{
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px;
}
.contact__intro h2{ font-size: clamp(1.6rem,3vw,2.1rem); }
.contact__list{ display: flex; flex-direction: column; gap: 16px; margin: 26px 0; }
.contact__list li{ display: flex; gap: 14px; align-items: flex-start; }
.contact__icon{ font-size: 1.3rem; }
.contact__list strong{ display: block; font-size: .88rem; margin-bottom: 2px; }
.contact__list p{ margin: 0; font-size: .88rem; }

.contact__actions{ display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.contact__social{ display: flex; gap: 10px; }
.social-pill{
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .2s ease, border-color .2s ease;
}
.social-pill svg{ width: 19px; height: 19px; fill: var(--ink); }
.social-pill:hover{ transform: translateY(-3px); border-color: var(--teal); }

.contact__side{ display: flex; flex-direction: column; gap: 20px; }
.contact__map{
  aspect-ratio: 4/3; border-radius: var(--radius-m); overflow: hidden;
  background: var(--teal-soft); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--teal-deep); font-weight: 600; text-align: center; padding: 20px;
}
.contact__map iframe{ width: 100%; height: 100%; border: 0; }
.contact__scan{
  border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--surface);
  padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  box-shadow: var(--shadow-s);
}
.contact__scan p{ margin: 0; font-size: .85rem; font-weight: 600; }
#qrCanvas{ border-radius: 8px; }

@media (max-width: 900px){ .contact__inner{ grid-template-columns: 1fr; } }

/* ==========================================================================
   فووتەر
   ========================================================================== */
.site-footer{ border-top: 1px solid var(--line); padding: 22px 24px; }
.site-footer__inner{
  max-width: 1180px; margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: .8rem; color: var(--ink-soft);
}

.back-to-top{
  position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 60;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--teal); color: #fff; box-shadow: var(--shadow-m);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all .25s ease;
}
.back-to-top.is-visible{ opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top svg{ width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================================
   scroll reveal helper
   ========================================================================== */
.reveal{ opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible{ opacity: 1; transform: translateY(0); }
