/* Custom styles for Gloria Alimentación Besaya */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #0f766e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #14b8a6;
}

/* Selection color */
::selection {
    background-color: rgba(20, 184, 166, 0.3);
    color: #f1f5f9;
}

/* Animation for fade-in elements */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger animation for grid items */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover effects for product cards */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Pulse animation for the badge */
@keyframes pulse-custom {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse-custom {
    animation: pulse-custom 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Gradient text utility */
.text-gradient {
    background: linear-gradient(135deg, #2dd4bf 0%, #0d9488 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass morphism effect */
.glass {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Mobile menu animation */
#mobileMenu {
    transition: transform 0.3s ease-in-out;
}

/* Navbar scroll effect */
#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Link underline animation */
a {
    position: relative;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* Loading state for buttons */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Image loading placeholder */
img {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

img[src] {
    animation: none;
    background: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}
