/* ===== CUSTOM NOTIFICATION ANIMATION ===== */
.custom-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    min-width: 300px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.custom-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.custom-notification.success {
    border-left: 4px solid #198754;
}

.custom-notification.error {
    border-left: 4px solid #dc3545;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #212529;
}

.notification-content i {
    font-size: 24px;
}

.custom-notification.success .notification-content i {
    color: #198754;
}

.custom-notification.error .notification-content i {
    color: #dc3545;
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: #e9ecef;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.notification-progress::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background: #198754;
    animation: progressBar 3s linear forwards;
}

@keyframes progressBar {
    from { width: 100%; }
    to { width: 0%; }
}

/* ===== BUTTON SUCCESS ANIMATION ===== */
.btn-success-animated {
    animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ===== CART ICON BOUNCE ANIMATION ===== */
.cart-bounce {
    animation: cartBounce 0.6s ease-in-out;
}

@keyframes cartBounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-10px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(-5px); }
}

/* ===== CHECKOUT MODAL ===== */
.checkout-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.checkout-modal-overlay.show {
    opacity: 1;
}

.checkout-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.checkout-modal-overlay.show .checkout-modal {
    transform: scale(1) translateY(0);
}

.checkout-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #ffffff 0%, #f3f5f4 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.checkout-modal-header h5 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.btn-close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.checkout-modal-body {
    padding: 32px;
}

.checkout-modal-body h6 {
    font-weight: 600;
    color: #212529;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #198754;
    display: inline-block;
}

.checkout-modal-body .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.checkout-modal-body .form-control,
.checkout-modal-body .form-select {
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 10px 14px;
    transition: all 0.3s ease;
}

.checkout-modal-body .form-control:focus,
.checkout-modal-body .form-select:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.15);
}

/* Order Summary */
.order-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.order-item {
    display: flex;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.order-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.order-item-details h6 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: #212529;
    border: none;
    padding: 0;
}

.order-item-details p {
    font-size: 0.85rem;
    margin: 0;
}

.order-total {
    padding-top: 16px;
    border-top: 2px solid #ffffff;
}

.order-total .d-flex {
    font-size: 0.95rem;
}

.order-total strong {
    font-size: 1.1rem;
}

.checkout-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 32px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 16px 16px;
}

.checkout-modal-footer .btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.checkout-modal-footer .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.checkout-modal-footer .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.checkout-modal-footer .btn-success {
    background-color: #198754;
    border-color: #198754;
}

.checkout-modal-footer .btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.4);
}

/* Character Counter */
.text-muted small {
    font-size: 0.85rem;
}

#charCount {
    font-weight: 600;
    color: #198754;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .checkout-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .checkout-modal-header {
        padding: 20px 20px;
    }
    
    .checkout-modal-header h5 {
        font-size: 1.25rem;
    }
    
    .checkout-modal-body {
        padding: 20px;
    }
    
    .order-summary {
        margin-top: 24px;
    }
    
    .checkout-modal-footer {
        padding: 16px 20px;
        flex-direction: column;
    }
    
    .checkout-modal-footer .btn {
        width: 100%;
    }
}

/* Smooth Scrollbar untuk Modal */
.checkout-modal::-webkit-scrollbar {
    width: 8px;
}

.checkout-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.checkout-modal::-webkit-scrollbar-thumb {
    background: #198754;
    border-radius: 10px;
}

.checkout-modal::-webkit-scrollbar-thumb:hover {
    background: #157347;
}

/* Fade In Animation untuk Form Elements */
.checkout-modal-body .mb-3 {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.checkout-modal-body .mb-3:nth-child(1) { animation-delay: 0.1s; }
.checkout-modal-body .mb-3:nth-child(2) { animation-delay: 0.2s; }
.checkout-modal-body .mb-3:nth-child(3) { animation-delay: 0.3s; }
.checkout-modal-body .mb-3:nth-child(4) { animation-delay: 0.4s; }
.checkout-modal-body .mb-3:nth-child(5) { animation-delay: 0.5s; }

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

/* Order Summary Animation */
.order-summary {
    animation: fadeInRight 0.5s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}