.r-offers-discounts {
  --offers-card-background: var(--app-bg-color);
  --offers-border-color: var(--primary-color);
  --offers-muted-color: color-mix(in srgb, var(--text-color-primary-bg) 66%, transparent);
  --offers-control-background: #eef1f3;
  overflow: hidden;

  &.space {
    margin-block: clamp(3rem, 6vw, 5rem);
  }

  & .r-offers-discounts__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
  }

  & .r-offers-discounts__heading {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.35rem;
  }

  & .r-offers-discounts__title,
  & .r-offers-discounts__subtitle {
    margin: 0;
  }

  & .r-offers-discounts__title {
    color: var(--offers-head-color);
    font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem);
    font-weight: var(--font-weight-bold);
    line-height: 1.35;
  }

  & .r-offers-discounts__subtitle {
    color: var(--offers-subhead-color);
    font-size: clamp(0.9rem, 0.83rem + 0.25vw, 1.05rem);
    font-weight: var(--font-weight-normal);
    line-height: 1.55;
    opacity: 0.78;
  }

  & .r-offers-discounts__header-actions,
  & .r-offers-discounts__navigation {
    display: flex;
    align-items: center;
  }

  & .r-offers-discounts__header-actions {
    flex: 0 0 auto;
    gap: 1rem;
  }

  & .r-offers-discounts__navigation {
    gap: 0.625rem;
  }

  & .r-offers-discounts__view-all {
    color: var(--offers-link-color);
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    text-underline-offset: 0.25em;
    transition: color 0.2s ease, opacity 0.2s ease;

    &:hover {
      color: var(--primary-color);
    }

    &:focus-visible {
      border-radius: 0.25rem;
      outline: 2px solid var(--primary-color);
      outline-offset: 0.25rem;
    }
  }

  button.r-offers-discounts__nav {
    display: inline-flex;
    width: clamp(2.5rem, 3.2vw, 3rem);
    height: clamp(2.5rem, 3.2vw, 3rem);
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--text-color-primary-bg) 12%, transparent);
    background-color: var(--offers-control-background);
    color: var(--text-color-primary-bg);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;

    svg {
      width: 1.15rem;
      height: 1.15rem;
      fill: none;
      stroke: currentColor;
      stroke-linecap: round;
      stroke-linejoin: round;
      stroke-width: 2;
    }

    &.r-offers-discounts__nav--next svg {
      transform: rotate(180deg);
    }

    &:hover {
      background-color: var(--primary-color);
      color: var(--app-bg-color);
    }

    &:focus-visible {
      outline: 2px solid var(--primary-color);
      outline-offset: 0.2rem;
    }

    &.swiper-button-disabled {
      cursor: default;
      opacity: 0.35;
    }
  }

  [dir="rtl"] & button.r-offers-discounts__nav--prev svg {
    transform: rotate(180deg);
  }

  [dir="rtl"] & button.r-offers-discounts__nav--next svg {
    transform: none;
  }

  & .r-offers-discounts__products {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  & .r-offers-discounts__products--slider,
  & .r-offers-discounts__slider {
    overflow: hidden;
  }

  & .r-offers-discounts__products--grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  & .r-offers-discounts__slider .swiper-wrapper {
    align-items: stretch;
  }

  & .r-offers-discounts__slide {
    display: flex;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    align-items: stretch;
  }

  .product-item.product-item--race-offer {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-height: 22rem;
    height: 22rem;
    max-height: 22rem;
    padding: 0;
    overflow: hidden;
    aspect-ratio: auto;
    border: 1px solid var(--offers-border-color);
    border-radius: 0.5rem;
    background: var(--offers-card-background);
    color: var(--text-color-primary-bg);

    .product-card-link {
      display: grid;
      box-sizing: border-box;
      width: 100%;
      min-width: 0;
      max-width: 100%;
      height: 100%;
      min-height: inherit;
      grid-template-columns: minmax(0, 48%) minmax(0, 52%);
      align-items: stretch;
      overflow: hidden;
      color: inherit;
      cursor: pointer;
    }

    .content_img {
      position: relative;
      box-sizing: border-box;
      width: 100% !important;
      min-width: 0;
      max-width: 100%;
      min-height: 100%;
      height: 100% !important;
      max-height: 100%;
      overflow: hidden;
      border-radius: 0;
      background: color-mix(in srgb, var(--text-color-primary-bg) 4%, transparent);

      .icons {
        position: absolute;
        inset-block-start: 0.75rem;
        inset-inline-start: 0.75rem;
        inset-inline-end: auto;
        z-index: 6;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
      }

      .icons .eye,
      .icons .comparison-trigger {
        position: static;
        display: inline-flex;
        width: 2.5rem;
        min-width: 2.5rem;
        height: 2.5rem;
        min-height: 2.5rem;
        margin: 0;
        padding: 0;
        align-items: center;
        justify-content: center;
        border: 1px solid color-mix(in srgb, var(--text-color-primary-bg) 14%, transparent);
        border-radius: 50%;
        background: var(--app-bg-color);
        color: var(--text-color-primary-bg);
        box-shadow: 0 0.25rem 0.8rem rgb(0 0 0 / 14%);
        opacity: 1;
        visibility: visible;
        transform: none;
        cursor: pointer;
        transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
      }

      .icons .eye:hover,
      .icons .comparison-trigger:hover {
        // border-color: var(--primary-color);
        background: var(--app-bg-color);
        color: var(--text-color-primary-bg);
        transform: translateY(-2px);
      }

      .icons .eye:focus-visible,
      .icons .comparison-trigger:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 0.15rem;
      }

      .icons .reshare {
        display: flex;
        align-items: center;
        justify-content: center;
        background: TRANSPARENT;
      }

      > img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: 0;
        transition: transform 0.35s ease;
      }
    }

    &:hover .content_img > img {
      transform: scale(1.035);
    }

    .product_details {
      display: flex;
      box-sizing: border-box;
      width: 100%;
      height: auto;
      min-width: 0;
      max-width: 100%;
      flex-direction: column;
      justify-content: flex-start;
      gap: 0.7rem;
      padding: 1.15rem;
      overflow: hidden;
      opacity: 1;
      visibility: visible;
    }

    .text-feild {
      display: flex;
      min-width: 0;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.35rem;
    }

    .product-title,
    .product-title span {
      display: -webkit-box !important;
      min-height: 1.4em;
      margin: 0;
      overflow: hidden;
      color: var(--offers-product-title-color);
      font-size: 0.78rem;
      font-weight: var(--font-weight-medium);
      line-height: 1.4;
      opacity: 0.72;
      // -webkit-box-orient: vertical;
      // -webkit-line-clamp: 1;
    }

    .discription-card,
    .discription-card p,
    .discription-card span {
      display: -webkit-box;
      // min-height: 3em;
      margin: 0;
      overflow: hidden;
      color: var(--offers-product-title-color);
      font-size: 1rem;
      font-weight: var(--font-weight-semibold);
      line-height: 1.5;
      overflow-wrap: anywhere;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }

    .product-card-rating-wrapper {
      display: flex;
      height: auto;
      min-height: 1.15rem;
      align-items: center;
      gap: 0.35rem;
      color: var(--offers-muted-color);
      font-size: 0.78rem;
    }

    .product-card_price {
      display: flex;
      min-width: 0;
      max-width: 100%;
      flex-direction: column;
      gap: 0.35rem;
    }

    .section-product-price {
      display: flex;
      min-width: 0;
      max-width: 100%;
      flex-wrap: wrap;
      align-items: baseline;
      justify-content: flex-start;
      gap: 0.45rem 0.7rem;
    }

    .product-price {
      color: var(--primary-color);
      font-size: 1.05rem;
      font-weight: var(--font-weight-bold);
    }

    .product-price-original {
      display: flex;
      width: auto;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.4rem;
      color: var(--offers-muted-color);
      font-size: 0.78rem;
    }

    .product-prev-price {
      color: inherit;
      text-decoration: line-through;
    }

    .discount-label {
      margin: 0;
      padding: 0.15rem 0.4rem;
      border-radius: 0.25rem;
      background: color-mix(in srgb, var(--danger-color) 12%, transparent);
      color: var(--danger-color);
      font-size: 0.7rem;
      font-weight: var(--font-weight-semibold);
    }

    .options_card {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-start;
      gap: 0.35rem;
    }

    .product-option-badge {
      margin: 0;
      color: var(--offers-muted-color);
      font-size: 0.72rem;
    }

    .countdown-wrapper {
      display: flex;
      width: 100%;
      margin-top: auto;
      padding-top: 0.3rem;
      align-items: center;
      justify-content: space-between;
      gap: 0.65rem;
      color: var(--offers-timer-color);
      text-align: center;
    }

    .offer-end-message,
    .countdown,
    .offer-ended-text {
      color: var(--offers-timer-color);
    }

    .offer-end-date,
    .month,
    .countdown {
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .offer-end-date,
    .month {
      gap: 0.1rem;
    }

    .offer-end-title,
    .remian-message {
      margin: 0;
      color: inherit;
      font-size: 0.68rem;
      line-height: 1.35;
    }

    .offer-end-message--ended {
      width: 100%;
      text-align: center;
    }

    .offer-ended-text {
      margin: 0;
      padding-block: 0.5rem;
      font-size: clamp(1.15rem, 2vw, 1.5rem);
      font-weight: var(--font-weight-bold, 700);
      line-height: 1.4;
      text-align: center;
    }

    .offer-end-day {
      color: inherit;
      font-size: 0.95rem;
      font-weight: var(--font-weight-bold);
    }

    .offer-end-month {
      color: inherit;
      font-size: 0.65rem;
    }

    .vertical-line {
      width: 1px;
      height: 2.5rem;
      flex: 0 0 auto;
      background: color-mix(in srgb, var(--offers-timer-color) 30%, transparent);
    }

    .countdown {
      gap: 0.25rem;
    }

    .cont_box {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.18rem;
    }

    .time-box {
      display: flex;
      min-width: 2rem;
      padding: 0;
      flex-direction: column;
      gap: 0.1rem;
    }

    .time-box .number,
    .countdown-separator {
      color: var(--offers-timer-color);
      font-size: 0.88rem;
      font-weight: var(--font-weight-bold);
      line-height: 1;
    }

    .time-box .label {
      color: var(--offers-timer-color);
      font-size: 0.58rem;
      line-height: 1.2;
      opacity: 0.72;
    }

    .countdown-separator {
      margin: 0;
      animation: none;
    }

    .offer-open-message {
      margin: auto 0 0;
      color: var(--offers-timer-color);
      font-size: 0.78rem;
    }

    .add_button_h {
      display: flex;
      width: 100%;
      height: 2.75rem;
      margin: 0;
      padding: 0;
      align-items: stretch;
      justify-content: flex-start;
      gap: 0.5rem;
    }

    .product-card__wishlist--inline {
      width: 2.75rem;
      min-width: 2.75rem;
      height: 2.75rem;
      flex: 0 0 2.75rem;
      border: 1px solid var(--primary-color);
      border-radius: 0.4rem;
    }

    .add_button_h .add_btn_card_hero {
      display: inline-flex;
      width: auto;
      min-width: 0;
      max-width: 100%;
      height: 100%;
      flex: 1 1 auto;
      align-items: center;
      justify-content: center;
      padding-inline: 0.8rem;
      border: 1px solid var(--primary-color);
      border-radius: 0.4rem;
      background: var(--primary-color);
      color: var(--product-card-action-text, #fff);
      font-size: 0.82rem;
      transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    }

    .add_button_h .add_btn_card_hero:hover {
      border-color: var(--primary-color);
      background: var(--primary-color);
      color: var(--app-bg-color);
      filter: none;
    }

  }
}

html.dark .r-offers-discounts {
  --offers-card-background: color-mix(in srgb, var(--app-bg-color) 88%, white 12%);
  --offers-border-color: color-mix(in srgb, var(--primary-color) 62%, white 38%);
  --offers-control-background: #243440;
}

.r-offers-discounts.r-offers-discounts--hide-image .product-item--race-offer .content_img,
.r-offers-discounts.r-offers-discounts--hide-badges .product-item--race-offer .badges,
.r-offers-discounts.r-offers-discounts--hide-badges .product-item--race-offer .product-card-bundle-offer,
.r-offers-discounts.r-offers-discounts--hide-category .product-item--race-offer .text-feild > .product-title,
.r-offers-discounts.r-offers-discounts--hide-product-name .product-item--race-offer .discription-card,
.r-offers-discounts.r-offers-discounts--hide-rating .product-item--race-offer .product-card-rating-wrapper,
.r-offers-discounts.r-offers-discounts--hide-price .product-item--race-offer .product-card_price,
.r-offers-discounts.r-offers-discounts--hide-discount .product-item--race-offer .discount-label,
.r-offers-discounts.r-offers-discounts--hide-options .product-item--race-offer .options_card,
.r-offers-discounts.r-offers-discounts--hide-cart .product-item--race-offer .add_button_h > .add_btn_card_hero,
.r-offers-discounts.r-offers-discounts--hide-wishlist .product-item--race-offer .wishlist_container_v,
.r-offers-discounts.r-offers-discounts--hide-quick-view .product-item--race-offer .icons .eye,
.r-offers-discounts.r-offers-discounts--hide-compare .product-item--race-offer .icons .reshare {
  display: none;
}

.r-offers-discounts.r-offers-discounts--hide-image .product-item--race-offer .product_details {
  width: 100%;
  max-width: 100%;
  flex: 1 1 100%;
}

.r-offers-discounts.r-offers-discounts--hide-image .product-item--race-offer .product-card-link {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 767.98px) {
  .r-offers-discounts {
    &.space {
      margin-block: 2.75rem;
    }

    & .r-offers-discounts__header {
      align-items: flex-start;
      gap: 0.75rem;
      margin-bottom: 1.25rem;
    }

    & .r-offers-discounts__heading {
      gap: 0.25rem;
    }

    & .r-offers-discounts__header-actions {
      flex-direction: column;
      align-items: flex-end;
      gap: 0.6rem;
    }

    & .r-offers-discounts__navigation {
      gap: 0.5rem;
    }

    & .r-offers-discounts__view-all {
      font-size: 0.85rem;
    }

    & button.r-offers-discounts__nav {
      width: 2.75rem;
      height: 2.75rem;
    }

    & .r-offers-discounts__products--grid {
      grid-template-columns: minmax(0, 1fr);
      gap: 1rem;
    }

    .product-item.product-item--race-offer {
      min-height: 27rem;
      height: 34rem;
      max-height: 33rem;
      border-radius: 0.45rem;

      .product-card-link {
        min-height: 0;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 16rem minmax(0, 1fr);
      }

      .content_img {
        width: 100% !important;
        min-width: 0;
        max-width: 100%;
        min-height: 16rem;
        height: 16rem !important;
        max-height: 16rem;
        aspect-ratio: auto;
        border-radius: 0;
      }

      .product_details {
        width: 100%;
        min-height: 0;
        max-width: 100%;
        gap: 0.55rem;
        padding: 0.9rem;
      }

      .product-title,
      .product-title span {
        font-size: 0.75rem;
      }

      .discription-card,
      .discription-card p,
      .discription-card span {
        font-size: 0.95rem;
      }

      .options_card {
        display: none;
      }

      .countdown-wrapper {
        margin-top: 0.25rem;
      }

    }
  }
}

@media (max-width: 420px) {
  .r-offers-discounts {
    & .r-offers-discounts__header {
      flex-wrap: wrap;
    }

    & .r-offers-discounts__header-actions {
      width: 100%;
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
    }
  }
}
