/* Cart Page Styles */
.cart-main {
    padding: 40px 0;
    min-height: 80vh;
}

.cart-header {
    text-align: center;
    margin-bottom: 40px;
}

.cart-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.cart-header p {
    color: var(--gray-color);
    font-size: 1.1rem;
}

.cart-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Cart Items Section */
.cart-items-section {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--light-gray);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.cart-item-price {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.cart-item-weight {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    width: 35px;
    height: 35px;
    background: var(--light-gray);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background-color 0.3s;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.qty-input {
    width: 50px;
    height: 35px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--light-gray);
    border-right: 1px solid var(--light-gray);
    font-weight: 600;
}

.remove-item {
    background: #e74c3c;
    color: var(--white);
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.remove-item:hover {
    background: #c0392b;
}

/* Empty Cart */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.cart-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.cart-empty p {
    color: var(--gray-color);
    margin-bottom: 30px;
}

/* Cart Summary */
.cart-summary {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.summary-card {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.summary-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.summary-details {
    margin-bottom: 30px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1rem;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    border-top: 2px solid var(--light-gray);
    padding-top: 15px;
    margin-top: 15px;
}

.checkout-btn {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.checkout-btn:hover:not(:disabled) {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.checkout-btn:disabled {
    background: var(--light-gray);
    cursor: not-allowed;
}

/* Checkout Modal */
.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 30px 20px;
    border-bottom: 1px solid var(--light-gray);
}

.modal-header h2 {
    font-size: 1.8rem;
    color: var(--dark-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-color);
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--primary-color);
}

/* Checkout Steps */
.checkout-steps {
    padding: 30px;
}

.checkout-step {
    display: none;
}

.checkout-step.active {
    display: block;
}

.checkout-step h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--dark-color);
}

/* Form Styles */
.checkout-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Payment Methods */
.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.payment-method {
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-method.active {
    border-color: var(--primary-color);
    background: rgba(230, 126, 34, 0.1);
}

.payment-method:hover {
    border-color: var(--primary-color);
}

.payment-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.payment-method h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.payment-method p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Payment Details */
.payment-details {
    background: var(--light-color);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
}

.qr-payment {
    text-align: center;
}

.qr-code-container {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    display: inline-block;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.bank-details {
    text-align: left;
}

.bank-details h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.bank-info {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.bank-info p {
    margin-bottom: 8px;
    font-weight: 500;
}

.bank-info strong {
    color: var(--primary-color);
}

/* Checkout Actions */
.checkout-actions {
    display: flex;
    gap: 15px;
    justify-content: space-between;
}

.back-btn,
.place-order-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.back-btn {
    background: var(--light-gray);
    color: var(--dark-color);
}

.back-btn:hover {
    background: var(--gray-color);
    color: var(--white);
}

.place-order-btn {
    background: var(--primary-color);
    color: var(--white);
}

.place-order-btn:hover {
    background: var(--secondary-color);
}

/* Order Confirmation */
.order-confirmation {
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.order-confirmation h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.order-info {
    background: var(--light-color);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: left;
}

.order-info p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.payment-instructions {
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
}

.payment-instructions h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.order-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.print-order-btn,
.continue-shopping-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.print-order-btn {
    background: var(--primary-color);
    color: var(--white);
}

.print-order-btn:hover {
    background: var(--secondary-color);
}

.continue-shopping-btn {
    background: var(--light-gray);
    color: var(--dark-color);
}

.continue-shopping-btn:hover {
    background: var(--gray-color);
    color: var(--white);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .cart-summary {
        position: static;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .cart-item-image {
        width: 150px;
        height: 150px;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .checkout-actions {
        flex-direction: column;
    }
    
    .order-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .cart-main {
        padding: 20px 0;
    }
    
    .cart-header h1 {
        font-size: 2rem;
    }
    
    .cart-items-section,
    .summary-card {
        padding: 20px;
    }
    
    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-header,
    .checkout-steps {
        padding: 20px;
    }
    
    .qr-code {
        width: 150px;
        height: 150px;
    }
}
