/* ==================
   01) FONT FACE
===================== */
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
/* ==================
   02) ROOT VARIABLES
===================== */
:root {
    --skeleton-base: #eeeeee;
--skeleton-shine: rgba(255, 255, 255, 0.68);
  --bg: #f3fbfe;
  --card: #ffffff;
  --text: #173640;
  --text-dark: #0f2931;
  --muted: #7d98a1;

  --line: rgba(15, 41, 49, 0.10);
  --line-soft: rgba(15, 41, 49, 0.06);
  --primary: #46C8DD;
  --primary-hover: #35BCD3;
  --soft: #f7fbfc;
  --ocean-soft: #e9f9fb;
  --ocean-soft-2: #e1f5fb;

  --accent: #4fb3d1;
  --accent-light: #8bd7e7;
  --accent-dark: #16758a;

  --price: #111827;
  --discount: #e11d48;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
}

/* ==================
   03) RESET / BASE
===================== */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  width: 100%;
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  width: 100%;
min-height: 100vh;
min-height: 100dvh;
  overflow-x: hidden;
  background: var(--card);
  color: var(--text);
  font-family: 'Vazirmatn', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

input,
textarea,
select {
  font: inherit;
  font-size: 13px;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand,
.brand-name,
.brand-subtitle,
.drawer-brand,
.drawer-title,
.drawer-subtitle {
  display: none;
}

/* ==================
   04) APP WRAPPER
===================== */
.app {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: clip;
  background: var(--card);
}

/* ==================
   05) STICKY HEADER AREA
===================== */

.sticky-top-area {
  position: -webkit-sticky;
  position: sticky;

  top: 0;
  z-index: 100;

  width: 100%;

  background: var(--card);
}

/* ==================
   06) TOP AD BANNER
===================== */
.top-ad-banner {
  width: 100%;
  height: 40px;
  min-height: 40px;
  overflow: hidden;
  background: var(--soft);
  flex-shrink: 0;
}

.top-ad-banner img {
  width: 100%;
  height: 100%;
  min-height: 40px;
  object-fit: cover;
}

/* ==================
   07) HEADER / SEARCH TRIGGER
===================== */
.header-cart-btn {
  position: relative;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;

  border: 1px solid rgba(15, 41, 49, 0.08);
  border-radius: var(--radius-md);
  background: #ffffff;

  display: flex;
  align-items: center;
  justify-content: center;
}

.header-cart-btn .icon-basket {
  width: 23px;
  height: 23px;
  background-color: #7d98a1;
}

.header-cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 10;

  min-width: 18px;
  height: 18px;
  padding: 0 5px;

  border-radius: 999px;
  background: var(--discount, #e11d48);
  color: #ffffff;

  font-size: 10px;
  font-weight: 700;
  line-height: 1;

  display: flex;
  align-items: center;
  justify-content: center;
}

.header-cart-count.is-empty {
  display: none;
}


.header {
  position: relative;
  z-index: 20;
  background: var(--card);
  border-bottom: 1px solid rgba(15, 41, 49, 0.06);
}


.header-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 14px 10px;
}



.header-actions {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  direction: rtl;
}

.search-trigger {
  width: 100%;
  border: 0;
  text-align: right;
}

.header .search-inner {
  flex: 1;
  min-width: 0;
  height: 43px;
  padding: 0 13px;
  border: 1px solid rgba(15, 41, 49, 0.08);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #fbfeff 100%);
  display: flex;
  align-items: center;
  gap: 9px;
  direction: rtl;
}



.header .search-brand {
  color: var(--accent-dark);
  font-size: 15px;
  font-weight: 700;
}

.header .search-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #7f9aa3;
  font-size: 13.2px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1;
}

.header .search-placeholder-text {
  line-height: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.header .search-brand-logo {
  width: 55px;
  height: 35px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  transform: translateY(-2px);
}

.menu-btn {
  width: 43px;
  height: 43px;
  flex-shrink: 0;
  border: 1px solid rgba(15, 41, 49, 0.08);
  border-radius: var(--radius-md);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, background 0.18s ease;
}


/* ==================
   08) ICONS
===================== */
.top-icon,
.close-icon,
.menu-icon,
.search-icon {
  display: block;
  flex-shrink: 0;
  background-color: #7d98a1;
  transition: transform 0.22s ease, background-color 0.22s ease;
}

.search-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
  background-color: #7d98a1;
  -webkit-mask: url("../icons/search.svg") center / contain no-repeat;
  mask: url("../icons/search.svg") center / contain no-repeat;
}


.menu-icon {
  width: 24px;
  height: 24px;
  -webkit-mask: url("../icons/menu.svg") center / contain no-repeat;
  mask: url("../icons/menu.svg") center / contain no-repeat;
}

.menu-btn:active .menu-icon {
  transform: scale(0.9) rotate(-5deg);
}

.close-icon {
  width: 22px;
  height: 22px;
  -webkit-mask: url("../icons/close.svg") center / contain no-repeat;
  mask: url("../icons/close.svg") center / contain no-repeat;
}

.close-btn:active .close-icon {
  transform: rotate(90deg) scale(0.9);
}

.bottom-icon {
  width: 22px;
  height: 22px;
  background-color: currentColor;
}

.icon-home {
  -webkit-mask: url("../icons/home.svg") center / contain no-repeat;
  mask: url("../icons/home.svg") center / contain no-repeat;
}

.icon-shop {
  -webkit-mask: url("../icons/shop.svg") center / contain no-repeat;
  mask: url("../icons/shop.svg") center / contain no-repeat;
}

.icon-basket {
  -webkit-mask: url("../icons/basket.svg") center / contain no-repeat;
  mask: url("../icons/basket.svg") center / contain no-repeat;
}

.icon-account {
  -webkit-mask: url("../icons/account.svg") center / contain no-repeat;
  mask: url("../icons/account.svg") center / contain no-repeat;
}

/* ==================
   09) FULL SEARCH PAGE
===================== */
.full-search-page {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  z-index: 999999;
  overflow: hidden;
  background: var(--card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease,
    visibility 0.22s ease;
  display: flex;
  flex-direction: column;
}
.full-search-input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}

.full-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  background-color: #7d98a1;
  -webkit-mask: url("/icons/close.svg") center / contain no-repeat;
  mask: url("/icons/close.svg") center / contain no-repeat;
  cursor: pointer;
}

.full-search-page.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.full-search-header {
  width: 100%;
  min-height: calc(
  68px + env(safe-area-inset-top)
);

padding:
  calc(10px + env(safe-area-inset-top))
  14px
  10px;
  border-bottom: 1px solid rgba(15, 41, 49, 0.08);
  background: var(--card);
  display: flex;
  align-items: center;
  gap: 10px;
}

.full-search-close {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(15, 41, 49, 0.08);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: #7d98a1;
  font-size: 33px;
  font-weight: 400;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.full-search-input-wrap {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(15, 41, 49, 0.08);
  border-radius: var(--radius-md);
  background: var(--card);
  display: flex;
  align-items: center;
  gap: 10px;
}

.full-search-input-wrap .search-icon {
  width: 21px;
  height: 21px;
}

.full-search-input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.full-search-input::placeholder {
  color: #9ab0b8;
}

.full-search-body {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 16px 14px calc(150px + env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.search-block {
  margin-bottom: 24px;
}

.search-block-title {
  margin: 0 0 13px;
  color: var(--text-dark);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.5;
}

.popular-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.popular-search-chip {
  min-height: 39px;
  padding: 8px 14px;
  border: 1px solid rgba(15, 41, 49, 0.08);
  border-radius: var(--radius-pill);
  background: var(--card);
  color: #28464f;
  font-size: 12.5px;
  font-weight: 500;
}

.popular-search-chip:active {
  background: var(--card);
  color: #28464f;
  border-color: rgba(15, 41, 49, 0.08);
}

.search-view-all {
  display: block;
  margin-top: 10px;
  margin-bottom: 32px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 41, 49, 0.08);
  border-radius: var(--radius-md);
  background: var(--card);
  color: #28464f;
  font-size: 12.8px;
  font-weight: 500;
  text-align: center;
}

.search-view-all:active {
  background: var(--card);
  color: #28464f;
  border-color: rgba(15, 41, 49, 0.08);
}

.search-view-all[hidden] {
  display: none;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 16px;
}

.search-result-item {
  position: relative;
  overflow: hidden;

  display: flex;
  align-items: center;
  gap: 8px;

  padding: 7px 8px 7px 36px;
  border: 1px solid rgba(15, 41, 49, 0.08);
  border-radius: var(--radius-md);

  background: var(--card);
  color: inherit;

  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    background-color 0.18s ease;
}

.search-result-item:active {
  transform: none;
}

.search-result-image {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid rgba(15, 41, 49, 0.06);
  border-radius: var(--radius-sm);
  background: var(--card);
  overflow: hidden;
}

.search-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: stretch;
}

.search-result-title {
  color: #223f47;
  font-size: 12.2px;
  font-weight: 500;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-result-prices {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;

  width: max-content;
  margin-right: auto;
  margin-left: 0;

  direction: rtl;
  text-align: center;
}

.search-result-old-price {
  order: 1;
  width: 100%;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  text-decoration: line-through;
  text-decoration-thickness: 0.6px;
}

.search-result-price {
  order: 2;
  width: 100%;
  color: var(--price);
  font-size: 13.4px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
}

.search-discount-badge {
  position: absolute;
  left: 0;
  top: auto;
  bottom: 23px;
  transform: none;

  width: 29px;
  min-width: 29px;
  height: 18px;
  padding: 0 4px;

  border-radius: 0 999px 999px 0;
  background: var(--discount);
  color: #ffffff;

  font-size: 9px;
  font-weight: 700;
  line-height: 18px;

  display: flex;
  align-items: center;
  justify-content: center;
  direction: rtl;
}

.search-empty {
  padding: 12px;
  border: 1px dashed rgba(15, 41, 49, 0.10);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
}
/* ==================
   16) BOTTOM NAVIGATION
===================== */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(
  8px + env(safe-area-inset-bottom)
);
  z-index: 90;
  width: calc(100% - 24px);
  max-width: 406px;
  height: 64px;
  padding: 6px 7px;
  border: 1px solid rgba(15, 41, 49, 0.08);
  border-radius: var(--radius-lg);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
  box-shadow: none;
  filter: none;
}

.bottom-nav::before,
.bottom-nav::after {
  content: none;
  display: none;
}

.bottom-item {
  position: relative;
  flex: 1;
  height: 50px;
  border-radius: var(--radius-md);
  color: #7d949b;
  font-size: 10.6px;
  font-weight: 500;
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.16s ease;
}

.bottom-item span:not(.bottom-icon) {
  color: currentColor;
  line-height: 1.25;
}

.bottom-item:active {
  transform: scale(0.95);
  background: linear-gradient(135deg, var(--ocean-soft-2), var(--ocean-soft));
  color: var(--accent-dark);
}

.bottom-item.active {
  background: linear-gradient(135deg, var(--ocean-soft-2), var(--ocean-soft));
  color: var(--accent-dark);
}

.bottom-item.active .bottom-icon,
.bottom-item:active .bottom-icon {
  background-color: var(--accent-dark);
}
body.search-open .bottom-nav {
  display: none !important;
}
/* ==================
   17) DRAWER / OVERLAY
===================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(18, 37, 43, 0.24);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: 0.25s ease;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.drawer {
  position: fixed;

  top: 0;
  right: 0;
  bottom: 0;

  z-index: 1000;

  width: 282px;
  max-width: 82%;

  height: auto;
  max-height: 100dvh;

padding:
  calc(16px + env(safe-area-inset-top))
  calc(16px + env(safe-area-inset-right))
  calc(24px + env(safe-area-inset-bottom))
  calc(16px + env(safe-area-inset-left));

  overflow-x: hidden;
  overflow-y: scroll;

  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;

  border-left: 1px solid var(--line);
  border-radius:
    var(--radius-lg)
    0
    0
    var(--radius-lg);

  background: var(--card);

  transform: translate3d(100%, 0, 0);

  transition:
    transform
    0.32s
    cubic-bezier(0.22, 1, 0.36, 1);
}

.drawer.open {
  transform: translate3d(0, 0, 0);
}
.drawer-head {
  position: relative;
  width: 100%;
  height: 42px;
  margin-bottom: 6px;
  direction: ltr;
}

.drawer-head .close-btn {
  position: absolute;
  top: 0;
  left: 0;
}

.close-btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(15, 41, 49, 0.08);

  border-radius: var(--radius-md);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, background 0.18s ease;
}



/* ==================
   18) DRAWER MENU
===================== */
.drawer-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
}

.drawer-menu-item {
  width: 100%;
}

.drawer-menu-link,
.drawer-all-products,
.drawer-parent-row {
  min-height: 52px;
  padding: 9px 10px;
  border: 1px solid rgba(15, 41, 49, 0.08);
  border-radius: var(--radius-md);

  background: var(--card);
  color: #28464f;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 11px;
  transition: none;
}

.drawer-menu-link img,
.drawer-all-products img,
.drawer-parent-main img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
}



.drawer-menu-link span,
.drawer-all-products span,
.drawer-parent-title {
  min-width: 0;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-menu-link:active,
.drawer-all-products:active,
.drawer-parent-row:active {
  transform: none;
  background: var(--card);
  color: #28464f;
  border-color: rgba(15, 41, 49, 0.08);
}

.drawer-parent-row {
  width: 100%;
  justify-content: space-between;
  cursor: pointer;
}

.drawer-menu-item.open .drawer-parent-row {
  background: var(--card);
  color: #28464f;
  border-color: rgba(15, 41, 49, 0.08);
}

.drawer-parent-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1;
}

.drawer-parent-title {
  font-size: 13px;
  font-weight: 500;
}

.submenu-caret {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-left: 2px solid #7d98a1;
  border-bottom: 2px solid #7d98a1;
  transform: rotate(45deg);
  transition: transform 0.22s ease, border-color 0.22s ease;
  margin-left: 4px;
}


.drawer-menu-item.open .submenu-caret {
  transform: rotate(-45deg);
}

.drawer-submenu {
  display: none;
  flex-direction: column;
  gap: 6px;
  margin: 7px 22px 3px 0;
  padding: 0 12px 0 0;
  border-right: 1px solid rgba(15, 41, 49, 0.07);
}

.drawer-menu-item.open .drawer-submenu {
  display: flex;
}

.drawer-submenu-link {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 41, 49, 0.07);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: #42616a;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 9px;
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.drawer-submenu-link img {
  width: 27px;
  height: 27px;
  flex-shrink: 0;
  object-fit: contain;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
}


.drawer-submenu-link span {
  min-width: 0;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-submenu-link:active {
  transform: none;
  background: var(--card);
  color: #42616a;
  border-color: rgba(15, 41, 49, 0.07);
}

/* ==================
   19) PAGE LOADER
===================== */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #ffffff;

  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
}


.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}


.logo-loader-img {
  width: 45px;
  height: 45px;
  animation: loader-spin 1s linear infinite;
}

@keyframes loader-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}
/*
|--------------------------------------------------------------------------
| HEADER DB SKELETON
|--------------------------------------------------------------------------
*/

.top-ad-banner.top-ad-banner-db-skeleton {
  position: relative;
  display: block;
  width: 100%;
  height: 40px;
  min-height: 40px;
  overflow: hidden;
  background: #eeeeee !important;
  background-color: #eeeeee !important;
  box-shadow: none !important;
}

.top-ad-banner.top-ad-banner-db-skeleton::before {
  display: none !important;
}

.top-ad-banner.top-ad-banner-db-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  transform: translateX(100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.65),
    transparent
  );
  animation: header-db-skeleton-loading 1.2s infinite;
}

.popular-search-chip-skeleton {
  position: relative;
  width: 74px;
  height: 30px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: #eeeeee !important;
  pointer-events: none;
  display: inline-flex;
}

.popular-search-chip-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.65),
    transparent
  );
  animation: header-db-skeleton-loading 1.2s infinite;
}

@keyframes header-db-skeleton-loading {
  100% {
    transform: translateX(-100%);
  }
}
/*
|--------------------------------------------------------------------------
| HEADER SEARCH + MENU SKELETON
|--------------------------------------------------------------------------
*/

.header-is-loading .search-inner {
  position: relative;
  overflow: hidden;
}

.header-is-loading .search-inner > * {
  opacity: 0;
}

.header-is-loading .search-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background: #eeeeee;
  pointer-events: none;
}

.header-is-loading .menu-btn {
  position: relative;
  overflow: hidden;
}

.header-is-loading .menu-btn > * {
  opacity: 0;
}

.header-is-loading .menu-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background: #eeeeee;
  pointer-events: none;
}

.header-is-loading .search-inner::before,
.header-is-loading .menu-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  transform: translateX(100%);
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.65),
    transparent
  );
  animation: header-db-skeleton-loading 1.2s infinite;
  pointer-events: none;
}
/*
|--------------------------------------------------------------------------
| HEADER SEARCH + CART + MENU SKELETON
|--------------------------------------------------------------------------
*/

.header-is-loading .search-inner,
.header-is-loading .header-cart-btn,
.header-is-loading .menu-btn {
  position: relative;
  overflow: hidden;
}

.header-is-loading .search-inner > *,
.header-is-loading .header-cart-btn > *,
.header-is-loading .menu-btn > * {
  opacity: 0;
}

.header-is-loading .search-inner::after,
.header-is-loading .header-cart-btn::after,
.header-is-loading .menu-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background: #eeeeee;
  pointer-events: none;
}

.header-is-loading .search-inner::before,
.header-is-loading .header-cart-btn::before,
.header-is-loading .menu-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  transform: translateX(100%);
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.65),
    transparent
  );
  animation: header-db-skeleton-loading 1.2s infinite;
  pointer-events: none;
}
/* =========================================================
   HEADER DYNAMIC SKELETON
========================================================= */

.top-ad-banner-db-skeleton {
  position: relative;

  width: 100%;
  height: 40px;
  min-height: 40px;

  overflow: hidden;

  background:
    var(--skeleton-base);
}

.top-ad-banner-db-skeleton::after,
.popular-search-chip-skeleton::after {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      100deg,
      transparent 20%,
      var(--skeleton-shine) 50%,
      transparent 80%
    );

  transform: translateX(110%);

  animation:
    commonSkeletonShimmer
    1.25s
    linear
    infinite;
}

.popular-search-chip-skeleton {
  position: relative;

  width: 74px;
  height: 39px;
  min-height: 39px;

  padding: 0;

  overflow: hidden;

  border: 0;
  border-radius: var(--radius-pill);

  background:
    var(--skeleton-base);

  pointer-events: none;
}

.popular-search-chip-skeleton:nth-child(2n) {
  width: 92px;
}

.popular-search-chip-skeleton:nth-child(3n) {
  width: 58px;
}

@keyframes commonSkeletonShimmer {
  from {
    transform: translateX(110%);
  }

  to {
    transform: translateX(-110%);
  }
}
/* =========================================================
   BOTTOM NAV SKELETON
========================================================= */

/*
 * حالت عادی ناو
 */
.bottom-nav .bottom-item {
  position: relative;
  overflow: hidden;
}

.bottom-nav .bottom-item::before,
.bottom-nav .bottom-item::after {
  content: none;
  display: none;
}

.bottom-nav .bottom-item > * {
  opacity: 1;
  visibility: visible;
}

/*
 * فقط هنگام داشتن کلاس loading
 */
.bottom-nav.bottom-nav-is-loading .bottom-item {
  pointer-events: none;
}

.bottom-nav.bottom-nav-is-loading .bottom-item > * {
  opacity: 0;
  visibility: hidden;
}

.bottom-nav.bottom-nav-is-loading .bottom-item::before {
  content: "";
  display: block;

  position: absolute;
  inset: 5px;
  z-index: 2;

  border-radius: var(--radius-md);
  background: #eeeeee;
}

.bottom-nav.bottom-nav-is-loading .bottom-item::after {
  content: "";
  display: block;

  position: absolute;
  inset: 5px;
  z-index: 3;

  overflow: hidden;

  border-radius: var(--radius-md);

  background:
    linear-gradient(
      100deg,
      transparent 20%,
      rgba(255, 255, 255, 0.72) 50%,
      transparent 80%
    );

  transform: translateX(110%);
  animation:
    bottomNavSkeletonShimmer
    1.2s
    linear
    infinite;
}

@keyframes bottomNavSkeletonShimmer {
  from {
    transform: translateX(110%);
  }

  to {
    transform: translateX(-110%);
  }
}
[data-loading-button] {
    position: relative;
    overflow: hidden;
}

.button-loading-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.button-loading-dots {
    position: absolute;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;
    gap: 5px;

    border-radius: inherit;
    background: inherit;
    color: inherit;

    pointer-events: none;
}

.is-button-loading {
    opacity: 1 !important;
    cursor: wait !important;
    pointer-events: none !important;
}

.is-button-loading .button-loading-content {
    visibility: hidden;
}

.is-button-loading .button-loading-dots {
    display: flex;
}

.button-loading-dots i {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;

    border-radius: 50%;
    background: currentColor;

    animation:
        button-loading-dot
        0.9s
        infinite
        ease-in-out;
}

.button-loading-dots i:nth-child(2) {
    animation-delay: 0.15s;
}

.button-loading-dots i:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes button-loading-dot {
    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.35;
    }

    40% {
        transform: translateY(-5px);
        opacity: 1;
    }
}
/* =========================================================
   SITE FOOTER
========================================================= */
.site-footer-spacer {
  width: 100%;

  height:
    clamp(
      120px,
      22vh,
      240px
    );

  height:
    clamp(
      120px,
      22dvh,
      240px
    );

  flex: 0 0 auto;

  background: #ffffff;
  pointer-events: none;
}
.site-footer {
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;

  padding:
    0
    16px
    calc(92px + env(safe-area-inset-bottom));

  background: #0f2026;
  color: #ffffff;

  direction: rtl;
  text-align: right;
}


/* =========================================================
   BACK TO TOP
========================================================= */

.footer-back-top {
  width: calc(100% + 32px);

  min-height: 46px;

  margin-right: -16px;
  margin-left: -16px;

  padding: 11px 16px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);

  background: #13272e;

  color: #d9e6e9;

  font-size: 11.8px;
  font-weight: 500;
  line-height: 1.5;

  text-align: center;
}

.footer-back-top:active {
  color: var(--primary);
}

.footer-back-top-icon {
  width: 8px;
  height: 8px;

  border-top: 1.5px solid var(--primary);
  border-right: 1.5px solid var(--primary);

  transform: rotate(-45deg);
}


/* =========================================================
   BENEFITS
========================================================= */

.footer-benefits {
  width: 100%;

  padding: 18px 0;

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 9px;

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-benefit {
  min-height: 68px;

  padding: 10px;

  display: flex;
  align-items: center;

  gap: 9px;

  border: 1px solid rgba(70, 200, 221, 0.11);
  border-radius: var(--radius-md);

  background: rgba(255, 255, 255, 0.025);
}

.footer-benefit-icon {
  width: 30px;
  height: 30px;

  flex: 0 0 30px;

  display: block;

  border-radius: var(--radius-sm);

  background-color: var(--primary);
}


/* اگر SVG برای این موارد ساختی، مسیرها را اینجا بگذار */

.footer-benefit-icon-payment {
  background: url("/icons/pays.png") center / contain no-repeat;
}

.footer-benefit-icon-original {
  background: url("/icons/orig.png") center / contain no-repeat;
}

.footer-benefit-icon-shipping {
  background: url("/icons/ship.png") center / contain no-repeat;
}

.footer-benefit-icon-support {
  background: url("/icons/supp.png") center / contain no-repeat;
}


.footer-benefit-text {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 2px;
}

.footer-benefit-text strong {
  color: #ffffff;

  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;

  white-space: nowrap;
}

.footer-benefit-text span {
  color: #809aa1;

  font-size: 9.5px;
  font-weight: 400;
  line-height: 1.5;

  white-space: nowrap;
}


/* =========================================================
   ACCORDION
========================================================= */

.footer-accordion {
  width: 100%;

  margin: 0;

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);

  background: transparent;
}


/* =========================================================
   ACCORDION SUMMARY
========================================================= */

.footer-accordion summary {
  width: 100%;
  min-height: 54px;

  margin: 0;
  padding: 15px 0;

  display: flex;
  align-items: center;
  justify-content: space-between;

  color: #ffffff;

  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;

  text-align: right;

  cursor: pointer;
  list-style: none;
  user-select: none;
}

.footer-accordion summary::-webkit-details-marker {
  display: none;
}

.footer-accordion summary::marker {
  content: "";
}


/* =========================================================
   CHEVRON
========================================================= */

.footer-chevron {
  width: 8px;
  height: 8px;

  margin-left: 5px;

  flex: 0 0 8px;

  border-left: 1.5px solid var(--primary);
  border-bottom: 1.5px solid var(--primary);

  transform: rotate(-45deg);

  transition: transform 0.22s ease;
}

.footer-accordion[open] .footer-chevron {
  transform: rotate(135deg);
}


/* =========================================================
   ACCORDION CONTENT
========================================================= */

.footer-accordion-content {
  width: 100%;

  padding: 0 0 17px;

  display: flex;
  flex-direction: column;

  text-align: right;
}


/* =========================================================
   NORMAL LINKS
========================================================= */

.footer-links-list {
  align-items: stretch;
}

.footer-links-list a {
  width: 100%;

  padding: 7px 0;

  color: #9fb4ba;

  font-size: 11.8px;
  font-weight: 400;
  line-height: 1.7;

  text-align: right;

  transition: color 0.18s ease;
}

.footer-links-list a:active {
  color: var(--primary);
}

/* =========================================================
   FOOTER SUPPORT
========================================================= */

.footer-support-list {
  display: flex;
  flex-direction: column;
  gap: 8px;

  padding-top: 5px;
  padding-bottom: 16px;
}

.footer-support-item {
  width: 100%;
  min-height: 68px;

  padding: 9px 10px;

  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);

  display: flex;
  align-items: center;
  gap: 11px;

  color: inherit;
  text-decoration: none;
}

.footer-support-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
}

.footer-support-icon img {
  display: block !important;

  width: 20px !important;
  height: 20px !important;

  min-width: 0 !important;
  max-width: 20px !important;
  min-height: 0 !important;
  max-height: 20px !important;

  object-fit: contain;
}

.footer-support-info {
  min-width: 0;
  flex: 1;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  gap: 1px;
}

.footer-support-info strong {
  color: #ffffff;

  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.6;
}

.footer-support-value {
  color: var(--accent-light);

  font-size: 11.8px;
  font-weight: 500;
  line-height: 1.6;

  direction: ltr;
}

.footer-support-info small {
  color: rgba(255, 255, 255, 0.55);

  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.6;
}

.footer-support-item:active {
  background: rgba(70, 200, 221, 0.06);
  border-color: rgba(70, 200, 221, 0.18);
}
/* =========================================================
   SOCIAL
========================================================= */

.footer-social-content {
  align-items: center;

  text-align: center;
}

.footer-social-text {
  margin: 0 0 12px;

  color: #9fb4ba;

  font-size: 11.8px;
  font-weight: 400;
  line-height: 1.8;

  text-align: center;
}

.footer-social-items {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  gap: 9px;
}

.footer-social-link {
  width: 39px;
  height: 39px;

  padding: 0;

  flex: 0 0 39px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(70, 200, 221, 0.22);
  border-radius: var(--radius-md);

  background: rgba(70, 200, 221, 0.08);

  transition:
    transform 0.16s ease,
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.footer-social-link:active {
  transform: scale(0.94);

  background: rgba(70, 200, 221, 0.15);

  border-color: rgba(70, 200, 221, 0.35);
}

.footer-social-link img {
  display: block;

  width: 19px;
  height: 19px;

  object-fit: contain;
}


/* =========================================================
   TRUST
========================================================= */

.footer-trust-content {
  display: block;

  padding-top: 2px;
  padding-bottom: 17px;
}

.footer-trust-items {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  gap: 10px;
}

.footer-trust-items a {
  width: 82px;
  height: 82px;

  padding: 7px;

  flex: 0 0 82px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  border: 1px solid rgba(70, 200, 221, 0.16);
  border-radius: var(--radius-md);

  background: #ffffff;
}

.footer-trust-items img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;
}


/* =========================================================
   COPYRIGHT
========================================================= */

.footer-bottom {
  width: 100%;

  padding-top: 17px;

  text-align: center;
}

.footer-bottom p {
  margin: 0;

  color: #728b92;

  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.8;

  text-align: center;
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

.site-footer a:focus-visible,
.site-footer summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;

  border-radius: var(--radius-xs);
}


/* =========================================================
   SAFE AREA
========================================================= */

/* =========================================================
   DRAWER QUICK LINKS
========================================================= */

.drawer-quick-links {
  width: 100%;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 7px;

  margin-bottom: 6px;
}

.drawer-quick-link {
  min-width: 0;
  min-height: 68px;

  padding: 8px 4px;

  border: 1px solid rgba(70, 200, 221, 0.16);
  border-radius: var(--radius-md);

  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f4fcfe 100%
  );

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 5px;

  color: #42616a;

  text-align: center;
}

.drawer-quick-link,
.drawer-quick-link:hover,
.drawer-quick-link:focus,
.drawer-quick-link:active {
  outline: none;
  box-shadow: none;
  -webkit-box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.drawer-quick-link:active {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f4fcfe 100%
  );

  border-color: rgba(70, 200, 221, 0.16);
  color: #42616a;
}


/* =========================================================
   ICON
========================================================= */

.drawer-quick-icon {
  width: 24px;
  height: 24px;

  display: block;

  background-color: var(--accent-dark);
}

.drawer-quick-home {
  -webkit-mask:
    url("/icons/home.svg")
    center / contain
    no-repeat;

  mask:
    url("/icons/home.svg")
    center / contain
    no-repeat;
}

.drawer-quick-account {
  -webkit-mask:
    url("/icons/account.svg")
    center / contain
    no-repeat;

  mask:
    url("/icons/account.svg")
    center / contain
    no-repeat;
}

.drawer-quick-cart {
  -webkit-mask:
    url("/icons/basket.svg")
    center / contain
    no-repeat;

  mask:
    url("/icons/basket.svg")
    center / contain
    no-repeat;
}


/* =========================================================
   TEXT
========================================================= */

.drawer-quick-text {
  width: 100%;

  color: inherit;

  font-size: 10.4px;
  font-weight: 600;
  line-height: 1.35;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* =========================================================
   SEPARATOR
========================================================= */

.drawer-quick-separator {
  width: 100%;
  height: 1px;

  margin: 4px 0 7px;

  background: rgba(15, 41, 49, 0.07);
}
/* جلوگیری از Auto Zoom فقط در iPhone / iPad */
@supports (-webkit-touch-callout: none) {
  input,
  textarea,
  select {
    font-size: 16px !important;
  }
}
/*
|--------------------------------------------------------------------------
| TABLET AND DESKTOP
|--------------------------------------------------------------------------
*/

@media (min-width: 768px) {

  body {
    background: var(--bg);
  }

    .app {
    max-width: 1280px;
  }

  .header-inner {
    width: 100%;
    max-width: 1180px;
    margin-right: auto;
    margin-left: auto;
    padding-right: 24px;
    padding-left: 24px;
  }

  .full-search-body {
    max-width: 760px;
    padding-right: 24px;
    padding-left: 24px;
  }

  .drawer {
    width: 360px;
    max-width: 45vw;
  }

  .footer-benefits {
    grid-template-columns:
      repeat(4, minmax(0, 1fr));
  }

  .footer-support-list {
    display: grid;
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}


/*
|--------------------------------------------------------------------------
| DESKTOP
|--------------------------------------------------------------------------
*/

@media (min-width: 1024px) {

  /*
   * نوار پایین مخصوص موبایل و تبلت است.
   */
  .bottom-nav {
    display: none;
  }

  .site-footer {
    padding-bottom: 36px;
  }
}
/* =========================================================
   HIDE FIXED BOTTOM UI WHEN FOOTER IS VISIBLE
========================================================= */

.footer-aware-bottom-ui {
  transition:
    opacity 0.22s ease,
    visibility 0s linear 0s !important;
}

.footer-aware-bottom-ui.is-hidden-by-footer {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;

  transition:
    opacity 0.22s ease,
    visibility 0s linear 0.22s !important;
}

@media (prefers-reduced-motion: reduce) {
  .footer-aware-bottom-ui,
  .footer-aware-bottom-ui.is-hidden-by-footer {
    transition: none !important;
  }
}