﻿/* =====================================
   СТОРІНКА КОШИКА
   ===================================== */

.cart-page {
    min-height: 70vh;
    padding: 55px 0 80px;
    background: #f8f6f3;
    color: #1f1f1f;
}

.cart-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

.cart-title {
    margin: 0;
    font-size: 38px;
    font-weight: 700;
}

.cart-subtitle {
    margin: 7px 0 0;
    color: #77716c;
}

.cart-clear-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: #7d756f;
}

    .cart-clear-button:hover {
        color: #b02a37;
    }


/* =====================================
   ПОРОЖНІЙ КОШИК
   ===================================== */

.cart-empty {
    max-width: 620px;
    margin: 45px auto;
    padding: 65px 30px;
    border: 1px solid #e4ded8;
    border-radius: 22px;
    background: #ffffff;
    text-align: center;
}

.cart-empty-icon {
    margin-bottom: 18px;
    font-size: 46px;
    color: #8b5e3c;
}

.cart-empty h2 {
    font-size: 27px;
    font-weight: 700;
}

.cart-empty p {
    max-width: 420px;
    margin: 14px auto 25px;
    color: #77716c;
}


/* =====================================
   ПОЗИЦІЇ КОШИКА
   ===================================== */

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    border: 1px solid #e2dcd6;
    border-radius: 18px;
    background: #ffffff;
}

.cart-item-image-link {
    display: block;
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 13px;
    background: #f5f2ef;
}

.cart-item-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 30px;
    color: #aaa39d;
}

.cart-item-information {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.cart-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.cart-item-title {
    color: #1f1f1f;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
}

    .cart-item-title:hover {
        color: #8b5e3c;
    }

.cart-item-properties {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 12px;
    color: #756e69;
    font-size: 14px;
}

    .cart-item-properties strong {
        color: #2b2927;
        font-weight: 500;
    }

.cart-remove-button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f4f0ed;
    color: #756e69;
}

    .cart-remove-button:hover {
        background: #f5dddd;
        color: #b02a37;
    }

.cart-unavailable {
    margin: 12px 0;
    color: #b02a37;
    font-size: 14px;
}

.cart-item-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
}

.cart-quantity-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .cart-quantity-form label {
        color: #756e69;
        font-size: 14px;
    }

    .cart-quantity-form .form-select {
        width: 75px;
    }

.cart-item-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.cart-unit-price {
    color: #827a74;
    font-size: 13px;
}

.cart-item-total {
    font-size: 21px;
}


/* =====================================
   ПІДСУМОК
   ===================================== */

.cart-summary {
    position: sticky;
    top: 25px;
    padding: 26px;
    border: 1px solid #ded7d1;
    border-radius: 18px;
    background: #ffffff;
}

    .cart-summary h2 {
        margin-bottom: 24px;
        font-size: 25px;
        font-weight: 700;
    }

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
    color: #716a65;
}

.cart-summary-total {
    margin: 10px 0 24px;
    padding-top: 20px;
    border-top: 1px solid #ded7d1;
    color: #1f1f1f;
    font-size: 21px;
}

    .cart-summary-total strong {
        font-size: 27px;
    }

.cart-continue-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 18px;
    color: #756e69;
    text-decoration: none;
}

    .cart-continue-link:hover {
        color: #1f1f1f;
    }


/* =====================================
   МОБІЛЬНА ВЕРСІЯ
   ===================================== */

@media (max-width: 767.98px) {
    .cart-page {
        padding: 32px 0 55px;
    }

    .cart-heading {
        align-items: flex-start;
        margin-bottom: 24px;
    }

    .cart-title {
        font-size: 30px;
    }

    .cart-clear-button {
        font-size: 13px;
    }

    .cart-item {
        grid-template-columns: 105px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
        border-radius: 14px;
    }

    .cart-item-image-link {
        height: 105px;
    }

    .cart-item-title {
        font-size: 15px;
    }

    .cart-item-properties {
        flex-direction: column;
        gap: 2px;
        margin-top: 7px;
        font-size: 12px;
    }

    .cart-item-bottom {
        grid-column: 1 / -1;
        margin-top: 14px;
    }

    .cart-quantity-form label {
        display: none;
    }

    .cart-item-total {
        font-size: 18px;
    }

    .cart-summary {
        position: static;
        padding: 22px;
    }
}
