/**
 * Moussi Delicatessen - Custom CSS
 * Additional styles that complement Tailwind
 */

/* ============================================
   CSS Custom Properties
   ============================================ */

:root {
    --color-olive-50: #f7f9f0;
    --color-olive-100: #ecf1db;
    --color-olive-200: #dce6bd;
    --color-olive-300: #c2d978;
    --color-olive-400: #a8c45a;
    --color-olive-500: #8aab3d;
    --color-olive-600: #6b872e;
    --color-olive-700: #526828;
    --color-olive-800: #435325;
    --color-olive-900: #394723;

    --color-vlees: #E63946;
    --color-vega: #2D6A4F;
    --color-vis: #1E88E5;

    --animation-duration: 0.3s;
    --transition-duration: 0.3s;
}

/* ============================================
   Base Styles
   ============================================ */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Navigation Link Hover Effect
   ============================================ */

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--color-olive-400), var(--color-olive-300));
    transition: width var(--transition-duration) ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================
   Button Hover Effects
   ============================================ */

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* ============================================
   Card Hover Effects
   ============================================ */

.card-hover {
    transition: all var(--transition-duration) cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Gradient Text
   ============================================ */

.gradient-text {
    background: linear-gradient(135deg, var(--color-olive-600), var(--color-olive-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Glassmorphism
   ============================================ */

.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ============================================
   Custom Scrollbar
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--color-olive-300);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-olive-400);
}

/* Hide scrollbar for specific elements */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============================================
   Loading Animation
   ============================================ */

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.loading {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ============================================
   Pulse Animation for Badges
   ============================================ */

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.pulse-badge::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    animation: pulse-ring 1.5s ease-out infinite;
    z-index: -1;
}

/* ============================================
   Category Badge Colors
   ============================================ */

.badge-vlees {
    background-color: rgba(230, 57, 70, 0.1);
    color: var(--color-vlees);
}

.badge-vlees:hover {
    background-color: var(--color-vlees);
    color: white;
}

.badge-vega {
    background-color: rgba(45, 106, 79, 0.1);
    color: var(--color-vega);
}

.badge-vega:hover {
    background-color: var(--color-vega);
    color: white;
}

.badge-vis {
    background-color: rgba(30, 136, 229, 0.1);
    color: var(--color-vis);
}

.badge-vis:hover {
    background-color: var(--color-vis);
    color: white;
}

/* ============================================
   Image Hover Effects
   ============================================ */

.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.5s ease;
}

.img-zoom:hover img {
    transform: scale(1.1);
}

/* ============================================
   Selection Color
   ============================================ */

::selection {
    background: var(--color-olive-300);
    color: var(--color-olive-900);
}

/* ============================================
   Focus Styles (Accessibility)
   ============================================ */

:focus-visible {
    outline: 2px solid var(--color-olive-400);
    outline-offset: 2px;
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }
}

/* ============================================
   Mobile Menu
   ============================================ */

.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Hamburger animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* ============================================
   Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
