/* ============================================
   Общий стиль корзины
============================================ */
.basket-page {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 15px;
    font-family: Arial, sans-serif;
}

.basket-page h1 {
    font-size: 32px;
    margin-bottom: 25px;
    font-weight: 600;
}


/* ============================================
   Пустая корзина
============================================ */
.basket-empty {
    padding: 40px;
    text-align: center;
    font-size: 20px;
    opacity: 0.7;
}


/* ============================================
   Таблица корзины (десктоп)
============================================ */
.basket-table {
    width: 100%;
    border-collapse: collapse;
}

.basket-table thead {
    background: #f5f5f5;
}

.basket-table th,
.basket-table td {
    padding: 12px 10px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #eaeaea;
}

.basket-img img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 6px;
}

.basket-variant {
    font-size: 13px;
    color: #777;
    margin-top: 4px;
}


/* ============================================
   Qty controls
============================================ */
.basket-qty {
    vertical-align: middle;
    padding: 10px;
}

/* flex ПЕРЕНЕСЁН внутрь */
.qty-controls {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* кнопки */
.qty-minus,
.qty-plus {
    width: 30px;
    height: 30px;
    border: none;
    background: #ddd;
    cursor: pointer;
    font-size: 18px;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.2s;
}

.qty-minus:hover,
.qty-plus:hover {
    background: #ccc;
}

/* input */
.qty-input {
    width: 50px;
    height: 30px;
    text-align: center;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 16px;
}


/* ============================================
   Price + total
============================================ */
.basket-price,
.basket-total {
    font-weight: 600;
}


/* ============================================
   Delete button
============================================ */
.basket-delete {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.2s;
}

.basket-delete:hover {
    opacity: 1;
    color: #c00;
}


/* ============================================
   Summary block
============================================ */
.basket-summary-box {
    margin-top: 25px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    text-align: right;
}

.basket-summary-box strong {
    font-size: 20px;
}

.checkout-btn {
    display: inline-block;
    margin-top: 15px;
    background: #1e88e5;
    padding: 12px 22px;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 18px;
    transition: 0.2s;
}

.checkout-btn:hover {
    background: #1565c0;
}


/* ============================================
   ⬇ MOBILE ADAPTATION ⬇
============================================ */
@media (max-width: 768px) {

    .basket-table thead {
        display: none;
    }

    .basket-table tr {
        display: block;
        background: #fff;
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 12px;
    }

    .basket-table td {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 6px 0;
        border: none;
    }

    .basket-table td::before {
        content: attr(data-label);
        font-weight: 600;
        min-width: 90px;
        color: #555;
    }

    .basket-img {
        justify-content: center;
    }

    .basket-img::before {
        display: none;
    }

    .basket-summary-box {
        text-align: center;
    }

    .checkout-btn {
        width: 100%;
    }
}



/* ============================================
   Extra small screens (phones)
============================================ */
@media (max-width: 480px) {

    .basket-page h1 {
        font-size: 26px;
    }

    .basket-img img {
        width: 70px;
        height: 70px;
    }

    .qty-input {
        width: 40px;
    }
}
