/* Подключаем шрифты с Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Manrope:wght@400;500;600;700&display=swap");


/* =========================
   ЦВЕТА И ОБЩИЕ НАСТРОЙКИ
========================= */

:root {
    --color-background: #f8f3eb;
    --color-background-light: #fffaf3;
    --color-background-dark: #34251d;

    --color-text: #382a23;
    --color-text-light: #74655d;
    --color-white: #ffffff;

    --color-accent: #b96f46;
    --color-accent-dark: #965334;
    --color-accent-light: #e8c5aa;

    --color-green: #66715a;
    --color-border: rgba(56, 42, 35, 0.14);

    --font-heading: "Cormorant Garamond", Georgia, serif;
    --font-main: "Manrope", Arial, sans-serif;

    --container-width: 1200px;
    --border-radius-small: 12px;
    --border-radius-medium: 24px;
    --border-radius-large: 40px;

    --shadow-soft: 0 18px 50px rgba(65, 42, 28, 0.1);
    --transition: 0.3s ease;
}


/* =========================
   СБРОС СТАНДАРТНЫХ СТИЛЕЙ
========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;

    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.7;

    color: var(--color-text);
    background-color: var(--color-background);

    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;

    background:
        radial-gradient(
            circle at 10% 20%,
            rgba(232, 197, 170, 0.23),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 60%,
            rgba(102, 113, 90, 0.1),
            transparent 27%
        );

    pointer-events: none;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    color: inherit;
    cursor: pointer;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

address {
    font-style: normal;
}


/* =========================
   ОБЩИЙ КОНТЕЙНЕР
========================= */

.container {
    width: min(
        calc(100% - 48px),
        var(--container-width)
    );

    margin-inline: auto;
}


/* =========================
   ОБЩИЕ КНОПКИ
========================= */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 54px;
    padding: 14px 30px;

    border: 1px solid transparent;
    border-radius: 999px;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.04em;

    transition:
        color var(--transition),
        background-color var(--transition),
        border-color var(--transition),
        transform var(--transition),
        box-shadow var(--transition);
}

.button:hover {
    transform: translateY(-2px);
}

.button--primary {
    color: var(--color-white);
    background-color: var(--color-accent);
    box-shadow: 0 12px 28px rgba(185, 111, 70, 0.25);
}

.button--primary:hover {
    background-color: var(--color-accent-dark);
    box-shadow: 0 16px 34px rgba(150, 83, 52, 0.3);
}

.button--full {
    width: 100%;
}


/* =========================
   ШАПКА
========================= */

.header {
    position: sticky;
    top: 0;
    z-index: 100;

    background-color: rgba(248, 243, 235, 0.88);
    border-bottom: 1px solid var(--color-border);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;

    min-height: 86px;
}

.logo {
    position: relative;

    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;

    color: var(--color-accent);
}

.logo::after {
    content: "";
    position: absolute;
    right: -12px;
    bottom: 3px;

    width: 7px;
    height: 7px;

    background-color: var(--color-green);
    border-radius: 50%;
}

.navigation {
    margin-left: auto;
}

.navigation__list {
    display: flex;
    align-items: center;
    gap: 34px;
}

.navigation__list a {
    position: relative;

    padding-block: 10px;

    font-size: 14px;
    font-weight: 600;

    color: var(--color-text-light);

    transition: color var(--transition);
}

.navigation__list a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 3px;
    left: 0;

    height: 1px;

    background-color: var(--color-accent);

    transform: scaleX(0);
    transform-origin: center;

    transition: transform var(--transition);
}

.navigation__list a:hover {
    color: var(--color-accent);
}

.navigation__list a:hover::after {
    transform: scaleX(1);
}


/* =========================
   КНОПКА КОРЗИНЫ
========================= */

.cart-button {
    display: flex;
    align-items: center;
    gap: 10px;

    min-height: 46px;
    padding: 8px 10px 8px 20px;

    color: var(--color-white);
    background-color: var(--color-background-dark);

    border: 0;
    border-radius: 999px;

    transition:
        background-color var(--transition),
        transform var(--transition);
}

.cart-button:hover {
    background-color: var(--color-accent-dark);
    transform: translateY(-2px);
}

.cart-button__text {
    font-size: 13px;
    font-weight: 700;
}

.cart-button__count {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    font-size: 12px;
    font-weight: 700;

    color: var(--color-background-dark);
    background-color: var(--color-accent-light);

    border-radius: 50%;
}


/* =========================
   ПЕРВЫЙ ЭКРАН
========================= */

.hero {
    position: relative;

    min-height: calc(100vh - 87px);
    padding: 70px 0 90px;

    display: flex;
    align-items: center;

    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 8%;
    left: -100px;

    width: 280px;
    height: 280px;

    border: 1px solid rgba(185, 111, 70, 0.17);
    border-radius: 50%;
}

.hero::after {
    content: "freshly baked";

    position: absolute;
    right: -35px;
    bottom: 35px;

    font-family: var(--font-heading);
    font-size: clamp(70px, 11vw, 170px);
    font-style: italic;
    font-weight: 600;
    line-height: 0.8;

    color: rgba(185, 111, 70, 0.055);

    white-space: nowrap;
    pointer-events: none;
}

.hero__container {
    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    align-items: center;
    gap: clamp(50px, 8vw, 110px);
}

.hero__content {
    max-width: 590px;
}

.hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 18px;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    color: var(--color-accent);
}

.hero__eyebrow::before {
    content: "";

    width: 34px;
    height: 1px;

    background-color: var(--color-accent);
}

.hero__title {
    max-width: 650px;
    margin-bottom: 24px;

    font-family: var(--font-heading);
    font-size: clamp(56px, 6vw, 88px);
    font-weight: 600;
    line-height: 0.92;
    letter-spacing: -0.045em;

    color: var(--color-text);
}

.hero__description {
    max-width: 540px;
    margin-bottom: 34px;

    font-size: 16px;
    line-height: 1.8;

    color: var(--color-text-light);
}


/* =========================
   ВРЕМЕННОЕ ИЗОБРАЖЕНИЕ HERO
========================= */

.hero__image {
    position: relative;

    width: 100%;
    min-height: 570px;

    background:
        linear-gradient(
            145deg,
            rgba(42, 27, 20, 0.12),
            rgba(42, 27, 20, 0.02)
        ),
        linear-gradient(
            135deg,
            #d7a57e 0%,
            #9c5f3e 45%,
            #493126 100%
        );

    border-radius: 48% 48% 18px 18px;
    box-shadow: var(--shadow-soft);

    overflow: hidden;
}

.hero__image::before {
    content: "BAKERY";

    position: absolute;
    top: 50%;
    left: 50%;

    font-family: var(--font-heading);
    font-size: clamp(55px, 7vw, 100px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;

    color: rgba(255, 255, 255, 0.18);

    transform: translate(-50%, -50%) rotate(-8deg);
}

.hero__image::after {
    content: "Скоро здесь будет очень аппетитная булка";

    position: absolute;
    right: 26px;
    bottom: 26px;
    left: 26px;

    padding: 18px 22px;

    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;

    color: rgba(255, 255, 255, 0.85);
    background-color: rgba(45, 29, 21, 0.4);

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}


/* =========================
   ВРЕМЕННЫЕ ОТСТУПЫ ДЛЯ БЛОКОВ
========================= */

/*
   Эти блоки мы оформим дальше.
   Сейчас отступы нужны, чтобы разделы
   не слипались в один сплошной текст.
*/

.benefits,
.catalog,
.about,
.order-steps,
.contacts {
    padding: 90px 0;
}


/* =========================
   ПЕРВАЯ АДАПТАЦИЯ
========================= */

@media (max-width: 950px) {

    .navigation {
        display: none;
    }

    .hero {
        min-height: auto;
        padding-top: 55px;
    }

    .hero__container {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .hero__content {
        max-width: 720px;
    }

    .hero__image {
        min-height: 500px;
    }
}


@media (max-width: 600px) {

    .container {
        width: min(
            calc(100% - 30px),
            var(--container-width)
        );
    }

    .header__container {
        min-height: 72px;
        gap: 20px;
    }

    .logo {
        font-size: 32px;
    }

    .cart-button {
        padding-left: 14px;
    }

    .cart-button__text {
        display: none;
    }

    .hero {
        padding: 45px 0 65px;
    }

    .hero__title {
        font-size: clamp(48px, 15vw, 68px);
    }

    .hero__description {
        font-size: 15px;
    }

    .hero__image {
        min-height: 390px;
        border-radius: 46% 46% 16px 16px;
    }

    .benefits,
    .catalog,
    .about,
    .order-steps,
    .contacts {
        padding: 65px 0;
    }
}
/* =========================
   ПРЕИМУЩЕСТВА
========================= */

.benefits {
    position: relative;
    padding: 0 0 90px;
}

.benefits__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    background-color: var(--color-background-light);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-medium);

    box-shadow: var(--shadow-soft);

    overflow: hidden;
}

.benefit {
    position: relative;

    display: flex;
    align-items: flex-start;
    gap: 20px;

    min-height: 190px;
    padding: 38px 34px;
}

.benefit:not(:last-child) {
    border-right: 1px solid var(--color-border);
}

.benefit::before {
    content: "";

    position: absolute;
    right: 24px;
    bottom: 18px;

    width: 64px;
    height: 64px;

    border: 1px solid rgba(185, 111, 70, 0.13);
    border-radius: 50%;
}

.benefit__icon {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;

    color: var(--color-white);
    background-color: var(--color-accent);

    border-radius: 50%;
}

.benefit:nth-child(2) .benefit__icon {
    background-color: var(--color-green);
}

.benefit:nth-child(3) .benefit__icon {
    color: var(--color-background-dark);
    background-color: var(--color-accent-light);
}

.benefit__title {
    margin-bottom: 9px;

    font-family: var(--font-heading);
    font-size: 25px;
    font-weight: 700;
    line-height: 1.1;

    color: var(--color-text);
}

.benefit__text {
    position: relative;
    z-index: 1;

    margin-bottom: 0;

    font-size: 13px;
    line-height: 1.7;

    color: var(--color-text-light);
}


/* Адаптация блока преимуществ */

@media (max-width: 900px) {

    .benefits {
        padding-bottom: 70px;
    }

    .benefits__list {
        grid-template-columns: 1fr;
    }

    .benefit {
        min-height: auto;
    }

    .benefit:not(:last-child) {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }
}


@media (max-width: 600px) {

    .benefits {
        padding-bottom: 60px;
    }

    .benefit {
        gap: 16px;
        padding: 28px 22px;
    }

    .benefit__icon {
        width: 42px;
        height: 42px;

        font-size: 17px;
    }

    .benefit__title {
        font-size: 23px;
    }
}

/* =========================
   ОБЩИЕ ЗАГОЛОВКИ РАЗДЕЛОВ
========================= */

.section-heading {
    max-width: 720px;
    margin-bottom: 44px;
}

.section-heading--center {
    margin-right: auto;
    margin-left: auto;

    text-align: center;
}

.section-heading__eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 14px;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    color: var(--color-accent);
}

.section-heading__eyebrow::before {
    content: "";

    flex: 0 0 auto;

    width: 34px;
    height: 1px;

    background-color: var(--color-accent);
}

.section-heading--center .section-heading__eyebrow {
    justify-content: center;
}

.section-heading__title {
    margin-bottom: 18px;

    font-family: var(--font-heading);
    font-size: clamp(44px, 5vw, 68px);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.035em;

    color: var(--color-text);
}

.section-heading__description {
    max-width: 620px;
    margin-bottom: 0;

    font-size: 15px;
    line-height: 1.8;

    color: var(--color-text-light);
}


/* =========================
   КАТАЛОГ
========================= */

.catalog {
    position: relative;

    padding: 110px 0;

    background-color: var(--color-background-light);

    overflow: hidden;
}

.catalog::before {
    content: "";

    position: absolute;
    top: -180px;
    right: -180px;

    width: 430px;
    height: 430px;

    border: 1px solid rgba(185, 111, 70, 0.13);
    border-radius: 50%;
}

.catalog::after {
    content: "";

    position: absolute;
    right: 70px;
    bottom: 80px;

    width: 130px;
    height: 130px;

    background-color: rgba(102, 113, 90, 0.07);
    border-radius: 50%;
}

.catalog .container {
    position: relative;
    z-index: 1;
}


/* =========================
   ПЕРЕКЛЮЧАТЕЛИ КАТЕГОРИЙ
========================= */

.category-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 42px;
    padding: 7px;

    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 999px;
}

.category-filter__button {
    min-height: 44px;
    padding: 10px 24px;

    font-size: 13px;
    font-weight: 700;

    color: var(--color-text-light);
    background-color: transparent;

    border: 0;
    border-radius: 999px;

    transition:
        color var(--transition),
        background-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

.category-filter__button:hover {
    color: var(--color-accent);
}

.category-filter__button--active {
    color: var(--color-white);
    background-color: var(--color-background-dark);

    box-shadow: 0 8px 20px rgba(52, 37, 29, 0.18);
}

.category-filter__button--active:hover {
    color: var(--color-white);
    transform: translateY(-1px);
}


/* =========================
   СЕТКА ТОВАРОВ
========================= */

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}


/* =========================
   КАРТОЧКА ТОВАРА
========================= */

.product-card {
    display: flex;
    flex-direction: column;

    min-width: 0;

    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-medium);

    box-shadow: 0 12px 35px rgba(65, 42, 28, 0.07);

    overflow: hidden;

    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
}

.product-card:hover {
    transform: translateY(-7px);

    border-color: rgba(185, 111, 70, 0.34);

    box-shadow: 0 22px 48px rgba(65, 42, 28, 0.13);
}


/* =========================
   ВРЕМЕННОЕ ИЗОБРАЖЕНИЕ ТОВАРА
========================= */

.product-card__image {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 270px;

    background:
        radial-gradient(
            circle at center,
            rgba(255, 255, 255, 0.7),
            transparent 36%
        ),
        linear-gradient(
            145deg,
            #ead1bb,
            #d2a17f
        );

    overflow: hidden;
}

.product-card:nth-child(2) .product-card__image {
    background:
        radial-gradient(
            circle at center,
            rgba(255, 255, 255, 0.72),
            transparent 36%
        ),
        linear-gradient(
            145deg,
            #d8c7a7,
            #b9835d
        );
}

.product-card:nth-child(3) .product-card__image {
    background:
        radial-gradient(
            circle at center,
            rgba(255, 255, 255, 0.65),
            transparent 36%
        ),
        linear-gradient(
            145deg,
            #d6c6ae,
            #8d7b65
        );
}

.product-card__image::before {
    content: "";

    position: absolute;

    width: 190px;
    height: 190px;

    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 50%;
}

.product-card__image::after {
    content: "";

    position: absolute;
    top: 22px;
    left: 22px;

    width: 48px;
    height: 48px;

    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 1px solid rgba(255, 255, 255, 0.5);
}

.product-card__symbol {
    position: relative;
    z-index: 1;

    font-size: 88px;
    line-height: 1;

    filter: drop-shadow(0 14px 14px rgba(73, 49, 38, 0.18));

    transition: transform 0.45s ease;
}

.product-card:hover .product-card__symbol {
    transform: scale(1.08) rotate(-3deg);
}

.product-card__weight {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 2;

    padding: 8px 13px;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;

    color: var(--color-white);
    background-color: rgba(52, 37, 29, 0.72);

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}


/* =========================
   СОДЕРЖИМОЕ КАРТОЧКИ
========================= */

.product-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;

    padding: 28px 26px 26px;
}

.product-card__title {
    margin-bottom: 10px;

    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.05;

    color: var(--color-text);
}

.product-card__description {
    margin-bottom: 25px;

    font-size: 13px;
    line-height: 1.75;

    color: var(--color-text-light);
}

.product-card__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    margin-top: auto;
    padding-top: 20px;

    border-top: 1px solid var(--color-border);
}

.product-card__price {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    line-height: 1;

    color: var(--color-accent-dark);
}

.product-card__button {
    flex: 0 0 auto;

    min-height: 43px;
    padding: 10px 18px;

    font-size: 12px;
    font-weight: 700;

    color: var(--color-white);
    background-color: var(--color-green);

    border: 0;
    border-radius: 999px;

    transition:
        background-color var(--transition),
        transform var(--transition),
        box-shadow var(--transition);
}

.product-card__button:hover {
    background-color: var(--color-background-dark);

    transform: translateY(-2px);

    box-shadow: 0 9px 20px rgba(52, 37, 29, 0.18);
}


/* =========================
   АНИМАЦИЯ ПОЯВЛЕНИЯ КАРТОЧЕК
========================= */

@keyframes productCardAppearance {

    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: productCardAppearance 0.45s ease both;
}

.product-card:nth-child(2) {
    animation-delay: 0.08s;
}

.product-card:nth-child(3) {
    animation-delay: 0.16s;
}


/* =========================
   АДАПТАЦИЯ КАТАЛОГА
========================= */

@media (max-width: 1000px) {

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 700px) {

    .catalog {
        padding: 80px 0;
    }

    .section-heading {
        margin-bottom: 34px;
    }

    .category-filter {
        display: flex;
        width: 100%;

        overflow-x: auto;
    }

    .category-filter__button {
        flex: 1 0 auto;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .product-card__image {
        min-height: 250px;
    }
}


@media (max-width: 450px) {

    .section-heading__title {
        font-size: 42px;
    }

    .category-filter {
        justify-content: flex-start;
    }

    .category-filter__button {
        padding-right: 18px;
        padding-left: 18px;
    }

    .product-card__content {
        padding: 24px 21px 22px;
    }

    .product-card__title {
        font-size: 28px;
    }

    .product-card__bottom {
        gap: 12px;
    }

    .product-card__price {
        font-size: 22px;
    }
}

/* =========================
   БЛОКИРОВКА СТРАНИЦЫ
========================= */

.page-locked {
    overflow: hidden;
}


/* =========================
   ЗАТЕМНЕНИЕ СТРАНИЦЫ
========================= */

.overlay {
    position: fixed;
    inset: 0;
    z-index: 900;

    background-color: rgba(39, 27, 21, 0.55);

    opacity: 0;

    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    transition: opacity 0.3s ease;
}

.overlay--visible {
    opacity: 1;
}


/* =========================
   ВЫДВИЖНАЯ КОРЗИНА
========================= */

.cart {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;

    display: flex;
    flex-direction: column;

    width: min(470px, 100%);
    height: 100dvh;

    background-color: var(--color-background-light);

    box-shadow: -20px 0 60px rgba(35, 24, 18, 0.2);

    transform: translateX(105%);

    visibility: hidden;

    transition:
        transform 0.4s ease,
        visibility 0.4s;
}

.cart--open {
    transform: translateX(0);
    visibility: visible;
}


/* =========================
   ШАПКА КОРЗИНЫ
========================= */

.cart__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    min-height: 90px;
    padding: 20px 28px;

    border-bottom: 1px solid var(--color-border);
}

.cart__title {
    margin-bottom: 0;

    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 700;
    line-height: 1;

    color: var(--color-text);
}

.cart__close {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;
    padding: 0;

    font-size: 30px;
    font-weight: 300;
    line-height: 1;

    color: var(--color-text-light);
    background-color: transparent;

    border: 1px solid var(--color-border);
    border-radius: 50%;

    transition:
        color var(--transition),
        background-color var(--transition),
        transform var(--transition);
}

.cart__close:hover {
    color: var(--color-white);
    background-color: var(--color-background-dark);

    transform: rotate(90deg);
}


/* =========================
   СОДЕРЖИМОЕ КОРЗИНЫ
========================= */

.cart__content {
    display: flex;
    flex: 1;
    flex-direction: column;

    min-height: 0;
}

.cart__items {
    flex: 1;

    padding: 26px 28px;

    overflow-y: auto;
}


/* =========================
   ПУСТАЯ КОРЗИНА
========================= */

.cart__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    min-height: 320px;
    margin: 0;

    text-align: center;

    color: var(--color-text-light);
}

.cart__empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100px;
    height: 100px;
    margin-bottom: 22px;

    font-size: 50px;

    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 50%;
}

.cart__empty p {
    margin-bottom: 5px;

    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;

    color: var(--color-text);
}

.cart__empty-hint {
    max-width: 230px;

    font-size: 12px;
    line-height: 1.6;
}


/* =========================
   ТОВАР В КОРЗИНЕ
========================= */

.cart-item {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 18px;

    padding: 18px 0;

    border-bottom: 1px solid var(--color-border);
}

.cart-item:first-child {
    padding-top: 0;
}

.cart-item__image {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 90px;
    height: 90px;

    font-size: 42px;

    background:
        radial-gradient(
            circle,
            rgba(255, 255, 255, 0.75),
            transparent 45%
        ),
        linear-gradient(
            145deg,
            #ead1bb,
            #c8906b
        );

    border-radius: 18px;
}

.cart-item__content {
    display: flex;
    flex-direction: column;
    justify-content: center;

    min-width: 0;
}

.cart-item__title {
    margin-bottom: 5px;

    font-family: var(--font-heading);
    font-size: 23px;
    font-weight: 700;
    line-height: 1.1;

    color: var(--color-text);
}

.cart-item__details {
    margin-bottom: 7px;

    font-size: 12px;

    color: var(--color-text-light);
}

.cart-item__price {
    font-family: var(--font-heading);
    font-size: 19px;

    color: var(--color-accent-dark);
}


/* =========================
   ИТОГ КОРЗИНЫ
========================= */

.cart__summary {
    flex: 0 0 auto;

    padding: 24px 28px 28px;

    background-color: var(--color-white);
    border-top: 1px solid var(--color-border);

    box-shadow: 0 -12px 30px rgba(65, 42, 28, 0.05);
}

.cart__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 20px;

    font-size: 14px;
    color: var(--color-text-light);
}

.cart__total strong {
    font-family: var(--font-heading);
    font-size: 30px;
    line-height: 1;

    color: var(--color-text);
}

.checkout-modal .button:disabled,
.cart__summary .button:disabled {
    cursor: not-allowed;

    color: rgba(255, 255, 255, 0.7);
    background-color: #b9ada5;

    box-shadow: none;

    transform: none;
}


/* =========================
   МОБИЛЬНАЯ КОРЗИНА
========================= */

@media (max-width: 500px) {

    .cart__header {
        min-height: 78px;
        padding: 17px 20px;
    }

    .cart__title {
        font-size: 34px;
    }

    .cart__items {
        padding: 22px 20px;
    }

    .cart-item {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 14px;
    }

    .cart-item__image {
        width: 76px;
        height: 76px;

        font-size: 35px;
        border-radius: 15px;
    }

    .cart-item__title {
        font-size: 21px;
    }

    .cart__summary {
        padding: 20px;
    }
}

/* =========================
   УЛУЧШЕННЫЙ ТОВАР В КОРЗИНЕ
========================= */

.cart-item {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 16px;

    padding: 20px 0;
}

.cart-item__image {
    width: 82px;
    height: 82px;

    font-size: 38px;
}

.cart-item__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.cart-item__title {
    margin-bottom: 6px;
}

.cart-item__remove {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;
    padding: 0;

    font-size: 20px;
    font-weight: 300;
    line-height: 1;

    color: var(--color-text-light);
    background-color: transparent;

    border: 1px solid var(--color-border);
    border-radius: 50%;

    transition:
        color var(--transition),
        background-color var(--transition),
        border-color var(--transition);
}

.cart-item__remove:hover {
    color: var(--color-white);
    background-color: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
}

.cart-item__unit-price {
    margin-bottom: 15px;

    font-size: 11px;
    line-height: 1.5;

    color: var(--color-text-light);
}

.cart-item__unit-price span {
    margin-inline: 4px;

    color: var(--color-accent);
}

.cart-item__bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}


/* =========================
   СЧЁТЧИК КОЛИЧЕСТВА
========================= */

.quantity-control {
    display: inline-grid;
    grid-template-columns: 32px 36px 32px;
    align-items: center;

    min-height: 34px;

    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 999px;

    overflow: hidden;
}

.quantity-control__button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 34px;
    padding: 0;

    font-size: 18px;
    line-height: 1;

    color: var(--color-text);
    background-color: transparent;

    border: 0;

    transition:
        color var(--transition),
        background-color var(--transition);
}

.quantity-control__button:hover:not(:disabled) {
    color: var(--color-white);
    background-color: var(--color-green);
}

.quantity-control__button:disabled {
    cursor: not-allowed;
    opacity: 0.3;
}

.quantity-control__value {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 34px;

    font-size: 12px;
    font-weight: 700;

    color: var(--color-text);

    border-right: 1px solid var(--color-border);
    border-left: 1px solid var(--color-border);
}


/* =========================
   СТОИМОСТЬ ПОЗИЦИИ
========================= */

.cart-item__cost {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 2px;

    text-align: right;
}

.cart-item__cost-label {
    font-size: 9px;
    line-height: 1.3;

    color: var(--color-text-light);
}

.cart-item__price {
    font-size: 21px;
    line-height: 1;

    white-space: nowrap;
}


/* =========================
   МОБИЛЬНАЯ КОРЗИНА
========================= */

@media (max-width: 400px) {

    .cart-item {
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 12px;
    }

    .cart-item__image {
        width: 68px;
        height: 68px;

        font-size: 32px;
    }

    .cart-item__bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .cart-item__cost {
        align-items: flex-start;

        text-align: left;
    }
}

/* =========================
   ФОРМА ПРЕДЗАКАЗА
========================= */

.checkout-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1100;

    width: min(620px, calc(100% - 32px));
    max-height: calc(100dvh - 40px);

    background-color: var(--color-background-light);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-medium);

    box-shadow: 0 30px 90px rgba(35, 24, 18, 0.35);

    opacity: 0;
    visibility: hidden;

    overflow-y: auto;

    transform:
        translate(-50%, -46%)
        scale(0.96);

    transition:
        opacity 0.3s ease,
        visibility 0.3s,
        transform 0.3s ease;
}

.checkout-modal--open {
    opacity: 1;
    visibility: visible;

    transform:
        translate(-50%, -50%)
        scale(1);
}

.checkout-modal__content {
    position: relative;

    padding: 44px;
}

.checkout-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
    padding: 0;

    font-size: 28px;
    font-weight: 300;
    line-height: 1;

    color: var(--color-text-light);
    background-color: transparent;

    border: 1px solid var(--color-border);
    border-radius: 50%;

    transition:
        color var(--transition),
        background-color var(--transition),
        transform var(--transition);
}

.checkout-modal__close:hover {
    color: var(--color-white);
    background-color: var(--color-background-dark);

    transform: rotate(90deg);
}

.checkout-modal__title {
    max-width: 450px;
    margin-bottom: 30px;

    font-family: var(--font-heading);
    font-size: clamp(38px, 5vw, 54px);
    font-weight: 700;
    line-height: 0.95;

    color: var(--color-text);
}


/* =========================
   ПОЛЯ ФОРМЫ
========================= */

.checkout-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.checkout-form__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkout-form__field:nth-child(1),
.checkout-form__field:nth-child(2),
.checkout-form__field:nth-child(5) {
    grid-column: 1 / -1;
}

.checkout-form__field label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;

    color: var(--color-text-light);
}

.checkout-form__field input,
.checkout-form__field select,
.checkout-form__field textarea {
    width: 100%;

    color: var(--color-text);
    background-color: var(--color-white);

    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-small);

    outline: none;

    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background-color var(--transition);
}

.checkout-form__field input,
.checkout-form__field select {
    min-height: 52px;
    padding: 12px 15px;
}

.checkout-form__field textarea {
    min-height: 110px;
    padding: 14px 15px;

    line-height: 1.6;

    resize: vertical;
}

.checkout-form__field input::placeholder,
.checkout-form__field textarea::placeholder {
    color: #a99c94;
}

.checkout-form__field input:focus,
.checkout-form__field select:focus,
.checkout-form__field textarea:focus {
    background-color: #fffdf9;
    border-color: var(--color-accent);

    box-shadow: 0 0 0 4px rgba(185, 111, 70, 0.11);
}

.checkout-form > .button {
    grid-column: 1 / -1;

    margin-top: 8px;
}


/* =========================
   МОБИЛЬНАЯ ФОРМА
========================= */

@media (max-width: 600px) {

    .checkout-modal {
        width: calc(100% - 20px);
        max-height: calc(100dvh - 20px);

        border-radius: 20px;
    }

    .checkout-modal__content {
        padding: 36px 22px 25px;
    }

    .checkout-modal__close {
        top: 14px;
        right: 14px;

        width: 38px;
        height: 38px;
    }

    .checkout-modal__title {
        padding-right: 45px;
    }

    .checkout-form {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .checkout-form__field:nth-child(1),
    .checkout-form__field:nth-child(2),
    .checkout-form__field:nth-child(5) {
        grid-column: auto;
    }

    .checkout-form > .button {
        grid-column: auto;
    }
}

/* =========================
   ПОДСКАЗКИ В ФОРМЕ
========================= */

.checkout-form__hint {
    display: block;

    padding-left: 2px;

    font-size: 10px;
    line-height: 1.5;

    color: var(--color-text-light);
}

.checkout-form__hint::before {
    content: "●";

    margin-right: 6px;

    font-size: 7px;
    vertical-align: 1px;

    color: var(--color-accent);
}