@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700;800;900&family=Roboto:wght@600;800&family=Sora:wght@800;900&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
}

/* ── Section wrapper ─────────────────────────────────── */
.order {
    padding: 50px 10px 40px;
}

/* ── Cards grid ──────────────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    align-items: center;
    max-width: 1140px;
    margin: 0 auto;
}

/* ── Single card ─────────────────────────────────────── */
.card {
    border-radius: 25px;
    border: 3px solid #6E7DB9;
    box-shadow: 0 5px 20px 1px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    font-weight: 900;
}

.card:hover {
    transform: scale(1.05);
}

/* Best-value card gets a different border color and slight scale */
.card--best {
    border-color: #E9AFC1;
    transform: scale(1.04);
}

.card--best:hover {
    transform: scale(1.08);
}

/* ── Card header ─────────────────────────────────────── */
.card__header {
    background: linear-gradient(180deg, #023C73 24%, #00529e 65%);
    border-radius: 20px 20px 0 0;
    padding: 10px 30px;
    text-align: center;
}

.card--best .card__header {
    background: #0461b8;
}

.card__label {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25em;
    font-weight: 700;
    color: #fff;
}

.card--best .card__label {
    font-size: 1.3em;
    font-weight: 800;
    text-transform: uppercase;
    color: #7ED957;
    text-shadow: 0.1px 0 0 rgba(0, 0, 0, 0.3);
}

/* ── Card body ───────────────────────────────────────── */
.card__body {
    background: #fff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.card--best .card__body {
    background: linear-gradient(180deg, #023C73 50%, #023C73 100%);
    padding: 10px;
}

/* Left column: bottle count + supply + image placeholder */
.card__product {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.card__bottles {
    font-family: 'Poppins', sans-serif;
    font-size: 2.1875em;
    font-weight: 900;
    color: #000;
    text-align: center;
    margin-top: 15px;
}

.card--best .card__bottles {
    font-size: 2.75em;
    color: #00BF63;
}

.card__supply {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25em;
    font-weight: 900;
    color: #2E2E2E;
    text-align: center;
}

.card--best .card__supply {
    color: #fff;
}

.card__img-placeholder {
    width: 85%;
    border-radius: 8px;
}

/* Right column: pricing + features */
.card__pricing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
}

/* Old price + new price side by side */
.card__price-row {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
}

.card__old-price {
    font-family: 'Roboto', sans-serif;
    font-size: 1.6em;
    font-weight: 900;
    color: #F53040;
    align-self: center;
    line-height: 1;
    position: relative;
    margin: 6px 0;
    text-shadow:
        -2px -2px 0 #000,
        0   -2px 0 #000,
        2px -2px 0 #000,
        -2px  0  0 #000,
        2px  0  0 #000,
        -2px  2px 0 #000,
        0    2px 0 #000,
        2px  2px 0 #000,
        4px 4px 0 rgba(0,0,0,.6),
        6px 6px 6px rgba(0,0,0,.6);
}

/* Кастомная зачёркнутая линия поверх текста */
.card__old-price::after {
    content: "";
    position: absolute;
    left: -6px;
    right: -6px;
    top: 50%;
    height: 3px;
    background: #000;
    transform: translateY(-50%);
}

.card__price {
    font-family: 'Roboto', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    color: #FFDF00;
    line-height: 1;
    margin: 6px 0;
    text-shadow:
        -2px -2px 0 #000,
        0   -2px 0 #000,
        2px -2px 0 #000,
        -2px  0  0 #000,
        2px  0  0 #000,
        -2px  2px 0 #000,
        0    2px 0 #000,
        2px  2px 0 #000,
        4px 4px 0 rgba(0,0,0,.6),
        6px 6px 6px rgba(0,0,0,.6);
}

.card--best .card__price {
    color: #00BF63;
    text-shadow:
        -2px -2px 0 #fff,
        0   -2px 0 #fff,
        2px -2px 0 #fff,
        -2px  0  0 #fff,
        2px  0  0 #fff,
        -2px  2px 0 #fff,
        0    2px 0 #fff,
        2px  2px 0 #fff,
        4px 4px 0 rgba(0,0,0,.6),
        6px 6px 6px rgba(0,0,0,.6);
}

/* ── Per-bottle oval SVG highlight ───────────────────── */
.card__per-bottle {
    position: relative;
    display: inline-block;
    padding: 6px 0;
}

.card__per-bottle-text {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #000;
    position: relative;
    z-index: 1;
}

.card--best .card__per-bottle-text {
    color: #fff;
}

.card__per-bottle-svg {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    overflow: visible;
}

.card__per-bottle-svg path {
    stroke: #61CE70;
    stroke-width: 9;
    fill: none;
    opacity: 0;
    stroke-dasharray: 0 1500;
    animation: draw-oval 1.2s forwards;
}

@keyframes draw-oval {
    0%   { stroke-dasharray: 0 1500; opacity: 1; }
    100% { stroke-dasharray: 1500 1500; opacity: 1; }
}

/* Features list */
.card__features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.card__features li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 800;
    line-height: 30px;
    color: #000;
}

.card--best .card__features li {
    color: #fff;
}

.card__features li svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    fill: #000;
}

.card--best .card__features li svg {
    fill: #fff;
}

.card__features li:first-child {
    list-style: none;
}

/* ── Карточка 1: 2-й пункт — синий ──────────────────── */
.card:nth-child(1) .card__features li:nth-child(2),
.card:nth-child(3) .card__features li:nth-child(2) {
    color: #2a5ba5;
}
.card:nth-child(1) .card__features li:nth-child(2) svg,
.card:nth-child(3) .card__features li:nth-child(2) svg {
    fill: #2a5ba5;
}

/* ── Карточка 2 (Best Value): спец. цвета пунктов ───── */
.card--best .card__features li:nth-child(2),
.card--best .card__features li:nth-child(2) svg {
    color: yellow;
    fill: yellow;
}
.card--best .card__features li:nth-child(3) svg,
.card--best .card__features li:nth-child(4) svg {
    fill: #00b063;
}

/* Guarantee line */
.card__guarantee {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25em;
    font-weight: 900;
    color: #FFDF00;
    text-align: center;
    margin-top: 5px;
    -webkit-text-stroke: 0.5px #000;
}

/* +SURPRISE 🎁 */
.card__bonus {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25em;
    font-weight: 900;
    color: #B2F5FA;
    text-align: center;
    margin-top: 5px;
    -webkit-text-stroke: 0.5px #000;
    text-shadow: 0 2px 0 #000, 0 0 18px rgba(244, 190, 16, 0.45);
    transform-origin: center bottom;
    will-change: transform;
    display: inline-block;
    animation: surprise-pop 6s cubic-bezier(.34, 1.56, .64, 1) 0.2s infinite both;
}

@keyframes surprise-pop {
    0%   { transform: translateY(24px) scale(.6) rotate(-2deg); opacity: 0; }
    16%  { transform: translateY(-8px) scale(1.15) rotate(0);  opacity: 1; }
    22%  { transform: translateY(0)    scale(1.00); }
    25%  { transform: translateY(-3px) scale(1.03); }
    28%  { transform: translateY(0)    scale(1.00); }
    100% { transform: translateY(0)    scale(1.00); opacity: 1; }
}

/* ── Card footer ─────────────────────────────────────── */
.card__footer {
    background: #fff;
    border-radius: 0 0 20px 20px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.card--best .card__footer {
    background: #023C73;
}

.card__btn {
    display: block;
    width: 100%;
    padding: 20px;
    font-family: 'Sora', sans-serif;
    font-size: 30px;
    font-weight: 800;
    line-height: 39px;
    text-align: center;
    text-decoration: none;
    color: #000;
    background: linear-gradient(180deg, #DADADA 49%, #E0E0E0 50%);
    box-shadow: 0 5px 0 0 #a0a0a0;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: filter 0.2s;
}

.card__btn:hover {
    filter: brightness(1.05);
}

.card--best .card__btn {
    color: #fff;
    background: linear-gradient(180deg, #00BF63 49%, #04AC5B 50%);
    box-shadow: 0px 5px 0px 0px #5e0c91;
}

.card__payment-img {
    width: auto;
    max-width: 70%;
    height: auto;
    display: block;
    object-fit: contain;
}

.card__total {
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    font-weight: 900;
    line-height: 1.2em;
    color: #000;
    text-align: center;
}

.card--best .card__total {
    color: #fff;
}

.card__shipping {
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    font-weight: 900;
    line-height: 1.2em;
    color: #555;
    text-align: center;
}

.card--best .card__shipping {
    color: #FFDF00;
}

.card__shipping .free {
    color: red;
}

/* ── Tablet (≤1024px): 1 колонка, тело карточки — строка ── */
@media (max-width: 1024px) {
    .section-form {
        padding: 90px 19px 60px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 700px;
    }

    /* Убираем постоянный scale у средней карточки */
    .card--best {
        transform: none;
    }
    .card--best:hover {
        transform: scale(1.03);
    }

    /* Тело карточки: изображение слева, цены справа */
    .card__body {
        flex-direction: row;
        align-items: stretch;
    }

    .card__product {
        flex: 0 0 34%;
        width: 34%;
        min-width: 0;
        justify-content: center;
    }

    .card__pricing {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .card__label {
        font-size: 35px;
    }

    .card--best .card__label {
        font-size: 35px;
    }
}

/* ── Mobile (≤767px): то же + переупорядочивание карточек ── */
@media (max-width: 767px) {
    .section-form {
        padding: 40px 12px 30px;
    }

    .cards-grid {
        max-width: 100%;
        gap: 24px;
    }

    /* Best Value — первая */
    .card--best {
        order: 1;
    }

    /* Good Value — вторая */
    .card:nth-child(3) {
        order: 2;
    }

    /* Basic — последняя */
    .card:nth-child(1) {
        order: 3;
    }

    .card__header {
        padding: 12px 16px;
    }

    .card__body {
        padding: 10px 8px;
        gap: 8px;
    }

    /* Изображение: фиксированная доля, не сжимается */
    .card__product {
        flex: 0 0 38%;
        width: 38%;
        min-width: 0;
    }

    /* Pricing: занимает оставшееся пространство, не выходит за край */
    .card__pricing {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        overflow: hidden;
    }

    .card__footer {
        padding: 14px 16px;
        gap: 8px;
    }

    .card__label {
        font-size: 22px;
    }

    .card--best .card__label {
        font-size: 40px;
    }

    .card__bottles,
    .card--best .card__bottles {
        font-size: 20px;
    }

    .card__supply {
        font-size: 14px;
    }

    .card__price {
        font-size: 44px;
    }

    .card__old-price {
        font-size: 1.1em;
    }

    .card__features li {
        font-size: 12px;
        line-height: 23px;
    }

    .card__features li svg {
        width: 15px;
        height: 15px;
    }

    .card__btn {
        font-size: 20px;
        line-height: 50px;
        padding: 0;
    }

    .card__payment-img {
        max-width: 45%;
    }
}

/* ── Очень маленькие экраны (≤400px) ── */
@media (max-width: 400px) {
    .card__price {
        font-size: 36px;
    }

    .card__per-bottle-text {
        font-size: 13px;
    }

    .card__product {
        flex: 0 0 36%;
        width: 36%;
    }
}
