.basket-page {
    padding: 1.5rem 0 3rem;
}

.basket-card,
.basket-summary {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 1.25rem;
}

.basket-card__title,
.basket-summary__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.basket-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.basket-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.basket-item__inner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.basket-item__image {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #fafafa;
}

.basket-item__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.basket-item__main {
    flex: 1;
    min-width: 0;
}

.basket-item__top {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.basket-item__info {
    flex: 1;
    min-width: 0;
}

.basket-item__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

.basket-item__title a {
    color: inherit;
    text-decoration: none;
}

.basket-item__title a:hover {
    color: #80BB01;
}

.basket-item__variant {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 0;
}

.basket-item__prices {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.basket-item__price-old {
    font-size: 0.85rem;
    color: #999;
    text-decoration: line-through;
}

.basket-item__price-current {
    font-size: 0.95rem;
    font-weight: 700;
    color: #80BB01;
}

.basket-item__qty-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.basket-item__qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.basket-item__qty-label {
    font-size: 0.85rem;
    color: #555;
    white-space: nowrap;
}

.basket-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.basket-qty-control button {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    color: #333;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
}

.basket-qty-control button:hover:not(:disabled) {
    background: #e8e8e8;
}

.basket-qty-control button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.basket-qty-control input {
    width: 40px;
    height: 32px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 0.9rem;
    -moz-appearance: textfield;
}

.basket-qty-control input::-webkit-outer-spin-button,
.basket-qty-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.basket-item__delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #fff5f5;
    border: 1px solid #ffd6d6;
    transition: background 0.15s;
    flex-shrink: 0;
}

.basket-item__delete:hover {
    background: #ffe8e8;
}

.basket-item__delete img {
    width: 18px;
    height: 18px;
}

.basket-item__delete--mobile {
    display: none;
}

.basket-item__total {
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
}

.basket-item__total strong {
    font-size: 0.9rem;
    color: #222;
    font-weight: 700;
}

.basket-item__total--mobile {
    display: none;
}

.basket-item__aside {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-inline-start: auto;
    min-width: 80px;
}

.basket-card__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.basket-btn-clear {
    font-size: 0.9rem;
    color: #666;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
}

.basket-btn-clear:hover {
    background: #eee;
    color: #333;
}

.basket-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #80BB01;
    border: 1px solid #80BB01;
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.basket-btn-primary:hover {
    background-color: #6fa001;
    border-color: #6fa001;
    color: #fff;
}

.basket-btn-primary--block {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.basket-summary {
    position: sticky;
    top: 1rem;
}

.basket-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: #555;
}

.basket-summary__row--discount span:last-child {
    color: #80BB01;
    font-weight: 600;
}

.basket-summary__divider {
    border-top: 1px solid #eee;
    margin: 0.75rem 0;
}

.basket-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0 1rem;
}

.basket-summary__total-label {
    font-size: 1rem;
    font-weight: 700;
    color: #222;
}

.basket-summary__total-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #80BB01;
}

.basket-secure {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #f3faeb;
    border: 1px solid #d4edb8;
    border-radius: 8px;
    padding: 0.85rem;
    margin-top: 1rem;
}

.basket-secure__icon {
    color: #80BB01;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.basket-secure__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #4a7a00;
    margin-bottom: 0.15rem;
}

.basket-secure__text {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.basket-empty {
    text-align: center;
    padding: 3rem 1.5rem;
}

.basket-empty__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.25rem;
}

.basket-item__total--desktop strong {
    display: block;
    margin-top: 0.15rem;
}

@media (min-width: 992px) {
    .basket-item__inner {
        display: grid;
        grid-template-columns: 90px 1fr auto;
        grid-template-rows: auto auto;
        flex: 1;
        align-items: start;
        gap: 0 1rem;
        flex-wrap: unset;
    }

    .basket-item__image {
        grid-column: 1;
        grid-row: 1 / 3;
    }

    .basket-item__main {
        grid-column: 2;
        grid-row: 1;
    }

    .basket-item__qty-row {
        grid-column: 2;
        grid-row: 2;
        margin-top: 0;
    }
}

@media (max-width: 991.98px) {
    .basket-summary {
        position: static;
    }

    .basket-item {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }

    .basket-item__inner {
        width: 100%;
    }

    .basket-item__image {
        width: 80px;
        height: 80px;
    }

    .basket-item__delete--mobile {
        display: flex;
    }

    .basket-item__aside {
        display: none;
    }

    .basket-item__qty-row {
        flex-basis: 100%;
        width: 100%;
        justify-content: space-between;
        margin-top: 0.75rem;
    }

    .basket-item__total--mobile {
        display: block;
        text-align: left;
    }

    .basket-card__footer {
        flex-direction: row;
        justify-content: stretch;
        gap: 0.75rem;
    }

    .basket-card__footer .basket-btn-primary {
        flex: 1;
        text-align: center;
    }

    .basket-card__footer .basket-btn-clear {
        flex: 0 0 auto;
        width: auto;
    }
}

@media (max-width: 575.98px) {
    .basket-page {
        padding: 1rem 0 2rem;
    }

    .basket-card,
    .basket-summary {
        padding: 1rem;
        border-radius: 10px;
    }

    .basket-item__image {
        width: 72px;
        height: 72px;
    }

    .basket-item__title {
        font-size: 0.9rem;
    }

    .basket-card__footer .basket-btn-clear {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}
