* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    overflow-x: hidden;
    width: 100%;
    min-width: 320px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

/* 上排導航樣式 */
.navbar-top {
    background-color: #2F7F7F;
    padding: 0;
    margin: 0;
    height: 40px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
}

.nav-top-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    max-width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 40px;
    position: relative;
}

.nav-logo {
    display: none;
}

.nav-logo a {
    text-decoration: none;
    padding: 0;
    display: flex;
    align-items: center;
    height: 100px;
}

.nav-logo img {
    width: 300px;
    height: 80px;
    display: block;
    object-fit: contain;
    background-color: white;
    padding: 5px;
    border: 2px solid #000;
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* 手機選單遮罩 */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.show {
    opacity: 1;
}

/* 手機選單按鈕 - 桌面版隱藏 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1003;
    position: relative;
}

.mobile-menu-btn .bar {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

/* 漢堡選單動畫 */
.mobile-menu-btn.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box form {
    display: flex;
    margin: 0;
    align-items: center;
    position: relative;
}

.lang-switch {
    position: relative;
    display: flex;
    align-items: center;
    padding: 15px 25px;
    margin: -15px -25px;
}

/* 手機版 Logo（桌面版隱藏） */
.mobile-top-logo {
    display: none;
}

/* 上排搜尋框 */
.top-search-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 500px;
    width: 40%;
}

.top-search-input {
    width: 100%;
    border: none;
    padding: 8px 20px;
    font-size: 14px;
    outline: none;
    background-color: white;
    border-radius: 20px;
}

.top-search-input::placeholder {
    color: #999;
}

.lang-btn {
    background-color: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.lang-btn img {
    width: 30px;
    height: 30px;
    display: block;
    transition: transform 0.3s ease;
}

.lang-btn:hover img {
    transform: scale(1.1);
}

/* 下拉選單樣式 */
.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    min-width: 140px;
    z-index: 1000;
    white-space: nowrap;
    padding-top: 5px;
    margin-top: 0;
}

/* 滑鼠移到語言切換區域時顯示下拉選單 */
.lang-switch:hover .lang-dropdown {
    display: block;
}

/* 讓下拉選單內容有正確的間距 */
.lang-dropdown::before {
    content: '';
    display: block;
    height: 5px;
}

.lang-option:first-child {
    margin-top: 0;
}

.lang-option {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #333;
    font-size: 14px;
    text-align: center;
    display: block;
    width: 100%;
}

.lang-option:last-child {
    border-radius: 0 0 4px 4px;
}

.lang-option:hover {
    background-color: #f5f5f5;
}

.lang-option.active {
    background-color: #2F7F7F;
    color: white;
}

.lang-option.active:hover {
    background-color: #267070;
}

.search-box input {
    padding: 8px 40px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 180px;
    outline: none;
    background-color: white;
    color: #333;
}

.search-button {
    background-color: #000;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    position: absolute;
    right: 0;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* 搜尋按鈕的圓形填充效果 */
.search-button .btn-fill {
    position: absolute;
    display: block;
    border-radius: 50%;
    width: 200%;
    height: 300%;
    top: -100%;
    left: -50%;
    background: #333;
    transform: translate3d(0, -76%, 0);
    transition: transform 0.7s cubic-bezier(0.7, 0, 0.3, 1);
    z-index: 0;
}

.search-button:hover .btn-fill {
    transform: translate3d(0, 0%, 0);
}

.search-button .btn-text {
    position: relative;
    z-index: 1;
}

/* 下排導航樣式 */
.navbar-bottom {
    background-color: white;
    padding: 20px 0;
    margin: 0;
    height: 90px;
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 40px;
    position: relative;
}

.nav-logo-bottom {
    height: 100%;
    display: flex;
    align-items: center;
    margin-left: 0;
    position: static;
}

.nav-logo-bottom a {
    display: block;
    height: 70px;
    width: 350px;
    overflow: hidden;
}

.nav-logo-bottom img {
    height: 100%;
    width: auto;
    object-fit: cover;
    object-position: left top;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0;
    gap: 15px;
}

.nav-menu li {
    margin: 0;
}

.nav-menu li a {
    color: #333;
    text-decoration: none;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    font-weight: bold;
    justify-content: center;
    height: 55px;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
}

/* btn-fill 做圓形填充動畫 */
.nav-menu li a .btn-fill {
    position: absolute;
    display: block;
    border-radius: 50%;
    width: 150%;
    height: 200%;
    top: -50%;
    left: -25%;
    background: linear-gradient(180deg, #2F7F7F 0%, #267070 100%);
    transform: translate3d(0, -76%, 0);
    transition: transform 0.7s cubic-bezier(0.7, 0, 0.3, 1);
    z-index: 0;
}

/* Hover 時從上往下填充 */
.nav-menu li a:hover .btn-fill,
.nav-menu li a.active .btn-fill {
    transform: translate3d(0, 0%, 0);
}

/* 滑鼠移開時回到初始位置 */
.nav-menu li a:not(:hover):not(.active) .btn-fill {
    transform: translate3d(0, -76%, 0);
}

/* 文字顏色變化 */
.nav-menu li a .btn-text {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
    color: #333;
}

.nav-menu li a:hover .btn-text,
.nav-menu li a.active .btn-text {
    color: white;
}

/* 英雄區塊樣式 */
.hero-section {
    background-color: white;
    padding: 0;
    margin-top: 130px;
    width: 100%;
}

.hero-content {
    position: relative;
    width: 100%;
    padding: 0;
    margin: 0;
}

.hero-video {
    width: 100%;
    height: 25vh;
    display: block;
    object-fit: cover;
    margin: 0;
    padding: 0;
    vertical-align: bottom;
}

.hero-image {
    width: 100%;
    height: 300px;
    display: block;
    object-fit: cover;
    margin: 0;
    padding: 0;
    vertical-align: bottom;
}

/* 內容區影片樣式 */
.video-section {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    position: relative;
}

.content-video {
    width: 100%;
    height: auto;
    display: block;
}

.video-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
    width: 90%;
    max-width: 1000px;
}

.video-main-text {
    font-size: 64px;
    font-weight: bold;
    margin: 0 0 30px 0;
    color: white;
    text-shadow: 3px 3px 10px rgba(0,0,0,0.9), 0 0 20px rgba(0,0,0,0.7);
    letter-spacing: 10px;
}

.video-sub-text {
    font-size: 32px;
    margin: 0;
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9), 0 0 15px rgba(0,0,0,0.7);
    letter-spacing: 3px;
    line-height: 1.6;
}

/* 首頁資訊區塊 */
.home-info-section {
    width: 100%;
    padding: 60px 0 100px 0;
    margin-top: 30px;
    position: relative;
    background-color: #e8f4f8;
    background-image: url('/static/images/glacier-park.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
}

.home-info-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.4);
    z-index: 0;
}

.home-info-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(to bottom,
            rgba(255,255,255,1) 0%,
            rgba(255,255,255,0.3) 60px,
            rgba(255,255,255,0.3) calc(100% - 60px),
            rgba(255,255,255,1) 100%);
    z-index: 1;
    pointer-events: none;
}

.info-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.info-row {
    display: flex;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.info-row:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.info-row.reverse {
    flex-direction: row-reverse;
}

.info-image {
    flex: 0 0 500px;
    overflow: hidden;
}

.info-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.info-text {
    flex: 1;
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-text h2 {
    color: #2F7F7F;
    font-size: 28px;
    margin-bottom: 20px;
}

.info-text p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.info-link {
    display: inline-block;
    padding: 12px 30px;
    background-color: #2F7F7F;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s;
    align-self: flex-start;
}

.info-link:hover {
    background-color: #267070;
}


.hero-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 48px;
    font-weight: bold;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    margin: 0;
    text-align: center;
    width: 100%;
    padding: 0 20px;
}

.hero-text {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
}

.hero-description {
    font-size: 32px;
    color: white;
    margin: 0 0 20px 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    line-height: 1.4;
}

.hero-button {
    display: inline-block;
    font-size: 18px;
    color: white;
    background: transparent;
    border: 2px solid white;
    padding: 10px 30px;
    text-decoration: none;
    transition: all 0.3s;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

main {
    max-width: 1600px;
    margin: 2rem auto;
    padding: 0 40px;
    flex: 1;
    margin-bottom: 120px;
    width: 100%;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

h2 {
    color: #555;
}

/* 關於我們整體包裝 */
.about-us-wrapper {
    max-width: 100%;
    margin: 40px auto 40px auto;
    display: flex;
    flex-direction: column;
    animation: slideUpFade 1s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(300px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 關於我們區塊樣式 */
.about-us-section {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: flex-start;
}

.about-us-image {
    flex: 0 0 auto;
    margin-top: 20px;
}

.about-us-image img {
    width: 702px;
    height: 409.45px;
    display: block;
    object-fit: cover;
}

.about-us-content {
    flex: 1;
    margin-top: -120px;
    margin-left: 20px;
}

.about-us-content h2 {
    font-size: 32px;
    font-weight: bold;
    color: #000;
    margin: 0 0 20px 0;
}

.about-us-content p {
    font-size: 14px;
    color: #333;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.more-btn {
    display: inline-block;
    background-color: #C81925;
    color: white;
    width: 109.98px;
    height: 36.58px;
    line-height: 36.58px;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
}

.more-btn:hover {
    opacity: 0.9;
}

/* 關於我們底部圖片 */
.about-us-image-bottom {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.news-content {
    flex: 1;
    text-align: left;
}

.news-content h2 {
    font-size: 32px;
    font-weight: bold;
    color: #000;
    margin: 0 0 20px 0;
}

.news-content p {
    font-size: 14px;
    color: #333;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.about-us-image-bottom img {
    width: 702px;
    height: 409.45px;
    display: block;
    object-fit: cover;
    flex-shrink: 0;
}

/* 上排 Footer 樣式 */
.footer-top {
    background-color: white;
    padding: 0;
    margin: 0;
    height: 50px;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    position: fixed;
    bottom: 50px;
    left: 0;
    right: 0;
    z-index: 999;
}

.footer-top-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 40px;
}

.footer-logo h3 {
    color: #333;
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.footer-links ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
}

.footer-links ul li {
    margin: 0;
}

.footer-links ul li a {
    color: #333;
    text-decoration: none;
    padding: 0 10px;
    display: flex;
    align-items: center;
    height: 50px;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: #2F7F7F;
}

/* 下排 Footer 樣式 */
.footer-bottom {
    background-color: #2F7F7F;
    color: white;
    padding: 0;
    margin: 0;
    height: 50px;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 14px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 998;
}

.footer-bottom-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 40px;
}

.footer-info {
    display: flex;
    gap: 30px;
    align-items: center;
}

.footer-info p {
    color: white;
    margin: 0;
    font-size: 14px;
    white-space: nowrap;
}

/* 首頁樣式 */

.features {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-item {
    text-align: center;
    padding: 20px;
}

.feature-item h3 {
    color: #333;
    margin-bottom: 10px;
}

/* 關於我們頁面樣式 */
.about-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 200px;
}

.about-content h2 {
    margin-top: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.about-content p {
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 產品介紹頁面樣式 */
.products-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 200px;
}

.products-layout {
    display: flex;
    gap: 30px;
    max-width: 1600px;
    margin: 0 auto;
}

.category-sidebar {
    flex: 0 0 160px;
}

.category-sidebar-sticky {
    position: sticky;
    top: 120px;
}

.category-title {
    font-size: 16px;
    margin-bottom: 12px;
    color: #333;
}

.products-content {
    flex: 1;
    min-width: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.product-item {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: white;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f5f5f5;
}

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

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

.product-info {
    padding: 20px;
    text-align: center;
}

.product-info h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.btn {
    display: inline-block;
    background-color: #2F7F7F;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #267070;
}

/* 響應式設計 */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* 產品詳細頁面樣式 */
main:has(.product-detail-wrapper) {
    padding: 0;
    max-width: 100%;
}

.product-detail-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.product-detail-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 30px;
    margin-bottom: 200px;
}

.breadcrumb {
    width: 100%;
    margin-bottom: 20px;
    padding: 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #2F7F7F;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #333;
}

.product-detail-content {
    display: flex;
    gap: 40px;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    align-items: flex-start;
    width: 100%;
    margin: 0;
}

.product-detail-left {
    flex: 0 0 500px;
    min-width: 500px;
}

.product-main-image {
    width: 100%;
    height: 450px;
    min-height: 450px;
    max-height: 450px;
    background-color: #f5f5f5;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.product-thumbnails .thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    object-fit: contain;
    transition: border-color 0.3s;
    padding: 5px;
    background-color: white;
}

.product-thumbnails .thumbnail:hover {
    border-color: #2F7F7F;
}

.product-thumbnails .thumbnail.active {
    border-color: #2F7F7F;
    box-shadow: 0 0 5px rgba(47, 127, 127, 0.3);
}

.product-detail-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 28px;
    color: #333;
    margin: 0 0 20px 0;
    padding: 0;
    font-weight: bold;
    text-align: left;
}

.product-specs {
    margin: 0 0 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-left: 4px solid #2F7F7F;
}

.product-specs .spec-item {
    margin: 5px 0;
    padding: 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
    text-align: left;
}

.product-description {
    margin: 0 0 20px 0;
    padding: 0;
    line-height: 1.6;
    color: #666;
    text-align: left;
}

.product-description p {
    margin: 0 0 10px 0;
    padding: 0;
    text-align: left;
}

.product-features {
    margin: 0 0 30px 0;
    padding: 0;
}

.product-features h3 {
    font-size: 18px;
    color: #333;
    margin: 0 0 10px 0;
    padding: 0;
    text-align: left;
}

.product-features ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.product-features ul li {
    padding: 8px 0 8px 20px;
    margin: 0;
    position: relative;
    color: #666;
    line-height: 1.5;
    text-align: left;
}

.product-features ul li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #2F7F7F;
    font-weight: bold;
    font-size: 20px;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-contact {
    background-color: #2F7F7F;
    flex: 1;
}

.btn-contact:hover {
    background-color: #267070;
}

.btn-back {
    background-color: #666;
    flex: 1;
}

.btn-back:hover {
    background-color: #555;
}

/* 響應式設計 - 產品詳細頁面 */
@media (max-width: 900px) {
    .product-detail-content {
        flex-direction: column;
    }

    .product-detail-left {
        flex: 1;
        width: 100%;
    }

    .product-actions {
        flex-direction: column;
    }
}

/* 最新消息頁面樣式 */
.news-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 30px;
    margin: 0 auto;
    margin-bottom: 200px;
    max-width: 100%;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.news-item {
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.news-date {
    background-color: #333;
    color: white;
    padding: 8px 5px;
    text-align: center;
    min-width: 90px;
    max-width: 90px;
}

.news-date .day {
    display: block;
    font-size: 24px;
    font-weight: bold;
}

.news-date .month {
    display: block;
    font-size: 14px;
}

.news-content {
    padding: 15px;
    flex: 1;
}

.news-content h3 {
    margin-top: 0;
}

/* 聯絡我們頁面樣式 */
.contact-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 40px;
    margin: 0 auto;
    margin-bottom: 120px;
    max-width: 100%;
}

.contact-container {
    display: flex;
    gap: 50px;
    margin-top: 0;
}

.contact-info {
    flex: 1;
}

.contact-info h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
}

.contact-info .info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact-info .info-item i {
    font-size: 20px;
    margin-right: 15px;
    margin-top: 5px;
    color: #2F7F7F;
}

.contact-info .info-item h3 {
    font-size: 16px;
    color: #666;
    margin-bottom: 5px;
}

.contact-info .info-item p {
    font-size: 18px;
    color: #333;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.contact-form {
    flex: 1;
    background-color: #f9f9f9;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    align-self: flex-start;
    margin-top: -20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    border-radius: 4px;
    box-sizing: border-box;
}

button {
    background-color: #333;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #555;
}

/* 響應式設計 */
@media (max-width: 768px) {
    html, body {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    /* 上排導航 */
    .navbar-top {
        height: 60px;
        position: relative;
    }

    .nav-top-container {
        padding: 5px 15px;
        justify-content: space-between;
        display: flex;
        align-items: center;
        flex-direction: row;
    }

    /* 手機版：語言在最左邊 */
    .lang-switch {
        order: 1;
    }

    /* 手機版：Logo 在上排導航中間（新元素） */
    .mobile-top-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        height: 50px;
        display: flex;
        align-items: center;
        z-index: 1001;
    }

    .mobile-top-logo a {
        display: block;
        height: 40px;
    }

    .mobile-top-logo img {
        height: 142%;
        width: auto;
        object-fit: contain;
        margin-top: -10px;

    }

    /* 隱藏下排導航的 logo */
    .navbar-bottom .nav-logo-bottom {
        display: none !important;
    }

    /* 手機版：搜尋框隱藏 */
    .top-search-container {
        order: 2;
        display: none !important;
    }

    /* 手機版：漢堡選單在最右邊 */
    .mobile-menu-btn {
        order: 3;
    }

    .right-controls {
        gap: 10px;
        position: relative;
        z-index: 1004;
        display: flex;
        align-items: center;
    }

    .lang-btn img {
        width: 24px;
        height: 24px;
    }

    .lang-switch {
        padding: 10px 15px;
        margin: -10px -15px;
        position: relative;
        z-index: 1004;
    }

    /* 手機版：語言下拉選單從左邊展開 */
    .lang-dropdown {
        left: 0;
        right: auto;
        z-index: 1005;
    }

    /* 手機選單按鈕顯示 */
    .mobile-menu-btn {
        display: flex !important;
        z-index: 1004 !important;
    }

    /* 遮罩層顯示 */
    .mobile-overlay {
        display: block !important;
        pointer-events: none;
    }

    .mobile-overlay.show {
        pointer-events: auto;
    }

    /* 下排導航 - 改成從右邊滑出的側邊欄（預設隱藏） */
    .navbar-bottom {
        position: fixed !important;
        top: 0 !important;
        left: auto !important;
        right: -200px !important;
        width: 180px !important;
        height: 100vh !important;
        background-color: white;
        box-shadow: -4px 0 20px rgba(0,0,0,0.3);
        z-index: 1002 !important;
        transition: right 0.5s cubic-bezier(0.7, 0, 0.3, 1) !important;
        overflow-y: auto;
        transform: translateZ(0);
    }

    .navbar-bottom.show {
        right: 0 !important;
    }

    .nav-bottom-container {
        padding: 60px 15px 20px;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu li a {
        padding: 12px 8px;
        height: auto;
        font-size: 13px;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0;
    }

    .nav-menu li a .btn-text {
        color: white;
    }

    .nav-menu li a:hover,
    .nav-menu li a.active {
        background: transparent;
    }

    .nav-menu li a:hover .btn-text,
    .nav-menu li a.active .btn-text {
        color: white;
    }

    /* 圓形填充調整 - 從右往左 */
    .nav-menu li a .btn-fill {
        width: 200%;
        height: 300%;
        top: -100%;
        right: -150%;
        left: auto;
        transform: translate3d(0, 0, 0);
    }

    .nav-menu li a:hover .btn-fill,
    .nav-menu li a.active .btn-fill {
        transform: translate3d(-76%, 0, 0);
    }

    .nav-menu li a:not(:hover):not(.active) .btn-fill {
        transform: translate3d(0, 0, 0);
    }

    /* 英雄區塊 */
    .hero-section {
        margin-top: 0;
    }

    .hero-video {
        height: 35vh;
    }

    .hero-image {
        height: auto;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-text {
        right: 20px;
    }

    .hero-description {
        font-size: 24px;
    }

    /* 影片上的文字 */
    .video-main-text {
        font-size: 28px;
        letter-spacing: 4px;
        margin: 0 0 15px 0;
    }

    .video-sub-text {
        font-size: 16px;
        letter-spacing: 1px;
    }

    /* 聯絡表單 */
    .contact-section {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        padding: 10px 15px !important;
        background: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin-bottom: 20px !important;
    }

    .contact-container {
        display: block !important;
        width: 100% !important;
    }

    .contact-info,
    .contact-form {
        display: block !important;
        width: 100% !important;
        margin-bottom: 20px !important;
    }

    .contact-info {
        padding: 0 !important;
        background: none !important;
    }

    .contact-form {
        padding: 20px !important;
        background-color: #f9f9f9 !important;
        border-radius: 8px !important;
    }

    .contact-info h2 {
        font-size: 22px !important;
    }

    .info-item {
        margin-bottom: 20px !important;
    }

    .info-item h3 {
        font-size: 14px !important;
    }

    .info-item p {
        font-size: 15px !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
        max-width: 100% !important;
    }

    /* 新聞列表 */
    .news-item {
        flex-direction: column;
    }

    .news-date {
        width: 100%;
    }

    /* Footer */
    .footer-top {
        display: none !important;
    }

    .footer-bottom {
        position: relative !important;
        bottom: 0 !important;
        margin-top: auto !important;
        min-height: auto !important;
        height: auto !important;
    }

    .footer-bottom-container {
        padding: 25px 15px !important;
        min-height: auto !important;
    }

    .footer-info {
        flex-direction: column !important;
        gap: 12px !important;
        text-align: center !important;
        width: 100% !important;
    }

    .footer-info p {
        font-size: 13px !important;
        line-height: 1.8 !important;
        margin: 0 !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .footer-contact-row {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
    }

    .footer-separator {
        color: white !important;
        opacity: 0.7 !important;
    }

    /* 主要內容 */
    main {
        margin-bottom: 20px;
        max-width: 100% !important;
        padding: 0 !important;
    }

    /* 首頁影片下方圖片區塊 */
    .home-info-section {
        padding: 30px 15px 50px 15px !important;
        margin-top: 20px !important;
    }

    .info-container {
        gap: 20px !important;
    }

    .info-row {
        flex-direction: column !important;
        margin-bottom: 20px !important;
    }

    .info-row.reverse {
        flex-direction: column !important;
    }

    .info-image {
        flex: none !important;
        width: 100% !important;
        height: 200px !important;
    }

    .info-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .info-text {
        padding: 20px !important;
    }

    .info-text h2 {
        font-size: 22px !important;
        margin-bottom: 15px !important;
    }

    .info-text p {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }

    .info-link {
        font-size: 14px !important;
        padding: 10px 20px !important;
    }

    /* 關於我們 */
    .about-us-wrapper {
        margin: 20px 10px;
        padding: 0 10px;
    }

    .about-us-section {
        flex-direction: column;
        gap: 20px;
    }

    .about-us-image img {
        width: 100%;
        height: auto;
    }

    .about-us-content {
        margin-top: 0;
        margin-left: 0;
        padding: 0 10px;
    }

    .about-us-content h2 {
        font-size: 24px;
    }

    .about-us-content p {
        font-size: 14px;
    }

    .about-us-image-bottom {
        flex-direction: column-reverse;
        gap: 20px;
    }

    .about-us-image-bottom img {
        width: 100%;
        height: auto;
    }

    .news-content h2 {
        font-size: 24px;
    }

    .news-content p {
        font-size: 14px;
    }

    /* 產品分類改成上方縱向 */
    .products-section {
        flex-direction: column !important;
        gap: 20px !important;
        padding: 15px 5px !important;
    }

    .category-sidebar {
        flex: none !important;
        width: 100% !important;
        order: -1;
    }

    .category-sidebar > div {
        position: static !important;
    }

    .category-sidebar h3 {
        font-size: 16px !important;
        margin-bottom: 10px !important;
        padding: 0 10px;
    }

    .category-list {
        display: block !important;
        padding: 0 10px;
    }

    /* 分類按鈕改成縱向排列 */
    .category-list > a {
        display: block !important;
        margin-bottom: 8px !important;
        width: 100%;
    }

    .parent-category-item {
        display: block !important;
        margin-bottom: 8px !important;
        width: 100%;
        position: static !important;
    }

    .parent-category-btn {
        width: 100%;
    }

    .category-list .category-btn {
        width: 100% !important;
        text-align: left;
    }

    /* 子分類改成下方展開 */
    .subcategories {
        position: static !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 5px 0 0 15px !important;
        z-index: auto !important;
        margin-top: 5px !important;
        margin-left: 0 !important;
    }

    .subcategories a {
        margin-bottom: 5px !important;
    }

    /* 產品網格 */
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 0 10px;
    }

    .product-image {
        height: 150px;
    }

    /* 產品詳細頁 */
    .product-detail-container {
        padding: 10px;
        margin-bottom: 50px;
    }

    .product-detail-content {
        flex-direction: column !important;
        padding: 15px !important;
    }

    .product-detail-left {
        flex: 1 !important;
        width: 100% !important;
        min-width: auto !important;
    }

    .product-main-image {
        width: 100% !important;
        height: auto !important;
        min-height: 250px !important;
        max-height: 300px !important;
    }

    .product-main-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }

    .product-thumbnails {
        display: flex !important;
        gap: 8px !important;
        margin-top: 10px !important;
        overflow-x: auto !important;
    }

    .product-thumbnails .thumbnail {
        width: 60px !important;
        height: 60px !important;
        flex-shrink: 0 !important;
    }

    .product-title {
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }

    .product-detail-right {
        width: 100% !important;
        padding: 0 !important;
    }

    /* 新聞頁面 */
    .news-section,
    .about-section {
        padding: 15px 10px;
        margin-bottom: 50px;
    }

    .about-content {
        padding: 0 10px !important;
    }

    .about-content h2 {
        padding: 0 !important;
    }

    .about-content p {
        padding: 0 !important;
    }

    .news-section h1,
    .products-section h1,
    .about-section h1,
    .contact-section h1 {
        font-size: 24px;
    }

    /* 按鈕 */
    .btn,
    .btn-contact,
    .btn-back {
        padding: 10px 15px;
        font-size: 14px;
    }

    .more-btn {
        width: 100px;
        height: 35px;
        line-height: 35px;
        font-size: 12px;
    }
}

/* 小型手機優化 (Portrait) */
@media (max-width: 480px) {
    /* 上排導航 */
    .navbar-top {
        height: 55px;
    }

    .nav-top-container {
        padding: 5px 10px;
    }

    .nav-logo img {
        width: 120px;
        height: 35px;
    }

    .lang-btn img {
        width: 20px;
        height: 20px;
    }

    /* 下排導航 - 確保2x2布局 */
    .nav-bottom-container {
        padding: 8px;
    }

    .nav-menu {
        gap: 6px;
    }

    .nav-menu li {
        flex: 0 0 calc(50% - 3px);
    }

    .nav-menu li a {
        padding: 10px 5px;
        height: 44px;
        font-size: 13px;
    }

    /* 確保圓形填充效果正常 */
    .nav-menu li a .btn-fill {
        width: 220%;
        height: 320%;
    }

    /* 英雄區塊 */
    .hero-title {
        font-size: 24px;
    }

    .hero-description {
        font-size: 18px;
    }

    /* 主要內容 */
    main {
        padding: 0 !important;
        max-width: 100% !important;
    }

    /* 所有卡片 */
    .about-section,
    .products-section,
    .news-section {
        padding: 10px 5px;
        margin-bottom: 30px;
    }

    .contact-section {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        padding: 10px 15px !important;
        background: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin-bottom: 20px !important;
    }

    h1 {
        font-size: 20px;
    }

    h2 {
        font-size: 18px;
    }
}

/* 首頁最新消息輪播 - 在右側文字區域內 */
.info-text .news-carousel-wrapper-full {
    position: relative;
    width: 100%;
    min-height: 450px;
    margin-top: 20px;
}

.news-carousel-card-full {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.news-carousel-card-full.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.news-carousel-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.news-carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-carousel-card-content-full {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-carousel-date-full {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 500;
}

.news-carousel-title-full {
    font-size: 18px;
    color: #333;
    margin: 0;
    line-height: 1.5;
}

.info-text .news-carousel-indicators-full {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    position: relative;
}

.news-carousel-indicators-full .news-indicator-full {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: background-color 0.3s;
}

.news-carousel-indicators-full .news-indicator-full.active {
    background-color: #333;
}

.news-carousel-indicators-full .news-indicator-full:hover {
    background-color: #666;
}

.news-carousel-card-full:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .info-text .news-carousel-wrapper-full {
        min-height: 250px;
    }

    .news-carousel-image {
        height: 120px;
    }

    .news-carousel-card-content-full {
        padding: 12px;
    }

    .news-carousel-title-full {
        font-size: 14px;
    }
}
