/**
 * Elementor Product Carousel Styles
 */

/* CSS Variables for shadow levels */
:root {
    --epc-shadow-none: none;
    --epc-shadow-small: 0 2px 8px rgba(0, 0, 0, 0.1);
    --epc-shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
    --epc-shadow-large: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Carousel Container */
.epc-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.epc-carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.epc-carousel-slide {
    flex: 0 0 calc(100% / var(--epc-slides-to-show, 3));
    padding: 0 10px;
    box-sizing: border-box;
}

/* Product Card */
.epc-product-card {
    position: relative;
    background-color: #f5f5f0;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.epc-product-card:hover {
    transform: translateY(-5px);
}

/* Product Tag */
.epc-product-tag {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #1a237e;
    color: #ffffff;
    padding: 8px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

/* Product Image */
.epc-product-image {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #f0f0f0;
}

.epc-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.epc-main-image {
    opacity: 1;
    transform: scale(1);
}

.epc-hover-image {
    opacity: 0;
    transform: scale(1.05);
}

.epc-product-card:hover .epc-main-image {
    opacity: 0;
    transform: scale(1.05);
}

.epc-product-card:hover .epc-hover-image {
    opacity: 1;
    transform: scale(1);
}

/* Product Content */
.epc-product-content {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.epc-product-name {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
    color: #333333;
    line-height: 1.3;
}

.epc-product-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.epc-product-name a:hover {
    color: #1a237e;
}

.epc-product-description {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.epc-product-price {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a237e;
    line-height: 1.3;
}

.epc-product-price .amount {
    font-size: inherit;
    font-weight: inherit;
}

/* Product Button */
.epc-product-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #1a237e;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.epc-product-button:hover {
    background-color: #0d1442;
    transform: translateY(-2px);
}

.epc-button-arrow {
    transition: transform 0.3s ease;
}

.epc-product-button:hover .epc-button-arrow {
    transform: translateX(5px);
}

/* Navigation Arrows */
.epc-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: #ffffff;
    color: #333333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 20;
    user-select: none;
}

.epc-arrow-prev {
    left: 10px;
}

.epc-arrow-next {
    right: 10px;
}

.epc-carousel-arrow:hover {
    background-color: #1a237e;
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.epc-carousel-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

/* Navigation Dots */
.epc-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.epc-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #cccccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.epc-carousel-dot:hover {
    background-color: #999999;
    transform: scale(1.2);
}

.epc-carousel-dot.active {
    background-color: #1a237e;
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .epc-carousel-slide {
        flex: 0 0 calc(100% / 2);
    }
}

@media (max-width: 768px) {
    .epc-carousel-slide {
        flex: 0 0 100%;
    }
    
    .epc-arrow-prev {
        left: 10px;
    }
    
    .epc-arrow-next {
        right: 10px;
    }
    
    .epc-product-image {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .epc-product-card {
        padding: 15px;
    }
    
    .epc-product-image {
        height: 200px;
    }
    
    .epc-product-name {
        font-size: 16px;
    }
    
    .epc-product-description {
        font-size: 13px;
    }
    
    .epc-product-button {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Loading State */
.epc-carousel.loading .epc-carousel-track {
    opacity: 0.5;
}

/* Touch support */
.epc-carousel {
    touch-action: pan-y;
    user-select: none;
}

.epc-carousel-track {
    touch-action: pan-y;
}

/* Accessibility */
.epc-carousel-arrow:focus,
.epc-carousel-dot:focus {
    outline: 2px solid #1a237e;
    outline-offset: 2px;
}

.epc-product-button:focus {
    outline: 2px solid #1a237e;
    outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
.epc-product-card,
.epc-product-image img,
.epc-product-button,
.epc-carousel-arrow,
.epc-carousel-dot {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Editor Placeholder Styles */
.epc-carousel-editor-placeholder {
    padding: 40px;
    text-align: center;
    background: #f5f5f5;
    border-radius: 8px;
    border: 2px dashed #ccc;
}

.epc-placeholder-content {
    color: #666;
}

.epc-placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.epc-carousel-editor-placeholder h3 {
    margin: 0 0 8px 0;
    color: #333;
}

.epc-carousel-editor-placeholder p {
    margin: 0;
}
