/* =============================================
   FONTS
============================================= */
@font-face {
  font-family: 'Estedad';
  src: url('fonts/Estedad-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Estedad';
  src: url('fonts/Estedad-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Estedad';
  src: url('fonts/Estedad-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* =============================================
   VARIABLES & RESET
============================================= */
:root {
  --primary:      #c8a96e;
  --primary-dim:  #a8854a;
  --bg-dark:      #0a0a0f;
  --bg-card:      rgba(255,255,255,0.04);
  --bg-glass:     rgba(255,255,255,0.06);
  --border:       rgba(200,169,110,0.18);
  --text:         #e8e0d0;
  --text-muted:   #8a8070;
  --header-h:     64px;
  --filter-h:     52px;
  --footer-h:     52px;
  --radius:       16px;
  --shadow:       0 8px 32px rgba(0,0,0,0.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Estedad', Tahoma, sans-serif;
  font-weight: 300;
  background: var(--bg-dark);
  color: var(--text);
  direction: rtl;
  /* leave room for fixed header + filter + footer */
  padding-top: calc(var(--header-h) + var(--filter-h));
  padding-bottom: var(--footer-h);
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .75; }

/* =============================================
   FIXED HEADER
============================================= */
.site-header {
  position: fixed;
  top: 0; right: 0; left: 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo-wrap { flex-shrink: 0; }
.logo { height: 40px; width: auto; object-fit: contain; }

.search-wrap {
  flex: 1;
  max-width: 440px;
  position: relative;
}
.search-wrap .search-icon {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}
#searchInput {
  width: 100%;
  padding: 9px 42px 9px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text);
  font-family: 'Estedad', sans-serif;
  font-size: .9rem;
  font-weight: 300;
  outline: none;
  transition: border-color .2s, background .2s;
  direction: rtl;
}
#searchInput::placeholder { color: var(--text-muted); }
#searchInput:focus {
  border-color: var(--primary);
  background: rgba(200,169,110,0.08);
}

.header-contact {
  flex-shrink: 0;
  font-size: .85rem;
  font-weight: 700;
  color: var(--primary);
}

/* =============================================
   FIXED FILTER BAR
============================================= */
.filter-bar {
  position: fixed;
  top: var(--header-h);
  right: 0; left: 0;
  height: var(--filter-h);
  z-index: 99;
  background: rgba(10,10,15,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-btn {
  flex-shrink: 0;
  padding: 6px 18px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: 'Estedad', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .22s;
  white-space: nowrap;
}
.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #0a0a0f;
}

/* =============================================
   SCROLLABLE MAIN
============================================= */
.catalog-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* =============================================
   HERO
============================================= */
.hero {
  padding: 52px 24px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.hero-tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(200,169,110,0.12);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
  letter-spacing: .04em;
}
.hero-text h1 {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 12px;
}
.hero-text h1 em {
  font-style: normal;
  color: var(--primary);
}
.hero-text p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 460px;
  line-height: 1.7;
}
.hero-badges {
  display: flex;
  gap: 14px;
}
.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 86px; height: 86px;
  border-radius: var(--radius);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  gap: 4px;
}
.badge span {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
}
.badge small {
  font-size: .7rem;
  color: var(--text-muted);
}

/* =============================================
   PRODUCTS GRID
============================================= */
.products-section { padding: 0 0 40px; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}

/* ===== CARD ===== */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  animation: fadeUp .35s ease both;
}
.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(200,169,110,0.45);
  box-shadow: 0 16px 48px rgba(200,169,110,0.08);
}
.product-card.featured {
  border-color: rgba(200,169,110,0.5);
  background: rgba(200,169,110,0.06);
}

@keyframes fadeUp {
  from { opacity:0; transform: translateY(18px); }
  to   { opacity:1; transform: translateY(0); }
}

/* Image */
.card-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}
.card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .card-img-wrap img { transform: scale(1.04); }

/* Stock badge */
.badge-stock {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 700;
}
.badge-stock.in  { background: rgba(50,205,100,0.15); color: #4ddd80; border: 1px solid rgba(50,205,100,0.3); }
.badge-stock.out { background: rgba(220,50,50,0.15);  color: #e86060; border: 1px solid rgba(220,50,50,0.3);  }

/* Card body */
.card-body { padding: 18px; display: flex; flex-direction: column; flex: 1; gap: 10px; }

.card-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.card-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
}
.card-model {
  font-size: .72rem;
  color: var(--primary);
  background: rgba(200,169,110,0.1);
  padding: 2px 8px;
  border-radius: 50px;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.card-desc {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Specs */
.specs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.specs li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--text);
  padding: 5px 8px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
}
.spec-icon { font-size: .9rem; flex-shrink: 0; }

/* Footer row */
.card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.price-wrap { display: flex; flex-direction: column; gap: 2px; }
.price-label { font-size: .7rem; color: var(--text-muted); }
.price { font-size: 1rem; font-weight: 900; color: var(--primary); }

.payment-note {
  font-size: .72rem;
  padding: 4px 10px;
  border-radius: 50px;
  background: rgba(200,169,110,0.1);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.payment-note.cash-only { color: #e8b560; background: rgba(232,181,96,0.1); border-color: rgba(232,181,96,0.25); }
.payment-note.out-stock  { color: #e86060; background: rgba(220,50,50,0.1);  border-color: rgba(220,50,50,0.25); }

/* No result */
.no-result {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.no-result span { font-size: 3rem; display: block; margin-bottom: 12px; }
.no-result p { font-size: 1.1rem; }

/* =============================================
   WARRANTY SECTION
============================================= */
.warranty-section {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
}
.warranty-section h2 {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  text-align: center;
  margin-bottom: 28px;
}
.warranty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.warranty-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: border-color .2s;
}
.warranty-card:hover { border-color: var(--primary); }
.w-icon { font-size: 2.2rem; margin-bottom: 10px; }
.warranty-card h3 { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.warranty-card p { font-size: .83rem; color: var(--text-muted); line-height: 1.65; }

/* =============================================
   FIXED FOOTER
============================================= */
.site-footer {
  position: fixed;
  bottom: 0; right: 0; left: 0;
  height: var(--footer-h);
  z-index: 100;
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-col {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .78rem;
  color: var(--text-muted);
}
.footer-col.center-col { gap: 8px; }
.footer-logo { height: 26px; width: auto; object-fit: contain; }
.sep { color: var(--border); }
.tel { color: var(--text-muted); font-size: .78rem; }
.tel:hover { color: var(--primary); }

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 768px) {
  :root { --header-h: 60px; --filter-h: 48px; --footer-h: 56px; }

  .hero { padding: 32px 8px 28px; }
  .hero-text h1 { font-size: 1.7rem; }
  .hero-badges { gap: 10px; }
  .badge { width: 72px; height: 72px; }

  .footer-inner { flex-wrap: wrap; height: auto; padding: 8px 16px; }
  .site-footer { height: auto; }
  body { padding-bottom: 80px; }

  .header-contact { display: none; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .hero-badges { display: none; }
}



/* ===== PROMOTIONAL TICKER BAR ===== */
.promo-ticker-wrapper {
  width: 100%;
  background: linear-gradient(90deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  border-bottom: 2px solid rgba(212, 175, 55, 0.5);
  padding: 0;
  overflow: hidden;
  position: relative;
  z-index: 10;
  /* فید محو در لبه‌ها */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

.promo-ticker {
  overflow: hidden;
  height: 38px;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  /* انیمیشن اسکرول از راست به چپ */
  animation: tickerScroll 45s linear infinite;
  will-change: transform;
}

/* هنگام hover متوقف می‌شود */
.promo-ticker-wrapper:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 32px;
  font-size: 13px;
  font-weight: 500;
  color: #e8d5a3;
  font-family: 'Vazirmatn', 'IRANSans', Tahoma, sans-serif;
  letter-spacing: 0.02em;
  direction: rtl;
  cursor: default;
  transition: color 0.2s;
}

.ticker-item:hover {
  color: #f5c842;
}

.ticker-icon {
  font-style: normal;
  color: #d4af37;
  font-size: 10px;
  opacity: 0.8;
  flex-shrink: 0;
}

/* خط جداکننده بین آیتم‌ها */
.ticker-item::after {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: rgba(212, 175, 55, 0.4);
  border-radius: 50%;
  margin-right: 32px;
  flex-shrink: 0;
}

.ticker-item:last-child::after {
  display: none;
}

/* کیفرام انیمیشن — از چپ شروع، به چپ می‌رود (RTL) */
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
  /* چون محتوا دو بار تکرار شده، ۵۰٪ = یک حلقه کامل */
}

/* ریسپانسیو */
@media (max-width: 768px) {
  .ticker-item {
    font-size: 11.5px;
    padding: 0 20px;
  }
  .promo-ticker {
    height: 34px;
  }
  .ticker-track {
    animation-duration: 35s; /* روی موبایل کمی سریع‌تر */
  }
}
/* ===== END PROMOTIONAL TICKER BAR ===== */


/* CSS */
.promo-ticker-wrapper {
  width: 100%;
  background: linear-gradient(90deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  border-bottom: 2px solid rgba(212, 175, 55, 0.5);
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(
    to right, transparent 0%, black 6%, black 94%, transparent 100%
  );
  mask-image: linear-gradient(
    to right, transparent 0%, black 6%, black 94%, transparent 100%
  );
}

.promo-ticker {
  overflow: hidden;
  height: 38px;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  /* ❌ هیچ انیمیشن CSS اینجا نذارید — JS کنترل می‌کنه */
  will-change: transform;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 28px;
  font-size: 13px;
  font-weight: 500;
  color: #e8d5a3;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  direction: rtl;
  white-space: nowrap;
  cursor: default;
  transition: color 0.2s;
  flex-shrink: 0;
}

.ticker-item:hover { color: #f5c842; }

.ticker-icon {
  font-style: normal;
  color: #d4af37;
  font-size: 10px;
}

.ticker-item::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: rgba(212, 175, 55, 0.45);
  border-radius: 50%;
  margin-left: 28px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .ticker-item { font-size: 11.5px; padding: 0 18px; }
  .promo-ticker { height: 34px; }
}
