/**
 * MG Brand Carousel 2 Styles
 *
 * @package MG_Brand_Carousel_2
 */

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

.mgbc2-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

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

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

/* ==================== CATEGORY BUTTONS ==================== */

.mgbc2-category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.mgbc2-category-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 400;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.mgbc2-category-btn:hover {
    border-color: #333;
}

.mgbc2-category-btn.active {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

/* ==================== CONTENT CONTAINER ==================== */

.mgbc2-content-container {
    position: relative;
}

.mgbc2-content-item {
    width: 100%;
}

.mgbc2-content-item:not(.active) {
    display: none;
}

/* ==================== LAYOUT ==================== */

.mgbc2-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* ==================== IMAGE ==================== */

.mgbc2-image {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.mgbc2-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==================== CONTENT ==================== */

.mgbc2-content {
    padding: 20px 0;
}

.mgbc2-quote {
    margin: 0 0 30px 0;
    padding: 0;
    font-size: 24px;
    font-weight: 400;
    font-style: italic;
    line-height: 1.5;
    color: #333;
    border: none;
    quotes: """ """ "'" "'";
}

.mgbc2-quote::before {
    content: open-quote;
}

.mgbc2-quote::after {
    content: close-quote;
}

.mgbc2-brand {
    margin-bottom: 8px;
}

.mgbc2-brand-link {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.3s ease;
}

a.mgbc2-brand-link:hover {
    color: #000;
}

.mgbc2-location {
    margin: 0 0 30px 0;
    font-size: 14px;
    color: #666;
}

/* ==================== SHOP BUTTON ==================== */

.mgbc2-shop-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #fff;
    color: #000;
    border: 2px solid #000;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mgbc2-shop-btn:hover {
    background-color: #000;
    color: #fff;
}

/* ==================== ANIMATIONS ==================== */

.mgbc2-content-item {
    opacity: 1;
    transition: opacity 0.4s ease;
}

.mgbc2-content-item.fade-out {
    opacity: 0;
}

.mgbc2-content-item.fade-in {
    opacity: 1;
}

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

@media (max-width: 1024px) {
    .mgbc2-layout {
        gap: 40px;
    }

    .mgbc2-quote {
        font-size: 20px;
    }
}

@media (max-width: 767px) {
    .mgbc2-container {
        padding: 0;
        width: 100%;
    }

    .mgbc2-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .mgbc2-category-buttons {
        gap: 8px;
        margin-bottom: 30px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }

    .mgbc2-category-btn {
        padding: 8px 16px;
        font-size: 13px;
        flex-shrink: 0;
    }

    .mgbc2-content-container,
    .mgbc2-content-item,
    .mgbc2-layout {
        width: 100%;
    }

    .mgbc2-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* 手機版圖片強制填滿寬度 - 使用高優先級覆蓋 Elementor inline style */
    .mgbc2-container .mgbc2-layout .mgbc2-image,
    .elementor-widget-mgbc2-brand-carousel-2 .mgbc2-image {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

    .mgbc2-container .mgbc2-layout .mgbc2-image img,
    .elementor-widget-mgbc2-brand-carousel-2 .mgbc2-image img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }

    .mgbc2-quote {
        font-size: 18px;
        margin-bottom: 20px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .mgbc2-brand-link {
        font-size: 16px;
    }

    .mgbc2-location {
        margin-bottom: 20px;
    }

    .mgbc2-shop-btn {
        padding: 10px 24px;
        font-size: 13px;
    }

    .mgbc2-content {
        padding: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}
