.page-main-title {
    text-align: center;
    margin: 40px 0;
    font-size: 2rem;
    font-weight: bold;
    color: #444;
    letter-spacing: 2px;
}

.sidebar-box {
    padding-right: 20px;
}

.sidebar-header {
    font-size: 1.2rem;
    font-weight: 800;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.sidebar-group-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--brand-green);
    margin-top: 20px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}

.sidebar-link {
    display: block;
    color: #666;
    padding: 6px 0 6px 15px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    border-left: 2px solid transparent;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #000;
    border-left-color: var(--brand-green);
    padding-left: 20px;
    font-weight: bold;
    background-color: #f9f9f9;
}

/* 右側 Banner (修正版：依照 1920x400 比例自動展開) */
.category-banner {
    width: 100%;
    height: auto;
    aspect-ratio: 1920 / 400;
    background-color: #eaddd3;
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.category-banner.has-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.banner-text-box {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
}

.banner-title {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.banner-desc {
    font-size: 1.1rem;
    border-top: 1px solid #fff;
    border-bottom: 1px solid #fff;
    padding: 5px 15px;
    display: inline-block;
}

.prod-card {
    border: none;
    margin-bottom: 30px;
    transition: transform 0.3s;
    position: relative;
}

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

.prod-img-box {
    width: 100%;
    aspect-ratio: 1/1;
    background-color: #fff;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f0f0f0;
}

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

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

.badge-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #fff;
    z-index: 2;
    border-radius: 2px;
}

.bg-new {
    background-color: #bfcd30;
}

.prod-title {
    text-align: center;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
}

.prod-title:hover {
    color: #000;
}

.pagination {
    justify-content: center;
    margin-top: 30px;
}

.page-link {
    color: #555;
    border: none;
    margin: 0 3px;
    background: transparent;
}

.page-item.active .page-link {
    background-color: #eee;
    color: #000;
    font-weight: bold;
    border-radius: 50%;
}

.page-link:hover {
    background-color: #f0f0f0;
    color: var(--brand-green);
    border-radius: 50%;
}

/* 產品內頁圖庫 */
.product-gallery-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 大圖區 */
.main-img-col {
    order: -1;
    background-color: #fff;
    border: 1px solid #eee;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.2s;
}

/* 左右箭頭 */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.35);
    color: #fff;
    border: none;
    width: 36px;
    height: 52px;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}
.gallery-arrow:hover { background: rgba(0,0,0,0.6); }
.gallery-arrow-left  { left: 6px; }
.gallery-arrow-right { right: 6px; }

/* 縮圖列（換行） */
.thumb-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.thumb-item {
    aspect-ratio: 1 / 1;
    border: 2px solid #eee;
    cursor: pointer;
    opacity: 0.65;
    transition: all 0.25s;
    padding: 4px;
    box-sizing: border-box;
    overflow: hidden;
}

.thumb-item:hover,
.thumb-item.active {
    opacity: 1;
    border-color: var(--brand-green);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 縮圖列：自動填滿大圖寬度，均勻分散 */
.thumb-list-col {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 8px;
}

.badge-hot-custom {
    background-color: #557b56;
    color: #fff;
    padding: 5px 12px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 15px;
}

.product-title-main {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.product-specs-text {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 30px;
}

.action-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    margin-right: 20px;
    transition: color 0.2s;
}

.action-links a:hover {
    color: var(--brand-green);
}

.product-meta-footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #666;
}

.meta-row {
    margin-bottom: 10px;
}

.social-icons a {
    color: #888;
    margin-right: 15px;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--brand-green);
}

/* 頁籤 & 建議商品 (部分樣式共用 home) */
.tab-link-custom {
    color: #666;
    font-size: 1.2rem;
    border: none !important;
    background: transparent !important;
    padding-bottom: 10px;
    position: relative;
}

.tab-link-custom.active {
    color: #333;
    font-weight: bold;
}

.tab-link-custom.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #333;
}

.measure-box {
    border: 1px solid var(--brand-green);
    border-radius: 15px;
    padding: 30px;
    background-color: #fff;
    max-width: 800px;
}

/* 建議商品 */
.rec-carousel-wrapper {
    position: relative;
    padding: 0 40px;
}

.rec-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-bottom: 10px;
}

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

.rec-item {
    flex: 0 0 calc(25% - 15px);
    max-width: calc(25% - 15px);
    text-align: center;
    user-select: none;
}

.rec-img-box {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #eee;
    background: #fff;
}

.rec-img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

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

.rec-title {
    color: #555;
    font-size: 0.95rem;
    margin-top: 10px;
}

.rec-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.rec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    transition: background 0.3s;
}

.rec-dot.active {
    background-color: #333;
}

@media(max-width: 768px) {
    .rec-item {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }

    .category-banner {
        aspect-ratio: unset !important;
        height: 200px !important;
        background-size: cover !important;
        background-position: center center !important;
        width: 100% !important;
    }

    .product-gallery-wrapper {
        gap: 8px;
    }

    .main-img-col {
        width: 100%;
    }

    .thumb-list-col {
        grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    }
}

/* 加入詢問單按鈕 */
.btn-inquiry-full {
    display: block;
    width: 100%;
    background-color: #fff;
    border: 2px solid #8DB750;
    color: #8DB750;
    text-align: center;
    padding: 12px 0;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 15px;
    transition: all 0.3s;
}

.btn-inquiry-full:hover {
    background-color: #8DB750;
    color: #fff;
}

/* 建議商品 - 左右導航按鈕樣式 */
.nav-btn-out {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: #555;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    outline: none;
}

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

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

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

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

    .rec-carousel-wrapper {
        padding: 0;
    }
}

/* 篩選 Checkbox 樣式 */
.filter-checkbox {
    cursor: pointer;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
}

.filter-checkbox:checked {
    background-color: #8DB750;
    border-color: #8DB750;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.filter-checkbox:hover {
    border-color: #8DB750;
}

.filter-checkbox:focus {
    border-color: #8DB750;
    box-shadow: 0 0 0 0.25rem rgba(141, 183, 80, 0.25);
}

.form-check-label {
    cursor: pointer;
    user-select: none;
    padding-left: 5px;
    margin-top: 2px;
}

.form-check {
    padding-left: 0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

/* 聯絡我們按鈕 */
.btn-contact-large {
    display: block;
    width: 100%;
    background-color: #8DB750;
    color: #fff;
    text-align: center;
    padding: 12px 0;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.btn-contact-large:hover {
    background-color: #7aa042;
    color: #fff;
}

/* 分類標籤文字 */
.meta-label {
    font-weight: 600;
    color: #555;
    margin-right: 8px;
    display: inline-block;
    min-width: 40px;
}

/* ===== 手機版篩選 Accordion ===== */
.mobile-filter-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s;
}

.mobile-filter-toggle:hover {
    border-color: var(--brand-green);
}

.mobile-filter-toggle .toggle-icon {
    font-size: 1.5rem;
    line-height: 1;
    color: var(--brand-green);
    font-weight: 300;
    transition: transform 0.2s;
}

.mobile-filter-body {
    display: none;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 12px 16px 16px;
    background: #fff;
}

.mobile-filter-body.open {
    display: block;
}

/* Tab 列 */
.mobile-filter-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 14px;
}

.mf-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 0.95rem;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}

.mf-tab.active {
    color: var(--brand-green);
    font-weight: bold;
    border-bottom-color: var(--brand-green);
}

/* 其他商品小標題 */
.mf-others-title {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 6px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

/* 手機選單 + 号切換 */
.mobile-submenu-toggle[aria-expanded="true"] .bi-plus-lg::before {
    content: "\f374"; /* bi-x-lg */
}
.mobile-submenu-toggle {
    border: none;
    background: none;
    line-height: 1;
}
