@font-face {
    font-weight: normal;
    font-style: normal;
    font-family: Navigo;
    src: url('https://www.raiffeisen.ru/static/fonts/navigo-regular.woff2')
        format('woff2');
    font-display: swap;
}

@font-face {
    font-weight: bold;
    font-style: normal;
    font-family: Navigo;
    src: url('https://www.raiffeisen.ru/static/fonts/navigo-bold.woff2')
        format('woff2');
    font-display: swap;
}

:root {
    --primary-color: #ffe600;
    --primary-co-color: #fed500;
    --primary-text-color: #2b2d33;

    /* Палитра raiffeisen.ru, на неё опирается фича cashback-sets */
    --color-white-0: #fff;
    --color-grey-0: #f8f6f2;
    --color-grey-2: #2f3441;
    --color-grey-4: #2b2d33;
    --color-grey-5: rgb(43 42 44 / 50%);
    --color-grey-6: rgb(43 45 51 / 60%);
    --color-grey-7: #eeebe6;
    --color-grey-8: #827f7f;
    --color-yellow-0: #ffe600;
    --color-yellow-1: #fed500;
    --color-black-0: #1e1d1f;
    --color-green-0: #285543;
    --color-green-1: #beebd7;
    --color-beige-0: #fceada;
    --color-beige-5: #7b6809;
    --color-button-primary-hover-background: #1c1f24;
}

/* Минимальный сброс: в шаблоне его нет, а вёрстка на него опирается */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--color-grey-0);
    color: var(--primary-text-color);
    font-family: Navigo, sans-serif;
}

h1,
h2,
p,
ul {
    margin: 0;
    padding: 0;
}

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.cashback-root {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Мобильная база: белый блок во всю ширину, без скруглений */
.cashback-wrapper {
    display: flex;
    flex-direction: column;
    row-gap: 24px;
    width: 100%;
    background-color: var(--color-white-0);
    padding-block: 24px;
    padding-inline: 16px;

    @media (width >= 768px) {
        row-gap: 32px;
        padding: 24px;
        border-radius: 16px;
    }

    @media (width >= 1024px) {
        row-gap: 40px;
        padding: 32px;
    }
}

.carousel-container {
    display: flex;
    flex-direction: column;
    row-gap: 16px;
    width: 100%;
}

.carousel-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    column-gap: 24px;
}

.carousel-title {
    max-width: 640px;
    color: var(--color-black-0);
    font-size: 17px;
    line-height: 23px;

    @media (width >= 768px) {
        font-size: 18px;
        line-height: 24px;
    }

    @media (width >= 1024px) {
        font-size: 20px;
        line-height: 26px;
    }
}

/* На тач-устройствах ленту листают пальцем, стрелки только на десктопе */
.carousel-arrows {
    display: none;
    flex-shrink: 0;
    column-gap: 8px;

    @media (width >= 768px) {
        display: flex;
    }
}

.carousel-arrow {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-grey-0);
    color: var(--color-grey-4);
    transition:
        background-color 0.3s ease,
        opacity 0.3s ease;

    @media (hover: hover) and (pointer: fine) {
        &:hover:not(:disabled) {
            background-color: var(--color-grey-7);
        }
    }

    &:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }
}

.carousel-arrow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentcolor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/*
 * Мобильная база: лента уходит под края экрана, scroll-padding держит
 * снап-позицию первой карточки на scrollLeft = 0.
 */
.carousel-track {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    column-gap: 12px;
    margin-inline: -16px;
    padding-inline: 16px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;

    @media (width >= 768px) {
        column-gap: 16px;
        margin-inline: 0;
        padding-inline: 0;
        scroll-padding-inline: 0;
    }

    &::-webkit-scrollbar {
        display: none;
    }
}

/*
 * Мобильная база: карточка занимает 80% экрана, чтобы из-за края
 * выглядывала следующая — это подсказывает, что ленту можно листать.
 */
.set-card {
    display: flex;
    flex: 0 0 min(80vw, 300px);
    flex-direction: column;
    row-gap: 16px;
    padding: 20px;
    border-radius: 16px;
    background-color: var(--color-grey-0);
    transition:
        box-shadow 0.3s ease,
        background-color 0.3s ease;
    scroll-snap-align: start;

    @media (width >= 768px) {
        flex-basis: 260px;
        padding: 24px;
    }

    @media (hover: hover) and (pointer: fine) {
        &:hover {
            box-shadow: inset 0 0 0 1px var(--color-grey-7);
        }
    }
}

.set-card.selected,
.set-card.selected:hover {
    background-color: var(--color-white-0);
    box-shadow: inset 0 0 0 2px var(--color-yellow-0);
}

.set-card-title {
    color: var(--color-black-0);
    font-weight: bold;
    font-size: 18px;
    line-height: 24px;
}

.set-card-rate-block {
    display: flex;
    flex-direction: column;
    row-gap: 8px;
}

.set-card-rate {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    height: 26px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    padding-inline: 9px;
}

.set-card-rate.main {
    background-color: var(--color-yellow-0);
    color: var(--color-black-0);
}

.set-card-rate.base {
    background-color: var(--color-grey-7);
    color: var(--color-grey-2);
}

.set-card-list {
    display: flex;
    flex-direction: column;
    row-gap: 4px;
}

.set-card-list-item {
    position: relative;
    color: var(--color-grey-6);
    font-size: 14px;
    line-height: 20px;
    padding-inline-start: 14px;
}

.set-card-list-item::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--color-grey-8);
}

.set-card-button {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    height: 48px;
    margin-top: auto;
    border-radius: 12px;
    background-color: var(--color-yellow-0);
    color: var(--color-black-0);
    font-size: 16px;
    transition: background-color 0.3s ease;

    @media (hover: hover) and (pointer: fine) {
        &:hover {
            background-color: var(--color-yellow-1);
        }
    }
}

.set-card.selected .set-card-button {
    background-color: var(--color-grey-7);
    color: var(--color-grey-6);
}

.page-intro {
    display: flex;
    flex-direction: column;
    row-gap: 12px;
    width: 100%;

    @media (width >= 768px) {
        row-gap: 16px;
    }
}

.page-intro-title {
    color: var(--color-black-0);
    font-weight: bold;
    font-size: 24px;
    line-height: 30px;

    @media (width >= 768px) {
        font-size: 32px;
        line-height: 38px;
    }
}

/* Обе строки под заголовком набраны одинаково */
.page-intro-text {
    color: var(--color-grey-8);
    font-size: 14px;
    line-height: 20px;

    @media (width >= 768px) {
        font-size: 15px;
        line-height: 21px;
    }
}

.page-intro-divider {
    height: 1px;
    margin: 4px 0 0;
    border: none;
    background-color: var(--color-grey-7);
}

/*
 * Мобильная база: картинка во всю ширину экрана и вплотную к верху,
 * поэтому отрицательные отступы гасят padding .cashback-wrapper.
 */
.hero-picture {
    display: block;
    object-fit: cover;
    width: calc(100% + 32px);
    background-color: var(--color-grey-7);
    margin-block: -24px 8px;
    margin-inline: -16px;
    object-position: center;
    aspect-ratio: 750 / 400;

    @media (width >= 768px) {
        width: 100%;
        height: 240px;
        margin: 0;
        border-radius: 16px;
        aspect-ratio: auto;
    }

    @media (width >= 1024px) {
        height: 280px;
    }
}

.screen-actions {
    display: flex;
    flex-direction: column;
    row-gap: 8px;
    margin-top: 8px;
}

.screen-actions-button {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    height: 56px;
    border-radius: 16px;
    font-size: 16px;
    transition:
        background-color 0.3s ease,
        opacity 0.3s ease;
    padding-inline: 24px;
}

.screen-actions-button.primary {
    background-color: var(--color-grey-4);
    color: var(--color-white-0);

    @media (hover: hover) and (pointer: fine) {
        &:hover:not(:disabled) {
            background-color: var(--color-button-primary-hover-background);
        }
    }

    &:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }
}

.screen-actions-button.secondary {
    background-color: var(--color-grey-7);
    color: var(--color-grey-4);

    @media (hover: hover) and (pointer: fine) {
        &:hover {
            background-color: var(--color-grey-0);
        }
    }
}

.success-screen {
    display: flex;
    flex-direction: column;
    row-gap: 16px;
    align-items: center;
    width: 100%;
}

.success-screen-mark {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-top: 8px;
    border-radius: 50%;
    background-color: var(--color-green-0);
}

.success-screen-mark svg {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: var(--color-white-0);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.success-screen-title {
    color: var(--color-black-0);
    font-weight: bold;
    font-size: 26px;
    line-height: 32px;
    text-align: center;

    @media (width >= 768px) {
        font-size: 32px;
        line-height: 38px;
    }
}

.success-screen-card {
    display: flex;
    flex-direction: column;
    row-gap: 16px;
    width: 100%;
    padding: 20px;
    border-radius: 16px;
    background-color: var(--color-grey-0);
}

.success-screen-text {
    color: var(--color-grey-6);
    font-size: 15px;
    line-height: 21px;
    text-align: center;
}

.success-screen-text.muted {
    color: var(--color-grey-8);
    font-size: 14px;
    line-height: 20px;
}

.success-screen-button {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    margin-top: 8px;
    border-radius: 16px;
    background-color: var(--color-grey-4);
    color: var(--color-white-0);
    font-size: 16px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    padding-inline: 24px;

    @media (hover: hover) and (pointer: fine) {
        &:hover {
            background-color: var(--color-button-primary-hover-background);
        }
    }
}

.select-screen {
    display: flex;
    flex-direction: column;
    row-gap: 16px;
    width: 100%;
}

.select-screen-instruction {
    color: var(--color-black-0);
    font-weight: bold;
    font-size: 15px;
    line-height: 21px;

    @media (width >= 768px) {
        font-size: 16px;
        line-height: 22px;
    }
}

.select-screen-list-title {
    color: var(--color-grey-8);
    font-size: 14px;
    line-height: 20px;
}

.select-screen-list {
    display: flex;
    flex-direction: column;
    row-gap: 8px;
}

.category-row {
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 12px 16px;
    border-radius: 12px;
    background-color: var(--color-grey-0);
    cursor: pointer;
    column-gap: 12px;
    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease,
        opacity 0.3s ease;
}

.category-row.checked {
    background-color: var(--color-white-0);
    box-shadow: inset 0 0 0 2px var(--color-yellow-0);
}

.category-row.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Настоящий чекбокс скрыт, но остаётся доступным с клавиатуры */
.category-row-input {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    white-space: nowrap;
    clip-path: inset(50%);
}

.category-row-box {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background-color: var(--color-white-0);
    box-shadow: inset 0 0 0 2px var(--color-grey-7);
    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease;
}

.category-row-box svg {
    width: 16px;
    height: 16px;
    opacity: 0;
    fill: none;
    stroke: var(--color-black-0);
    transition: opacity 0.2s ease;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.category-row.checked .category-row-box {
    background-color: var(--color-yellow-0);
    box-shadow: inset 0 0 0 2px var(--color-yellow-0);
}

.category-row.checked .category-row-box svg {
    opacity: 1;
}

.category-row-input:focus-visible + .category-row-box {
    box-shadow: inset 0 0 0 2px var(--color-grey-4);
}

.category-row-title {
    flex-grow: 1;
    color: var(--color-black-0);
    font-size: 15px;
    line-height: 20px;

    @media (width >= 768px) {
        font-size: 16px;
        line-height: 22px;
    }
}

.category-row-rate {
    flex-shrink: 0;
    color: var(--color-grey-8);
    font-weight: bold;
    font-size: 15px;
    line-height: 20px;
}

.category-row.checked .category-row-rate {
    color: var(--color-black-0);
}

.info-banner {
    display: flex;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 12px;
    background-color: var(--color-beige-0);
    column-gap: 12px;
}

.info-banner-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    fill: none;
    stroke: var(--color-beige-5);
    stroke-width: 1.8;
    stroke-linecap: round;
}

.info-banner-text {
    color: var(--color-beige-5);
    font-size: 14px;
    line-height: 20px;
}

.offer-screen {
    display: flex;
    flex-direction: column;
    row-gap: 16px;
    width: 100%;
}

.offer-screen-question {
    color: var(--color-black-0);
    font-weight: bold;
    font-size: 15px;
    line-height: 21px;

    @media (width >= 768px) {
        font-size: 16px;
        line-height: 22px;
    }
}

.offer-screen-card {
    display: flex;
    flex-direction: column;
    row-gap: 12px;
    padding: 20px;
    border-radius: 16px;
    background-color: var(--color-beige-0);
}

.offer-screen-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    column-gap: 16px;
}

.offer-screen-row-title {
    color: var(--color-grey-6);
    font-size: 15px;
    line-height: 21px;
}

.offer-screen-row-rate {
    flex-shrink: 0;
    color: var(--color-black-0);
    font-weight: bold;
    font-size: 15px;
    line-height: 21px;
}

