/* WP Custom Responsive Slider - Frontend Styles */

:root {
    --wcrs-transition: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --wcrs-radius: 16px;
}

/* Slider Container */
.wcrs-slider-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.wcrs-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Slider Track */
.wcrs-slider-track {
    display: flex;
    transition: transform var(--wcrs-transition);
    will-change: transform;
}

/* Slide Items - Mobile: 1:1 horizontal with peek */
.wcrs-slide {
    flex-shrink: 0;
    width: calc(100% - 60px);
    margin-right: 20px;
    position: relative;
    overflow: hidden;
    border-radius: var(--wcrs-radius);
}

.wcrs-slide picture {
    display: block;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* 1:1 aspect ratio */
    position: relative;
    overflow: hidden;
}

.wcrs-slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--wcrs-radius);
}

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

.wcrs-nav:hover {
    background: #d4af37;
    box-shadow: 0 4px 12px rgba(212,175,55,0.3);
}

.wcrs-nav svg {
    width: 20px;
    height: 20px;
    fill: #1a1a1a;
}

.wcrs-nav:hover svg {
    fill: #ffffff;
}

.wcrs-prev {
    left: 10px;
}

.wcrs-next {
    right: 10px;
}

/* Hide navigation on mobile */
@media (max-width: 768px) {
    .wcrs-nav {
        display: none;
    }
}

/* Pagination Dots */
.wcrs-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

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

.wcrs-dot:hover {
    background: rgba(212, 175, 55, 0.5);
    transform: scale(1.2);
}

.wcrs-dot.active {
    background: #d4af37;
    width: 24px;
    border-radius: 5px;
}

/* Desktop: 9:16 ratio, 4 columns + 50% peek */
@media (min-width: 769px) {
    .wcrs-slider-container {
        padding: 0 5%;
    }
    
    .wcrs-slide {
        width: calc((100% - 60px) / 4.5); /* 4 full + 0.5 peek */
        margin-right: 15px;
    }
    
    .wcrs-slide picture {
        padding-bottom: 177.78%; /* 9:16 aspect ratio (16/9 * 100) */
    }
    
    .wcrs-nav {
        display: flex;
    }
}

/* Touch Scroll for Mobile */
@media (max-width: 768px) {
    .wcrs-slider-container {
        padding: 0 20px;
    }
    
    .wcrs-slider-track {
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }
}

/* Smooth transitions */
.wcrs-slider-track.transitioning {
    transition: transform var(--wcrs-transition);
}

.wcrs-slider-track:not(.transitioning) {
    transition: none;
}

/* Link styling */
.wcrs-slide a {
    display: block;
    text-decoration: none;
}

/* Loading state */
.wcrs-slider-container.loading {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcrs-slider-container.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid rgba(212, 175, 55, 0.2);
    border-top-color: #d4af37;
    border-radius: 50%;
    animation: wcrs-spin 0.8s linear infinite;
}

@keyframes wcrs-spin {
    to { transform: rotate(360deg); }
}
