/* ============================================================
   FONTS
   ============================================================ */
@font-face {
  font-family: 'RaviFaNum';
  src: url('../fonts/RaviFaNum-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'RaviFaNum';
  src: url('../fonts/RaviFaNum-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   RTL BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'RaviFaNum', Tahoma, Arial, sans-serif;
  direction: rtl;
  text-align: right;
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  color: #1a1a2e;
  line-height: 1.8;
}

.container {
  max-width: 1330px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #E25C37; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #c94d2a; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  background-color: #061B2C;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.header-topbar {
  background: #041321;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-topbar-inner {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-topbar-message {
  margin: 0;
  color: rgba(255,255,255,0.72);
  font-size: 0.74rem;
}

.header-topbar-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-topbar-links a {
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 0.74rem;
}

.header-topbar-links a:hover {
  color: #E25C37;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 1rem;
}

.site-logo img { height: 48px; width: auto; }

.primary-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.primary-nav ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
}

.primary-nav ul li a:hover,
.primary-nav ul li.current-menu-item > a {
  background: rgba(255,255,255,0.09);
  color: #E25C37;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.header-right,
.header-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.primary-nav,
.site-logo {
  display: none;
}

.btn-login {
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-login:hover {
  background: rgba(255,255,255,0.1);
  border-color: #E25C37;
  color: #E25C37;
}

.btn-register {
  background: #E25C37;
  color: #fff !important;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.btn-register:hover { background: #c94d2a; }

.cart-btn {
  position: relative;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  width: 38px;
  height: 38px;
  justify-content: center;
  border-radius: 9px;
}

.cart-btn:hover { color: #E25C37; }

.cart-count {
  position: absolute;
  top: -7px;
  left: -6px;
  background: #E25C37;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.header-cart {
  position: relative;
}

.header-mini-cart {
  position: absolute;
  top: calc(100% + 10px);
  right: -283px;
  left: auto;
  width: 320px;
  max-width: calc(100vw - 24px);
  max-height: 72vh;
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.2s ease;
  z-index: 1200;
}

.header-cart.is-open .header-mini-cart {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mini-cart-panel-inner {
  padding: 0.8rem;
}

.mini-cart-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #061B2C;
  margin-bottom: 0.7rem;
}

.mini-cart-panel-head span {
  color: #64748b;
  font-size: 0.8rem;
}

.mini-cart-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mini-cart-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.mini-cart-item-content {
  min-width: 0;
  flex: 1;
}

.mini-cart-item-thumb img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 9px;
}

.mini-cart-item-title {
  display: block;
  color: #061B2C;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-cart-item-title:hover {
  color: #E25C37;
}

.mini-cart-item-meta {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-cart-panel-foot {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid #edf2f7;
}

.mini-cart-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #334155;
  margin-bottom: 0.55rem;
}

.mini-cart-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.mini-cart-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 9px;
  border: 1px solid #d1d5db;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 700;
  background: #fff;
  transition: all 0.2s ease;
}

.mini-cart-btn--primary {
  border-color: #E25C37;
  background: #E25C37;
  color: #fff;
}

.mini-cart-empty {
  text-align: center;
  color: #64748b;
}

.mini-cart-empty .mini-cart-btn {
  margin-top: 0.6rem;
  width: 100%;
}

/* Mobile nav */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-nav {
  display: block;
  position: fixed;
  top: 0;
  right: 0;
  width: min(86vw, 340px);
  height: 100vh;
  background: #0a2438;
  padding: 0.75rem 0;
  border-left: 1px solid rgba(255,255,255,0.1);
  overflow: auto;
  transform: translateX(110%);
  transition: transform 0.28s ease;
  opacity: 1;
  z-index: 1300;
}

.mobile-nav.is-open {
  transform: translateX(0);
}

.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 1rem 0.55rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.mobile-nav-head span {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

.mobile-nav-contact {
  margin: 0.15rem 1rem 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mobile-nav-contact a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.82rem;
}

.mobile-nav-contact a:hover {
  color: #E25C37;
}

.mobile-menu-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav ul li a {
  display: block;
  color: #fff;
  text-decoration: none;
  margin: 0.2rem 0.7rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-size: 0.95rem;
  transition: background 0.2s, border-color 0.2s;
}

.mobile-nav ul li a:hover {
  background: rgba(226,92,55,0.15);
  border-color: rgba(226,92,55,0.4);
  color: #E25C37;
}

.mobile-nav-overlay {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.56);
  border: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1200;
}

body.is-mobile-menu-open .mobile-nav-overlay {
  opacity: 1;
  visibility: visible;
}

body.is-mobile-menu-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .header-topbar {
    display: none;
  }

  .header-inner { height: 62px; }

  .header-left {
    gap: 0.55rem;
  }

  .header-auth {
    gap: 0.35rem;
  }

  .btn-login,
  .btn-register {
    padding: 0.3rem 0.55rem;
    font-size: 0.72rem;
  }

  .header-mini-cart {
    position: fixed;
    top: 108px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    max-height: min(70vh, 520px);
    border-radius: 12px;
  }
}

@media (max-width: 560px) {
  .mini-cart-panel-inner {
    padding: 0.7rem;
  }

  .mini-cart-item-thumb img {
    width: 46px;
    height: 46px;
  }

  .mini-cart-actions {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #061B2C;
  color: #fff;
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.54fr) minmax(0, 1.75fr) minmax(0, 0.76fr) minmax(0, 0.85fr);
  gap: 2rem;
  align-items: start;
  text-align: right;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-about { color: rgba(255,255,255,0.75); font-size: 0.9rem; line-height: 2; }
.footer-about strong { color: #E25C37; display: block; margin-bottom: 0.5rem; font-size: 1rem; }
.footer-about-text {
  margin: 0;
  text-align: justify;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.footer-about.is-expanded .footer-about-text {
  display: block;
  line-clamp: unset;
  -webkit-line-clamp: unset;
}
.footer-about-toggle {
  margin-top: 0.45rem;
  border: 0;
  background: none;
  color: #E25C37;
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.footer-about-toggle:hover {
  color: #ff8f73;
}
.footer-about-toggle-icon {
  font-size: 0.9em;
  line-height: 1;
  transition: transform 0.2s ease;
}
.footer-about-toggle[aria-expanded="true"] .footer-about-toggle-icon {
  transform: rotate(180deg);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  text-align: right;
}

.footer-logo { text-align: right; }
.footer-logo img { height: 78px; width: auto; margin-bottom: 0.5rem; }
.footer-brand ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.35rem 0.8rem;
}

.footer-brand ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 0.84rem;
}

.footer-brand ul li a:hover {
  color: #E25C37;
}

.footer-social {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding-right: 4rem;
}
.footer-social h4 { color: #E25C37; font-size: 0.9rem; margin: 0 0 0.25rem; }

.social-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
  direction: rtl;
}

.social-link:hover { color: #E25C37; }

.social-link svg { width: 20px; height: 20px; flex-shrink: 0; }

.social-link img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  gap: 0.75rem;
}

.footer-contact h4 {
  margin: 0 0 0.2rem;
  color: #E25C37;
  font-size: 0.9rem;
}

.footer-contact a {
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  direction: ltr;
}

.footer-contact a:hover {
  color: #E25C37;
}

.footer-contact-phone {
  unicode-bidi: plaintext;
}

.footer-contact-address {
  margin: 0;
  max-width: 22rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
  line-height: 1.75;
  text-align: right;
}

.footer-trust {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
}

.trust-badge {
  width: 84px;
  height: 101px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  overflow: hidden;
}

.trust-badge img {
  width: 84px;
  height: 100px;
  object-fit: cover;
  display: block;
}

#zarinpal {
  margin: auto;
}

#zarinpal img {
  width: 80px;
  height: auto;
}

.footer-copy {
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
  padding-top: 1.5rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    text-align: right;
    gap: 1.25rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
    align-items: center;
    text-align: center;
  }

  .footer-about {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 36px;
  }

  .footer-about strong {
    text-align: center;
  }

  .footer-social,
  .footer-contact {
    align-items: flex-start;
    text-align: right;
  }

  .footer-social {
    padding-right: 0;
  }

  .social-link,
  .footer-contact a {
    justify-content: flex-start;
    text-align: right;
  }
  .footer-trust {
    justify-content: flex-start;
    width: 100%;
  }
  .footer-logo img {
    height: 70px;
  }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #E25C37;
  color: #fff;
  text-decoration: none;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary:hover { background: #c94d2a; color: #fff; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #061B2C;
  text-decoration: none;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid #061B2C;
  transition: all 0.2s;
  cursor: pointer;
  font-family: inherit;
}

.btn-secondary:hover { background: #061B2C; color: #fff; }

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #061B2C;
  position: relative;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 48px;
  height: 3px;
  background: #E25C37;
  border-radius: 2px;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-primary { background: rgba(226,92,55,0.12); color: #E25C37; }
.badge-secondary { background: rgba(6,27,44,0.08); color: #061B2C; }
