/* ==========================================
   Los Pericos Market — Custom Styles
   ========================================== */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #F08080;
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F4;
}
::-webkit-scrollbar-thumb {
    background: #c4c6cb;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a1a5aa;
}

/* ==========================================
   Animations
   ========================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scrollLine {
    0%, 100% {
        opacity: 0.3;
        transform: scaleY(0.5);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

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

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   Navbar
   ========================================== */

#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 248, 244, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

/* ==========================================
   Mobile Menu
   ========================================== */

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #E05555;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

/* ==========================================
   Hero
   ========================================== */

#hero {
    position: relative;
}

/* ==========================================
   Cards
   ========================================== */

.product-card {
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.product-card:hover::before {
    opacity: 1;
}

/* ==========================================
   Buttons
   ========================================== */

.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

/* ==========================================
   Form
   ========================================== */

input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 768px) {
    .font-display {
        line-height: 1.15;
    }
}

@media (max-width: 640px) {
    html {
        font-size: 15px;
    }
}

/* ==========================================
   Print
   ========================================== */

@media print {
    #navbar,
    #contact,
    .animate-scroll-line {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
