.offers-grid {
  display: grid;
  gap: 16px;
}

.offer-card {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr) 1.5fr 1fr;
  gap: 8px;
  background-color: #fff;
  border-radius: 16px;
  padding: 20px;
  border: 2px solid var(--color-border-default);
}
.offer-logo-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: space-between;
  align-items: flex-start;

  .lime-logo-img {
    width: 24px;
    height: 24px;
    position: relative;
    img {
      position: absolute;
      top: -4px;

      &:last-child {
        display: none;
      }
    }
  }

  .offer-logo-text-block {
    display: flex;
    gap: 12px;
    align-items: center;
  }
  .offer-logo-text {
    border-radius: 30px;
    padding: 2px 6px;
  }
}
.offer-num {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.offer-actions {
  display: flex;
  gap: 4px;
  .btn-info {
    all: unset;
    height: 40px;
    display: flex;
    border-radius: 10px;
    background: var(--background-surface-secondary);
    justify-content: center;
    align-items: center;
    cursor: pointer;

    &.info-icon {
      width: 40px;
    }
    &.info-text {
      padding-inline: 16px;
    }
  }
}
.offer-psk-mob {
  display: none;
}

/* ===== OFFER MODAL ===== */
.offer-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.offer-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.offer-modal {
  background: var(--background-surface-secondary);
  border-radius: 24px;
  width: 100%;
  max-width: 600px;
  max-height: min(90vh, 800px);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.offer-modal-overlay.active .offer-modal {
  transform: translateY(0);
}

.offer-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px;
  padding-bottom: 12px;
}

.offer-modal-logo-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-logo-img-wrapper {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.offer-modal-close {
  all: unset;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.offer-modal-close:hover {
  background: var(--background-surface-secondary);
}

.offer-modal-body {
  flex: 1;
  overflow-y: auto;
}

.offer-modal-body::-webkit-scrollbar {
  width: 4px;
}

.offer-modal-body::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 4px;
}

/* Accordion sections */
.offer-accordion-container {
  display: flex;
  flex-direction: column;
  margin-top: 24px;
  gap: 12px;
  padding-inline: 32px;
}
.offer-accordion {
  background-color: #fff;
  border-radius: 32px;
  padding: 0 24px;
}

.offer-accordion:last-child {
  border-bottom: none;
}

.offer-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding-block: 12px;
}

.offer-accordion-header:hover {
  opacity: 0.7;
}

.offer-accordion-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.offer-accordion-header[aria-expanded="true"] .offer-accordion-icon {
  transform: rotate(180deg);
}

.offer-accordion-content {
  display: none;
  /* padding-bottom: 20px; */
}

.offer-accordion-content.open {
  display: block;
}

/* Detail rows */
.offer-detail-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-default);
}

.offer-detail-row:last-child {
  border-bottom: none;
}

.offer-detail-label {
  font-family: Golos Text;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 135%;
  letter-spacing: 0%;
  vertical-align: middle;
  color: var(--text-body-secondary);
  margin-bottom: 6px;
}

.offer-detail-value {
  font-family: Golos Text;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 135%;
  letter-spacing: 0%;
  vertical-align: middle;
  color: var(--text-body-primary);
}

.offer-detail-value.small {
  font-size: 16px;
  font-weight: 400;
  color: #161616;
}

.offer-detail-value.promo {
  font-size: 16px;
  font-weight: 400;
  color: #161616;
  line-height: 1.5;
}

/* Advantages list */
.offer-advantages-title {
  font-family: "Golos Text", sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0%;
  color: #8a8a8a;
  vertical-align: middle;
  line-height: 135%;
  margin-top: 12px;
  margin-bottom: 6px;
}

.offer-advantages-list li {
  font-family: "Golos Text", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #161616;
  line-height: 1.5;
  counter-increment: advantage;

  /* Новые свойства для выравнивания */
  display: grid;
  grid-template-columns: auto 1fr; /* Колонка под цифру + колонка под текст */
  gap: 8px; /* Фиксированный отступ между цифрой и текстом */
}

.offer-advantages-list li::before {
  content: counter(advantage) ".";
  grid-column: 1; /* Помещаем цифру в первую колонку */
}

/* MFO info */
.offer-mfo-info {
  padding: 12px 0;
}

.offer-mfo-info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-default);
}

.offer-mfo-info-row:last-child {
  border-bottom: none;
}

.offer-mfo-info-label {
  font-family: "Golos Text", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #8a8a8a;
}

.offer-mfo-info-value {
  font-family: "Golos Text", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #161616;
  text-align: right;
  max-width: 60%;
}

/* Modal footer */
.offer-modal-footer {
  padding: 16px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.offer-modal-cta {
  display: block;
  width: 100%;
  padding: 16px 32px;
  font-family: "Golos Text", sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 1%;
  color: #fff;
  background: #7028f4;
  border: none;
  border-radius: 16px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.offer-modal-cta:hover {
  background: #5a1fd4;
}

.offer-modal-date {
  font-family: "Golos Text", sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #8a8a8a;
}
.offer-mfo-info-header {
  margin-top: 12px;
}
/* Mobile styles */
@media (max-width: 576px) {
  .offer-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .offer-modal {
    max-width: 100%;
    max-height: 95vh;
    height: 100%;
    border-radius: 24px 24px 0 0;
  }

  .offer-modal-header {
    padding: 12px 20px;
  }

  .modal-logo-img-wrapper {
    width: 20px;
    height: 20px;
  }

  .offer-accordion-container {
    margin-top: 12px;
    gap: 8px;
    padding-inline: 0;
  }

  .offer-accordion {
    padding: 0 20px;
    border-radius: 16px;
  }

  .offer-modal-footer {
    padding: 12px 16px 20px;
  }

  .offer-modal-cta {
    font-size: 16px;
    padding: 14px 24px;
  }
}

.mobile {
  display: none;
}
.desktop {
  display: block;
}

@media (width <= 576px) {
  .offers-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    grid-template-rows: repeat(7, auto);
  }
  .offer-card {
    padding: 12px 8px;
    display: grid;
    grid-template-columns: 1fr; /* Внутри карточки всё идет в одну колонку */
    grid-row: span 7; /* Карточка занимает ровно 7 рядов базовой сетки */
    grid-template-rows: subgrid; /* Магия: строки синхронизируются с соседней карточкой */
    gap: 8px;
  }
  .offer-logo-block {
    grid-column: span 2;
    margin-bottom: 4px;
    .lime-logo-img {
      width: 20px;
      height: 20px;
      img {
        top: 0;

        &:first-child {
          display: none;
        }
        &:last-child {
          display: block;
        }
      }
    }
    .offer-logo-text {
      display: none;
    }
  }
  .offer-num {
    grid-column: span 2;
    flex-direction: row;
    text-align: right;
  }
  .offer-actions {
    grid-column: span 2;
    display: flex;
    margin-block: 4px;
    gap: 4px;
    .btn-info {
      height: 32px;

      &.info-icon {
        width: 32px;
        min-width: 32px;
      }
      &.info-text {
        padding: 0;
        width: 100%;
      }
    }
  }
  .offer-psk {
    display: none;
  }
  .offer-psk-mob {
    display: block;
    text-align: center;
  }
  .mobile {
    display: block;
  }
  .desktop {
    display: none;
  }
  .offer-rate {
    min-width: 62px;
  }
}
