/* Performance Optimizations */

/* Lazy loading for images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Optimize font loading */
@font-face {
    font-family: 'Montserrat';
    font-display: swap;
}

@font-face {
    font-family: 'Cookie';
    font-display: swap;
}

/* Reduce layout shift */
.product__item__pic,
.blog__item__pic,
.instagram__item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.product__item__pic img,
.blog__item__pic img,
.instagram__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Optimize animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Critical CSS inlining helper */
.above-fold {
    display: block;
}

.below-fold {
    display: none;
}

/* Optimize carousel performance */
.owl-carousel .owl-item {
    will-change: transform;
}

/* Reduce paint complexity */
.header,
.footer {
    will-change: auto;
}

/* Optimize scroll performance */
.nice-scroll {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* Preload critical resources */
.preload-critical {
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}