/* КНОПКА С ИКОНКОЙ */
.cart-flyout-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    width: 64px;
    height: 64px;
    background-color: #ff6d4a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 7px 23px #ff6d4a94;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cart-flyout-toggle:hover {
    transform: scale(1.05);
    background-color: #fe5c34;
    cursor: pointer;
}

.cart-flyout-toggle svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
    cursor: pointer;
}

.cart-flyout-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background-color: #fff;
    color: #414141;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    line-height: 20px;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #ff6d4a;
}

/* Скрыть кнопку, если пусто */
.cart-flyout-toggle.hidden {
    display: none !important;
}

/* ЗАТЕМНЕНИЕ */
.cart-flyout-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999998;
}

/* ВЫЕЗЖАЮЩАЯ КОРЗИНА */
.cart-flyout {
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(100%);
    width: 400px;
    height: 100%;
    background: #ffffff;
    z-index: 999999;
    transition: transform 0.4s ease;
    padding: 24px 24px 100px;
    box-shadow: -8px 0 20px rgba(0, 0, 0, 0.1);
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    display: flex;
    flex-direction: column;
}

.cart-flyout.open {
    transform: translateX(0);
}

/* АДАПТИВНОСТЬ ДЛЯ ФЛАУТА */
@media screen and (max-width: 1024px) {
    .cart-flyout {
        width: 85% !important;
        max-width: 400px;
        right: 0;
        border-radius: 20px 0 0 20px !important;
    }
}

@media screen and (max-width: 768px) {
    .cart-flyout {
        width: 100%;
        padding: 24px 16px 100px;
        border-radius: 0;
    }
}

/* ЗАКРЫТЬ (КРЕСТИК) */
.cart-flyout-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 37px;
    font-weight: bold;
    color: #999999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.cart-flyout-close:hover {
    color: #333333;
}

/* ЗАГОЛОВОК */
.cart-flyout-title {
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 10px;
    margin-bottom: 20px;
    color: #2c3e50 !important;
}

/* ОБЛАСТЬ ТОВАРОВ */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 140px; /* отступ под футер */
}

/* КАРТОЧКА ТОВАРА */
.cart-items .item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 14px;
    background: #f9fafb;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    position: relative; /* для крестика */
}

/* миниатюра товара слева */
.cart-items .item img {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 14px;
    object-fit: cover;
    display: block;
}

/* текстовая часть */
.cart-items .item-title {
    flex: 1 1 auto;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 21px;
    margin-bottom: 4px;
    max-width: 190px;
    margin-right: 16px;
}

.cart-items .item-title a {
    color: #002915;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.cart-items .item-title a:hover {
    text-decoration: underline;
}

/* цена - справа */
.cart-items .item-price {
    font-size: 15px;
    font-weight: 500;
    color: #5f5f5f !important;
    margin-bottom: 6px;
    margin-left: auto;
    text-align: left;
}

/* дополнительная мета (если появится) */
.cart-items .item-meta {
    margin-bottom: 3px;
}

.cart-items .item-meta small {
    color: #6c7a89;
    font-size: 13px;
}

/* Крестик удаления: темный по умолчанию, красный при наведении */
.cart-items .remove-item {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    border: none;
    background: none;
    cursor: pointer;

    /* скрываем текст */
    font-size: 0;
    line-height: 0;
    color: transparent;
    overflow: visible;
    z-index: 50;
}

.cart-items .remove-item::after {
    content: "×";
    font-size: 22px;
    font-weight: 600;
    line-height: 22px;
    color: #333333;
    display: block;
    text-align: center;
}

.cart-items .remove-item:hover::after {
    color: #d63031;
}

/* ФУТЕР КОРЗИНЫ */
.cart-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 24px;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    border-top: 1px solid #eeeeee;
    z-index: 100000000;
	border-radius: 20px !important;
}

/* ИТОГО */
.cart-total {
    font-size: 16.5px !important;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 20px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* КНОПКА ОФОРМИТЬ ЗАКАЗ (оранжевая) */
.checkout-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: #ff6d4a;
    color: #ffffff;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    border-radius: 14px;
    text-decoration: none;
    transition: background 0.3s ease;
    box-shadow: 2px 15px 30px #C84B2C45;
}

.checkout-btn:hover {
    background: #fc6c43;
}

/* кастомная кнопка добавления (если используется) */
.flyout-add-button.button.alt {
    display: inline-block;
    color: #ffffff !important;
    background-color: #00562e !important;
    background-image: linear-gradient(180deg, #00562e 0%, #004221 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 18px !important;
    font-family: '', sans-serif !important;
    font-weight: 700 !important;
    padding: 12px 22% 10px 22% !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease !important;
    cursor: pointer;
    top: -45px;
}

.flyout-add-button.button.alt:hover {
    background-image: linear-gradient(180deg, #006333 1%, #004221 100%) !important;
    filter: brightness(0.95);
}

/* Адаптив под кнопку checkout */
@media screen and (max-width: 768px) {
    .checkout-btn {
        width: 100% !important;
        margin: 20px auto 0;
    }
}

@media screen and (max-width: 1024px) {
    .checkout-btn {
        width: 100%;
        margin: 0 auto;
    }
}
