/* ============================================
   MODERN PROFESSIONAL THEME
   A beautiful, contemporary design system
   ============================================ */

/* ============================================
   1. CSS VARIABLES & DESIGN TOKENS
   ============================================ */
:root {
    /* Primary Color Palette - Vibrant Blues */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    /* Secondary Color Palette - Purple Accent */
    --secondary-50: #faf5ff;
    --secondary-100: #f3e8ff;
    --secondary-200: #e9d5ff;
    --secondary-300: #d8b4fe;
    --secondary-400: #c084fc;
    --secondary-500: #a855f7;
    --secondary-600: #9333ea;
    --secondary-700: #7e22ce;
    --secondary-800: #6b21a8;
    --secondary-900: #581c87;

    /* Success - Emerald Green */
    --success-50: #ecfdf5;
    --success-500: #10b981;
    --success-600: #059669;
    --success-700: #047857;

    /* Warning - Amber */
    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    --warning-600: #d97706;

    /* Danger - Rose Red */
    --danger-50: #fef2f2;
    --danger-500: #ef4444;
    --danger-600: #dc2626;
    --danger-700: #b91c1c;

    /* Neutral Grays */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warm: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-cool: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    --gradient-sunset: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    --gradient-ocean: linear-gradient(135deg, #2e3192 0%, #1bffff 100%);
    --gradient-royal: linear-gradient(135deg, #141e30 0%, #243b55 100%);

    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.5);
    --shadow-glow-purple: 0 0 30px rgba(168, 85, 247, 0.4);

    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Z-Index Scale */
    --z-background: -1;
    --z-base: 0;
    --z-content: 1;
    --z-elevated: 10;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-navbar: 1035;
    --z-header: 1035;
    --z-layout-overlay: 1040;
    --z-sidebar: 1045;
    --z-drag-target: 1046;
    --z-floating-elements: 1047;
    --z-offcanvas-backdrop: 1040;
    --z-offcanvas: 1045;
    --z-modal-backdrop: 1050;
    --z-modal: 1055;
    --z-sweetalert: 1060;
    --z-popover: 1070;
    --z-tooltip: 1080;
    --z-toast: 1090;
    --z-alert: 1100;
    --z-loading: 1110;
    --z-notification: 1200;
    --z-emergency: 9999;
}

/* ============================================
   2. GLOBAL IMPROVEMENTS
   ============================================ */

/* Better Font Rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
    font-kerning: normal;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Styling */
::selection {
    background-color: var(--primary-500);
    color: white;
}

::-moz-selection {
    background-color: var(--primary-500);
    color: white;
}

/* ============================================
   3. ENHANCED CARD COMPONENTS
   ============================================ */

.modern-card {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    border: 1px solid var(--gray-100);
    overflow: hidden;
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-200);
}

.modern-card-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.modern-card-gradient {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.modern-card-gradient:hover {
    box-shadow: var(--shadow-glow-purple);
}

/* ============================================
   4. BEAUTIFUL BUTTONS
   ============================================ */

.btn-modern {
    position: relative;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    overflow: hidden;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left var(--transition-slow);
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-modern-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    color: white;
}

.btn-modern-secondary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.btn-modern-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.5);
    color: white;
}

.btn-modern-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-modern-outline {
    background: transparent;
    border: 2px solid var(--primary-500);
    color: var(--primary-600);
}

.btn-modern-outline:hover {
    background: var(--primary-500);
    color: white;
    transform: translateY(-2px);
}

.btn-modern-glass {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-modern-glass:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ============================================
   5. ANIMATED GRADIENTS
   ============================================ */

.gradient-animated {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================
   6. PRODUCT CARDS - ENHANCED
   ============================================ */

.product-card-modern {
    position: relative;
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    text-align: center;
    transition: all var(--transition-base);
    border: 2px solid var(--gray-100);
    cursor: pointer;
    overflow: hidden;
}

.product-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.product-card-modern:hover::before {
    transform: scaleX(1);
}

.product-card-modern:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-300);
}

.product-card-modern .icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-4);
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.product-card-modern:hover .icon-wrapper {
    transform: rotate(5deg) scale(1.1);
    box-shadow: var(--shadow-glow);
}

.product-card-modern .icon-wrapper img {
    width: 50px;
    height: 50px;
    filter: brightness(0) invert(1);
}

.product-card-modern h5 {
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: var(--space-2);
    font-size: 1.125rem;
}

.product-card-modern p {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0;
}

/* ============================================
   7. BADGE ENHANCEMENTS
   ============================================ */

.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.badge-modern-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.badge-modern-success {
    background: linear-gradient(135deg, var(--success-500), var(--success-600));
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.badge-modern-warning {
    background: linear-gradient(135deg, var(--warning-500), var(--warning-600));
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.badge-modern-danger {
    background: linear-gradient(135deg, var(--danger-500), var(--danger-600));
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.badge-modern-glass {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

/* ============================================
   8. FORM ENHANCEMENTS
   ============================================ */

.form-modern .form-control {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all var(--transition-base);
    background: var(--gray-50);
}

.form-modern .form-control:focus {
    border-color: var(--primary-500);
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-modern .input-group {
    position: relative;
}

.form-modern .input-group-text {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    padding: 0.875rem 1rem;
}

.form-modern label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
    font-size: 0.9375rem;
}

/* ============================================
   9. SLIDER/CAROUSEL ENHANCEMENTS
   ============================================ */

.promo-slider-modern {
    position: relative;
    padding: var(--space-8) 0;
}

.slide-card-modern {
    background: var(--gradient-primary);
    border-radius: var(--radius-2xl);
    padding: var(--space-10);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
}

.slide-card-modern::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.slide-card-modern h4 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--space-4);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.slide-card-modern p {
    font-size: 1.125rem;
    opacity: 0.95;
    line-height: 1.6;
}

/* ============================================
   10. SECTION HEADERS
   ============================================ */

.section-header-modern {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-header-modern .badge {
    margin-bottom: var(--space-4);
}

.section-header-modern h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: var(--space-4);
    line-height: 1.2;
}

.section-header-modern h2 .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.section-header-modern p {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============================================
   11. HERO SECTION ENHANCEMENTS
   ============================================ */

.hero-modern {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.hero-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: heroPattern 20s ease-in-out infinite;
}

@keyframes heroPattern {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.hero-modern .hero-content {
    position: relative;
    z-index: var(--z-elevated);
}

.hero-modern h1 {
    font-size: 3.5rem;
    font-weight: 900;
    color: white;
    margin-bottom: var(--space-6);
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-modern .lead {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--space-8);
    line-height: 1.7;
}

/* ============================================
   12. ANIMATIONS & MICRO-INTERACTIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ============================================
   13. LOADING STATES
   ============================================ */

.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: var(--radius-md);
}

.spinner-modern {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   14. RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 768px) {
    .hero-modern h1 {
        font-size: 2.5rem;
    }

    .section-header-modern h2 {
        font-size: 2rem;
    }

    .btn-modern {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
}

/* ============================================
   15. ACCESSIBILITY IMPROVEMENTS
   ============================================ */

.focus-visible:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   16. UTILITY CLASSES
   ============================================ */

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-secondary {
    background: var(--gradient-secondary);
}

.bg-gradient-success {
    background: var(--gradient-success);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hover-lift {
    transition: transform var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-scale {
    transition: transform var(--transition-base);
}

.hover-scale:hover {
    transform: scale(1.05);
}
