.ms-cart-action-block {
    margin: 15px 0 20px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.ms-qty-label {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 5px;
}

.ms-quantity-input {
    font-weight: bold;
    text-align: center;
}

.ms-add-to-cart {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 10px 15px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.ms-btn-danger {
    background-color: #28ae5d;
    border: 1px solid #28ae5d;
    color: #fff !important;
}

.ms-btn-danger:hover {
    background-color: #1f8f4b;
    border-color: #1f8f4b;
    color: #fff !important;
    text-decoration: none;
}

.ms-btn-success {
    background-color: #28a745;
    border: 1px solid #28a745;
    color: #fff !important;
}

.ms-btn-success:hover {
    background-color: #218838;
    border-color: #218838;
    color: #fff !important;
    text-decoration: none;
}

.ms-cart-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
    text-decoration: none !important;
    border-radius: 4px;
    transition: background 0.2s;
}

.ms-cart-link--mobile {
    margin-top: 12px;
}

.ms-cart-link--desktop {
    margin-right: 10px;
}

.ms-cart-link i {
    font-size: 22px;
    color: #fff;
}

.ms-cart-link--mobile i {
    color: #28ae5d;
}

.ms-cart-link:hover {
    background: rgba(0, 0, 0, 0.2);
}

.ms-cart-link:hover i {
    color: #d4f0e2;
}

.ms-cart-link--mobile:hover i {
    color: #1f8f4b;
}

.ms-cart-count {
    display: none;
    background: #28ae5d;
    color: #fff;
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 9px;
    text-align: center;
    font-weight: bold;
    font-family: sans-serif;
    padding: 0 4px;
}

@media (max-width: 767px) {
    .ms-add-to-cart {
        margin-top: 10px;
        font-size: 14px;
        padding: 8px 10px;
    }

    .ms-cart-action-block .col-xs-6 {
        padding-left: 5px;
        padding-right: 5px;
    }
}

.ms-cart-page {
    margin-bottom: 40px;
}

.ms-cart-table th {
    background-color: #f5f5f5;
}

.ms-cart-table td {
    vertical-align: middle !important;
}

.ms-cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #eee;
}

.ms-cart-item-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    display: block;
    word-break: break-word;
}

.ms-cart-item-name:hover {
    color: #28ae5d;
    text-decoration: underline;
}

.ms-cart-qty {
    width: 80px !important;
    display: inline-block !important;
    text-align: center;
}

.ms-cart-total-wrapper {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
    border: 1px solid #eee;
}

.ms-cart-total-sum {
    font-size: 24px;
    font-weight: bold;
    color: #28ae5d;
}

.ms-remove-item {
    color: #218838;
    font-size: 18px;
    text-decoration: none !important;
}

.ms-remove-item:hover {
    color: #1e6a2e;
}

.ms-cart-table {
    table-layout: fixed;
    width: 100%;
    word-break: break-word;
}

.ms-cart-table td, .ms-cart-table th {
    overflow: hidden;
}

@media (max-width: 767px) {
    .ms-cart-table thead {
        display: none;
    }

    .ms-cart-table tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #eee;
        padding: 10px;
    }

    .ms-cart-table td {
        display: block;
        text-align: right;
        border-bottom: 1px solid #f4f4f4;
        position: relative;
        padding-left: 45% !important;
        min-height: 45px;
        line-height: 25px;
        box-sizing: border-box;
    }

    .ms-cart-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 40%;
        text-align: left;
        font-weight: bold;
        color: #666;
    }

    .ms-cart-table td[data-label="Фото"] {
        padding-left: 10px !important;
        text-align: center;
    }

    .ms-cart-table td[data-label="Фото"]:before {
        display: none;
    }

    .ms-cart-qty {
        width: 100% !important;
        max-width: 120px;
    }

    .ms-cart-total-wrapper {
        text-align: center !important;
    }
}
