/* Shopping Cart Styles */

/* Cart Icon in Header */
.cart-icon-wrapper {
    position: relative;
    margin-left: 20px;
    cursor: pointer;
}

.cart-icon {
    font-size: 24px;
    color: #333;
    transition: color 0.3s ease;
}

.cart-icon:hover {
    color: #007bff;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Cart Modal */
#cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
}

#cart-modal.active {
    display: flex;
}

#cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.cart-content {
    position: relative;
    background: white;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    margin: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-header {
    padding: 18px 22px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.cart-header h2 {
    margin: 0;
    font-size: 22px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-header h2 i {
    color: #007bff;
}

#close-cart {
    background: white;
    border: 2px solid #dee2e6;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
    line-height: 1;
}

#close-cart:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: rotate(90deg);
}

/* TWO COLUMN LAYOUT */
.cart-main-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    flex: 1;
    overflow: hidden;
    border-top: 2px solid #f0f0f0;
    min-height: 0;
}

.cart-left-column {
    border-right: 2px solid #f0f0f0;
    overflow-y: auto;
    padding: 20px;
    background: #fafafa;
}

.cart-right-column {
    overflow-y: auto;
    padding: 20px 20px 10px 20px;
    background: white;
}

.cart-body {
    padding: 0;
    max-height: none;
    background: transparent;
    border: none;
    overflow: visible;
}

.cart-body::-webkit-scrollbar {
    display: none;
}

.cart-empty-message {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.cart-empty-message i {
    font-size: 56px;
    margin-bottom: 15px;
    color: #dee2e6;
}

.cart-empty-message p {
    font-size: 16px;
    margin: 0;
    font-weight: 500;
}

/* Cart Items */
#cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#cart-items:empty + .cart-empty-message {
    display: block;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.cart-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 6px rgba(0,123,255,0.15);
}

.cart-item-image {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 6px;
    background: #f8f9fa;
    padding: 5px;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.cart-item-price {
    margin: 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: 2px solid #007bff;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #007bff;
    font-weight: bold;
}

.quantity-btn:hover {
    background: #007bff;
    color: white;
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-input {
    width: 45px;
    height: 28px;
    text-align: center;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.quantity-input:focus {
    outline: none;
    border-color: #007bff;
}

.cart-item-subtotal {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #007bff;
    min-width: 70px;
    text-align: right;
}

.cart-item-remove {
    background: #fff5f5;
    border: 2px solid #ff4444;
    color: #ff4444;
    font-size: 16px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.cart-item-remove:hover {
    background: #ff4444;
    color: white;
}

/* Cart Footer */
.cart-footer {
    padding: 20px;
    border-top: 3px solid #007bff;
    background: white;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.cart-total-row span {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

#cart-total {
    font-size: 26px;
    color: #28a745;
    font-weight: 800;
}

#checkout-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#checkout-btn:hover {
    background: linear-gradient(135deg, #20BA5A 0%, #1a9d4d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

#checkout-btn:active {
    transform: translateY(0);
}

#checkout-btn i {
    font-size: 22px;
}

.checkout-note {
    text-align: center;
    margin: 12px 0 0 0;
    color: #28a745;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.checkout-note i {
    font-size: 14px;
}

/* Add to Cart Button */
.btn-add-cart {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add-cart:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-add-cart i {
    font-size: 16px;
}

/* Cart Notification */
.cart-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    z-index: 10001;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.cart-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.cart-notification i {
    font-size: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-content {
        width: 95%;
        max-height: 95vh;
    }

    .cart-item {
        flex-wrap: wrap;
        gap: 10px;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .cart-item-details {
        flex: 1 1 100%;
    }

    .cart-item-controls {
        flex: 1;
    }

    .cart-item-subtotal {
        min-width: auto;
    }

    .cart-notification {
        right: 10px;
        left: 10px;
        top: 80px;
    }

    .cart-icon-wrapper {
        margin-left: 15px;
    }
}

@media (max-width: 480px) {
    .cart-header h2 {
        font-size: 20px;
    }

    .cart-item-name {
        font-size: 14px;
    }

    #cart-total {
        font-size: 24px;
    }

    #checkout-btn {
        font-size: 16px;
        padding: 12px;
    }
}

/* Payment Information Section */
.cart-payment-info {
    background: white;
    border-bottom: 2px solid #dee2e6;
    padding: 25px;
    margin: 0;
}

.payment-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: #2c5f2d;
    font-size: 17px;
    font-weight: 600;
}

.payment-info-header i {
    font-size: 22px;
}

.payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
}

.payment-method {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #495057;
    border: 1px solid #e9ecef;
}

.payment-method:first-child {
    flex: 1 1 100%;
    justify-content: center;
    gap: 12px;
    background: white;
    border: 2px solid #e9ecef;
}

.payment-method i {
    font-size: 20px;
    color: #007bff;
}

.payment-method:first-child i.fab {
    font-size: 24px;
}

.payment-method .fab.fa-cc-visa {
    color: #1A1F71;
}

.payment-method .fab.fa-cc-mastercard {
    color: #EB001B;
}

.payment-method .fab.fa-cc-amex {
    color: #006FCF;
}

.payment-method .fab.fa-cc-discover {
    color: #FF6000;
}

.payment-note {
    display: none;
}

.checkout-note {
    text-align: center;
    margin: 12px 0 0 0;
    color: #28a745;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.checkout-note i {
    font-size: 14px;
}

/* Responsive adjustments for payment info */
@media (max-width: 480px) {
    .payment-methods {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .payment-method:nth-child(2) {
        grid-column: 1;
    }
    
    .payment-method {
        font-size: 13px;
    }
    
    .payment-note {
        font-size: 12px;
    }
}

/* Customer Information Form */
.cart-customer-info {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.customer-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: #007bff;
    font-size: 16px;
    font-weight: 600;
}

.customer-info-header i {
    font-size: 20px;
    color: #007bff;
}

.customer-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-group label i {
    font-size: 13px;
    color: #6c757d;
}

.form-group input,
.form-group textarea {
    padding: 8px 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #adb5bd;
}

.form-group textarea {
    resize: vertical;
    min-height: 50px;
}

/* Card Simulation Section */
.card-simulation-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.card-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: #007bff;
    font-size: 15px;
    font-weight: 700;
}

.card-header-title i {
    font-size: 18px;
}

#card-number {
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    font-size: 14px;
}

#card-expiry,
#card-cvv {
    font-family: 'Courier New', monospace;
    text-align: center;
    font-size: 14px;
}

.card-simulation-section .form-group input:hover {
    border-color: #80bdff;
}

.card-simulation-section .form-group input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
    background: linear-gradient(to right, #ffffff 0%, #f8f9ff 100%);
}

.form-disclaimer {
    display: none;
}

/* Payment Information Section */
.cart-payment-info {
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 20px;
}

.payment-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #28a745;
    font-size: 16px;
    font-weight: 600;
}

.payment-info-header i {
    font-size: 20px;
    color: #28a745;
}

/* Responsive Design */
@media (max-width: 900px) {
    .cart-main-container {
        grid-template-columns: 1fr;
        max-height: 50vh;
        overflow: hidden;
    }
    
    .cart-left-column {
        border-right: none;
        border-bottom: 2px solid #f0f0f0;
        overflow-y: auto;
    }

    .cart-right-column {
        overflow-y: auto;
    }

    .cart-footer {
        display: block !important;
        position: relative;
        width: 100%;
        flex-shrink: 0;
    }

    #checkout-btn {
        display: flex !important;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .cart-content {
        width: 98%;
        max-width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .cart-content {
        border-radius: 8px;
    }
    
    .cart-header h2 {
        font-size: 18px;
    }
    
    .cart-item-name {
        font-size: 13px;
    }

    #cart-total {
        font-size: 20px;
    }

    #checkout-btn {
        font-size: 14px;
        padding: 14px;
    }
    
    .form-group label {
        font-size: 11px;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 12px;
        padding: 7px 9px;
    }
    
    .cart-left-column,
    .cart-right-column {
        padding: 15px;
    }
}
