/* модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.534);
    cursor: pointer;

}

.modal-content {
    position: relative;
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}


.modal-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    background: transparent;
    border: none;
    display: block;
    width: 50px;
    height: 50px;
    text-align: center;
    line-height: 50px;
}

.close-modal:hover {
    color: #8cbbd1;
}





/* модальное окно для оформления заказа */

.checkout-modal {
    display: none;
    position: fixed;
    top: 30px;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    font-family: mainFont, sans-serif;
    overflow-y: auto;
}

.checkout-modal__content {
    background: white;
    max-width: 900px;
    border-radius: 15px;
    width: 100%;
    padding: 30px;
    margin: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.checkout-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #8cbbd1;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.checkout-modal__header h2 {
    margin: 0;
    font-size: 24px;
    color: #2c3e50;
}

.checkout-modal__close {
    font-size: 36px;
    font-weight: bold;
    color: #2c3e50;
    cursor: pointer;
    transition: color 0.2s;
}



/* Тело модального окна - две колонки */
.checkout-modal__body {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

/* Левая колонка - товар */
.checkout-modal__product {
    flex: 1;
    min-width: 200px;
    padding: 10px 0;
    text-align: left;
}




.checkout-products-list {
    max-height: 650px;
    overflow-y: auto;
}

.checkout-product-item {
    padding-bottom: 10px;
    padding-top: 10px;
    border-bottom: 1px solid rgba(140, 187, 209, 0.533);
}

.checkout-product-item:last-child {
    border-bottom: none;
}

.checkout-product-item__name {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 4px;
}

.checkout-product-item__price {
    font-size: 18px;
    font-weight: 400;
    color:  #2c3e50;
}

.checkout-total-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid #8cbbd1;
    font-weight: bold;
    font-size: 18px;
}





.checkout-product__info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.checkout-product__name {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
}

.checkout-product__price {
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
}

/* Правая колонка - форма */
.checkout-modal__form {
    flex: 2;
    min-width: 300px;
}

.checkout-form__group {
    margin-bottom: 20px;
}

.checkout-form__group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.checkout-form__group input[type="text"],
.checkout-form__group input[type="email"],
.checkout-form__group input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #8cbbd1;
    border-radius: 8px;
    font-family: mainFont, sans-serif;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
}

.checkout-form__group input:focus {
    border-color: #51879e;
}
.form-hint {
    display: block;
    font-size: 11px;
    color: rgba(153, 153, 153, 0.822)e50;
    margin-top: 5px;
}

/* Радио кнопки */
.checkout-radio__group {
    display: flex;
    gap: 15px;
    margin-top: 8px;
}



.payment-btn, .delivery-btn {
    background: #ffffff;
    border: 2px solid #8cbbd1;
    color: #51879e;
    padding: 10px 20px;
    cursor: pointer;
    font-family: mainFont;
    font-size: 14px;
    transition: all 0.2s;
}

.payment-btn.active, .delivery-btn.active {
    background: #8cbbd1;
    color: white;

}



/* Итоговая сумма */
.checkout-form__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 2px solid #8cbbd1;
    margin-top: 20px;
    font-weight: bold;
    font-size: 24px;
    color: #2c3e50;
}



.checkout-total__price {
    color:  #2c3e50;
    font-size: 24px;
}

/* Кнопка "Оформить" */
.checkout-submit__btn {
    width: 100%;
    background: #2c3e50;
    color: white;
    border: none;
    padding: 14px;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    margin-top: 15px;
    margin-bottom: 15px;
}

.checkout-submit__btn:hover {
    background: #1a2a3a;
}



/* стили для блока с аккаунтом */
.profile-dropdown {
    background: white;
    border: 1px solid #8cbbd1;
    font-family: mainFont;
    position: absolute;
    top: 80px;
    right: 50px;
    padding: 15px;
    width: 200px;
    z-index: 5;
    visibility: hidden;
    transform: translate(0px, 20px);
    border-radius: 10px;
    text-align: center;
}

.profile-dropdown._active {
    opacity: 1;
    visibility: visible;
    transform: translate(0px, 0px);
}

.profile-name {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    /* padding-bottom: 10px; */
}

.profile-logout__btn {
    background-color: #8cbbd1;
    color: #fff;
    border: none;
    padding: 12px 22px;
    cursor: pointer;
    font-weight: 400;
    font-size: 13px;
    width: 100%;
}

.profile-logout__btn:hover {
    background: #51879e;
}



/* Адаптация для мобильных */
@media (max-width: 768px) {
    .checkout-modal__body {
        flex-direction: column;
        gap: 10px;
    }

    .cart-header__body {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        margin: 0 auto;
        width: 85%;
        max-width: 350px;
        max-height: 300px;
    }

    .checkout-products-list {
        max-height: 200px;
    }

    .profile-dropdown {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        margin: 0 auto;
        width: 85%;
        max-width: 200px;
    }

    .profile-name {
    font-size: 15px;
    }

    .profile-logout__btn {
    font-size: 12px;
}


}


