/* Frontend Styles for Elegance Offers Slider */

.eos-slider-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
}

.eos-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* Maintain 900:330 aspect ratio (2.73:1) for desktop/tablet */
    aspect-ratio: 900 / 330;
}

.eos-slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.eos-slide {
    min-width: 100%;
    width: 100%;
    max-width: 100%;
    position: relative;
    flex-shrink: 0;
    /* Maintain 900:330 aspect ratio for desktop/tablet */
    aspect-ratio: 900 / 330;
}

.eos-slide-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

/* Disable link when show_link is off */
.eos-slide-link.no-link {
    pointer-events: none;
    cursor: default;
}

.eos-slide picture {
    display: block;
    width: 100%;
}

.eos-slide img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 900 / 330; /* Default: Desktop/Tablet ratio */
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.eos-slide:hover img {
    transform: scale(1.05);
}

/* Mobile aspect ratio (2560:1440 = 16:9) */
@media (max-width: 767px) {
    .eos-slider-wrapper {
        aspect-ratio: 2560 / 1440;
    }
    
    .eos-slide {
        aspect-ratio: 2560 / 1440;
    }
    
    .eos-slide img {
        aspect-ratio: 2560 / 1440;
    }
}

.eos-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 50%, transparent 50%, rgba(0, 0, 0, 0.3));
    color: #fff;
    padding: 20px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.eos-slide:hover .eos-slide-overlay {
    background: linear-gradient(to top, rgba(65, 99, 15, 0.7), transparent 50%, transparent 50%, rgba(65, 99, 15, 0.4));
}

/* Make title and button clickable */
.eos-slide-title,
.eos-slide-cta {
    pointer-events: auto;
}

/* Position Classes for Title - Desktop (Default) */
/* Left/Right positions account for navigation arrows (50px wide + 15px margin = 65px from edge, add 15px buffer = 80px) */
.eos-title-top-left { position: absolute; top: 20px; left: 80px; max-width: calc(100% - 160px); }
.eos-title-top-center { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); text-align: center; max-width: calc(100% - 160px); }
.eos-title-top-right { position: absolute; top: 20px; right: 80px; text-align: right; max-width: calc(100% - 160px); }
.eos-title-center-left { position: absolute; top: 50%; left: 80px; transform: translateY(-50%); max-width: calc(100% - 160px); }
.eos-title-center-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; max-width: calc(100% - 160px); }
.eos-title-center-right { position: absolute; top: 50%; right: 80px; transform: translateY(-50%); text-align: right; max-width: calc(100% - 160px); }
.eos-title-bottom-left { position: absolute; bottom: 20px; left: 80px; max-width: calc(100% - 160px); }
.eos-title-bottom-center { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); text-align: center; max-width: calc(100% - 160px); }
.eos-title-bottom-right { position: absolute; bottom: 20px; right: 80px; text-align: right; max-width: calc(100% - 160px); }

/* Position Classes for Button - Desktop (Default) with spacing to avoid title overlap and arrows */
.eos-button-top-left { position: absolute; top: 20px; left: 80px; }
.eos-button-top-center { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); }
.eos-button-top-right { position: absolute; top: 20px; right: 80px; }
.eos-button-center-left { position: absolute; top: 50%; left: 80px; transform: translateY(-50%); }
.eos-button-center-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.eos-button-center-right { position: absolute; top: 50%; right: 80px; transform: translateY(-50%); }
.eos-button-bottom-left { position: absolute; bottom: 20px; left: 80px; }
.eos-button-bottom-center { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); }
.eos-button-bottom-right { position: absolute; bottom: 20px; right: 80px; }

/* When title and button are in same position, add spacing */
.eos-slide-overlay .eos-title-top-left ~ .eos-button-top-left { top: 80px; }
.eos-slide-overlay .eos-title-top-center ~ .eos-button-top-center { top: 80px; }
.eos-slide-overlay .eos-title-top-right ~ .eos-button-top-right { top: 80px; }
.eos-slide-overlay .eos-title-center-left ~ .eos-button-center-left { top: calc(50% + 50px); transform: translateY(0); }
.eos-slide-overlay .eos-title-center-center ~ .eos-button-center-center { top: calc(50% + 50px); transform: translateX(-50%); }
.eos-slide-overlay .eos-title-center-right ~ .eos-button-center-right { top: calc(50% + 50px); transform: translateY(0); }
.eos-slide-overlay .eos-title-bottom-left ~ .eos-button-bottom-left { bottom: 70px; }
.eos-slide-overlay .eos-title-bottom-center ~ .eos-button-bottom-center { bottom: 70px; }
.eos-slide-overlay .eos-title-bottom-right ~ .eos-button-bottom-right { bottom: 70px; }

/* Tablet Responsive Positions (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .eos-title-tablet-top-left { top: 15px !important; left: 75px !important; transform: none !important; text-align: left !important; max-width: calc(100% - 150px) !important; }
    .eos-title-tablet-top-center { top: 15px !important; left: 50% !important; transform: translateX(-50%) !important; text-align: center !important; max-width: calc(100% - 150px) !important; }
    .eos-title-tablet-top-right { top: 15px !important; right: 75px !important; left: auto !important; transform: none !important; text-align: right !important; max-width: calc(100% - 150px) !important; }
    .eos-title-tablet-center-left { top: 50% !important; left: 75px !important; right: auto !important; transform: translateY(-50%) !important; text-align: left !important; max-width: calc(100% - 150px) !important; }
    .eos-title-tablet-center-center { top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important; text-align: center !important; max-width: calc(100% - 150px) !important; }
    .eos-title-tablet-center-right { top: 50% !important; right: 75px !important; left: auto !important; transform: translateY(-50%) !important; text-align: right !important; max-width: calc(100% - 150px) !important; }
    .eos-title-tablet-bottom-left { bottom: 15px !important; top: auto !important; left: 75px !important; transform: none !important; text-align: left !important; max-width: calc(100% - 150px) !important; }
    .eos-title-tablet-bottom-center { bottom: 15px !important; top: auto !important; left: 50% !important; transform: translateX(-50%) !important; text-align: center !important; max-width: calc(100% - 150px) !important; }
    .eos-title-tablet-bottom-right { bottom: 15px !important; top: auto !important; right: 75px !important; left: auto !important; transform: none !important; text-align: right !important; max-width: calc(100% - 150px) !important; }
    
    .eos-button-tablet-top-left { top: 15px !important; left: 75px !important; transform: none !important; }
    .eos-button-tablet-top-center { top: 15px !important; left: 50% !important; transform: translateX(-50%) !important; }
    .eos-button-tablet-top-right { top: 15px !important; right: 75px !important; left: auto !important; transform: none !important; }
    .eos-button-tablet-center-left { top: 50% !important; left: 75px !important; right: auto !important; transform: translateY(-50%) !important; }
    .eos-button-tablet-center-center { top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important; }
    .eos-button-tablet-center-right { top: 50% !important; right: 75px !important; left: auto !important; transform: translateY(-50%) !important; }
    .eos-button-tablet-bottom-left { bottom: 15px !important; top: auto !important; left: 75px !important; transform: none !important; }
    .eos-button-tablet-bottom-center { bottom: 15px !important; top: auto !important; left: 50% !important; transform: translateX(-50%) !important; }
    .eos-button-tablet-bottom-right { bottom: 15px !important; top: auto !important; right: 75px !important; left: auto !important; transform: none !important; }
}

/* Mobile Responsive Positions (< 768px) */
@media (max-width: 767px) {
    .eos-title-mobile-top-left { top: 10px !important; left: 70px !important; transform: none !important; text-align: left !important; max-width: calc(100% - 140px) !important; }
    .eos-title-mobile-top-center { top: 10px !important; left: 50% !important; transform: translateX(-50%) !important; text-align: center !important; max-width: calc(100% - 140px) !important; }
    .eos-title-mobile-top-right { top: 10px !important; right: 70px !important; left: auto !important; transform: none !important; text-align: right !important; max-width: calc(100% - 140px) !important; }
    .eos-title-mobile-center-left { top: 50% !important; left: 70px !important; right: auto !important; transform: translateY(-50%) !important; text-align: left !important; max-width: calc(100% - 140px) !important; }
    .eos-title-mobile-center-center { top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important; text-align: center !important; max-width: calc(100% - 140px) !important; }
    .eos-title-mobile-center-right { top: 50% !important; right: 70px !important; left: auto !important; transform: translateY(-50%) !important; text-align: right !important; max-width: calc(100% - 140px) !important; }
    .eos-title-mobile-bottom-left { bottom: 10px !important; top: auto !important; left: 70px !important; transform: none !important; text-align: left !important; max-width: calc(100% - 140px) !important; }
    .eos-title-mobile-bottom-center { bottom: 10px !important; top: auto !important; left: 50% !important; transform: translateX(-50%) !important; text-align: center !important; max-width: calc(100% - 140px) !important; }
    .eos-title-mobile-bottom-right { bottom: 10px !important; top: auto !important; right: 70px !important; left: auto !important; transform: none !important; text-align: right !important; max-width: calc(100% - 140px) !important; }
    
    .eos-button-mobile-top-left { top: 10px !important; left: 70px !important; transform: none !important; }
    .eos-button-mobile-top-center { top: 10px !important; left: 50% !important; transform: translateX(-50%) !important; }
    .eos-button-mobile-top-right { top: 10px !important; right: 70px !important; left: auto !important; transform: none !important; }
    .eos-button-mobile-center-left { top: 50% !important; left: 70px !important; right: auto !important; transform: translateY(-50%) !important; }
    .eos-button-mobile-center-center { top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important; }
    .eos-button-mobile-center-right { top: 50% !important; right: 70px !important; left: auto !important; transform: translateY(-50%) !important; }
    .eos-button-mobile-bottom-left { bottom: 10px !important; top: auto !important; left: 70px !important; transform: none !important; }
    .eos-button-mobile-bottom-center { bottom: 10px !important; top: auto !important; left: 50% !important; transform: translateX(-50%) !important; }
    .eos-button-mobile-bottom-right { bottom: 10px !important; top: auto !important; right: 70px !important; left: auto !important; transform: none !important; }
    
    /* Smaller font sizes on mobile */
    .eos-slide-title { font-size: 1.4rem; }
    .eos-slide-cta { padding: 8px 16px; font-size: 0.9rem; }
}

.eos-slide-title {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.eos-slide-cta {
    display: inline-block;
    background: #41630F;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    max-width: 200px;
    text-align: center;
}

.eos-slide:hover .eos-slide-cta {
    background: #2e4709;
    transform: translateX(5px);
}

/* Anti-Overlap: When title and button share the same position */
/* Title should be on top, button on bottom with spacing */

/* Top positions: Title at top, button below */
.eos-slide-overlay .eos-title-top-left ~ .eos-button-top-left,
.eos-slide-overlay .eos-title-top-center ~ .eos-button-top-center,
.eos-slide-overlay .eos-title-top-right ~ .eos-button-top-right {
    top: 70px !important;
}

/* Center positions: Title above center, button below center */
.eos-slide-overlay .eos-title-center-left ~ .eos-button-center-left,
.eos-slide-overlay .eos-title-center-center ~ .eos-button-center-center,
.eos-slide-overlay .eos-title-center-right ~ .eos-button-center-right {
    top: calc(50% + 30px) !important;
}

/* Bottom positions: Title at bottom, button further below */
.eos-slide-overlay .eos-title-bottom-left ~ .eos-button-bottom-left,
.eos-slide-overlay .eos-title-bottom-center ~ .eos-button-bottom-center,
.eos-slide-overlay .eos-title-bottom-right ~ .eos-button-bottom-right {
    bottom: 20px !important;
    top: auto !important;
}

.eos-slide-overlay .eos-title-bottom-left,
.eos-slide-overlay .eos-title-bottom-center,
.eos-slide-overlay .eos-title-bottom-right {
    bottom: 70px !important;
}

/* Tablet Responsive Anti-Overlap */
@media (min-width: 768px) and (max-width: 1024px) {
    .eos-slide-cta {
        padding: 8px 16px;
        font-size: 0.9rem;
        max-width: 180px;
    }
    
    .eos-title-tablet-top-left ~ .eos-button-tablet-top-left,
    .eos-title-tablet-top-center ~ .eos-button-tablet-top-center,
    .eos-title-tablet-top-right ~ .eos-button-tablet-top-right {
        top: 60px !important;
    }
    
    .eos-title-tablet-center-left ~ .eos-button-tablet-center-left,
    .eos-title-tablet-center-center ~ .eos-button-tablet-center-center,
    .eos-title-tablet-center-right ~ .eos-button-tablet-center-right {
        top: calc(50% + 25px) !important;
    }
    
    .eos-title-tablet-bottom-left ~ .eos-button-tablet-bottom-left,
    .eos-title-tablet-bottom-center ~ .eos-button-tablet-bottom-center,
    .eos-title-tablet-bottom-right ~ .eos-button-tablet-bottom-right {
        bottom: 15px !important;
    }
}

/* Mobile Responsive Anti-Overlap */
@media (max-width: 767px) {
    .eos-slide-cta {
        padding: 8px 16px;
        font-size: 0.9rem;
        max-width: 160px;
    }
    
    .eos-title-mobile-top-left ~ .eos-button-mobile-top-left,
    .eos-title-mobile-top-center ~ .eos-button-mobile-top-center,
    .eos-title-mobile-top-right ~ .eos-button-mobile-top-right {
        top: 50px !important;
    }
    
    .eos-title-mobile-center-left ~ .eos-button-mobile-center-left,
    .eos-title-mobile-center-center ~ .eos-button-mobile-center-center,
    .eos-title-mobile-center-right ~ .eos-button-mobile-center-right {
        top: calc(50% + 20px) !important;
    }
    
    .eos-title-mobile-bottom-left ~ .eos-button-mobile-bottom-left,
    .eos-title-mobile-bottom-center ~ .eos-button-mobile-bottom-center,
    .eos-title-mobile-bottom-right ~ .eos-button-mobile-bottom-right {
        bottom: 10px !important;
    }
}

/* Navigation Buttons */
.eos-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.eos-nav-btn:hover {
    background: #41630F;
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.eos-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.eos-prev {
    left: 15px;
}

.eos-next {
    right: 15px;
}

.eos-nav-btn svg {
    width: 24px;
    height: 24px;
}

/* Arrow Size Variants */
.eos-arrow-small {
    width: 40px;
    height: 40px;
}

.eos-arrow-small svg {
    width: 20px;
    height: 20px;
}

.eos-arrow-medium {
    width: 50px;
    height: 50px;
}

.eos-arrow-medium svg {
    width: 24px;
    height: 24px;
}

.eos-arrow-large {
    width: 60px;
    height: 60px;
}

.eos-arrow-large svg {
    width: 28px;
    height: 28px;
}

/* Dots Navigation */
.eos-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.eos-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.eos-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.eos-dot.active {
    background: #41630F;
    width: 30px;
    border-radius: 6px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .eos-slide-title {
        font-size: 1.3rem;
    }
    
    .eos-slide-cta {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
    
    .eos-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .eos-prev {
        left: 10px;
    }
    
    .eos-next {
        right: 10px;
    }
    
    .eos-dots {
        bottom: 10px;
        gap: 8px;
    }
    
    .eos-dot {
        width: 10px;
        height: 10px;
    }
    
    .eos-dot.active {
        width: 24px;
    }
}

@media (max-width: 480px) {
    .eos-slide-title {
        font-size: 1.1rem;
    }
    
    .eos-slide-overlay {
        padding: 20px 15px 15px;
    }
    
    .eos-nav-btn {
        width: 35px;
        height: 35px;
    }
    
    .eos-nav-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Loading State */
.eos-slider-container.loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.eos-slider-container.loading::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #41630F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Touch and Drag Support */
.eos-slider-track {
    cursor: grab;
}

.eos-slider-track:active {
    cursor: grabbing;
}

/* Accessibility */
.eos-nav-btn:focus,
.eos-dot:focus {
    outline: 2px solid #41630F;
    outline-offset: 2px;
}

/* Animation for slide transitions */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.eos-slide.animating-right {
    animation: slideInRight 0.5s ease;
}

.eos-slide.animating-left {
    animation: slideInLeft 0.5s ease;
}
