/* 首頁跑馬燈 */
#homeCarousel,
.carousel-inner,
.carousel-item {
    background-color: #ffffff !important;
}

.hero-carousel-item {
    width: 100%;
    height: auto !important;
    position: relative;
    background-color: #ffffff !important;
    overflow: hidden;
}

.hero-real-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.hero-text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 8%;
    text-align: left;
    color: #333 !important;
    max-width: 500px;
    z-index: 3;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #333 !important;
}

.hero-desc {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 20px;
    color: #555 !important;
}

.carousel-indicators {
    bottom: 20px;
}

.carousel-indicators button {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50%;
    background-color: #ccc !important;
    border: none;
    margin: 0 6px !important;
    opacity: 0.6;
}

.carousel-indicators button.active {
    background-color: var(--brand-green) !important;
    width: 14px !important;
    height: 14px !important;
    opacity: 1;
}

.banner-nav-btn {
    width: 50px;
    height: 50px;
    background-color: #fff;
    border-radius: 50%;
    opacity: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: all 0.3s;
}

.banner-nav-btn:hover {
    background-color: var(--brand-green);
    color: #fff;
    border-color: var(--brand-green);
    opacity: 1;
}

.banner-prev {
    left: -70px;
}

.banner-next {
    right: -70px;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.3rem;
        margin-bottom: 5px;
    }

    .hero-desc {
        display: none;
    }

    .hero-text {
        top: 50%;
        bottom: auto;
        left: 5%;
        transform: translateY(-50%);
        width: auto;
        max-width: 55%;
        text-align: left;
    }

    .banner-nav-btn {
        display: none;
    }

    /* 新增：按鈕縮小 */
    .hero-btn {
        padding: 5px 20px !important;
        font-size: 0.85rem !important;
    }
}

/* 三個推廣方塊 */
.promo-box {
    position: relative;
    width: 100%;
    height: auto !important;
    aspect-ratio: 1/1;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    padding: 30px;
    overflow: hidden;
    transition: transform 0.3s;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.promo-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.promo-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: #000;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.promo-desc {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
    line-height: 1.8;
    position: relative;
    z-index: 2;
}

.promo-link {
    position: absolute;
    bottom: 25px;
    left: 30px;
    font-size: 1rem;
    font-weight: 800;
    color: #000;
    text-decoration: none;
    z-index: 2;
}

.promo-link:hover {
    color: var(--brand-green);
}

.text-highlight {
    background-color: rgba(255, 255, 255, 0.6);
    padding: 2px 8px;
    display: inline-block;
    margin-bottom: 2px;
}

/* 聯繫我們小圖 */
.contact-icon-img {
    width: auto;
    max-width: 130px;
    height: auto;
    margin-bottom: 15px;
    display: inline-block;
    transition: transform 0.3s;
}

.contact-icon-img:hover {
    transform: translateY(-5px);
}

.contact-title {
    font-weight: 900;
    font-size: 1.25rem;
    color: #000;
    margin-bottom: 8px;
}

.contact-subtitle {
    color: #888;
    font-size: 0.95rem;
    font-weight: normal;
    margin: 0;
}

/* 廣告區塊 */
.ad-section-box {
    background-color: transparent;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.75rem;
    font-weight: bold;
    overflow: hidden;
    position: relative;
}

.ad-section-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #fff;
    position: absolute;
    top: 0;
    left: 0;
}

.ad-text {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 首頁橫向捲動分類 */
.scroll-wrapper-outside {
    position: relative;
    width: 100%;
    padding: 0;
}

.scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 15px;
    scrollbar-width: none;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-left: 0;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

.cat-item {
    min-width: calc((100% - 80px) / 5);
    width: calc((100% - 80px) / 5);
    text-align: center;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.cat-img-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    background-color: #fff;
    margin-bottom: 10px;
    border: 1px solid #eee;
}

.cat-img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.cat-item:hover .cat-img-box img {
    transform: scale(1.05);
}

.cat-overlay-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.85);
    color: var(--brand-green);
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.cat-desc-box {
    background-color: transparent;
    padding: 0;
    text-align: center;
    margin-top: 10px;
}

.cat-desc-text {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

.nav-btn-out {
    position: absolute;
    top: 179px;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    color: #333;
    transition: all 0.3s;
}

.nav-btn-out:hover {
    background-color: var(--brand-green);
    color: #fff;
    border-color: var(--brand-green);
}

.nav-left-out {
    left: -70px;
}

.nav-right-out {
    right: -70px;
}

/* 理念與小知識 (首頁) */
.info-banner-box {
    position: relative;
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-left: 50px;
    padding-right: 20px;
    border-radius: 4px;
    overflow: hidden;
}

.info-content {
    color: #fff;
    z-index: 2;
    width: 100%;
}

.info-banner-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
    transition: background 0.3s;
}

.info-banner-box:hover::before {
    background: rgba(0, 0, 0, 0.35);
}

.info-small-title {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.info-big-title {
    font-size: 2.2rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.info-right-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.info-right-desc {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

/* 新品上市 */
.arrival-small-box,
.arrival-large-box {
    width: 100%;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.arrival-small-box {
    height: 350px;
}

.arrival-large-box {
    height: 500px;
}

.arrival-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s;
}

.arrival-small-box:hover .arrival-img,
.arrival-large-box:hover .arrival-img {
    transform: scale(1.05);
}

.arrival-sub-title {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #333;
    margin-bottom: 10px;
}

.badge-new-custom {
    background-color: #bfcd30;
    color: #fff;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 2px;
    margin-left: 10px;
    vertical-align: middle;
    font-weight: bold;
}

.arrival-main-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #000;
    margin-bottom: 20px;
}

.arrival-desc-text {
    color: #888;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 40px;
    font-weight: 500;
}

/* --- 8. 合作客戶專用樣式 (6欄位版) --- */

/* 1. 背景顏色 */
.bg-client-section {
    background-color: #f0f0f0 !important;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* 2. 客戶項目容器 (修改為 8 欄位) */
.client-item-slide {
    /* ▼▼▼ 修改這裡：電腦版一排 8 個 ▼▼▼ */
    /* (總寬 100% - 7個間距*20px) / 8個項目 */
    min-width: calc((100% - 140px) / 8);
    width: calc((100% - 140px) / 8);
    /* ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲ */

    flex-shrink: 0;
    scroll-snap-align: start;
    text-align: center;
    padding: 0 2px;
    /* 稍微留一點緩衝，避免邊緣重疊 */
}

/* 3. 卡片樣式 */
.client-box-single {
    width: 100%;
    height: 180px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    margin: 0 auto;
}

.client-box-single:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.client-box-single img {
    max-width: 90%;
    max-height: 90px;
    object-fit: contain;
    margin-bottom: 10px;
}

.client-name-text {
    font-size: 1rem;
    font-weight: bold;
    color: #555;
    padding: 0 5px;
    /* 稍微縮小內距，因為卡片變窄了 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* 4. 按鈕位置 (垂直置中) */
.client-nav-btn {
    position: absolute;
    top: 50% !important;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    color: #333;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.client-nav-btn:hover {
    background-color: #8DB750;
    color: #fff;
    border-color: #8DB750;
}

.client-prev {
    left: -60px;
}

.client-next {
    right: -60px;
}

/* RWD: 手機版維持 2 個，平板版可以改 4 個 */
@media (max-width: 992px) {
    .client-item-slide {
        min-width: calc((100% - 60px) / 4);
        /* 平板一排 4 個 */
        width: calc((100% - 60px) / 4);
    }
}

@media (max-width: 768px) {
    .client-item-slide {
        min-width: calc((100% - 20px) / 2);
        /* 手機一排 2 個 */
        width: calc((100% - 20px) / 2);
    }

    .client-nav-btn {
        display: none;
    }
}

/* 閱讀文章 (首頁) */
.article-img-box {
    width: 100%;
    aspect-ratio: 470 / 306;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #f0f0f0;
}

.article-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-img {
    transform: scale(1.05);
}

.article-title {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 8px;
    letter-spacing: 1px;
    font-weight: 500;
}

.article-link {
    display: inline-block;
    padding: 6px 20px;
    border: 1px solid #888;
    border-radius: 50px;
    font-size: 0.85rem;
    color: #555;
    text-decoration: none;
    transition: all 0.3s;
    margin-top: 10px;
}

.article-link:hover {
    background-color: var(--brand-green);
    color: #fff;
    border-color: var(--brand-green);
}

/* RWD 補充 */
@media (max-width: 1200px) {
    .cat-item {
        min-width: calc((100% - 60px) / 4);
        width: calc((100% - 60px) / 4);
    }
}

@media (max-width: 992px) {
    .cat-item {
        min-width: calc((100% - 40px) / 3);
        width: calc((100% - 40px) / 3);
    }
}

@media (max-width: 768px) {
    .nav-btn-out {
        display: none;
    }

    .cat-item {
        min-width: calc((100% - 20px) / 2);
        width: calc((100% - 20px) / 2);
    }
}