/* Основной контейнер */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Roboto', sans-serif; 
}

.cart-content {
    width: 100%;
    display: flex;
    flex-direction: row;
}

.continue-shopping {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #5a677a;
    font-weight: 600;
    font-size: 15px;
    padding: 12px 24px;
    border: 2px solid #5a677a;
    border-radius: 5px;
    transition: all 0.1s ease;
    margin-top: 20px;
}

.continue-shopping:hover {
    background: #5a677a;
    color: white;
    transform: translateX(-5px);
}

.cart-items {
    margin-right: 0;
    margin-bottom: 20px;
    flex: 1;
}
/* Шаги */
.cart-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    font-size: 16px;
    gap: 30px;
    color: #555555;
}

.cart-steps .step::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #ddd;
    border-radius: 50%;
}
.cart-steps .step.active {

    color: black;
    font-weight: bold;

}

.step a {
    text-decoration: none;
    color: black;
}

.cart-steps .step.active::before {
    background: #fff;
}

/* Таблица товаров */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
    table-layout: fixed;

}
.cart-table th,
.cart-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}
.cart-table th {
    font-weight: bold;
    color: #777777;
    font-size: 14px;
}

/* Задаем фиксированные ширины для столбцов */
.cart-table th:nth-child(1), /* Товар */
.cart-table td:nth-child(1) {
    width: 40%; /* Ширина для названия товара */
}

.cart-table th:nth-child(2), /* Цена */
.cart-table td:nth-child(2) {
    width: 15%;
    text-align: right;
}

.cart-table th:nth-child(3), /* Скидка */
.cart-table td:nth-child(3) {
    width: 15%;
    text-align: right;
}

.cart-table th:nth-child(4), /* Подытог */
.cart-table td:nth-child(4) {
    width: 15%;
    text-align: right;
}

.cart-table th:nth-child(5), /* Удалить */
.cart-table td:nth-child(5) {
    width: 15%;
    text-align: center;
}

.cart-table thead {
    border-bottom: 3px solid #eee;
}


.cart-table .product-info {
    display: flex;
    align-items: start;
    gap: 10px;
}


.cart-table .product-info img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}
.cart-table .remove-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #CCCCCC;
    padding: 0px 6px;
    border: 3px solid #CCCCCC;
    border-radius: 18px;
}

.subtotal, .price {
    font-weight: bold;
    width: 100%;
}

.discount {
    width: 100%;
    color:#777777;
}

.cart-table .remove-btn:hover {
    color: black;
    border: 3px solid black;
}

/* Сводка корзины */
.cart-summary {
    border-left: 1px solid #ddd;
    margin-left: 20px;
    padding-left: 30px;
    width: 100%;
    max-width: 300px;
    flex-shrink: 0; /* Запрещаем сжатие */
}


.cart-summary h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 14px;
    border: 3px solid #777777;
    padding: 4px 4px;
    border-bottom: 3px solid #ddd;
    color: #777777;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}
.summary-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

#cart-subtotal, #cart-total {
    font-weight: bold;
    font-size: 14px;
    color: black;
}

.summary-row span {
    font-size: 14px;
    color: #777777;
}

.checkout-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    font-weight: 600;
    font-size: 16px;
    border: none;
    border-radius: 6px ;
    cursor: pointer;
    margin-top: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.2);
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.3);
}

.checkout-btn:active {
    transform: translateY(0);
}
/* Пустая корзина */
.empty-cart {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}
.empty-cart p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}
.btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background: #5a677a;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.2s ease;
}
.btn-primary:hover {
    background: #4a5768;
}

/* Адаптивность */
@media (max-width: 768px) {
    .cart-content {
        flex-direction: column;

    }
    .cart-items {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
        overflow-x: auto;
        height: 100%;
    }
    .cart-table {
        table-layout: auto; /* На мобильных возвращаем автоматическую ширину */
        min-width: 400px; /* Минимальная ширина таблицы */
    }
    .cart-summary {
        width: 100%;
        max-width: 700px;
        margin-top: 50px;

    }
    .cart-table th,
    .cart-table td {
        padding: 8px;
        font-size: 12px !important;
    }

    .cart-summary {
        border-left: none;
        padding: 0px;
        padding-left: 0px;
        margin-left: 0px;
    }

    .cart-table th:nth-child(1),
    .cart-table td:nth-child(1) {
        width: 35%;
    }
    
    .cart-table th:nth-child(2),
    .cart-table td:nth-child(2),
    .cart-table th:nth-child(3),
    .cart-table td:nth-child(3),
    .cart-table th:nth-child(4),
    .cart-table td:nth-child(4) {
        width: 20%;
    }
    
    .cart-table th:nth-child(5),
    .cart-table td:nth-child(5) {
        width: 5%;
    }

    .checkout-btn {
        margin-top: 10px !important;

    }
}



/* === Форма оформления заказа === */

.checkout-content {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.checkout-form {
    width: 60%;
    padding: 20px;
    background: #fff;
    border-top: 2px solid #ddd;
}

.checkout-form h3 {
    font-size: 14px;
    color: #777777;
    margin-bottom: 15px;
    padding: 4px 4px;
    border: 3px solid #777777;
    border-bottom: 3px solid #ddd;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row.full-width input,
.form-row.full-width textarea {
    width: 100%;
}

.form-row input,
.form-row textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-row textarea {
    min-height: 80px;
    resize: vertical;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background: #555555;
    color: white;
    font-weight: bold;
    border: none;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.2s ease;
}

.checkout-btn:hover {
    background: #3a3a3a;
}

.privacy-note {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    text-align: center;
}

.privacy-note a {
    color: #555555;
    text-decoration: underline;
}

/* === Блок "Ваш заказ" === */

.order-summary {
    width: 40%;
    padding: 20px;
    border: 2px solid #647284;

}

.order-summary h3 {
    font-size: 14px;
    color: #777777;
    margin-bottom: 15px;
    padding: 4px 4px;
    border: 3px solid #777777;
    border-bottom: 3px solid #ddd;
}

.order-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

.order-table th,
.order-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.order-table td.d {
    color: #777777;
}

.order-table th {
    font-weight: bold;
    color: #777777;
    font-size: 14px;
    border-bottom: 3px solid #eee;
}

.order-table tfoot tr {
    border-top: 2px solid #ddd;
}

.order-table tfoot td {
    font-weight: bold;
    font-size: 14px;
    color: black;
}


.no-payment {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 3px solid #ddd;
}

/* === Адаптивность === */

@media (max-width: 992px) {
    .checkout-content {
        flex-direction: column;
    }

    .checkout-form,
    .order-summary {
        width: 100%;
    }

    .form-row textarea {
        flex: 1;
        padding: 0px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    .checkout-form {
        padding: 0px;
    }
    .checkout-btn {
        width: 90%;
        margin: 0px 5%;
    }
    .order-summary {
        padding: 0px;
    }
    .cart-steps {
        font-size: 11px;
     }
}


.checkout-content h3 {
    border: none !important;
    font-size: 16px;
}