/* Custom Styles for Digital Store */

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Line Clamp for Text Truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #6366f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4f46e5;
}

/* Print Styles */
@media print {
    body {
        background: white !important;
    }
    
    nav, footer, button {
        display: none !important;
    }
    
    .no-print {
        display: none !important;
    }
    
    #receipt-container {
        box-shadow: none !important;
        border: 2px solid #000 !important;
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .product-card {
        transform: none !important;
    }
    
    .product-card:hover {
        transform: none !important;
    }
}

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus Styles */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Button Hover Effects */
button {
    transition: all 0.3s ease;
}

button:active {
    transform: scale(0.98);
}

/* Card Hover Effects */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Modal Backdrop */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-error {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Separator */
.separator {
    border-top: 2px dashed #d1d5db;
    margin: 1.5rem 0;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 100;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Form Validation */
input:invalid, select:invalid, textarea:invalid {
    border-color: #ef4444 !important;
}

input:valid, select:valid, textarea:valid {
    border-color: #22c55e !important;
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible for Keyboard Users */
*:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}