/* ============================================================
   Nehmat Bakery — Public Stylesheet
   Palette : Warm Cream · Cocoa · Terracotta · Sage
   Fonts   : Vazirmatn (bilingual — Persian & Latin)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Custom Properties ──────────────────────────────────── */
:root {
  --primary:        #D97757;   /* Terracotta */
  --primary-light:  #E8977A;
  --primary-dark:   #B85E40;
  --sage:           #7A9E7E;
  --cream:          #FFF8F0;
  --cream-2:        #FFF0E6;
  --cream-3:        #FAE0CC;
  --brown:          #5C3D2E;   /* Cocoa */
  --brown-2:        #4A3028;
  --brown-light:    #8B7060;
  --text:           #2B2B2B;
  --text-soft:      #7A6560;
  --border:         #E8D5C8;
  --shadow-sm:      0 2px 8px rgba(50,30,18,.08);
  --shadow-md:      0 4px 20px rgba(50,30,18,.14);
  --shadow-lg:      0 12px 40px rgba(50,30,18,.18);
  --radius:         14px;
  --radius-lg:      22px;
  --ease:           cubic-bezier(0.4, 0, 0.2, 1);
  --t:              0.3s;
  --font-d:         'Vazirmatn', 'Segoe UI', sans-serif;
  --font-b:         'Vazirmatn', 'Segoe UI', sans-serif;
  --header-h:       76px;
  --max-w:          1200px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-b);
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-d);
  font-weight: 700;
  color: var(--brown);
  line-height: 1.25;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.7rem); }

.label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .5rem;
}
.divider {
  width: 52px; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 2px;
  margin: .75rem auto 0;
}
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header p {
  margin-top: .75rem;
  color: var(--text-soft);
  font-size: 1.05rem;
  max-width: 560px;
  margin-inline: auto;
}

/* ── Utility ────────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: 1.5rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  transition: all var(--t) var(--ease);
  cursor: pointer;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(217,119,87,.35);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217,119,87,.45);
}
.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}
.btn-ghost {
  color: #fff;
  border: 2px solid rgba(255,255,255,.55);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.15);
  border-color: #fff;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--header-h);
  background: rgba(255,248,240,.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--t) var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}

/* Logo */
.logo {
  display: flex; align-items: center; gap: .8rem;
  text-decoration: none; flex-shrink: 0;
}
.logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.4rem;
  box-shadow: 0 3px 10px rgba(217,119,87,.3);
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; }
.logo-name {
  font-family: var(--font-d);
  font-size: 1.2rem; font-weight: 700;
  color: var(--brown); line-height: 1.1;
}
.logo-tag {
  font-size: .68rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--primary);
}

/* Nav */
.nav-list {
  display: flex; gap: 2.25rem;
}
.nav-list a {
  font-weight: 500; font-size: .92rem;
  color: var(--text-soft);
  position: relative; padding-bottom: 3px;
  transition: color var(--t);
}
.nav-list a::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px; background: var(--primary);
  transform: scaleX(0) translateZ(0);
  transform-origin: center;
  transition: transform var(--t) var(--ease);
}
.nav-list a:hover, .nav-list a.active { color: var(--primary); }
.nav-list a:hover::after, .nav-list a.active::after { transform: scaleX(1); }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: 8px; border-radius: 8px;
  transition: background var(--t);
}
.hamburger:hover { background: var(--cream-3); }
.hamburger span {
  width: 22px; height: 2px;
  background: var(--brown); border-radius: 2px;
  transition: all var(--t) var(--ease);
  display: block;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-list {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: center; gap: 0;
    background: var(--cream);
    padding: 1.5rem 0 2rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform .4s var(--ease), opacity .3s;
    pointer-events: none;
  }
  .nav-list.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-list li { width: 100%; text-align: center; }
  .nav-list a {
    display: block; padding: .85rem 2rem;
    font-size: 1rem;
  }
  .nav-list a::after { display: none; }
  .nav-list a:hover { background: var(--cream-3); color: var(--primary); border-radius: 0; }
}

/* ── Hero Slider ─────────────────────────────────────────────── */
.hero {
  margin-top: var(--header-h);
  position: relative;
  height: calc(100vh - var(--header-h));
  min-height: 560px;
  max-height: 860px;
  overflow: hidden;
  background: var(--brown);
}

.slides-track {
  display: flex;
  height: 100%;
  will-change: transform;
  transition: transform .85s cubic-bezier(.77,0,.175,1);
  direction: ltr; /* always LTR so translateX works correctly in RTL pages */
}

.slide {
  position: relative;
  min-width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

/* Per-slide CSS gradient fallbacks (shown when no image uploaded) */
.slide[data-index="0"] { background: linear-gradient(135deg, #1a0805 0%, #5c3d2e 45%, #b85e40 100%); }
.slide[data-index="1"] { background: linear-gradient(135deg, #0d1a0e 0%, #2d5030 45%, #7a9e7e 100%); }
.slide[data-index="2"] { background: linear-gradient(135deg, #060c1a 0%, #142e4a 45%, #147e9e 100%); }
.slide[data-index="3"] { background: linear-gradient(135deg, #1a0d08 0%, #5c3018 45%, #d97757 100%); }
.slide[data-index="4"] { background: linear-gradient(135deg, #1a1008 0%, #4a3028 45%, #9e7060 100%); }

.slide-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.06);
  transition: transform 8s ease;
}
.slide.active .slide-bg { transform: scale(1); }
.slide-bg video { width: 100%; height: 100%; object-fit: cover; }

.slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.1) 0%,
    rgba(0,0,0,.15) 40%,
    rgba(0,0,0,.65) 100%
  );
}

/* Decorative grain texture on gradient slides */
.slide-grain {
  position: absolute; inset: 0;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

/* Decorative circle ornament */
.slide-ornament {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.slide-ornament::before {
  content: '';
  position: absolute;
  width: min(60vw, 520px); aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  right: -10%; top: 50%; transform: translateY(-50%);
}
.slide-ornament::after {
  content: '';
  position: absolute;
  width: min(40vw, 360px); aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 50%;
  right: -4%; top: 50%; transform: translateY(-50%);
}

.slide-content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 760px;
}
.slide-content .label { color: var(--primary-light); opacity: .9; }
.slide-content h1 {
  color: #fff;
  font-size: clamp(2.2rem, 6vw, 4rem);
  text-shadow: 0 2px 20px rgba(0,0,0,.4);
  margin: .4rem 0 1rem;
  transform: translateY(20px);
  opacity: 0;
  transition: transform .7s var(--ease) .15s, opacity .7s .15s;
}
.slide-content .sub {
  color: rgba(255,255,255,.82);
  font-size: clamp(.95rem, 2vw, 1.2rem);
  max-width: 520px; margin-inline: auto;
  transform: translateY(20px);
  opacity: 0;
  transition: transform .7s var(--ease) .3s, opacity .7s .3s;
}
.slide-content .slide-cta {
  margin-top: 2rem;
  transform: translateY(20px);
  opacity: 0;
  transition: transform .7s var(--ease) .45s, opacity .7s .45s;
}
.slide.active .slide-content h1,
.slide.active .slide-content .sub,
.slide.active .slide-content .slide-cta {
  transform: translateY(0);
  opacity: 1;
}

/* Slider Controls */
.slider-arrow {
  position: absolute; top: 50%; z-index: 10;
  transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff; font-size: 1.1rem;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background var(--t), transform var(--t) var(--ease);
}
.slider-arrow:hover {
  background: rgba(255,255,255,.28);
  transform: translateY(-50%) scale(1.08);
}
.slider-arrow.prev { left: 1.25rem; }
.slider-arrow.next { right: 1.25rem; }

.slider-dots {
  position: absolute; bottom: 1.75rem; left: 50%; z-index: 10;
  transform: translateX(-50%);
  display: flex; gap: .55rem;
}
.slider-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  transition: all var(--t) var(--ease);
  border: none;
}
.slider-dot.active {
  background: var(--primary-light);
  width: 28px; border-radius: 4px;
}

@media (max-width: 640px) {
  .slider-arrow { width: 40px; height: 40px; font-size: .95rem; }
  .slider-arrow.prev { left: .75rem; }
  .slider-arrow.next { right: .75rem; }
}

/* ── Section: Products ───────────────────────────────────────── */
.products-section {
  padding: 7rem 0;
  background: var(--cream);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.product-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
  cursor: default;
  border: 1px solid rgba(232,185,160,.5);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-image-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.product-image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.product-card:hover .product-image-wrap img { transform: scale(1.06); }

/* Per-product gradient placeholder */
.product-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .6rem;
}
.product-placeholder span.icon { font-size: 3rem; }
.product-placeholder span.name-fa {
  font-family: var(--font-d);
  font-size: 1.3rem;
  color: rgba(255,255,255,.9);
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
  direction: rtl;
}

.product-card[data-product="1"] .product-placeholder { background: linear-gradient(135deg, #e8977a 0%, #d97757 100%); }
.product-card[data-product="2"] .product-placeholder { background: linear-gradient(135deg, #7a5a45 0%, #5c3d2e 100%); }
.product-card[data-product="3"] .product-placeholder { background: linear-gradient(135deg, #f5e6d8 0%, #e8c8a8 100%); }
.product-card[data-product="4"] .product-placeholder { background: linear-gradient(135deg, #f0dfd0 0%, #d8c0a8 100%); }
.product-card[data-product="5"] .product-placeholder { background: linear-gradient(135deg, #b0c8b4 0%, #7a9e7e 100%); }
.product-card[data-product="6"] .product-placeholder { background: linear-gradient(135deg, #c8d8e0 0%, #8aa8b8 100%); }

.product-card[data-product="3"] .product-placeholder span.icon,
.product-card[data-product="4"] .product-placeholder span.icon,
.product-card[data-product="5"] .product-placeholder span.icon { filter: drop-shadow(0 1px 3px rgba(0,0,0,.2)); }

.product-card[data-product="3"] .product-placeholder span.name-fa,
.product-card[data-product="4"] .product-placeholder span.name-fa,
.product-card[data-product="5"] .product-placeholder span.name-fa { color: rgba(92,61,46,.7); text-shadow: none; }

.product-body { padding: 1.4rem 1.4rem 1.6rem; }
.product-name {
  font-family: var(--font-d);
  font-size: 1.1rem; font-weight: 700;
  color: var(--brown); line-height: 1.2;
  margin-bottom: .25rem;
}
.product-name-fa {
  font-size: .82rem; color: var(--primary);
  font-weight: 500; direction: rtl; unicode-bidi: embed;
  margin-bottom: .6rem; letter-spacing: .01em;
}
.product-desc {
  font-size: .88rem; color: var(--text-soft);
  line-height: 1.65;
}

@media (max-width: 900px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .products-grid { grid-template-columns: 1fr; } }

/* ── Section: About Teaser ───────────────────────────────────── */
.about-teaser {
  padding: 7rem 0;
  background: var(--cream-2);
}
.about-teaser-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--brown-2), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  box-shadow: var(--shadow-lg);
}
.about-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: inherit;
}
.about-text .section-header { text-align: left; }
.about-text .divider { margin: .75rem 0 0; }
.about-text p { color: var(--text-soft); margin-top: 1.5rem; line-height: 1.8; }
.about-text .btn { margin-top: 2rem; }

@media (max-width: 820px) {
  .about-teaser-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-text .section-header { text-align: center; }
  .about-text .divider { margin-inline: auto; }
  .about-text p { text-align: center; }
  .about-text .btn { display: block; text-align: center; width: fit-content; margin-inline: auto; }
}

/* ── Section: Why Choose Us ──────────────────────────────────── */
.why-section {
  padding: 6rem 0;
  background: var(--brown);
}
.why-section .section-header h2 { color: #fff; }
.why-section .section-header p  { color: rgba(255,255,255,.65); }
.why-section .divider { background: linear-gradient(90deg, var(--primary-light), var(--primary)); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3.5rem;
}
.why-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: background var(--t), transform var(--t) var(--ease);
}
.why-card:hover {
  background: rgba(255,255,255,.1);
  transform: translateY(-4px);
}
.why-icon {
  font-size: 2.5rem; margin-bottom: 1rem;
  display: block;
}
.why-card h4 { color: var(--primary-light); margin-bottom: .5rem; font-size: 1rem; }
.why-card p  { color: rgba(255,255,255,.6); font-size: .88rem; line-height: 1.65; }

@media (max-width: 900px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px)  { .why-grid { grid-template-columns: 1fr; } }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--brown-2);
  color: rgba(255,255,255,.8);
  padding: 3.5rem 0 2rem;
}
.footer-inner {
  display: flex; flex-direction: column; align-items: center; gap: 1.75rem;
}
.footer-logo .logo-name { color: #fff; font-size: 1.4rem; }
.footer-logo .logo-tag  { color: var(--primary-light); }
.footer-tagline {
  font-size: .9rem; color: rgba(255,255,255,.55);
  font-style: italic; text-align: center;
}
.footer-socials {
  display: flex; gap: 1rem;
}
.social-btn {
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem 1.25rem;
  border-radius: 50px;
  font-size: .88rem; font-weight: 500;
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.85);
  transition: all var(--t) var(--ease);
}
.social-btn svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.social-btn.telegram:hover { background: #229ED9; border-color: #229ED9; color: #fff; }
.social-btn.instagram:hover {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  border-color: transparent; color: #fff;
}
.footer-divider {
  width: 100%; height: 1px;
  background: rgba(255,255,255,.1);
}
.footer-copy {
  font-size: .8rem; color: rgba(255,255,255,.35);
  text-align: center;
}

/* ── About Page ──────────────────────────────────────────────── */
.page-hero {
  margin-top: var(--header-h);
  padding: 6rem 0 5rem;
  background: linear-gradient(135deg, var(--brown) 0%, var(--brown-2) 60%, #6b3828 100%);
  text-align: center;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero h1 { color: #fff; }
.page-hero .label { color: var(--primary-light); }
.page-hero .divider { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }

.about-content { padding: 6rem 0; }
.about-story {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: start;
  margin-bottom: 5rem;
}
.about-story-text h2 { margin-bottom: 1rem; }
.about-story-text p { color: var(--text-soft); margin-bottom: 1rem; line-height: 1.85; }
.about-story-image {
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #d97757, #5c3d2e);
  display: flex; align-items: center; justify-content: center;
  font-size: 6rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.about-values {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem;
}
.value-card {
  padding: 2rem 1.5rem;
  background:#fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  transition: box-shadow var(--t);
}
.value-card:hover { box-shadow: var(--shadow-md); }
.value-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.value-card h4 { color: var(--brown); margin-bottom: .5rem; }
.value-card p { color: var(--text-soft); font-size: .9rem; line-height: 1.65; }

@media (max-width: 820px) {
  .about-story { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-values { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .about-values { grid-template-columns: 1fr; }
}

/* ── Contact Page ────────────────────────────────────────────── */
.contact-content { padding: 6rem 0; }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start;
}
.contact-info h2 { margin-bottom: 1rem; }
.contact-info p { color: var(--text-soft); margin-bottom: 2rem; }
.contact-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.contact-item:last-of-type { border-bottom: none; }
.contact-item-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--cream-3);
  display: grid; place-items: center; font-size: 1.3rem;
  flex-shrink: 0;
}
.contact-item-text strong { display: block; color: var(--brown); margin-bottom: .2rem; }
.contact-item-text span  { color: var(--text-soft); font-size: .9rem; }

.contact-form-wrap {
  background: #fff;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.contact-form-wrap h3 { margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block; font-size: .85rem; font-weight: 600;
  color: var(--brown-light); margin-bottom: .4rem;
}
.form-group input,
.form-group textarea {
  width: 100%; padding: .75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px; font-size: .95rem;
  background: var(--cream); color: var(--text);
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(217,119,87,.12);
}
.form-group textarea { resize: vertical; min-height: 130px; }

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

/* ── 404 Page ────────────────────────────────────────────────── */
.error-page {
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 4rem 1.5rem;
  background: var(--cream);
}
.error-code {
  font-family: var(--font-d);
  font-size: clamp(5rem, 18vw, 10rem);
  font-weight: 800; color: var(--primary); line-height: 1;
  opacity: .25; margin-bottom: 1rem;
}
.error-page h2 { margin-bottom: 1rem; color: var(--brown); }
.error-page p   { color: var(--text-soft); max-width: 400px; margin-inline: auto; margin-bottom: 2rem; }

/* ── Flash / Toast Messages ──────────────────────────────────── */
.flash-messages {
  position: fixed; top: calc(var(--header-h) + 1rem);
  left: 50%; transform: translateX(-50%);
  z-index: 1100; display: flex; flex-direction: column; gap: .6rem;
  pointer-events: none; width: min(480px, 90vw);
}
.flash {
  padding: .85rem 1.25rem;
  border-radius: 10px; font-size: .9rem; font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: flashIn .35s var(--ease);
  pointer-events: auto;
  display: flex; align-items: center; gap: .5rem;
}
@keyframes flashIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.flash.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.flash.danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.flash.warning { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.flash.info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── Reveal animations ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }
.reveal-delay-5 { transition-delay: .5s; }

/* ── Language Switcher ───────────────────────────────────────── */
.lang-switcher {
  display: flex; align-items: center; gap: .25rem;
  margin-inline-start: .5rem;
}
.lang-btn {
  font-size: .78rem; font-weight: 600;
  padding: .3rem .55rem;
  border-radius: 6px;
  color: var(--text-soft);
  transition: all var(--t) var(--ease);
  line-height: 1;
  letter-spacing: .03em;
}
.lang-btn:hover {
  color: var(--primary);
  background: var(--cream-3);
}
.lang-btn.active {
  color: #fff;
  background: var(--primary);
}
.lang-divider {
  color: var(--border);
  font-size: .75rem;
  user-select: none;
}

/* ── RTL Overrides ───────────────────────────────────────────── */
/* Applied when <html dir="rtl"> (Farsi mode)                     */

[dir="rtl"] body {
  text-align: right;
}

/* Header: logo moves to right, hamburger to left (natural RTL flex) */
[dir="rtl"] .header-inner {
  flex-direction: row-reverse;
}
[dir="rtl"] .logo { flex-direction: row-reverse; }
[dir="rtl"] .logo-text { text-align: right; }

/* Mobile nav drawer: same width, text right */
[dir="rtl"] .nav-list { direction: rtl; }
[dir="rtl"] .nav-list a::after {
  transform-origin: right center;
}

/* Language switcher: push to the opposite visual edge */
[dir="rtl"] .lang-switcher { margin-inline-start: 0; margin-inline-end: .5rem; }

/* Slider arrows swap: prev on RIGHT, next on LEFT; flip icons so they point outward */
[dir="rtl"] .slider-arrow {
  transform: translateY(-50%) scaleX(-1);
}
[dir="rtl"] .slider-arrow:hover {
  transform: translateY(-50%) scaleX(-1) scale(1.08);
}
[dir="rtl"] .slider-arrow.prev {
  left: auto;
  right: 1.25rem;
}
[dir="rtl"] .slider-arrow.next {
  right: auto;
  left: 1.25rem;
}
@media (max-width: 640px) {
  [dir="rtl"] .slider-arrow.prev { right: .75rem; left: auto; }
  [dir="rtl"] .slider-arrow.next { left: .75rem; right: auto; }
}

/* Slide label & text */
[dir="rtl"] .slide-content { direction: rtl; }

/* Products */
[dir="rtl"] .product-body { text-align: right; }
[dir="rtl"] .product-name-fa { direction: ltr; text-align: right; }

/* "About" teaser: visual on right, text on left in RTL */
[dir="rtl"] .about-teaser-inner,
[dir="rtl"] .about-story {
  direction: rtl;
}
[dir="rtl"] .about-text .section-header { text-align: right; }
[dir="rtl"] .about-text .divider { margin: .75rem 0 0; }
[dir="rtl"] .about-text p    { text-align: right; }
[dir="rtl"] .about-text .btn { text-align: center; }
@media (max-width: 820px) {
  [dir="rtl"] .about-text .section-header { text-align: center; }
  [dir="rtl"] .about-text p               { text-align: center; }
}

/* Why section */
[dir="rtl"] .why-card { direction: rtl; }
[dir="rtl"] .why-card h4,
[dir="rtl"] .why-card p { text-align: right; }

/* About page */
[dir="rtl"] .about-story-text { direction: rtl; text-align: right; }
[dir="rtl"] .about-story-text h2 { text-align: right; }
[dir="rtl"] .about-story-text p  { text-align: right; }
[dir="rtl"] .value-card { direction: rtl; text-align: right; }
[dir="rtl"] .section-header { direction: rtl; }
[dir="rtl"] .section-header p { text-align: right; }

/* Contact page */
[dir="rtl"] .contact-grid { direction: rtl; }
[dir="rtl"] .contact-info h2,
[dir="rtl"] .contact-info p { text-align: right; }
[dir="rtl"] .contact-item { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .contact-item-text { text-align: right; }
[dir="rtl"] .contact-form-wrap { direction: rtl; }
[dir="rtl"] .contact-form-wrap h3 { text-align: right; }
[dir="rtl"] .form-group label { text-align: right; }

/* Footer */
[dir="rtl"] .footer-tagline { direction: rtl; }
[dir="rtl"] .footer-copy { direction: rtl; }

/* Page hero */
[dir="rtl"] .page-hero { direction: rtl; }

/* Forms: inputs auto-detect content direction */
input[type="text"], input[type="email"],
input[type="tel"], textarea {
  direction: auto;
}

/* Error page */
[dir="rtl"] .error-page { direction: rtl; }

/* Flash messages */
[dir="rtl"] .flash-messages { direction: rtl; }
