/* Page Title */
.page-title {
    text-align: center;
    margin: 2rem 0;
    font-size: 2rem;
    color: #2c3e50;
    font-weight: 700;
}

/* Cart Container */
.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Cart Empty State */
.cart-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 2rem;
}

.cart-empty p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #7f8c8d;
    font-weight: 500;
}

.cart-empty .btn-primary {
    background-color: #20b2aa;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.cart-empty .btn-primary:hover {
    background-color: #1a8d87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 178, 170, 0.3);
}

/* Cart Content Layout */
.cart-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 968px) {
    .cart-content {
        grid-template-columns: 1fr;
    }
}

/* Cart Items Section */
.cart-items-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.cart-section-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f3f5;
    font-weight: 600;
}

/* Cart Item Card */
.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid #f1f3f5;
    align-items: center;
}

.cart-item:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
        row-gap: 1rem;
    }
}

/* Cart Item Image */
.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    background-color: #f8f9fa;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    grid-row: 1 / span 2;
}

@media (max-width: 768px) {
    .cart-item-image {
        width: 80px;
        height: 80px;
        grid-row: 1 / 2;
        grid-column: 1 / 2;
    }
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Cart Item Info */
.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    grid-column: 2 / 3;
}

@media (max-width: 768px) {
    .cart-item-info {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }
}

.cart-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.cart-item-price {
    font-size: 1rem;
    color: #e74c3c;
    font-weight: 600;
}

.cart-item-total {
    font-size: 1rem;
    color: #27ae60;
    font-weight: 600;
    text-align: right;
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}

@media (max-width: 768px) {
    .cart-item-total {
        grid-column: 1 / 3;
        grid-row: 3 / 4;
        text-align: left;
        font-size: 0.95rem;
    }
}

/* Quantity Control */
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}

@media (max-width: 768px) {
    .cart-item-quantity {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        margin-top: 0.5rem;
    }
}

.quantity-btn {
    width: 36px;
    height: 36px;
    background-color: #20b2aa;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background-color: #1a8d87;
    transform: scale(1.05);
}

.quantity-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.quantity-input {
    width: 50px;
    height: 36px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid #20b2aa;
    border-radius: 8px;
    outline: none;
    background-color: white;
    color: #2c3e50;
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
    padding: 0;
}

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

.quantity-input:focus {
    border-color: #1a8d87;
    box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.15);
}

/* Remove Button */
.btn-remove {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.btn-remove:hover {
    background-color: rgba(231, 76, 60, 0.1);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .btn-remove {
        top: 0.5rem;
        right: 0.5rem;
    }
}

/* Cart Summary Section */
.cart-summary-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 20px;
    align-self: start;
    height: fit-content;
}

@media (max-width: 968px) {
    .cart-summary-section {
        position: static;
    }
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f5;
    font-size: 1rem;
    color: #2c3e50;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item strong {
    font-weight: 600;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 0 1rem;
    border-top: 2px solid #20b2aa;
    font-size: 1.5rem;
    font-weight: 700;
    color: #e74c3c;
    margin-top: 1rem;
}

.summary-total span:first-child {
    color: #2c3e50;
}

/* Order Form Section */
.order-form-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 2rem;
}

.order-form h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f3f5;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid #f1f3f5;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: #fafbfc;
    color: #2c3e50;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #20b2aa;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* Order Button */
.btn-order-submit {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
    background-color: #20b2aa;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
    /* box-shadow: 0 4px 12px rgba(20, 126, 64, 0.3); */
}

.btn-order-submit:hover {
    background-color: #20b2aa;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px #20b2ab9a;
}

.btn-order-submit:active {
    transform: translateY(0);
}

.btn-order-submit:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Notifications */
.notification {
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    animation: slideIn 0.3s ease-out;
    border: 2px solid transparent;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #27ae60;
}

.notification.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #e74c3c;
}

.notification-icon {
    font-size: 2rem;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.notification-content p {
    margin: 0;
    line-height: 1.5;
}


/* уведомления */
.form-error-message,
.form-success-message {
    margin-bottom: 15px;
    padding: 12px 15px;
    border-radius: 4px;
    font-weight: 500;
}

.form-error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Empty Cart Illustration */
.cart-empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: #bdc3c7;
}

/* Кнопка корзины рядом с +/- */
.btn-quick-cart {
    width: 42px;
    height: 36px;
    background-color: #20b2aa;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-left: 0.5rem;
}

.btn-quick-cart:hover {
    background-color: #1a8d87;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(32, 178, 170, 0.4);
}

/* Кнопка "Оформить заказ под "Итого"" */
.btn-order {
    width: 100%; 
    padding: 1rem; 
    margin-top: 1.5rem;
    text-align: center;
    color: #ffffff;
    background-color: #20b2aa;
    border: 2px solid #20b2aa;
    transition: all 0.3s;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
}

.btn-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 178, 171, 0.486);
}

.btn-show-catalog {
    text-decoration: none;
    color: #ffffff;
    background-color: #20b2aa;
    border: 2px solid #20b2aa;
    border-radius: 8px;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 16px;
}

.btn-show-catalog:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 178, 171, 0.486);
}



/* Кнопка "Продолжить покупки" */
.btn-continue-shopping {
    display: block;
    text-align: center;
    margin-top: 1rem;
    text-decoration: none;
    color: #20b2aa;
    font-weight: 600;
    padding: 0.8rem;
    border-radius: 8px;
    border: 2px solid #20b2aa;
    transition: all 0.3s;
}

.btn-continue-shopping:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 178, 171, 0.473);
}

/* Кнопка удаления рядом с +/- */
.btn-remove-quick {
    width: 42px;
    height: 36px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    z-index: 100;
}

.btn-remove-quick:hover {
    background-color: #c0392b;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.btn-remove-can-icon {
    width: 20px;
    filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(280deg);
    pointer-events: none;
    object-fit: contain;
}

/* Убираем старую кнопку удаления (×) */
.btn-remove {
    display: none;
}

/* Адаптивность для кнопки удаления */
@media (max-width: 768px) {
    .cart-item-quantity {
        gap: 0.5rem;
    }
    
    .btn-remove-quick {
        width: 38px;
        height: 32px;
        font-size: 1rem;
        margin-left: 0.25rem;
    }
}

@media (max-width: 480px) {
    .btn-remove-quick {
        width: 36px;
        height: 30px;
        font-size: 0.9rem;
    }
}

/* Адаптивность для кнопки корзины */
@media (max-width: 768px) {
    .cart-item-quantity {
        gap: 0.5rem;
    }
    
    .btn-quick-cart {
        width: 38px;
        height: 32px;
        font-size: 1rem;
        margin-left: 0.25rem;
    }
}

@media (max-width: 480px) {
    .btn-quick-cart {
        width: 36px;
        height: 30px;
        font-size: 0.9rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .cart-container {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .cart-content,
    .cart-items-section,
    .cart-summary-section,
    .order-form-section {
        padding: 1.5rem;
    }
    
    .cart-item {
        padding: 1.2rem;
        gap: 1rem;
    }
    
    .cart-item-image {
        width: 70px;
        height: 70px;
    }
    
    .cart-item-title {
        font-size: 1rem;
    }
    
    .cart-item-price,
    .cart-item-total {
        font-size: 0.9rem;
    }
    
    .quantity-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .quantity-input {
        width: 45px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .summary-total {
        font-size: 1.3rem;
    }
    
    .btn-order-submit {
        padding: 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .cart-empty {
        padding: 3rem 1.5rem;
    }
    
    .cart-empty p {
        font-size: 1.2rem;
    }
    
    .cart-item {
        grid-template-columns: 70px 1fr;
        padding: 1rem;
    }
    
    .cart-item-info {
        gap: 0.25rem;
    }
    
    .cart-item-title {
        font-size: 0.95rem;
    }
    
    .summary-item {
        font-size: 0.9rem;
    }
    
    .summary-total {
        font-size: 1.2rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
}