/* ============================================================
   چرخ گستر سهند - استایل هدر و فوتر
   نسخه: 4.2 - Production Ready
   ============================================================ */

:root {
  --atlas-deep-blue: #0a1a2f;
  --atlas-mid-blue: #0d2240;
  --atlas-tech-blue: #134074;
  --atlas-gold: #d4af37;
  --atlas-gold-light: #e5c767;
  --atlas-copper: #b87333;
  --atlas-white: #ffffff;
  --atlas-text-on-dark: #ccd6e0;
  --atlas-text-muted: #8899aa;
  --transition-fast: 0.25s ease;
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
  --font-primary: 'Vazirmatn', 'Tahoma', sans-serif;
}

/* ==================== هدر ==================== */
.atlas-header {
  background: linear-gradient(180deg, #061220 0%, var(--atlas-deep-blue) 100%);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  font-family: var(--font-primary);
  backdrop-filter: blur(10px);
  direction: rtl;
}

.atlas-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
      transparent 0%,
      var(--atlas-gold) 20%,
      var(--atlas-copper) 50%,
      var(--atlas-gold) 80%,
      transparent 100%);
  animation: headerGlow 3s ease-in-out infinite;
}

@keyframes headerGlow {
  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  max-width: 1300px;
  margin: 0 auto;
  gap: 1.5rem;
  position: relative;
}

/* ==================== لوگو ==================== */
.header-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.logo-gear {
  width: 100%;
  height: 100%;
  color: var(--atlas-gold);
  animation: gearSpin 8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .logo-gear,
  .atlas-header::before,
  .cart-badge {
    animation: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

@keyframes gearSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.logo-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.logo-title {
  color: var(--atlas-white);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.logo-subtitle {
  color: var(--atlas-gold);
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ==================== منو ==================== */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--atlas-text-on-dark);
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--atlas-gold);
  transition: transform var(--transition-fast);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: var(--atlas-white);
  background: rgba(212, 175, 55, 0.08);
  outline: none;
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* ==================== دکمه‌های هدر ==================== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

.hdr-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.84rem;
  transition: all var(--transition-smooth);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.08);
  color: var(--atlas-gold);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hdr-btn:hover,
.hdr-btn:focus-visible {
  background: rgba(212, 175, 55, 0.18);
  border-color: var(--atlas-gold);
  color: var(--atlas-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  outline: none;
}

.hdr-btn:active {
  transform: scale(0.96);
}

.hdr-btn-user {
  color: var(--atlas-gold-light);
  background: rgba(212, 175, 55, 0.14);
  border-color: rgba(212, 175, 55, 0.45);
}

.hdr-btn-call {
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(212, 175, 55, 0.5);
  color: var(--atlas-gold-light);
}

.hdr-btn-call:hover,
.hdr-btn-call:focus-visible {
  background: rgba(212, 175, 55, 0.28);
}

/* ==================== موبایل منو ==================== */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--atlas-gold);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:focus-visible {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--atlas-gold);
  outline: none;
}

/* ==================== سبد خرید ==================== */
.nav-cart {
  position: relative;
}

.nav-cart svg {
  flex-shrink: 0;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -7px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 900;
  background: #e74c3c;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  line-height: 1;
  z-index: 2;
  animation: cartBadgePop 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes cartBadgePop {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  60% {
    transform: scale(1.4);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================================
   فوتر
   ============================================================ */
.atlas-footer {
  background: linear-gradient(0deg, #061220 0%, var(--atlas-deep-blue) 100%);
  position: relative;
  font-family: var(--font-primary);
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  overflow: hidden;
}

.atlas-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg,
      transparent,
      transparent 2px,
      rgba(212, 175, 55, 0.02) 2px,
      rgba(212, 175, 55, 0.02) 4px);
  pointer-events: none;
  z-index: 0;
}

.footer-top {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem 3rem;
  max-width: 1300px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 3rem;
}

.footer-brand {
  position: relative;
  z-index: 1;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.footer-logo-icon {
  width: 45px;
  height: 45px;
  color: var(--atlas-gold);
}

.footer-company-name {
  color: var(--atlas-white);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.footer-about {
  color: var(--atlas-text-on-dark);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  opacity: 0.8;
}

.footer-address {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(212, 175, 55, 0.05);
  border-radius: 12px;
  border-right: 3px solid var(--atlas-gold);
}

.address-icon {
  width: 40px;
  height: 40px;
  background: rgba(212, 175, 55, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--atlas-gold);
}

.address-icon svg {
  width: 20px;
  height: 20px;
}

.address-text {
  color: var(--atlas-text-on-dark);
  font-size: 0.9rem;
  line-height: 1.8;
}

.address-text strong {
  color: var(--atlas-white);
  display: block;
  margin-bottom: 0.2rem;
}

.social-links {
  display: flex;
  gap: 0.8rem;
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--atlas-gold);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.social-link:hover,
.social-link:focus-visible {
  background: var(--atlas-gold);
  color: var(--atlas-deep-blue);
  border-color: var(--atlas-gold);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.15);
  outline: none;
}

.social-link svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
}

.footer-title {
  color: var(--atlas-white);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  position: relative;
  display: inline-block;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 2px;
  background: var(--atlas-gold);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-link {
  color: var(--atlas-text-on-dark);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-link::before {
  content: '▸';
  color: var(--atlas-gold);
  font-size: 0.7rem;
  transition: transform var(--transition-fast);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--atlas-gold);
  transform: translateX(-5px);
  outline: none;
}

.footer-link:hover::before,
.footer-link:focus-visible::before {
  transform: translateX(-3px);
}

.contact-info {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
}

.contact-item {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  transition: all var(--transition-fast);
}

.contact-item:hover {
  background: rgba(212, 175, 55, 0.05);
}

.contact-icon {
  width: 36px;
  height: 36px;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--atlas-gold);
}

.contact-icon svg {
  width: 16px;
  height: 16px;
}

.contact-detail {
  flex: 1;
}

.contact-label {
  color: var(--atlas-text-muted);
  font-size: 0.75rem;
  display: block;
  margin-bottom: 0.2rem;
}

.contact-value {
  color: var(--atlas-white);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

a.contact-value:hover,
a.contact-value:focus-visible {
  color: var(--atlas-gold);
  outline: none;
}

.working-hours {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(212, 175, 55, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.1);
}

.hours-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  color: var(--atlas-text-on-dark);
  font-size: 0.85rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.hours-item:last-child {
  border-bottom: none;
}

.hours-day {
  color: var(--atlas-text-on-dark);
}

.hours-time {
  color: var(--atlas-gold);
  font-weight: 600;
}

.hours-time.closed {
  color: #e74c3c;
}

/* ==================== پایین فوتر ==================== */
.footer-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  padding: 1.5rem 2rem;
  max-width: 1300px;
  margin: 0 auto;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright {
  color: var(--atlas-text-muted);
  font-size: 0.85rem;
}

.copyright strong {
  color: var(--atlas-gold);
  font-weight: 600;
}

.footer-bottom-links {
  display: flex;
  gap: 0.8rem;
}

.footer-bottom-link {
  color: var(--atlas-text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 1.2rem;
  border-radius: 50px;
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1.2);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  backdrop-filter: blur(8px);
}

.footer-bottom-link::before {
  content: '●';
  color: var(--atlas-gold);
  font-size: 0.4rem;
  opacity: 0;
  transition: all 0.35s ease;
  transform: translateX(5px);
}

.footer-bottom-link:hover,
.footer-bottom-link:focus-visible {
  color: var(--atlas-gold);
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.08);
  box-shadow: 0 5px 20px rgba(212, 175, 55, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.footer-bottom-link:hover::before,
.footer-bottom-link:focus-visible::before {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .header-container {
    padding: 0.5rem 1rem;
    gap: 1rem;
  }

  .nav-link {
    padding: 0.4rem 0.7rem;
    font-size: 0.82rem;
  }

  .hdr-btn-label {
    display: none;
  }

  .hdr-btn {
    padding: 0.55rem;
    width: 40px;
    height: 40px;
    justify-content: center;
  }

  .footer-grid {
    gap: 2rem;
  }

  .footer-top {
    padding: 4rem 1.5rem 2.5rem;
  }
}

@media (max-width: 900px) {
  .header-nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    background: var(--atlas-deep-blue);
    flex-direction: column;
    padding: 0.8rem;
    border-bottom: 2px solid var(--atlas-gold);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    gap: 0.3rem;
    z-index: 999;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  }

  .header-nav.active {
    display: flex;
  }

  .nav-link {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .nav-cart {
    justify-content: center;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .header-container {
    flex-wrap: nowrap;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-contact-wrapper {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-contact-wrapper {
    grid-column: span 1;
  }

  .footer-top {
    padding: 3rem 1.2rem 2rem;
  }

  .footer-bottom {
    padding: 1.2rem;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 0.8rem;
  }

  .footer-company-name {
    font-size: 1.2rem;
  }

  .footer-bottom-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0.4rem 0.8rem;
    gap: 0.5rem;
  }

  .logo-title {
    font-size: 1rem;
  }

  .logo-subtitle {
    font-size: 0.56rem;
    letter-spacing: 1.2px;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
  }

  .header-logo {
    gap: 0.4rem;
    min-width: 0;
  }

  .hdr-btn {
    width: 34px;
    height: 34px;
    padding: 0.45rem;
  }

  .mobile-menu-btn {
    width: 36px;
    height: 36px;
  }

  .footer-company-name {
    font-size: 1.1rem;
  }

  .footer-top {
    padding: 2.5rem 1rem 1.5rem;
  }

  .footer-bottom-links {
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .footer-bottom-link {
    font-size: 0.76rem;
    padding: 0.35rem 0.9rem;
  }
}

@media (max-width: 380px) {
  .logo-subtitle {
    display: none;
  }

  .logo-title {
    font-size: 0.95rem;
  }

  .header-actions {
    gap: 0.45rem;
  }
}
/* تضمین نمایش یکپارچه دکمه خروج در هدر */
.header-actions form {
    margin: 0;
    padding: 0;
}
.hdr-btn-logout {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px; /* فاصله آیکون با متن */
}
