/**
 * Iran storefront alignment — RTL, self-hosted Vazirmatn, Melodica_IR header/footer.
 * Font files: assets/fonts/vazirmatn/ (same woff2 as Melodica_IR).
 */

:root {
  --font-sans: "Vazirmatn", Tahoma, Arial, sans-serif;
  --font-body: "Vazirmatn", Tahoma, Arial, sans-serif;
}

html {
  direction: rtl;
}

body {
  direction: rtl;
  text-align: right;
  font-family: var(--font-body) !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-body) !important;
}

/* ── Announcement bar (main layout) ── */
.lotfi-announcement-bar {
  width: 100%;
  overflow-x: hidden;
  background: color-mix(in srgb, var(--maincolor) 10%, transparent);
  color: #171717;
}

.lotfi-announcement-bar__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.5rem 1rem;
}

@media (min-width: 640px) {
  .lotfi-announcement-bar__inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.lotfi-announcement-bar__text {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.75rem;
  line-height: 1.6;
  text-align: right;
}

@media (min-width: 1024px) {
  .lotfi-announcement-bar__text {
    font-size: 0.875rem;
    white-space: normal;
  }
}

.lotfi-announcement-bar__icon {
  flex-shrink: 0;
  color: var(--maincolor);
}

.lotfi-announcement-bar__phone {
  font-weight: 700;
  color: var(--maincolor);
  text-decoration: none;
  padding: 0 0.15rem;
}

.lotfi-announcement-bar__phone:hover {
  color: var(--background-color);
}

/* ── Header — matches IR Header.tsx (h-20, white, shadow-md) ── */
.lotfi-header {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: #fff;
  border-bottom: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.lotfi-header.scrolled {
  background: #fff;
  border-bottom: none;
}

.lotfi-header-inner {
  height: 5rem;
  min-height: 5rem;
  max-height: 5rem;
  max-width: 80rem;
  margin: 0 auto;
}

.lotfi-primary-nav {
  margin-right: 1rem;
  margin-left: 0;
}

.lotfi-header-right {
  margin-right: 0;
  margin-left: 0;
  gap: 0.25rem;
}

.lotfi-chevron {
  margin-right: 3px;
  margin-left: 0;
}

.lotfi-primary-nav ul .sub-menu {
  right: 0;
  left: auto;
  text-align: right;
}

.lotfi-primary-nav .sub-menu li > a:hover {
  padding-right: 1.25rem;
  padding-left: 1rem;
}

.lotfi-b2b-badge {
  margin-left: 0.25rem;
  margin-right: 0;
}

.lotfi-hamburger {
  margin-right: 0.75rem;
  margin-left: 0;
}

/* Mobile drawer — slides from right (RTL) */
.lotfi-mobile-menu {
  right: 0;
  left: auto;
  border-radius: 0.5rem 0 0 0.5rem;
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15);
  transform: translate3d(100%, 0, 0);
}

.lotfi-mobile-nav .sub-menu {
  padding-right: 1rem;
  padding-left: 0;
  text-align: right;
}

.lotfi-store-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  color: #4b5563;
  transition: color 0.2s;
}

.lotfi-store-link:hover {
  color: var(--maincolor);
}

.lotfi-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.lotfi-logo-img {
  height: 2.5rem;
  width: auto;
  max-width: 9rem;
  object-fit: contain;
}

.lotfi-logo-img--wide {
  display: none;
}

@media (min-width: 640px) {
  .lotfi-logo-img {
    height: 2.75rem;
    max-width: 10rem;
  }
}

@media (min-width: 1024px) {
  .lotfi-logo-img--square {
    display: none;
  }

  .lotfi-logo-img--wide {
    display: block;
    height: 3rem;
    max-width: 11rem;
  }
}

.lotfi-footer-brand-text {
  flex: 1;
  min-width: 0;
}

/* ── Footer RTL ── */
.lotfi-footer-grid {
  text-align: right;
}

.lotfi-footer-heading {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.625rem;
}

.lotfi-footer-chevron {
  transform: rotate(180deg);
}

.lotfi-footer-logo-img {
  height: 4rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: right center;
  display: block;
}

.lotfi-footer-logo-img--desktop {
  display: none;
}

.lotfi-footer-bar {
  flex-direction: row-reverse;
}

.lotfi-footer-copy {
  text-align: right;
}

.lotfi-footer-payments-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.lotfi-mobile-submenu-toggle {
  text-align: right;
}

.lotfi-search-form,
.lotfi-search-input,
.lotfi-search-btn,
.lotfi-search-close {
  direction: rtl;
  text-align: right;
}

.lotfi-search-input::placeholder {
  text-align: right;
}

/* About + promo strip (IR Footer.tsx) */
.lotfi-footer-about {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.7);
}

.lotfi-footer-about-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .lotfi-footer-about-inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.lotfi-footer-about-brand h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.lotfi-footer-about-brand .lotfi-footer-about-tag {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--maincolor);
}

.lotfi-footer-about-brand p {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  line-height: 2;
  color: #a3a3a3;
  text-align: justify;
}

.lotfi-footer-promo {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 640px) {
  .lotfi-footer-promo {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.lotfi-footer-promo li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.lotfi-footer-promo-icon {
  display: flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--maincolor);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.lotfi-footer-promo span {
  font-size: 0.75rem;
  font-weight: 600;
  color: #d4d4d8;
}

.lotfi-enamad img {
  max-height: 2.5rem;
  width: auto;
  cursor: pointer;
}

/* Breadcrumbs / pagination RTL */
.lotfi-breadcrumbs {
  text-align: right;
}

.lotfi-breadcrumbs .sep {
  transform: scaleX(-1);
  display: inline-block;
}

.lotfi-pagination {
  direction: rtl;
}
