/* Enhanced Modern UI Styles for ModernShop */

/* ==== MODERN ANIMATIONS & TRANSITIONS ==== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 5px hsl(var(--accent));
    }
    50% {
        box-shadow: 0 0 20px hsl(var(--accent)), 0 0 30px hsl(var(--accent));
    }
}

/* ==== ENHANCED BUTTONS ==== */
.btn-modern {
    position: relative;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    z-index: 1;
}

.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.5s;
    z-index: -1;
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn-gradient-primary {
    background: linear-gradient(135deg, hsl(var(--accent)) 0%, hsl(var(--accent-h) calc(var(--accent-s) - 10%) calc(var(--accent-l) - 15%)) 100%);
    border: none;
    color: white;
}

.btn-gradient-secondary {
    background: linear-gradient(135deg, hsl(var(--accent)) 0%, hsl(var(--accent-h) calc(var(--accent-s) + 10%) calc(var(--accent-l) - 10%)) 100%);
    border: none;
    color: white;
}

.btn-glassmorphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: hsl(var(--dark));
    transition: all 0.3s ease;
}

.btn-glassmorphism:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ==== ENHANCED CARDS ==== */
.card-modern {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    border: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    position: relative;
}

.card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, hsl(var(--base)), hsl(var(--accent)));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.card-modern:hover::before {
    opacity: 1;
}

.card-product {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.card-product .product-image {
    position: relative;
    overflow: hidden;
}

.card-product .product-image img {
    transition: transform 0.5s ease;
}

.card-product:hover .product-image img {
    transform: scale(1.1);
}

.card-product .product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-product:hover .product-overlay {
    opacity: 1;
}

/* ==== ENHANCED FORMS ==== */
.form-modern .form-control {
    border: 2px solid hsl(var(--light-3));
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: hsl(var(--light));
}

.form-modern .form-control:focus {
    border-color: hsl(var(--base));
    box-shadow: 0 0 0 3px hsla(var(--base), 0.1);
    transform: translateY(-2px);
}

.form-floating-modern {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-floating-modern .form-control {
    padding-top: 20px;
    padding-bottom: 8px;
}

.form-floating-modern label {
    position: absolute;
    top: 15px;
    left: 20px;
    color: hsl(var(--dark-300));
    transition: all 0.3s ease;
    pointer-events: none;
    font-weight: 500;
}

.form-floating-modern .form-control:focus + label,
.form-floating-modern .form-control:not(:placeholder-shown) + label {
    top: 8px;
    font-size: 12px;
    color: hsl(var(--base));
    font-weight: 600;
}

/* ==== ENHANCED NAVIGATION ==== */
.navbar-modern {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.navbar-modern.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-link-modern {
    position: relative;
    font-weight: 500;
    color: hsl(var(--dark)) !important;
    transition: all 0.3s ease;
    padding: 10px 20px !important;
}

.nav-link-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, hsl(var(--base)), hsl(var(--accent)));
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link-modern:hover::after,
.nav-link-modern.active::after {
    width: 80%;
}

.nav-link-modern:hover {
    color: hsl(var(--base)) !important;
    transform: translateY(-2px);
}

/* ==== ENHANCED SIDEBAR ==== */
.sidebar-modern {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9), 
        rgba(255, 255, 255, 0.7)
    );
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0 20px 20px 0;
}

.sidebar-modern .sidebar-item {
    margin: 5px 0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.sidebar-modern .sidebar-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(5px);
}

/* ==== ENHANCED MODALS ==== */
.modal-modern .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-modern .modal-header {
    background: linear-gradient(135deg, hsl(var(--base)), hsl(var(--base-600)));
    color: white;
    border: none;
    padding: 20px 30px;
}

.modal-modern .modal-body {
    padding: 30px;
}

/* ==== ENHANCED LOADING STATES ==== */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

.spinner-modern {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: hsl(var(--base));
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==== ENHANCED UTILITIES ==== */
.text-gradient {
    background: linear-gradient(135deg, hsl(var(--base)), hsl(var(--accent)));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.shadow-modern {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.shadow-modern-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-modern-hover:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
               linear-gradient(135deg, hsl(var(--base)), hsl(var(--accent))) border-box;
}

.pulse-glow {
    animation: pulseGlow 2s infinite;
}

/* ==== ENHANCED SCROLLBAR ==== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: hsl(var(--light-2));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, hsl(var(--base)), hsl(var(--base-600)));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, hsl(var(--base-600)), hsl(var(--base-800)));
}

/* ==== ENHANCED ANIMATIONS FOR PAGE ELEMENTS ==== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }

/* ==== ENHANCED TOOLTIPS ==== */
.tooltip-modern {
    position: relative;
    display: inline-block;
}

.tooltip-modern::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

.tooltip-modern::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip-modern:hover::after,
.tooltip-modern:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ==== RESPONSIVE ENHANCEMENTS ==== */
@media (max-width: 768px) {
    .card-modern {
        margin: 10px;
        border-radius: 16px;
    }
    
    .btn-modern {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .form-modern .form-control {
        padding: 12px 16px;
    }
}

/* ==== DARK MODE SUPPORT ==== */
@media (prefers-color-scheme: dark) {
    .card-modern {
        background: hsl(var(--dark-100));
        color: hsl(var(--light));
    }
    
    .navbar-modern {
        background: rgba(30, 30, 30, 0.95);
    }
    
    .form-modern .form-control {
        background: hsl(var(--dark-200));
        border-color: hsl(var(--dark-300));
        color: hsl(var(--light));
    }
}