/* Основной контейнер */
.basket-page {
    max-width: 1650px;
    margin: 40px auto 80px;
    padding: 0 20px;
    font-family: 'Inter', Arial, sans-serif;
    color: #1a1a1a;
}

.basket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.basket-page__title {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

/* Кнопка Оформить (сверху) */
.basket-btn--outline {
    background: #fff;
    color: #2A2D4D;
    border: 2px solid #2A2D4D;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.basket-btn--outline:hover {
    background: #2A2D4D;
    color: #fff;
}

/* ============ СЕТКА 2 КОЛОНКИ ============ */
.basket-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

.basket-main {
    min-width: 0;
}

.basket-sidebar {
    position: sticky;
    top: 100px; /* Отступ от верха при скролле */
}

/* Верхняя панель (Кол-во товаров) */
.basket-topbar {
    background: #2A2D4D;
    border-radius: 8px 8px 0 0;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.basket-count {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
}
.basket-clear-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 6px 16px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.basket-clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

/* Обертка списка товаров */
.basket-items-wrapper {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Карточка товара */
.basket-item {
    display: flex;
    align-items: flex-start;
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
    transition: opacity 0.3s;
    gap: 24px;
}
.basket-item:last-child {
    border-bottom: none;
}

/* Картинка */
.basket-item__image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-radius: 8px;
    padding: 8px;
    border: 1px solid #f3f4f6;
}
.basket-item__image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}
.basket-item__noimg {
    width: 100%; height: 100%; background: #e5e7eb; border-radius: 4px;
}

/* Инфо-блок */
.basket-item__info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 4px;
}
.basket-item__name {
    display: block;
    color: #2A2D4D;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.2s;
}
.basket-item__name:hover { 
    color: #4B5563; 
}

/* Теги свойств */
.basket-item__props {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.basket-prop-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    color: #4B5563;
    background: #f9fafb;
}
.basket-prop-tag--active {
    border-color: #2A2D4D;
    color: #2A2D4D;
    background: #eef2ff;
}
.basket-prop-tag--article {
    border-color: transparent;
    background: #f3f4f6;
    color: #6B7280;
}
.basket-prop-tag b { font-weight: 600; color: #111827; }
.basket-prop-tag--active b { color: #2A2D4D; }

/* ВАРИАНТЫ (Кнопки диаметров) */
.basket-item__variants {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}
.variants-label {
    font-size: 13px;
    color: #6B7280;
    font-weight: 500;
    margin-right: 4px;
}
.variant-btn {
    background: #fff;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 40px;
    text-align: center;
}
.variant-btn:hover:not(:disabled) {
    border-color: #2A2D4D;
    color: #2A2D4D;
}
.variant-btn.active {
    border-color: #2A2D4D;
    background: #2A2D4D;
    color: #fff;
}
.variant-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Подсказка Кол-во, м */
.basket-item__step {
    font-size: 13px;
    color: #6B7280;
}
.basket-item__step b { color: #111827; }

/* Цена базовая */
.basket-item__price-base {
    font-size: 14px;
    color: #6B7280;
}

/* Блок управления */
.basket-item__controls {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
    flex-shrink: 0;
}

/* ============ НОВЫЙ СТЕППЕР +/- ============ */
.basket-qty {
    display: flex;
    align-items: center;
    border: 1px solid #D1D5DB;
    border-radius: 8px; /* Чуть больше закругление */
    overflow: hidden;
    height: 38px; /* Сделали чуть компактнее */
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* Легкая тень для объема */
}

.basket-qty__btn {
    width: 38px; /* Квадратные кнопки */
    height: 100%;
    border: none;
    background: #F9FAFB; /* Светло-серый фон кнопок */
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    color: #4B5563;
    padding: 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.basket-qty__btn:hover:not(:disabled) { 
    background: #E5E7EB; 
    color: #111827;
}

.basket-qty__btn:disabled { 
    cursor: not-allowed; 
    opacity: 0.5; 
}

.basket-qty__input {
    width: 70px; /* Увеличили ширину с 55px до 70px */
    min-width: 70px; /* Защита от сжатия */
    height: 100%;
    border: none;
    border-left: 1px solid #D1D5DB;
    border-right: 1px solid #D1D5DB;
    text-align: center;
    font-size: 15px; /* Сделали шрифт чуть меньше, чтобы 4 знака влезали */
    font-weight: 600;
    outline: none;
    color: #111827;
    background: #fff;
    padding: 0;
}

/* Итоговая сумма за строку */
.basket-item__sum {
    display: none;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    min-width: 120px;
    text-align: right;
}

/* Кнопка удаления */
.basket-item__remove {
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}
.basket-item__remove:hover:not(:disabled) { 
    color: #EF4444; 
    background: #FEF2F2;
}
.basket-item__remove:disabled { cursor: not-allowed; opacity: 0.5; }

/* ============ БЛОК ИТОГОВ ============ */
.basket-summary {
    padding: 32px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.basket-summary__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #2A2D4D;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}
.basket-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 16px;
    color: #4B5563;
}
.basket-summary__row--total {
    display: none !important;
    border-top: 1px solid #e5e7eb;
    margin-top: 12px;
    padding-top: 20px;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

/* Кнопки */
.basket-btn {
    display: inline-block;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    margin-top: 24px;
    width: 100%;
    transition: background 0.2s;
}
.basket-btn--primary {
    background: #2A2D4D;
    color: #fff;
}
.basket-btn--primary:hover { background: #1f2139; }

/* Пустая корзина / Загрузка */
.basket-empty, .basket-loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #6B7280;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.basket-empty p {
    margin-bottom: 20px;
}
.basket-empty .basket-btn {
    display: inline-block;
    width: auto;
    margin-top: 0;
}

/* ============ УВЕДОМЛЕНИЕ (UNDO) ============ */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #2A2D4D;
    color: #fff;
    padding: 14px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 9999;
}
.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.toast-btn {
    background: #fff;
    color: #2A2D4D;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.toast-btn:hover {
    background: #f3f4f6;
}

/* ============ АДАПТИВ ============ */
@media (max-width: 1100px) {
    .basket-layout {
        grid-template-columns: 1fr 320px;
    }
}
@media (max-width: 992px) {
    .basket-layout {
        grid-template-columns: 1fr;
    }
    .basket-sidebar {
        position: static;
        margin-top: 20px;
    }
    .basket-item {
        flex-wrap: wrap;
    }
    .basket-item__controls {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px dashed #e5e7eb;
    }
}
@media (max-width: 576px) {
    .basket-page {
        padding: 0 15px;
        margin: 20px auto 40px;
    }
    .basket-page__title {
        font-size: 24px;
    }
    .basket-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .basket-item__image {
        width: 70px;
        height: 70px;
    }
    .basket-summary {
        padding: 20px;
    }
}