/* Enhanced Foythong Website Styles */

/* Enhanced Animation Keyframes */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

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

.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        filter: blur(5px);
    }
    to { 
        opacity: 1; 
        filter: blur(0);
    }
}

/* Enhanced Product Card Styles */
.group:hover .product-image {
    transform: scale(1.1) rotate(2deg);
}

/* Floating Animation for Badges */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Pulse Animation for New Badges */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
        transform: scale(1.05);
    }
}

.animate-pulse {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Enhanced Hover Effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Loading Button Animation */
.loading {
    pointer-events: none;
    position: relative;
    color: transparent !important;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Grid Layouts */
.grid-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Smooth Transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, 
                transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

/* Enhanced Typography */
.text-gradient {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Card Styles */
.card-enhanced {
    background: linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
    border: 1px solid rgba(245, 158, 11, 0.1);
    backdrop-filter: blur(10px);
}

.card-enhanced:hover {
    border-color: rgba(245, 158, 11, 0.3);
    background: linear-gradient(145deg, #ffffff 0%, #fffbf0 100%);
}

/* Testimonial Cards Animation */
.testimonial-card {
    transform: scale(0.95);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: scale(1);
    opacity: 1;
}

/* Enhanced Shadows */
.shadow-enhanced {
    box-shadow: 
        0 10px 25px -5px rgba(245, 158, 11, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-enhanced:hover {
    box-shadow: 
        0 25px 50px -12px rgba(245, 158, 11, 0.25),
        0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .animate-fade-in-up {
        animation-duration: 0.6s;
    }
    
    .hover-lift:hover {
        transform: translateY(-4px) scale(1.01);
    }
    
    .grid-enhanced {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

/* Enhanced Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #d97706, #dc2626);
}

/* Focus States for Accessibility */
button:focus,
a:focus,
input:focus {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .animate-fade-in-up,
    .fade-in,
    .hover-lift {
        animation: none !important;
        transform: none !important;
    }
}

/* Performance Optimizations */
.group,
.card-enhanced,
.hover-lift {
    will-change: transform;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* Dark Mode Support (for future implementation) */
@media (prefers-color-scheme: dark) {
    .card-enhanced {
        background: linear-gradient(145deg, #1f2937 0%, #111827 100%);
        border-color: rgba(245, 158, 11, 0.2);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Additional Enhanced Styles for Shopping Cart and Checkout */
.cart-item {
    transition: all 0.3s ease;
}

.cart-item:hover {
    background-color: rgba(245, 158, 11, 0.05);
    transform: translateX(5px);
}

.quantity-controls button {
    transition: all 0.2s ease;
}

.quantity-controls button:hover {
    background-color: #f59e0b;
    transform: scale(1.1);
}

.checkout-step {
    position: relative;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.checkout-step.active {
    opacity: 1;
    transform: scale(1.05);
}

.checkout-step.completed {
    opacity: 0.8;
}

.order-summary {
    background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.2);
}

/* Dashboard Styles */
.dashboard-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.stat-card {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

/* Modern gradient backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
}

/* Advanced animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-slide-up {
    animation: slideInUp 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out;
}

/* Enhanced product cards */
.product-card-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

.product-card-enhanced:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.product-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #F59E0B, #D97706, #F59E0B);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card-enhanced:hover::before {
    opacity: 1;
}

/* Price styling */
.price-display {
    position: relative;
    font-weight: 700;
    color: #D97706;
}

.price-display::before {
    content: '฿';
    margin-right: 2px;
    font-size: 0.9em;
}

/* Modern buttons */
.btn-modern {
    position: relative;
    overflow: hidden;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #F59E0B, #D97706);
    color: white;
    border: none;
    cursor: pointer;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(217, 119, 6, 0.3);
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn-modern:hover::before {
    left: 100%;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Image effects */
.image-hover-zoom {
    overflow: hidden;
    border-radius: 12px;
}

.image-hover-zoom img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-hover-zoom:hover img {
    transform: scale(1.1);
}

/* Enhanced typography */
.text-gradient {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern cards */
.card-modern {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Floating elements */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Modern navigation */
.nav-item {
    position: relative;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #F59E0B, #D97706);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 80%;
}

/* Enhanced footer */
.footer-enhanced {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    position: relative;
}

.footer-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #F59E0B, transparent);
}

/* Toast notifications enhanced */
.toast-enhanced {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .product-card-enhanced {
        margin-bottom: 1rem;
    }
    
    .btn-modern {
        width: 100%;
        padding: 14px;
    }
    
    .text-gradient {
        font-size: 1.8rem;
    }
}

/* Accessibility improvements */
.focus-enhanced:focus {
    outline: 3px solid #F59E0B;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Print styles */
@media print {
    .gradient-primary,
    .gradient-secondary {
        background: #F59E0B !important;
        color: white !important;
    }
    
    .btn-modern {
        background: #D97706 !important;
        color: white !important;
    }
}
