/* ============================================= */
/* PRODUCT CARD CAROUSEL - SLIDER                */
/* ============================================= */

/* ===== CAROUSEL CONTAINER ===== */
.product-carousel-container {
    position: relative;
    width: 100%;
    margin: 40px 0;
    padding: 0 40px;
    overflow: hidden;
}

.product-carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px;
    padding: 10px 0;
}

/* ===== CAROUSEL ITEMS ===== */
.carousel-item {
    flex: 0 0 calc(100% / 4 - 15px); /* 4 cards per view */
    min-width: calc(100% / 4 - 15px);
    transition: all 0.3s ease;
    opacity: 1;
}

/* Active card highlight */
.carousel-item.active {
    transform: scale(1.02);
}

/* ===== NAVIGATION BUTTONS ===== */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 2px solid #2d3194;
    color: #2d3194;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-btn:hover {
    background: #2d3194;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
}

.carousel-btn:disabled:hover {
    background: #f5f5f5;
    color: #999;
    transform: translateY(-50%);
}

/* ===== PAGINATION DOTS ===== */
.carousel-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
}

.pagination-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-dot.active {
    background: #2d3194;
    transform: scale(1.2);
}

.pagination-dot:hover {
    background: #2d3194;
    transform: scale(1.1);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .carousel-item {
        flex: 0 0 calc(100% / 3 - 13px); /* 3 cards */
        min-width: calc(100% / 3 - 13px);
    }
}

@media (max-width: 992px) {
    .product-carousel-container {
        padding: 0 35px;
    }
    
    .carousel-item {
        flex: 0 0 calc(100% / 2 - 10px); /* 2 cards */
        min-width: calc(100% / 2 - 10px);
    }
    
    .carousel-btn {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .product-carousel-container {
        padding: 0 30px;
        margin: 30px 0;
    }
    
    .carousel-item {
        flex: 0 0 calc(100% / 1.5 - 10px); /* 1.5 cards (partial view) */
        min-width: calc(100% / 1.5 - 10px);
    }
    
    .carousel-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .product-carousel-container {
        padding: 0 25px;
    }
    
    .carousel-item {
        flex: 0 0 100%; /* 1 card */
        min-width: 100%;
    }
    
    .carousel-pagination {
        margin-top: 20px;
    }
}

/* ===== AUTOPLAY INDICATOR ===== */
.carousel-autoplay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

.autoplay-toggle {
    width: 40px;
    height: 20px;
    background: #ddd;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
}

.autoplay-toggle.active {
    background: #2d3194;
}

.autoplay-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.autoplay-toggle.active::after {
    transform: translateX(20px);
}

/* ===== LOADING STATE ===== */
.carousel-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2d3194;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== TOUCH SUPPORT ===== */
.product-carousel {
    touch-action: pan-y pinch-zoom;
}

.carousel-item {
    user-select: none;
}