.home,
.home button,
.home input,
.home textarea,
.home select,
.home a {
  font-family: "DanaFaNum", Tahoma, sans-serif;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* مربع‌های منو و سبد خرید */
.header__box {
  width: 48px;
  height: 48px;
  background: var(--white);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 20px;
  box-sizing: border-box;
}
.header__box img {
  width: 26px;
  height: 26px;
}

.header__box--cart {
  position: relative;
  overflow: visible;
  text-decoration: none;
  color: inherit;
}

.cart {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart__badge {
  position: absolute;
  top: -20px;
  right: -20px;
  min-width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 5px;
  background: var(--red);
  color: var(--white);
  font-size: 12px;
}

.cart__badge.cart-badge--len-3 {
  min-width: 24px;
  padding: 0 5px;
}

.cart__badge.cart-badge--len-4 {
  min-width: 30px;
  padding: 0 6px;
}

/* لوگو */
.header__logo {
  width: 98px;
  /* height: 50px; */

  display: flex;
  align-items: center;
  justify-content: center;

  font-weight: bold;
}
.header__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/*  سرچ بار  */
.search {
  max-width: 390px;
  height: 48px;

  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;

  display: flex;
  align-items: center;

  padding: 0 14px;
  margin-top: 24px;
}

.home .search,
.home .search__input {
  cursor: pointer;
}
.search__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.search__icon img {
  width: 20px;
  height: 20px;
}
.search__input {
  flex: 1;
  border: none;
  outline: none;

  background: transparent;

  font-size: 16px;
  color: var(--gray-dark);

  text-align: right;
}
.search:focus-within {
  border: 1px solid var(--blue-dark);
}
.search {
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* استوری‌ها */
.stories {
  margin-top: 24px;
}

.stories__scroll {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 5px 0;
  cursor: grab;
  touch-action: pan-x pan-y;
}

.stories__scroll--dragging {
  cursor: grabbing;
  user-select: none;
}

.stories__scroll--dragging .story {
  pointer-events: none;
}

.stories__scroll::-webkit-scrollbar {
  display: none;
}

.story {
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.story__ring {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid var(--blue-dark);
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: center;
}

.story__img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.story--seen .story__ring {
  border-color: var(--gray-light);
}

/* بنر اسلایدی */
.banner-slider {
  margin-top: 24px;
  max-width: 390px;
}

.banner-slider__viewport {
  width: 100%;
  height: 145px;
  overflow: hidden;
  border-radius: var(--radius);
  touch-action: pan-x pan-y;
  cursor: grab;
}

.banner-slider__viewport:active {
  cursor: grabbing;
}

.banner-slider__track {
  display: flex;
  flex-direction: row-reverse;
  height: 100%;
  transition: transform 0.5s ease;
  direction: ltr;
  will-change: transform;
}

.banner-slider__track--dragging {
  transition: none;
}

.banner-slider__slide {
  flex: 0 0 100%;
  height: 145px;
  position: relative;
  overflow: hidden;
}

.banner-slider__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.banner-slider__btn {
  position: absolute;
  bottom: 12px;
  left: 12px;

  width: 100px;
  height: 30px;
  padding: 0 8px 0 10px;
  border: none;
  border-radius: 15px;
  background: var(--blue-light);
  color: var(--white);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  font-size: 14px;
  cursor: pointer;
}

.banner-slider__btn-text {
  line-height: 1;
  font-size: 13px;
}

.banner-slider__btn-icon {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.banner-slider__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
}

.banner-slider__dot {
  width: 8px;
  height: 3px;
  padding: 0;
  border: none;
  background: var(--blue-light);
  cursor: pointer;
  flex-shrink: 0;
  border-radius: var(--radius);
}

.banner-slider__dot--active {
  width: 10px;
  height: 5px;
  background: var(--blue-dark);
}

/* دسته‌بندی‌ها */
.categories {
  width: 100%;
  max-width: 390px;
  /* min-height: 276px; */
  margin-top: 32px;
  padding: 15px;
  box-sizing: border-box;
  background: var(--white);
  border-radius: var(--radius-small);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.categories__grid {
  display: grid;
  grid-template-columns: repeat(5, 60px);
  justify-content: space-between;
  align-content: start;
  row-gap: 20px;
  direction: rtl;
}

.category {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 60px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.category__icon {
  width: 60px;
  height: 60px;
  background: var(--bg-main);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-small);
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.category__icon img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  pointer-events: none;
}

.category__name {
  margin-top: 14px;
  width: 60px;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  color: var(--gray-dark);
  word-break: break-word;
}

/* شگفت انگیزها — تمام‌عرض 430px بدون padding کناری */
.amazing {
  width: 100%;
  max-width: 430px;
  margin-top: 32px;
  min-height: 435px;
  padding: 24px 0 20px;
  box-sizing: border-box;
  background: var(--blue-dark);
}

.amazing__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  margin-bottom: 20px;
}

.amazing__title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.amazing__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.amazing__icon img {
  width: 100%;
  height: 100%;
  display: block;
  filter: brightness(0) invert(1);
}

.amazing__heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.amazing__view-all {
  display: flex;
  align-items: center;
  text-align: center;
  gap: 8px;
  font-size: 12px;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  direction: ltr;
}

.amazing__view-all-icon {
  width: 7px;
  height: auto;
  display: block;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

.amazing__scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 20px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-x pan-y;
  direction: rtl;
}

.horizontal-scroll--dragging {
  cursor: grabbing;
  user-select: none;
}

.horizontal-scroll--dragging .product-card {
  pointer-events: none;
}

.horizontal-scroll--dragging .brand-item {
  pointer-events: none;
}

.horizontal-scroll--dragging .blog-card {
  pointer-events: none;
}

.amazing__scroll::-webkit-scrollbar {
  display: none;
}

.product-card {
  flex-shrink: 0;
  width: 165px;
  height: 339px;
  box-sizing: border-box;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card__image {
  width: 165px;
  height: 165px;
  background: var(--white-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.product-card__image img {
  width: 135px;
  height: 135px;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
}

.product-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 12px;
  min-height: 0;
}

.product-card__desc {
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 12px;
  color: var(--black-light);
  text-align: right;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  min-height: calc(1.45em * 2);
}

.product-card__pricing {
  margin-top: auto;
}

.product-card__stock-status {
  margin: 0;
  font-size: clamp(12px, 3.2vw, 14px);
  font-weight: 400;
  line-height: 1.4;
  color: var(--gray);
  text-align: left;
}

.product-card__discount-row {
  display: flex;
  align-items: center;
  text-align: center;
  justify-content: left;
  gap: 6px;
  margin-bottom: 6px;
  min-height: 23px;
}

.product-card__discount-row--placeholder {
  visibility: hidden;
}

.product-card__old-price {
  font-size: 13px;
  color: var(--gray-light);
  text-decoration: line-through;
  line-height: 1.2;
}

.product-card__discount-badge {
  height: 23px;
  min-width: 23px;
  padding: 0 8px;
  box-sizing: border-box;
  background: var(--red);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: stretch;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.product-card__discount-badge__label {
  display: block;
  height: 100%;
  line-height: 23px;
  text-align: center;
}

.product-card__price {
  display: flex;
  align-items: baseline;
  justify-content: left;
  gap: 4px;
  line-height: 1.2;
}

.product-card__price-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-dark);
}

.product-card__price-unit {
  font-size: 12px;
  color: var(--gray);
}

.product-card__btn {
  width: 145px;
  height: 30px;
  margin: 12px auto 0;
  padding: 0;
  border: none;
  border-radius: var(--radius-small);
  background: var(--blue-dark);
  color: var(--white);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

/* بنر تبلیغاتی — زیر شگفت‌انگیزها */
.promo-banner {
  width: 100%;
  max-width: 430px;
  padding: 0 20px;
  margin-top: 24px;
  box-sizing: border-box;
}

.promo-banner__inner {
  position: relative;
  width: 100%;
  max-width: 390px;
  height: 90px;
  margin: 0 auto;
  border-radius: var(--radius);
  background: var(--blue-light);
  overflow: hidden;
}

.promo-banner__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.promo-banner__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0 16px;
  box-sizing: border-box;
}

.promo-banner__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
  text-align: right;
}

.promo-banner__line {
  display: block;
  width: 100%;
  max-width: 118px;
  height: 0.5px;
  margin: 6px 0 8px;
  background: var(--white);
  flex-shrink: 0;
}

.promo-banner__btn {
  width: 73px;
  height: 17px;
  padding: 0 8px 0 6px;
  border: none;
  border-radius: var(--radius-small);
  background: var(--blue-dark);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.promo-banner__btn-text {
  line-height: 1;
}

.promo-banner__btn-icon {
  width: 12px;
  height: 12px;
  display: block;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

/* جدیدترین محصولات */
.newest {
  width: 100%;
  max-width: 430px;
  padding: 0 20px;
  margin-top: 32px;
  box-sizing: border-box;
}

.newest__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.newest__heading {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.2;
}

.newest__view-all {
  display: flex;
  align-items: center;
  text-align: center;
  gap: 8px;
  font-size: 12px;
  color: var(--gray);
  text-decoration: none;
  white-space: nowrap;
  direction: ltr;
}

.newest__view-all-icon {
  width: 7px;
  height: auto;
  display: block;
  flex-shrink: 0;
  filter: brightness(0);
  opacity: 0.55;
}

.newest__box {
  width: 100%;
  max-width: 390px;
  height: 370px;
  margin: 0 auto;
  box-sizing: border-box;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-small);
  overflow: hidden;
}

.newest__scroll {
  display: flex;
  gap: 12px;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 15px 12px;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-x pan-y;
  direction: rtl;
}

.newest__scroll::-webkit-scrollbar {
  display: none;
}

.bestSeller__scroll {
    display: flex;
    gap: 12px;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 15px 12px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
    touch-action: pan-x pan-y;
    direction: rtl;
}

    .bestSeller__scroll::-webkit-scrollbar {
        display: none;
    }

/* برندها */
.brands {
  width: 100%;
  max-width: 430px;
  padding: 0 20px;
  margin-top: 32px;
  box-sizing: border-box;
}

.brands__heading {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.2;
  text-align: right;
}

.brands__box {
  width: 100%;
  max-width: 390px;
  height: 90px;
  margin: 0 auto;
  box-sizing: border-box;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-small);
  overflow: hidden;
}

.brands__scroll {
  display: flex;
  gap: 12px;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 15px 12px;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-x pan-y;
  direction: rtl;
}

.brands__scroll::-webkit-scrollbar {
  display: none;
}

.brand-item {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-small);
  background: var(--bg-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-item__logo {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-item__logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

/* بلاگ */
.blog {
  width: 100%;
  max-width: 430px;
  padding: 0 var(--page-padding-x);
  margin-top: 32px;
  box-sizing: border-box;
}

.blog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.blog__heading {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.2;
}

.blog__view-all {
  display: flex;
  align-items: center;
  text-align: center;
  gap: 8px;
  font-size: 12px;
  color: var(--gray);
  text-decoration: none;
  white-space: nowrap;
  direction: ltr;
}

.blog__view-all-icon {
  width: 7px;
  height: auto;
  display: block;
  flex-shrink: 0;
  filter: brightness(0);
  opacity: 0.55;
}

.blog__box {
  width: 100%;
  max-width: var(--content-max);
  height: auto;
  min-height: 270px;
  margin: 0 auto;
  box-sizing: border-box;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-small);
  overflow: hidden;
}

.blog__scroll {
  display: flex;
  gap: 12px;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 12px;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-x pan-y;
  direction: rtl;
}

.blog__scroll::-webkit-scrollbar {
  display: none;
}

.blog-card {
  flex-shrink: 0;
  width: min(190px, calc((100vw - (var(--page-padding-x) * 2) - 24px) * 0.5));
  min-width: 160px;
  height: auto;
  aspect-ratio: 190 / 250;
  box-sizing: border-box;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-small);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.blog-card__image {
  width: 100%;
  aspect-ratio: 190 / 130;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--white-3);
}

.blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.blog-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 10px 10px;
  box-sizing: border-box;
  min-height: 0;
}

.blog-card__excerpt {
  margin: 5px 2px 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--black-light);
  text-align: right;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  min-height: calc(1.45em * 2);
}

.blog-card__date {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  margin-bottom: 8px;
}

.blog-card__calendar-icon {
  width: 14px;
  height: 14px;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

.blog-card__date-text {
  font-size: 11px;
  line-height: 1.2;
  color: var(--gray);
}

.blog-card__divider {
  display: block;
  width: 95%;
  max-width: 170px;
  height: 1px;
  margin: 0 auto 8px;
  background: rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.blog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.blog-card__read-more {
  font-size: 12px;
  line-height: 1.2;
  color: var(--blue-dark);
  font-weight: 700;
}

.blog-card__read-icon {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}
