/* تعریف متغیرهای پالت رنگی اختصاصی */
:root {
  --primary-bg: #110b11;
  /* بادمجانی بسیار تیره (زغال سرد) */
  --secondary-text: #d35400;
  /* نارنجی گداخته */
  --accent-cta: #e74c3c;
  /* قرمز آتشین */
  --light-bg: #1c121c;
  /* تغییر یافته: بادمجانی تیره (جایگزین سفید سابق) */
  --main-text: #eaeaea;
  /* تغییر یافته: متون روشن روی پس‌زمینه تیره */
  --hover-color: #f39c12;
  /* زرد گداخته (هاور دکمه‌ها) */
  --card-bg: #1a121a;
}

/* شخصی‌سازی اسکرول‌بار مرورگر متناسب با تم زغال و آتش */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-text);
  border-radius: 5px;
  border: 2px solid var(--primary-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cta);
}

/* ریست و تنظیمات پایه */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Vazirmatn", sans-serif;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
  background-color: var(--primary-bg);
  color: #ffffff;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* --- هدر بیضی‌شکل معلق --- */
/* --- اصلاح و متحرک‌سازی هدر بیضی‌شکل معلق --- */
.main-header {
  position: fixed;
  top: 25px;
  /* کمی فاصله بیشتر از بالا برای زیبایی بیشتر */
  left: 5%;
  right: 5%;
  height: 80px;
  /* افزایش جزئی ارتفاع برای فضای تنفس بهتر المان‌ها */
  background: rgba(17, 11, 17, 0.75);
  /* بادمجانی بسیار تیره و نیمه‌شفاف */
  backdrop-filter: blur(15px);
  /* افکت شیشه‌ای قوی‌تر */
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(211, 84, 0, 0.15);
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  /* ایجاد پدینگ بیشتر از طرفین برای چیدمان مرتب‌تر */
  z-index: 1000;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);

  /* انیمیشن اولیه لود و ترنزیشن نرم */
  transform: translateY(0) scale(1);
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* افکت هاور پویا و جذاب روی کل بدنه هدر */
.main-header:hover {
  transform: translateY(-3px) scale(1.01);
  /* حرکت بسیار نرم به سمت بالا و بزرگنمایی نامحسوس */
  background: rgba(22, 14, 22, 0.85);
  /* کمی تیره‌تر شدن پس‌زمینه هنگام هاور */
  border-color: rgba(211, 84, 0, 0.6);
  /* گداخته شدن تدریجی لبه‌ها */
  box-shadow:
    0 15px 40px rgba(211, 84, 0, 0.25),
    /* ایجاد سایه گداخته نارنجی در زیر هدر */ 0 0 20px rgba(231, 76, 60, 0.1);
}

/* لوگو هدر */
.logo-area,
.nav-menu,
.header-actions {
  display: flex;
  align-items: center;
}

.logo-area img {
  height: 50px;
  /* بزرگ‌تر شدن اندازه لوگو برای تناسب بهتر با هدر جدید */
  width: auto;
  filter: drop-shadow(0 0 8px rgba(211, 84, 0, 0.3));
  transition: filter 0.4s ease;
}

.main-header:hover .logo-area img {
  filter: drop-shadow(0 0 12px rgba(211, 84, 0, 0.7));
  /* درخشش بیشتر لوگو هنگام هاور هدر */
}

/* منوی هدر */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-menu a {
  color: #dddddd;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  position: relative;
  padding: 8px 0;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: var(--secondary-text);
  text-shadow: 0 0 10px rgba(211, 84, 0, 0.5);
}

.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-text);
  transition: width 0.3s ease;
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-menu a:hover {
  color: var(--secondary-text);
}

/* دکمه سبد خرید در هدر */
.cart-btn {
  background: linear-gradient(135deg, var(--accent-cta), var(--secondary-text));
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
  position: relative;
}

.cart-btn:hover {
  background: var(--hover-color);
  transform: scale(1.05) translateY(-5px);
  /* اصلاح هاور به بالا */
  box-shadow: 0 10px 25px rgba(243, 156, 18, 0.5);
}

.cart-badge {
  background-color: white;
  color: var(--accent-cta);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

/* --- پنل کشویی سبد خرید (Cart Drawer) --- */
.cart-drawer {
  position: fixed;
  top: 0;
  left: -380px;
  /* مخفی در حالت پیش‌فرض */
  width: 350px;
  height: 100vh;
  background: #181018;
  border-right: 2px solid var(--secondary-text);
  z-index: 2000;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  padding: 25px;
  transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.cart-drawer.open {
  left: 0;
}

.cart-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 15px;
}

.cart-drawer-header h3 {
  color: var(--secondary-text);
  font-weight: bold;
}

.close-cart-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.close-cart-btn:hover {
  color: var(--accent-cta);
}

.cart-items-container {
  flex-grow: 1;
  overflow-y: auto;
  margin-bottom: 20px;
}

.empty-cart-text {
  text-align: center;
  color: #777;
  margin-top: 50px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 15px;
  border-radius: 10px;
  margin-bottom: 10px;
  border: 1px solid rgba(211, 84, 0, 0.1);
}

.cart-item-name {
  font-size: 0.95rem;
  font-weight: bold;
}

.cart-item-price {
  color: var(--hover-color);
  font-size: 0.9rem;
}

.checkout-btn {
  background: linear-gradient(135deg, var(--accent-cta), var(--secondary-text));
  color: white;
  border: none;
  width: 100%;
  padding: 15px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.checkout-btn:hover {
  background: var(--hover-color);
  transform: translateY(-4px);
  /* اصلاح هاور به بالا */
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 1999;
  display: none;
}

.cart-overlay.open {
  display: block;
}

/* --- بنر هدر اصلی (Hero Banner) --- */
.hero-banner {
  position: relative;
  height: 100vh;
  min-height: 700px;
  background:
    linear-gradient(rgba(17, 11, 17, 0.4), var(--primary-bg)),
    url("../../assets/img/baner.png") no-repeat center center/cover;
  /* تصویر سوم قرار گرفته در پس زمینه */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10%;
  overflow: hidden;
}

/* افکت ۳ بعدی گرد و غبار/دخان پشت متن */
.hero-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(231, 76, 60, 0.08) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  pointer-events: none;
}

.hero-content {
  z-index: 2;
  max-width: 600px;
  text-align: right;
  transform: translateZ(50px);
  /* شبیه‌سازی عمق ۳ بعدی */
  animation: fadeInUp 1.2s ease forwards;
}

.hero-brand-name {
  font-size: 5rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow:
    0 10px 20px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(211, 84, 0, 0.6);
  margin-bottom: 10px;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--secondary-text);
  margin-bottom: 30px;
  font-weight: 700;
}

/* دکمه مشاهده محصول */
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--accent-cta), var(--secondary-text));
  color: #fff;
  padding: 15px 35px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  border: 2px solid transparent;
  box-shadow: 0 10px 25px rgba(231, 76, 60, 0.4);
  transform: scale(1);
}

.hero-btn:hover {
  background: var(--hover-color);
  border-color: #ffffff;
  box-shadow: 0 15px 30px rgba(243, 156, 18, 0.6);
  transform: translateY(-5px) scale(1.05);
  /* اصلاح هاور به بالا */
}

/* --- بخش محصولات تخفیف خورده --- */
.discount-section {
  padding: 100px 5%;
  background-color: var(--primary-bg);
  position: relative;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 60px;
  color: #ffffff;
  position: relative;
}

.section-title span {
  color: var(--secondary-text);
}

.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--accent-cta);
  margin: 15px auto 0;
  border-radius: 2px;
}

/* گرید سه‌بعدی کارت‌ها */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  perspective: 1000px;
  /* فعال‌سازی حالت سه‌بعدی برای فرزندان */
}

/* کارت محصول سه‌بعدی */
.product-card {
  background-color: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  transform-style: preserve-3d;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.product-card:hover {
  transform: rotateY(5deg) rotateX(5deg) translateY(-10px);
  border-color: rgba(211, 84, 0, 0.4);
  box-shadow: 0 25px 45px rgba(211, 84, 0, 0.2);
}

.product-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--accent-cta);
  color: white;
  padding: 5px 15px;
  border-radius: 15px;
  font-weight: bold;
  font-size: 0.9rem;
  z-index: 5;
  box-shadow: 0 4px 10px rgba(231, 76, 60, 0.4);
}

.product-img-wrapper {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: #000;
}

.product-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
}

.product-card:hover .product-img-wrapper img {
  transform: scale(1.1);
}

.product-info {
  padding: 25px;
  text-align: right;
}

.product-name {
  font-size: 1.4rem;
  margin-bottom: 10px;
  font-weight: 700;
  color: #ffffff;
}

.product-desc {
  font-size: 0.9rem;
  color: #aaaaaa;
  margin-bottom: 20px;
  line-height: 1.6;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.old-price {
  text-decoration: line-through;
  color: #7f8c8d;
  font-size: 0.95rem;
}

.new-price {
  color: var(--secondary-text);
  font-size: 1.4rem;
  font-weight: bold;
}

.add-to-cart-btn {
  width: 100%;
  background: transparent;
  border: 2px solid var(--accent-cta);
  color: #ffffff;
  padding: 12px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.add-to-cart-btn:hover {
  background: var(--accent-cta);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
  transform: translateY(-5px);
  /* اصلاح هاور به بالا */
}

/* --- سیستم نوتیفیکیشن اختصاصی (Toast) --- */
#toast-container {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(17, 11, 17, 0.95);
  border-left: 5px solid var(--accent-cta);
  border-right: 1px solid rgba(211, 84, 0, 0.3);
  border-top: 1px solid rgba(211, 84, 0, 0.3);
  border-bottom: 1px solid rgba(211, 84, 0, 0.3);
  color: #ffffff;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 15px;
  transform: translateX(-120%);
  animation: slideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast.hide {
  animation: slideOut 0.5s ease forwards;
}

/* --- بخش مقالات با پس‌زمینه جدید بادمجانی تیره --- */
.articles-section {
  background-color: var(--light-bg);
  color: var(--main-text);
  padding: 80px 5%;
  border-top: 1px solid rgba(211, 84, 0, 0.1);
  border-bottom: 1px solid rgba(211, 84, 0, 0.1);
}

.articles-section .section-title {
  color: #ffffff;
}

/* --- فوتر مدرن با پالت رنگی داغ --- */
.footer {
  background-color: #0b070b;
  border-top: 2px solid rgba(211, 84, 0, 0.2);
  padding: 60px 5% 30px;
  color: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h3 {
  color: var(--secondary-text);
  font-size: 1.3rem;
  margin-bottom: 20px;
  font-weight: bold;
}

.footer-col p,
.footer-col a {
  color: #b3b3b3;
  text-decoration: none;
  line-height: 1.8;
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--hover-color);
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icon {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(211, 84, 0, 0.2);
}

.social-icon:hover {
  background: var(--accent-cta);
  transform: translateY(-5px) rotate(360deg);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.social-icon svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  font-size: 0.85rem;
  color: #777;
}

/* دکمه احراز هویت در هدر */
.header-actions {
  gap: 15px;
}

.auth-btn,
.cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  /* یکسان‌سازی دقیق ارتفاع هر دو دکمه */
  border-radius: 22px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 20px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  background: #d35400c4;
}

.auth-btn:hover,
.auth-btn.logged-in {
  background: linear-gradient(
    135deg,
    var(--secondary-text),
    var(--hover-color)
  );
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(211, 84, 0, 0.4);
  transform: translateY(-5px);
  /* اصلاح هاور به بالا */
}

.logged-in {
  margin-top: 11px;
}

/* پاپ آپ مودال احراز هویت */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal {
  background: #181018;
  border: 2px solid var(--secondary-text);
  border-radius: 24px;
  width: 90%;
  max-width: 450px;
  padding: 40px 30px;
  position: relative;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(211, 84, 0, 0.2);
  transform: scale(0.85);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.open .auth-modal {
  transform: scale(1);
}

.close-modal-btn {
  position: absolute;
  top: 15px;
  left: 20px;
  background: transparent;
  border: none;
  color: #777;
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal-btn:hover {
  color: var(--accent-cta);
}

/* استایل درونی فرم‌های احراز هویت */
.auth-form-box h2 {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
  text-align: center;
}

.auth-subtitle {
  color: #aaa;
  font-size: 0.9rem;
  margin-bottom: 25px;
  text-align: center;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.input-group label {
  color: var(--secondary-text);
  font-size: 0.9rem;
  font-weight: bold;
}

.input-group input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 15px;
  color: white;
  font-size: 1rem;
  text-align: right;
  direction: ltr;
  /* برای ورود مناسب شماره موبایل و پسورد */
}

.input-group input:focus {
  outline: none;
  border-color: var(--secondary-text);
  box-shadow: 0 0 10px rgba(211, 84, 0, 0.3);
}

/* ساختار نمایشی فیلد پسورد و دکمه چشم تعاملی */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  width: 100%;
  padding-left: 45px;
  /* فضا برای قرارگیری دکمه چشم در سمت چپ */
}

.toggle-password-btn {
  position: absolute;
  left: 12px;
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  z-index: 5;
}

.toggle-password-btn:hover {
  color: var(--secondary-text);
  transform: scale(1.1);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 25px;
}

.forgot-pass-link {
  color: #aaa;
  text-decoration: none;
  font-size: 0.85rem;
}

.forgot-pass-link:hover {
  color: var(--hover-color);
}

.submit-auth-btn {
  background: linear-gradient(135deg, var(--accent-cta), var(--secondary-text));
  border: none;
  color: white;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
  margin-bottom: 20px;
}

.submit-auth-btn:hover {
  background: var(--hover-color);
  transform: translateY(-4px);
  /* اصلاح هاور به بالا */
}

.logout-btn {
  background: transparent;
  border: 1px solid rgba(231, 76, 60, 0.5);
  color: var(--accent-cta);
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
}

.logout-btn:hover {
  background: rgba(231, 76, 60, 0.1);
  transform: translateY(-3px);
  /* اصلاح هاور به بالا */
}

.switch-form-text {
  text-align: center;
  font-size: 0.9rem;
  color: #777;
}

.switch-form-text a {
  color: var(--secondary-text);
  text-decoration: none;
  font-weight: bold;
}

.switch-form-text a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

/* توست انواع خطا و پیغام */
.toast.error {
  border-left-color: #c0392b;
}

.toast.info {
  border-left-color: #f39c12;
}

/* --- استایل‌دهی مدرن به لیست‌های کشویی (Select Elements) --- */
.input-group select {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 15px;
  color: #ffffff;
  font-size: 1rem;
  font-family: "Vazirmatn", sans-serif;
  width: 100%;
  cursor: pointer;
  outline: none;
  direction: rtl;
  font-size: 12px;

  /* حذف ظاهر فلش پیش‌فرض مرورگر */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* قرار دادن آیکون فلش سفارشی در سمت چپ فیلد */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23d35400' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 15px center;
  background-size: 18px;
  padding-left: 45px;
  /* ایجاد فضا برای فلش سفارشی */
}

/* افکت فوکوس روی منوی کشویی */
.input-group select:focus {
  border-color: var(--secondary-text);
  box-shadow: 0 0 10px rgba(211, 84, 0, 0.3);
  background-color: rgba(211, 84, 0, 0.02);
}

/* استایل‌دهی به گزینه‌های داخل منوی کشویی (Option Elements) */
.input-group select option {
  background-color: #181018;
  /* پس‌زمینه بادمجانی تیره متناسب با تم */
  color: #eaeaea;
  padding: 12px;
  font-family: "Vazirmatn", sans-serif;
}

/* حالت غیرفعال بودن منوی کشویی شهر (زمانی که هنوز استان انتخاب نشده) */
.input-group select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23777777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* انیمیشن‌ها */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  to {
    transform: translateX(0);
  }
}

@keyframes slideOut {
  to {
    transform: translateX(-150%);
    opacity: 0;
  }
}

/* بازنویسی چیدمان هدر موبایل با اولویت‌بندی مطلق و رفع باگ متن دکمه */
@media (max-width: 768px) {
  .main-header {
    top: 15px !important;
    left: 15px !important;
    right: 15px !important;
    height: auto !important;
    border-radius: 24px !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important; /* چیدمان ستونی اجباری */
    gap: 15px !important;
    background: rgba(24, 16, 24, 0.95) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
  }

  /* ردیف اول: لوگو با اقتدار در بالاترین نقطه قرار می‌گیرد */
  .logo-area {
    order: 1 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 5px !important;
    position: relative;
    top: -60px;
  }

  .logo-area img {
    height: 42px !important;
    filter: drop-shadow(0 0 10px rgba(211, 84, 0, 0.5)) !important;
  }

  /* ردیف دوم: منوی سه‌گانه دقیقاً به وسط و جایگاه قبلی لوگو نقل مکان می‌کند */
  .nav-menu {
    order: 2 !important;
    display: flex !important;
    justify-content: center !important;
    gap: 25px !important;
    width: 100% !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 10px 0 !important;
    position: relative;
    top: 60px;
  }

  .nav-menu a {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
  }

  /* ردیف سوم: دکمه‌های اکشن به انتهای هدر منتقل می‌شوند */
  .header-actions {
    order: 3 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    gap: 12px !important;
  }

  /* دکمه حساب کاربری */
  .auth-btn {
    padding: 0 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: var(--secondary-text) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .auth-btn span {
    display: none !important;
  }

  .auth-btn svg {
    width: 20px !important;
    height: 20px !important;
    stroke: #fff !important;
  }

  /* حل جادویی مشکل باگ متنی «سبد سبد خرید» */
  .cart-btn {
    height: 40px !important;
    padding: 0 20px !important;
    border-radius: 20px !important;
    background: var(--secondary-text) !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .cart-btn svg {
    display: none !important; /* حذف آیکون طبق استایل صفحه محصولات */
  }

  /* ترفند CSS برای پاک کردن متن قبلی و جایگزینی آن با کلمه شیکِ "سبد" */
  .cart-btn span:not(.cart-badge) {
    font-size: 0 !important; /* متن اصلی «سبد خرید» کاملاً پنهان می‌شود */
  }

  .cart-btn span:not(.cart-badge)::before {
    content: "سبد" !important; /* متن جدید جایگزین می‌شود */
    font-size: 0.85rem !important; /* احیای سایز فونت */
    color: #ffffff !important;
  }

  .cart-badge {
    background-color: white !important;
    color: var(--secondary-text) !important;
    width: 18px !important;
    height: 18px !important;
    font-size: 0.75rem !important;
    font-weight: 900 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* تنظیم فاصله بخش هیرو برای جلوگیری از تداخل با هدر جدید */
  .hero-banner {
    padding-top: 190px !important; /* کمی فضا را افزایش دادیم تا هدر ۳ ردیفه روی متون را نپوشاند */
    height: auto !important;
    min-height: 100vh !important;
  }
}

/* --- استایل دکمه حذف محصول در سبد خرید --- */
.remove-item-btn {
  background: transparent;
  border: none;
  color: #7f8c8d;
  /* رنگ خاکستری ملایم در حالت عادی */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  transition: all 0.2s ease-in-out;
}

/* افکت هاور روی دکمه حذف (قرمز آتشین متناسب با تم زغال) */
.remove-item-btn:hover {
  background: rgba(231, 76, 60, 0.15);
  color: var(--accent-cta);
  /* قرمز آتشین */
  transform: scale(1.1);
}

/* تنظیم سایز دقیق آیکون SVG حذف */
.remove-item-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  /* هماهنگی رنگ با والد */
  transition: stroke 0.2s ease;
}

.shipping-note {
  background: #fff3e0;
  border-right: 4px solid #e67e22;
  padding: 10px;
  border-radius: 4px;
  line-height: 1.6;
}

.shipping-note.free {
  background: #e8f5e9;
  border-right: 4px solid #2ecc71;
}

/* مهار کردن رفتار بی‌سلیقه کروم در سفید کردن فیلدهای Auto-fill */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff !important; /* رنگ متن همچنان سفید بماند */
  transition: background-color 5000s ease-in-out 0s; /* پس‌زمینه را در یک ترنزیشن ابدی قفل می‌کنیم تا تغییر رنگ ندهد */
  box-shadow: inset 0 0 0px 1000px rgba(255, 255, 255, 0.03) !important; /* اعمال پس‌زمینه بسیار شفاف اصلی شما */
}
