/**
 * MG Category Carousel Styles
 *
 * @package MG_Category_Carousel
 */

/* ==================== MAIN CONTAINER ==================== */

.mgcc-container {
    position: relative;
    width: 100%;
    background-color: #f5f3ef;
    padding: 40px;
}

/* ==================== TITLE ==================== */

.mgcc-title {
    font-size: 28px;
    font-weight: 400;
    color: #333;
    margin: 0 0 30px 0;
}

/* ==================== CAROUSEL WRAPPER (Desktop) ==================== */

.mgcc-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.mgcc-carousel {
    flex: 1;
    overflow: hidden;
}

.mgcc-track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
}

/* ==================== CARD ==================== */

.mgcc-card {
    position: relative;
    flex: 0 0 calc((100% - 40px) / 3);
    height: 280px;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    display: block;
}

.mgcc-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.mgcc-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 50%);
    pointer-events: none;
}

.mgcc-card-name {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: #fff;
    font-size: 18px;
    font-weight: 400;
    z-index: 2;
}

/* Hover Effect - Image zoom in */
.mgcc-card:hover .mgcc-card-image {
    transform: scale(1.1);
}

/* ==================== ARROWS ==================== */

.mgcc-arrow {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #333;
    font-size: 24px;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.mgcc-arrow:hover {
    color: #000;
}

.mgcc-arrow-prev {
    margin-right: 10px;
}

.mgcc-arrow-next {
    margin-left: 10px;
}

.mgcc-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}


/* ==================== MOBILE LIST ==================== */

.mgcc-mobile-list {
    display: none;
    flex-direction: column;
    gap: 15px;
}

.mgcc-mobile-list .mgcc-card {
    flex: none;
    width: 100%;
    height: 180px;
}

/* ==================== RESPONSIVE ==================== */

/* Tablet */
@media (max-width: 1024px) {
    .mgcc-card {
        flex: 0 0 calc((100% - 20px) / 2);
    }
}

/* Mobile */
@media (max-width: 767px) {
    .mgcc-container {
        padding: 20px 15px;
    }

    .mgcc-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .mgcc-carousel-wrapper {
        display: none !important;
    }

    .mgcc-mobile-list {
        display: flex !important;
    }

    .mgcc-mobile-list .mgcc-card {
        height: 160px;
    }

    .mgcc-card-name {
        font-size: 16px;
        bottom: 15px;
        left: 15px;
    }
}
