/* =========================================================
   کفش ایوان | E1Shoes — استایل اصلی v2
   Mobile-first | RTL | Light theme | Optimized
   ========================================================= */

/* ============ FONT ============ */
@font-face {
  font-family: 'Estedad';
  src: url('../fonts/Estedad/Estedad-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Estedad';
  src: url('../fonts/Estedad/Estedad-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Estedad';
  src: url('../fonts/Estedad/Estedad-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Estedad';
  src: url('../fonts/Estedad/Estedad-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Estedad';
  src: url('../fonts/Estedad/Estedad-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ============ VARIABLES ============ */
:root {
  color-scheme: light;

  /* Colors */
  --bg:          #ffffff;
  --bg-soft:     #f7f7f8;
  --bg-mute:     #efeff1;
  --bg-elevated: #ffffff;
  --text:        #111114;
  --text-soft:   #52525b;
  --text-muted:  #8b8b93;
  --border:      #e6e6ea;
  --border-soft: #f0f0f3;

  --accent:      #ff5a1f;
  --accent-dark: #e04a10;
  --accent-soft: #fff1ea;
  --accent-ring: rgba(255, 90, 31, .18);

  --success:     #16a34a;
  --success-soft:#ecfdf5;
  --danger:      #dc2626;
  --danger-soft: #fef2f2;
  --info:        #0ea5e9;
  --info-soft:   #eff6ff;
  --warning:     #f59e0b;
  --warning-soft:#fffbeb;

  /* Radius */
  --radius-sm:   10px;
  --radius:      16px;
  --radius-lg:   24px;
  --radius-xl:   32px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(17,17,20,.04);
  --shadow-sm: 0 2px 8px rgba(17,17,20,.06);
  --shadow-md: 0 8px 24px rgba(17,17,20,.08);
  --shadow-lg: 0 20px 50px rgba(17,17,20,.12);
  --shadow-focus: 0 0 0 4px var(--accent-ring);

  /* Transitions */
  --t-fast: .15s ease;
  --t-base: .25s cubic-bezier(.2,.8,.2,1);
  --t-slow: .4s cubic-bezier(.2,.8,.2,1);

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Layout */
  --container: 1200px;
  --container-narrow: 840px;
  --header-h: 68px;

  /* Z-index scale */
  --z-nav: 99;
  --z-header: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* ============ RESET ============ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  tab-size: 4;
}

body {
  font-family: 'Estedad', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 15px;
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
  touch-action: none;
}

img, svg, video, canvas, audio, iframe, embed, object {
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
}

button:disabled { cursor: not-allowed; opacity: .55; }

input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

ul, ol { list-style: none; }

table { border-collapse: collapse; width: 100%; }

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
  text-wrap: balance;
}

p { text-wrap: pretty; }

strong, b { font-weight: 700; color: var(--text); }

::selection {
  background: var(--accent);
  color: #fff;
}

/* ============ FOCUS ============ */
:focus { outline: none; }

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

/* ============ SKIP LINK ============ */
.skip-link {
  position: fixed;
  top: -100px;
  right: 20px;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  z-index: var(--z-toast);
  transition: top var(--t-base);
  font-weight: 600;
  font-size: .9rem;
}
.skip-link:focus { top: 0; }

/* ============ UTILITIES ============ */
.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;
}

.divider {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: var(--space-6) 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  color: var(--text-soft);
  font-size: .8rem;
  font-weight: 600;
}
.chip.is-accent { background: var(--accent-soft); color: var(--accent-dark); }
.chip.is-success { background: var(--success-soft); color: var(--success); }
.chip.is-danger { background: var(--danger-soft); color: var(--danger); }

/* ============ CONTAINER ============ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.container.narrow { max-width: var(--container-narrow); }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--t-base), background var(--t-base);
}
.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
  background: rgba(255,255,255,.96);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  font-weight: 900;
  flex-shrink: 0;
}
.brand-en {
  font-size: 1.15rem;
  letter-spacing: 1px;
  color: var(--text);
}
.brand-fa {
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-top: 3px;
}

.main-nav ul {
  display: flex;
  gap: 26px;
}
.main-nav a {
  font-size: .92rem;
  font-weight: 500;
  color: var(--text-soft);
  position: relative;
  padding: 4px 0;
  transition: color var(--t-fast);
}
.main-nav a:hover { color: var(--accent); }
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--t-base);
}
.main-nav a:hover::after { width: 100%; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1;
  border-radius: var(--radius-pill);
  transition:
    transform var(--t-fast),
    box-shadow var(--t-base),
    background var(--t-base),
    color var(--t-base),
    border-color var(--t-base);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  will-change: transform;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { cursor: not-allowed; opacity: .55; transform: none !important; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255,90,31,.28);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-dark);
  box-shadow: 0 10px 26px rgba(255,90,31,.38);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-dark {
  background: var(--text);
  color: #fff;
}
.btn-dark:hover:not(:disabled) {
  background: #000;
  transform: translateY(-2px);
}

.btn-light {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-light:hover:not(:disabled) {
  background: var(--bg-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm { padding: 8px 16px; font-size: .84rem; }
.btn-lg { padding: 14px 30px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 70px 0 90px;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 10%, var(--accent-soft) 0%, transparent 45%),
    radial-gradient(circle at 10% 90%, #eef4ff 0%, transparent 45%),
    var(--bg);
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
}
.hero-badge {
  display: inline-block;
  padding: 7px 16px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: .8rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
  animation: fadeUp .6s ease both;
}
.hero-title {
  font-size: clamp(1.9rem, 8vw, 3.4rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -.5px;
  margin-bottom: 18px;
  animation: fadeUp .6s ease .08s both;
}
.hero-title .accent { color: var(--accent); }
.hero-desc {
  font-size: 1.02rem;
  color: var(--text-soft);
  max-width: 560px;
  margin-bottom: 32px;
  animation: fadeUp .6s ease .16s both;
}
.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: fadeUp .6s ease .24s both;
}

/* ============ SECTION HEAD ============ */
.section-head {
  text-align: center;
  margin-bottom: 48px;
}
.section-head small {
  display: block;
  color: var(--accent);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: 3px;
  margin-bottom: 10px;
}
.section-head h2 {
  font-size: clamp(1.5rem, 6vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -.4px;
  line-height: 1.3;
}
.section-head.align-right { text-align: right; }
.section-sub {
  color: var(--text-soft);
  font-size: .95rem;
  margin-top: 8px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.section-head.align-right .section-sub { margin-left: 0; }

/* ============ FEATURES ============ */
.features { padding: 80px 0; background: var(--bg); }
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.feature {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  transition:
    transform var(--t-base),
    box-shadow var(--t-base),
    border-color var(--t-base),
    background var(--t-base);
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
  background: #fff;
}
.feature-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
  transition: transform var(--t-base);
}
.feature:hover .feature-icon { transform: scale(1.06) rotate(-3deg); }
.feature-icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 6px; }
.feature p { font-size: .92rem; color: var(--text-soft); line-height: 1.7; }

/* ============ CTA BOX ============ */
.cta-box {
  position: relative;
  text-align: center;
  padding: 52px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1a1a1f 0%, #2a2a32 100%);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.cta-box::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle at 70% 30%, rgba(255,90,31,.35), transparent 45%);
  pointer-events: none;
  z-index: -1;
}
.cta-box h2 {
  position: relative;
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 900;
  margin-bottom: 10px;
  color: #fff;
}
.cta-box p {
  position: relative;
  color: #c7c7ce;
  max-width: 520px;
  margin: 0 auto 26px;
  font-size: .95rem;
}
.cta-box .btn { position: relative; }
.cta-btns {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ============ CONTACT CARDS ============ */
.contact { padding: 20px 0 90px; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 26px 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform var(--t-base), box-shadow var(--t-base), background var(--t-base);
}
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  background: #fff;
}
.contact-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  color: var(--accent);
  margin-bottom: 6px;
  box-shadow: var(--shadow-sm);
}
.contact-icon svg { width: 24px; height: 24px; }
.contact-label {
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 1px;
}
.contact-card strong { font-size: .98rem; font-weight: 700; color: var(--text); }

/* ============ FOOTER ============ */
.site-footer {
  background: #0e0e12;
  color: #fff;
  padding: 50px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 40px;
}
.footer-col h4 {
  font-size: .95rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: #fff;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a {
  color: #a1a1aa;
  font-size: .88rem;
  transition: color var(--t-fast);
}
.footer-col ul a:hover { color: var(--accent); }

.footer-brand .brand-en { color: #fff; font-size: 1.2rem; }
.footer-brand .brand-fa { color: #8b8b93; }
.footer-slogan {
  color: var(--accent);
  font-size: .85rem;
  font-weight: 600;
  margin: 10px 0 8px;
}
.footer-desc {
  color: #a1a1aa;
  font-size: .85rem;
  line-height: 1.75;
  max-width: 320px;
}
.footer-contact li { color: #a1a1aa; font-size: .88rem; }
.footer-address { line-height: 1.7; }

.footer-bottom {
  border-top: 1px solid #1f1f26;
  padding: 20px 0;
}
.footer-bottom .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.footer-bottom p { color: #8b8b93; font-size: .82rem; }
.footer-domain { color: #6b6b73 !important; letter-spacing: 1px; }

/* ============ MENU TOGGLE ============ */
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 12px;
}
.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--t-base), opacity var(--t-base);
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ ANIMATIONS ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

/* ============ OVERFLOW SAFETY ============ */
section, header, footer, main, div, aside, article { max-width: 100%; }
p, h1, h2, h3, h4, h5, h6, a, span, strong, small {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* ============ RESPONSIVE ============ */
@media (min-width: 600px) {
  body { font-size: 15.5px; }
  .container { padding: 0 24px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 900px) {
  body { font-size: 16px; }
  :root { --header-h: 74px; }
  .hero { padding: 90px 0 120px; }
  .hero-desc { font-size: 1.08rem; }
  .features { padding: 100px 0; }
  .features-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .categories-cta { padding: 30px 0 100px; }
  .cta-box { padding: 70px 40px; }
  .contact { padding-bottom: 110px; }
  .main-nav ul { gap: 34px; }
}

@media (min-width: 1200px) {
  .hero-title { letter-spacing: -1px; }
}

@media (max-width: 899px) {
  .main-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    left: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 16px 20px 22px;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--t-slow), opacity var(--t-base);
    box-shadow: var(--shadow-md);
    z-index: var(--z-nav);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .main-nav a::after { display: none; }
  .main-nav li:last-child a { border-bottom: none; }
  .btn-header { display: none; }
  .menu-toggle { display: flex; }
}

@media (max-width: 400px) {
  .container { padding: 0 16px; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; }
  .cta-box { padding: 38px 18px; }
  .feature { padding: 22px 18px; }
  .contact-card { padding: 22px 16px; }
}

/* ============ SCROLLBAR (RTL-aware) ============ */
@supports (scrollbar-width: thin) {
  html { scrollbar-width: thin; scrollbar-color: #c9c9d0 var(--bg-soft); }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb {
  background: #c9c9d0;
  border-radius: 10px;
  border: 2px solid var(--bg-soft);
}
::-webkit-scrollbar-thumb:hover { background: #a1a1aa; }

/* ============ HIGH CONTRAST ============ */
@media (prefers-contrast: more) {
  :root {
    --text-soft: #333338;
    --text-muted: #55555c;
    --border: #c9c9d0;
  }
}