/* Custom styles */
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef3 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile touch optimization */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: rgba(34, 197, 94, 0.2);
    }

    body {
        font-size: 16px; /* Prevent zoom on input focus */
    }

    /* Larger touch targets for mobile */
    a, button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

.hero-bg {
    background-image: linear-gradient(135deg, rgba(34, 139, 34, 0.9) 0%, rgba(46, 125, 50, 0.95) 100%), 
                      url('https://placehold.co/1600x900/2E7D32/FFFFFF?text=Premium+Cannabis+Products');
    background-size: cover;
    background-position: center;
    background-attachment: scroll; /* Better performance on mobile */
    position: relative;
}

@media (max-width: 768px) {
    .hero-bg {
        background-image: linear-gradient(135deg, rgba(34, 139, 34, 0.9) 0%, rgba(46, 125, 50, 0.95) 100%), 
                          url('https://placehold.co/800x600/2E7D32/FFFFFF?text=Premium+Cannabis+Products');
    }
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
    position: relative;
    z-index: 1;
}

.product-card {
    background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 
                0 2px 4px -1px rgba(0, 0, 0, 0.04),
                0 0 0 1px rgba(0, 0, 0, 0.02);
    padding: 1.75rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.3s ease;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .product-card {
        padding: 1.25rem;
        border-radius: 0.75rem;
    }
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 
                0 10px 10px -5px rgba(0, 0, 0, 0.06),
                0 0 0 1px rgba(34, 197, 94, 0.1);
    background: linear-gradient(145deg, #ffffff 0%, #f0fdf4 100%);
}

.product-card img {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .fade-in-on-scroll,
    .product-card,
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Faster animations on mobile for better performance */
@media (max-width: 768px) {
    .fade-in-on-scroll {
        transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .product-card {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    background 0.2s ease;
    }
}

/* Enhanced button styles */
a[class*="bg-green"], button[class*="bg-green"] {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

a[class*="bg-green"]::before, button[class*="bg-green"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

a[class*="bg-green"]:hover::before, button[class*="bg-green"]:hover::before {
    width: 300px;
    height: 300px;
}

/* Smooth text highlights */
h1, h2 {
    background: linear-gradient(135deg, #1e40af 0%, #16a34a 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Glass morphism effect for header */
header {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    header {
        backdrop-filter: blur(8px);
    }

    /* Mobile navigation menu improvements */
    #nav-links {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #nav-links li a {
        padding: 1rem 1.5rem;
        font-size: 1.125rem;
    }
}

/* Enhanced footer gradient */
footer {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
}

/* Lightbox styles */
#lightbox-modal {
    transition: opacity 0.3s ease;
    animation: fadeIn 0.3s ease;
}

#lightbox-image {
    animation: zoomIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#lightbox-close {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Add hover effect to product images to indicate they're clickable */
.product-card img {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.product-card img:hover {
    opacity: 0.9;
}