/* ==========================================================================
   Cart pages (shared)
   ========================================================================== */

.carts-page {
  direction: rtl;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  min-height: 0;
  box-sizing: border-box;
  background: var(--bg-main);
}

.carts-page.carts-basket-empty {
  min-height: calc(100dvh - 64px);
  min-height: calc(100svh - 64px);
  min-height: calc(100vh - 64px);
}

#app:has(.carts-page) > .carts-checkout {
  flex: 0 0 auto;
}

.carts-page__header {
  position: absolute;
  top: 0;
  right: var(--page-padding-x);
  left: var(--page-padding-x);
  height: var(--page-padding-top);
  display: flex;
  align-items: center;
}

.carts-page__title {
  margin: 0;
  font-size: clamp(16px, 4.6vw, 18px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--blue-dark);
}

/* --- مراحل خرید: سبد / ارسال / پرداخت --- */

.carts-page .container {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  padding-top: var(--page-padding-top);
  padding-bottom: calc(64px + 24px);
}

.carts-page.carts-page--basket .container {
  padding-bottom: calc(80px + 24px);
}

#app:has(.carts-page--basket) .carts-checkout {
  display: flex;
}

.carts-steps {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  gap: 0;
}

.carts-steps__item {
  flex-shrink: 0;
  width: clamp(24px, 7vw, 28px);
  height: clamp(24px, 7vw, 28px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carts-steps__item img {
  width: clamp(20px, 5.6vw, 22px);
  height: clamp(20px, 5.6vw, 22px);
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  filter: var(--icon-filter-gray-light-2);
}

.carts-steps__item--active img {
  filter: var(--icon-filter-blue-dark);
}

.carts-steps__line {
  flex: 1;
  height: 1.5px;
  background: var(--gray-light-2);
}

.carts-steps__line--active {
  background: var(--blue-dark);
}

.carts-page__header--with-back {
  justify-content: flex-start;
  gap: 10px;
}

.carts-page__back {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

.carts-page__back-icon {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  filter: var(--icon-filter-blue-dark);
}

.carts-page__header--with-back .carts-page__title {
  flex: 1;
  min-width: 0;
}

.carts-page.carts-page--delivery .container {
  padding-bottom: calc(80px + 24px);
}

.carts-page.carts-page--payment .container {
  padding-bottom: calc(80px + 24px);
}

#app:has(.carts-page--delivery) .carts-checkout {
  display: flex;
}

#app:has(.carts-page--payment) .carts-checkout {
  display: flex;
}

.carts-delivery-address {
  width: 100%;
  max-width: var(--content-max);
  margin: clamp(12px, 3.6vw, 16px) auto 0;
  padding: 15px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius);
}

.carts-delivery-address__type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.carts-delivery-address__type-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  filter: var(--icon-filter-blue-dark);
}

.carts-delivery-address__type-label {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--blue-dark);
}

.carts-delivery-address__location,
.carts-delivery-address__text,
.carts-delivery-address__postal {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--blue-dark);
}

.carts-delivery-address__location {
  margin-top: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carts-delivery-address__text {
  margin-top: 4px;
}

.carts-delivery-address__text--empty {
  margin-top: 0;
  color: var(--gray);
  line-height: 1.6;
}

.carts-delivery-address__postal {
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carts-delivery-address__change {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  align-self: flex-end;
  padding: 0;
  border: none;
  background: transparent;
  text-decoration: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--gray);
  cursor: pointer;
}

.carts-delivery-address__change-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  filter: var(--icon-filter-gray);
}

.carts-delivery-address__methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.carts-delivery-method-option {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
  cursor: pointer;
  font-family: inherit;
}

.carts-delivery-method-option__label {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--blue-dark);
}

.carts-delivery-method-option__radio {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  border: 2px solid var(--gray-light-2);
  border-radius: 50%;
  background: transparent;
}

.carts-delivery-method-option__radio--selected {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
  box-shadow: inset 0 0 0 3px var(--white);
}

.carts-delivery-address__detail {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

.carts-delivery-address__detail-content {
  padding-inline-start: 30px;
  box-sizing: border-box;
}

.carts-delivery-address__detail .carts-delivery-address__change {
  align-self: flex-end;
}

.carts-delivery-address__warehouses {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  padding-inline-start: 30px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}

.carts-warehouse-option {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: right;
  cursor: pointer;
  font-family: inherit;
}

.carts-warehouse-option__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.carts-warehouse-option__label {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--blue-dark);
}

.carts-warehouse-option__address {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--gray);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.carts-warehouse-option__radio {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  border: 2px solid var(--gray-light-2);
  border-radius: 50%;
  background: transparent;
  margin-top: 1px;
}

.carts-warehouse-option__radio--selected {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
  box-shadow: inset 0 0 0 3px var(--white);
}

.carts-delivery-box__row-value-free {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--blue-dark);
}

/* --- باکس شیوه و زمان ارسال --- */

.carts-delivery-box {
  width: 100%;
  max-width: var(--content-max);
  margin: clamp(12px, 3.6vw, 15px) auto 0;
  padding: 15px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius);
}

.carts-delivery-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.carts-delivery-box__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--blue-dark);
}

.carts-delivery-box__count {
  flex-shrink: 0;
  min-width: 50px;
  height: 25px;
  padding: 0 6px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(158, 157, 161, 0.7);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  color: var(--white);
  white-space: nowrap;
}

.carts-delivery-box__products-scroll {
  margin-top: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.carts-delivery-box__products-scroll::-webkit-scrollbar {
  display: none;
}

.carts-delivery-box__products-track {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  min-width: 100%;
}

.carts-delivery-box__product {
  position: relative;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-main);
}

.carts-delivery-box__product img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.carts-delivery-box__product-qty {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(158, 157, 161, 0.7);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  border-radius: var(--radius-small);
}

.carts-delivery-box__section {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
}

.carts-delivery-box__section-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.carts-delivery-box__section-icon {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  filter: var(--icon-filter-blue-dark);
}

.carts-delivery-box__section-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--blue-dark);
}

.carts-delivery-box__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  min-width: 0;
}

.carts-delivery-box__row-label {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--blue-dark);
  text-align: right;
}

.carts-delivery-box__row-value {
  flex-shrink: 0;
}

.carts-delivery-box__row-value .carts-price__value,
.carts-delivery-box__row-value .carts-price__unit {
  color: var(--blue-dark);
}

.carts-delivery-box__address-note {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--gray);
  text-align: right;
}

.carts-delivery-box__divider {
  display: block;
  width: min(360px, 100%);
  max-width: 100%;
  height: 1px;
  margin: 16px auto;
  background: rgba(0, 0, 0, 0.12);
}

.carts-delivery-box__time-value {
  margin: 16px 0 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--gray);
  text-align: right;
}

.carts-delivery-box__time-value--selected {
  color: var(--blue-dark);
}

.carts-delivery-box__select-btn {
  align-self: flex-end;
  margin-top: 16px;
  min-width: 148px;
  height: 40px;
  padding: 0 14px;
  border: none;
  border-radius: var(--radius);
  background: var(--blue-dark);
  color: var(--white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.carts-delivery-box__select-btn:active {
  opacity: 0.92;
}

/* --- سبد خالی --- */

.carts-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0;
  min-height: 0;
}

.carts-empty-state__icon {
  width: clamp(64px, 20vw, 80px);
  height: clamp(64px, 20vw, 80px);
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  filter: var(--icon-filter-gray);
}

.carts-empty-state__text {
  margin: clamp(12px, 3.6vw, 16px) 0 0;
  padding: 0 4px;
  font-size: clamp(14px, 4.6vw, 18px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--gray);
  text-align: center;
}

.carts-empty-state__btn {
  flex-shrink: 0;
  width: 100%;
  max-width: var(--content-max);
  height: clamp(48px, 14vw, 55px);
  margin: clamp(16px, 5.4vw, 24px) auto 0;
  padding: 0;
  text-align: center;
  text-decoration: none;
  line-height: clamp(48px, 14vw, 55px);
  font-size: clamp(14px, 4vw, 16px);
}

.carts-empty-state__btn:active {
  opacity: 0.92;
}

/* --- سبد با محصول --- */

.carts-items {
  width: 100%;
  max-width: var(--content-max);
  margin: clamp(12px, 3.6vw, 16px) auto 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 3.6vw, 15px);
}

.carts-item {
  width: 100%;
  max-width: 100%;
  min-height: 173px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius);
}

.carts-item__top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 90px;
}

.carts-item__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.carts-item__thumb {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-main);
  border-radius: var(--radius-small);
  overflow: hidden;
}

.carts-item__thumb img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.carts-item__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  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;
}

.carts-item__pricing {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.carts-item__discount-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 6px;
  min-height: 23px;
}

.carts-item__discount-row--placeholder {
  visibility: hidden;
}

.carts-item__old-price {
  font-size: 13px;
  color: var(--gray-light);
  text-decoration: line-through;
  line-height: 1.2;
}

.carts-item__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;
}

.carts-item__discount-badge__label {
  display: block;
  height: 100%;
  line-height: 23px;
  text-align: center;
}

.carts-item__price {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  line-height: 1.2;
}

.carts-item__price-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-dark);
}

.carts-item__price-unit {
  font-size: 12px;
  color: var(--gray);
}

.carts-item__qty {
  flex-shrink: 0;
  width: 90px;
  display: inline-flex;
  align-items: center;
  height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.carts-item__qty-btn {
  width: 28px;
  height: 40px;
  padding: 0;
  border: none;
  background: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.carts-item__qty-btn:active {
  opacity: 0.88;
}

.carts-item__qty-btn-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  filter: var(--icon-filter-blue-dark);
}

.carts-item__qty-btn-icon--minus {
  display: block;
  width: 11px;
  height: 2.5px;
  background: var(--blue-dark);
  border-radius: 2px;
  filter: none;
}

.carts-item__qty-btn-icon--plus {
  position: relative;
  display: block;
  width: 11px;
  height: 11px;
  filter: none;
}

.carts-item__qty-btn-icon--plus::before,
.carts-item__qty-btn-icon--plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--blue-dark);
  border-radius: 2px;
}

.carts-item__qty-btn-icon--plus::before {
  width: 11px;
  height: 2.5px;
  transform: translate(-50%, -50%);
}

.carts-item__qty-btn-icon--plus::after {
  width: 2.5px;
  height: 11px;
  transform: translate(-50%, -50%);
}

.carts-item__qty-value {
  flex: 1;
  min-width: 0;
  padding: 0 2px;
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--blue-dark);
  text-align: center;
}

/* --- خلاصه قیمت سبد --- */

.carts-summary {
  width: 100%;
  max-width: var(--content-max);
  height: 130px;
  box-sizing: border-box;
  margin: clamp(12px, 3.6vw, 15px) auto 0;
  padding: clamp(12px, 3.6vw, 14px) clamp(12px, 4vw, 16px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius);
}

.carts-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.carts-summary__label {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--black-light);
  text-align: right;
}

.carts-price {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  line-height: 1.2;
  direction: rtl;
  flex-shrink: 0;
}

.carts-price__value {
  font-size: 14px;
  font-weight: 400;
  color: var(--gray);
}

.carts-price__unit {
  font-size: 12px;
  color: var(--gray);
}

.carts-summary__row--discount .carts-summary__label,
.carts-summary__row--discount .carts-price__value,
.carts-summary__row--discount .carts-price__unit {
  color: var(--success);
}

.carts-summary__row--total .carts-summary__label {
  font-weight: 700;
  color: var(--blue-dark);
}

.carts-summary__row--total .carts-price__value {
  font-weight: 700;
  color: var(--blue-dark);
}

.carts-summary__divider {
  display: block;
  width: min(360px, 100%);
  max-width: 100%;
  height: 1px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

/* --- نوار ثابت ثبت سفارش --- */

.carts-checkout {
  display: none;
  position: sticky;
  bottom: 64px;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 14px var(--page-padding-x);
  background: var(--white);
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  direction: rtl;
  z-index: 99;
  flex-shrink: 0;
}

.carts-checkout__inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.carts-checkout__btn {
  flex-shrink: 0;
  min-width: 132px;
  height: 48px;
  padding: 0 16px;
  border: none;
  border-radius: var(--radius);
  background: var(--blue-dark);
  color: var(--white);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.carts-checkout__btn:active {
  opacity: 0.92;
}

.carts-checkout__btn.carts-checkout__btn--outline {
  background: var(--white);
  color: var(--blue-dark);
  border: 1px solid var(--blue-dark);
}

.carts-checkout__btn.carts-checkout__btn--outline:active {
  opacity: 0.92;
}

.carts-checkout__total {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.carts-checkout__total-label {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--gray);
}

.carts-checkout__total-value {
  display: block;
  min-width: 0;
}

.carts-price__value--checkout {
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-dark);
}

/* --- صفحه انتخاب آدرس سبد --- */

.carts-page.carts-page--select-address .container {
  padding-bottom: calc(64px + 24px);
}

.carts-select-address__close {
  position: absolute;
  top: 0;
  right: var(--page-padding-x);
  height: var(--page-padding-top);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-dark);
  text-decoration: none;
  z-index: 2;
}

.carts-select-address__close-icon {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  filter: var(--icon-filter-blue-dark);
}

.carts-select-address__close-title {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--blue-dark);
  white-space: nowrap;
}

.carts-select-address__add {
  display: block;
  width: 100%;
  max-width: var(--content-max);
  height: 55px;
  margin: auto auto 16px;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: var(--blue-dark);
  color: var(--white);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.carts-select-address__add:active {
  opacity: 0.92;
}

.carts-page--select-address .profile-address-box {
  margin-top: 0;
}

.address-card--cart-select {
  cursor: pointer;
}

.address-card--cart-select .address-card__top {
  align-items: center;
}

.address-card--cart-select .address-card__type {
  flex: 1;
  min-width: 0;
}

.address-card__radio {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  border: 2px solid var(--gray-light-2);
  border-radius: 50%;
  background: transparent;
}

.address-card__radio--selected {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
  box-shadow: inset 0 0 0 3px var(--white);
}

.address-card--selected {
  border-color: var(--blue-dark);
}

/* --- صفحه پرداخت / شیوه تحویل --- */

.carts-payment-box,
.carts-order-summary {
  width: 100%;
  max-width: var(--content-max);
  margin: clamp(12px, 3.6vw, 16px) auto 0;
  padding: 15px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius);
}

.carts-payment-box__head,
.carts-order-summary__head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.carts-payment-box__icon,
.carts-order-summary__icon {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  filter: var(--icon-filter-blue-dark);
}

.carts-payment-box__title,
.carts-order-summary__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--blue-dark);
}

.carts-payment-box__options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.carts-payment-option {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: right;
  cursor: pointer;
  font-family: inherit;
}

.carts-payment-option__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.carts-payment-option__label {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--blue-dark);
}

.carts-payment-option__hint {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--gray);
}

.carts-payment-option__radio {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  border: 2px solid var(--gray-light-2);
  border-radius: 50%;
  background: transparent;
}

.carts-payment-option__radio--selected {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
  box-shadow: inset 0 0 0 3px var(--white);
}

.carts-order-summary__divider {
  display: block;
  width: min(360px, 100%);
  max-width: 100%;
  height: 1px;
  margin: 16px auto;
  background: rgba(0, 0, 0, 0.12);
}

.carts-order-summary__section-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.carts-order-summary__section-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  filter: var(--icon-filter-blue-dark);
}

.carts-order-summary__address-type {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--blue-dark);
}

.carts-order-summary__address-line,
.carts-order-summary__address-text,
.carts-order-summary__address-postal {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--blue-dark);
  text-align: right;
}

.carts-order-summary__address-text--empty {
  color: var(--gray);
}

.carts-order-summary__shipping-label {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--blue-dark);
}

.carts-order-summary__shipping-value {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--blue-dark);
  text-align: right;
}

.carts-order-summary__cart-label {
  margin: 16px 0 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--blue-dark);
  text-align: right;
}

.carts-order-summary .carts-delivery-box__products-scroll {
  margin-top: 12px;
}

/* --- مودال انتخاب زمان تحویل --- */

.carts-delivery-time-modal .login-modal__panel {
  height: 70vh;
  height: 70dvh;
  max-height: 70vh;
  max-height: 70dvh;
  min-height: 70vh;
  min-height: 70dvh;
  overflow: hidden;
}

.carts-delivery-time-modal__title {
  flex-shrink: 0;
  text-align: right;
  margin: 0 0 12px;
  padding: 0 0 0 48px;
}

.carts-delivery-time-modal__hint {
  flex-shrink: 0;
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--gray);
  text-align: right;
}

.carts-delivery-time-modal__field {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.carts-delivery-time-modal__select {
  flex-shrink: 0;
  width: 100%;
  height: 50px;
  padding: 0 14px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius);
  background: var(--white);
  font-family: inherit;
  cursor: pointer;
}

.carts-delivery-time-modal__select-text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--gray);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carts-delivery-time-modal__select--filled .carts-delivery-time-modal__select-text {
  color: var(--blue-dark);
}

.carts-delivery-time-modal__select--open {
  border-color: var(--blue-dark);
}

.carts-delivery-time-modal__select-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  filter: var(--icon-filter-gray);
  transition: transform 0.2s ease;
}

.carts-delivery-time-modal__select--open .carts-delivery-time-modal__select-arrow {
  transform: rotate(180deg);
}

.carts-delivery-time-modal__options {
  flex: 1;
  min-height: 0;
  margin-top: 8px;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.carts-delivery-time-modal__options[hidden] {
  display: none;
}

.carts-delivery-time-modal__options-scroll {
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
}

.carts-delivery-time-modal__option {
  width: 100%;
  padding: 12px 14px;
  box-sizing: border-box;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--blue-dark);
  text-align: right;
  cursor: pointer;
}

.carts-delivery-time-modal__option:last-child {
  border-bottom: none;
}

.carts-delivery-time-modal__option--active {
  background: rgba(0, 0, 0, 0.04);
  font-weight: 700;
}

.carts-delivery-time-modal__option:active {
  background: rgba(0, 0, 0, 0.06);
}

.carts-checkout-order {
    position: sticky;
    bottom: 64px;
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 14px var(--page-padding-x);
    background: var(--white);
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    direction: rtl;
    z-index: 99;
    flex-shrink: 0;
}