/* Основные стили корзины */
.cart-page {
    padding: 30px 0 60px;
}

.breadcrumbs {
    background: #f8f9fa;
    padding: 15px 0;
    margin-bottom: 30px;
}

.breadcrumbs ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.breadcrumbs li {
    margin-right: 10px;
    color: #6c757d;
}

.breadcrumbs li:after {
    content: '/';
    margin-left: 10px;
    color: #6c757d;
}

.breadcrumbs li:last-child:after {
    display: none;
}

.breadcrumbs a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: #0056b3;
}

/* Макет корзины */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.cart-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 15px;
    color: #212529;
}

.cart-steps {
    display: flex;
    gap: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6c757d;
}

.step.active {
    color: #212529;
    font-weight: 500;
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.step.active .step-number {
    background: #007bff;
    color: white;
}

/* Изменение цвета текста на белый для указанных элементов */
.step-text,
.service-content p {
    color: white !important;
}

/* Изменение цвета текста на голубой для указанных элементов */
.services-title,
.service-content h4 {
    color: #3498db !important;
}

/* Пустая корзина */
.empty-cart {
    text-align: center;
    padding: 50px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 30px;
}

.empty-icon {
    font-size: 48px;
    color: #adb5bd;
    margin-bottom: 20px;
}

.empty-cart h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #212529;
}

.empty-cart p {
    color: #6c757d;
    margin-bottom: 20px;
}

/* Список товаров */
.cart-items {
    margin-bottom: 30px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s;
}

.cart-item:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.item-image {
    width: 100px;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px;
    color: #212529;
}

.item-meta {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 10px;
}

.item-actions {
    display: flex;
    gap: 15px;
}

.item-action {
    background: none;
    border: none;
    color: #007bff;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.3s;
}

.item-action:hover {
    color: #0056b3;
    text-decoration: underline;
}

.item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.current-price {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}

.old-price {
    font-size: 14px;
    color: #6c757d;
    text-decoration: line-through;
}

.item-quantity {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.quantity-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.quantity-input {
    width: 40px;
    text-align: center;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.remove-item {
    color: #dc3545;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.remove-item:hover {
    color: #c82333;
}

/* Дополнительные услуги */
.cart-services {
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 30px;
}

.services-title {
    font-size: 18px;
    margin: 0 0 15px;
    color: #212529;
}

.service-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f8f9fa;
}

.service-item:last-child {
    border-bottom: none;
}

.service-checkbox {
    margin-top: 3px;
}

.service-checkbox input {
    display: none;
}

.service-checkbox label {
    display: block;
    width: 20px;
    height: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.service-checkbox input:checked + label {
    background: #007bff;
    border-color: #007bff;
}

.service-checkbox input:checked + label:after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.service-content h4 {
    font-size: 16px;
    margin: 0 0 5px;
    color: #212529;
}

.service-content p {
    font-size: 13px;
    color: #6c757d;
    margin: 0 0 5px;
}

.service-price {
    font-size: 14px;
    font-weight: 600;
    color: #28a745;
}

/* Блок итого */
.cart-summary {
    position: relative;
}

.summary-card {
    position: sticky;
    top: 20px;
    padding: 20px;
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.summary-title {
    font-size: 20px;
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    color: #212529;
}

.summary-details {
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #6c757d;
}

.discount {
    color: #28a745;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    margin: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}

.total-price {
    color: #007bff;
    font-size: 20px;
}

.checkout-btn {
    margin-bottom: 20px;
}

.delivery-options {
    margin-bottom: 20px;
}

.delivery-options h4 {
    font-size: 16px;
    margin: 0 0 15px;
    color: #212529;
}

.delivery-option {
    margin-bottom: 10px;
}

.delivery-option input {
    display: none;
}

.delivery-option label {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.delivery-option input:checked + label {
    border-color: #007bff;
    background: rgba(0,123,255,0.05);
}

.delivery-option i {
    margin-right: 10px;
    color: #6c757d;
    width: 20px;
    text-align: center;
}

.delivery-option input:checked + label i {
    color: #007bff;
}

.delivery-option span {
    flex: 1;
}

.delivery-price {
    font-weight: 600;
    color: #212529;
}

.promo-code {
    margin-bottom: 20px;
}

.promo-code h4 {
    font-size: 16px;
    margin: 0 0 10px;
    color: #212529;
}

.promo-input {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.promo-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.promo-error {
    font-size: 13px;
    color: #dc3545;
    min-height: 18px;
}

.secure-payment {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.secure-icon {
    color: #28a745;
    font-size: 24px;
    margin-bottom: 10px;
}

.secure-payment p {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 10px;
}

.payment-methods {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.payment-methods img {
    height: 20px;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
}

.modal-body {
    padding: 30px;
    text-align: center;
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.modal-icon.success {
    color: #28a745;
}

.modal-icon.error {
    color: #dc3545;
}

.modal-title {
    font-size: 20px;
    margin: 0 0 10px;
    color: #212529;
}

.modal-text {
    font-size: 15px;
    color: #6c757d;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

/* Адаптивность */
@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
    
    .summary-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
    }
    
    .item-price {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-top: 1px solid #eee;
        padding-top: 15px;
        margin-top: 15px;
    }
}

@media (max-width: 576px) {
    .cart-steps {
        gap: 10px;
    }
    
    .step-text {
        display: none;
    }
    
    .promo-input {
        flex-direction: column;
    }
    
    .promo-input button {
        width: 100%;
    }
}