/* ===================================
   CAROUSEL IMAGES RESPONSIVE STYLES
   =================================== */

/* Base image styles */
.owl-carousel .owl-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-width: 100%;
}

/* Container responsive adjustments */
.owl-carousel-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* Image aspect ratio maintenance */
.owl-carousel .owl-item {
    position: relative;
    overflow: hidden;
}

.owl-carousel .owl-item img {
    transition: transform 0.3s ease;
}

/* Hover effects for desktop */
@media (min-width: 769px) {
    .owl-carousel .owl-item:hover img {
        transform: scale(1.05);
    }
}

/* Responsive breakpoints for images */
@media screen and (max-width: 1024px) {
    .owl-carousel .owl-item img {
        max-height: 400px;
    }
}

@media screen and (max-width: 768px) {
    .owl-carousel .owl-item img {
        max-height: 300px;
    }
    
    .owl-carousel-container {
        padding: 0 10px;
    }
}

@media screen and (max-width: 480px) {
    .owl-carousel .owl-item img {
        max-height: 250px;
    }
    
    .owl-carousel-container {
        padding: 0 5px;
    }
}

@media screen and (max-width: 360px) {
    .owl-carousel .owl-item img {
        max-height: 200px;
    }
}

/* Specific image types */
.owl-carousel .owl-item img.banner-image {
    width: 100%;
    height: auto;
    min-height: 200px;
}

.owl-carousel .owl-item img.product-image {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Loading placeholder */
.owl-carousel .owl-item img[src*="placeholder"],
.owl-carousel .owl-item img:not([src]) {
    background: #f0f0f0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.owl-carousel .owl-item img[src*="placeholder"]::before,
.owl-carousel .owl-item img:not([src])::before {
    content: "Cargando...";
    color: #999;
    font-size: 14px;
}

/* Lazy loading support */
.owl-carousel .owl-item img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.owl-carousel .owl-item img[data-src].loaded {
    opacity: 1;
}

/* Image optimization for different screen densities */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .owl-carousel .owl-item img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    .owl-carousel .owl-item img {
        max-width: 100%;
        height: auto;
        page-break-inside: avoid;
    }
    
    .owl-carousel .owl-buttons,
    .owl-carousel .owl-pagination {
        display: none !important;
    }
}

/* Accessibility improvements for images */
.owl-carousel .owl-item img[alt] {
    border: 1px solid transparent;
}

.owl-carousel .owl-item img:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* High contrast mode for images */
@media (prefers-contrast: high) {
    .owl-carousel .owl-item img {
        border: 1px solid currentColor;
    }
}

/* Reduced motion for images */
@media (prefers-reduced-motion: reduce) {
    .owl-carousel .owl-item img {
        transition: none;
    }
    
    .owl-carousel .owl-item:hover img {
        transform: none;
    }
}
