body {    font-family: 'Arial', sans-serif;    background-color: #f8f9fa;     margin: 0;    padding: 0;}

/* 頂部導航區域 */
.header-wrap {
    display: flex;
    width: 100%;
    margin-top: 30px; /* 電腦版頂部邊界 */
    margin-bottom: 10px; /* 新增：電腦版底部間距 */
}

/* 左側Logo區域 */
.logo-area {
    background-color: #f8f9fa; /* 淺灰色背景 */
    flex: 0 0 45%; /* 固定寬度佔比 */
    padding: 15px 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.logo-area a {
    margin-left: 50px; /* Logo左側距離 */
}

.logo-area img {
    height: 49px; /* Logo 高度 */
}

/* 右側選單區域 */
.menu-area {
    background-color: #222222; /* 深黑色背景 */
    flex: 1; /* 佔用剩餘空間 */
    /* padding: 20px 0; */ /* 暫時移除或調整 padding，由內部元素控制 */
    position: relative;
    display: flex; /* 新增：使內部元素可以並排 */
    align-items: stretch; /* 新增：使內部元素（圖片和選單容器）高度一致 */
}

/* 選單容器 */
.menu-container {
    display: flex;
    justify-content: flex-end; /* 菜單靠右 */
    /* padding-right: 50px; */ /* 選單容器的右邊距 */
    padding: 20px 50px 20px 20px; /* 上 右 下 左 - 給選單內容留出空間*/
    flex-grow: 1; /* 新增：佔據剩餘空間 */
}

.menu-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-list li {
    display: flex;
    align-items: center;
}

.menu-list li a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0 15px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.menu-list li a:hover {
    color: #fff;
}

.menu-list li:not(:last-child)::after {
    content: '|';
    color: rgba(255, 255, 255, 0.4);
    display: inline-block;
}

.menu-list li:last-child a {
    /* font-weight: bold; */ /* 移除粗體樣式 */
    color: #fff;
}

/* 導航列分隔圖像 */
.nav-separator-graphic {
    /* display: block; */ /* 改為 flex item 的一部分 */
    /* height: 85px; */ /* 移除固定高度，改為自適應 */
    height: 100%; /* 嘗試使其填滿父容器高度 */
    object-fit: contain; /* 保持長寬比並完整顯示 */
    /* padding-left: 20px; */ /* 移除，由 menu-container 的 padding 控制間距 */
    width: 30px; /* 設定一個明確的寬度，避免無限延展，請根據SVG調整 */
    /* max-width: 50px; */ /* 限制最大寬度，避免圖片過大，根據實際圖片調整 */
}

/* 行動裝置版選單按鈕 */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #000;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero section 主視覺樣式 - index.php */
.hero-section {
    position: relative;
    height: 415px;
    overflow: hidden;
    background-color: #004899;
    background-image: url('../img/index_top_bg.svg');
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: contain;
}

.hero-section .hero-left-bg { /* More specific for index.php hero */
    position: absolute;
    left: 0;
    top: 0;
    width: 44.9%;
    height: 100%;
    padding: 0;
    background-color: #004899;
    z-index: 1;
}

.hero-section .hero-right-bg { /* More specific for index.php hero */
    position: absolute;
    right: 0;
    top: 0;
    width: 55.1%;
    height: 100%;
    background-color: #d3ebff; /* Existing light blue background */
    z-index: 0;
    background-image: url('../img/index_top_bg.svg'); /* Added here */
    background-repeat: no-repeat;
    background-position: center center; /* Or adjust as needed */
    background-size: cover; /* Or adjust as needed */
}

.hero-section .hero-text-container { /* More specific for index.php hero */
    position: absolute;
    left: 0;
    top: 0;
    width: 44.9%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 5%;
    padding-right: 100px;
    color: #fff;
    z-index: 2;
    align-items: flex-start;
    background-image: url(../img/hero-text-r.svg);
    background-repeat: no-repeat;
    background-position: right center;
    background-size: auto 100%;
    background-color: #004899;
}

.hero-section .hero-text-container h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.hero-section .hero-text-container p {
    font-size: 1.2rem;
    margin: 0;
}

.hero-section .hero-image-container { /* More specific for index.php hero */
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 50%; /* Reduced from 50% to allow text container to be wider if needed */
    /* max-width: 600px; */ /* Example max-width */
    text-align: right;
    z-index: 1;
    /* background-image: url('../img/index_top_bg.svg'); */ /* Removed from here */
    /* background-repeat: no-repeat; */
    /* background-position: center center; */
    /* background-size: cover; */
}

.hero-section .hero-image-container img {
    max-width: 90%;
    max-height: 350px;
}

/* Hero Section Carousel Fade Effect */
.hero-image-container .carousel-fade .carousel-item {
    opacity: 0;
    transition-duration: .6s;
    transition-property: opacity;
}

.hero-image-container .carousel-fade .carousel-item.active,
.hero-image-container .carousel-fade .carousel-item-next.carousel-item-left,
.hero-image-container .carousel-fade .carousel-item-prev.carousel-item-right {
    opacity: 1;
}

.hero-image-container .carousel-fade .active.carousel-item-left,
.hero-image-container .carousel-fade .active.carousel-item-right {
    opacity: 0;
}

.hero-image-container .carousel-fade .carousel-item-next,
.hero-image-container .carousel-fade .carousel-item-prev,
.hero-image-container .carousel-fade .carousel-item.active,
.hero-image-container .carousel-fade .active.carousel-item-left,
.hero-image-container .carousel-fade .active.carousel-item-prev {
    transform: translateX(0);
    transform: translate3d(0, 0, 0);
}

/* Ensure carousel images in hero section maintain their styling */
.hero-image-container .carousel-inner img {
    max-width: 100%; /* Allow image to fill container width */
    max-height: 350px; /* Maintain max height */
    object-fit: contain; /* Ensure image is scaled correctly */
}

/* 最新消息區塊 */
.news-section {
    padding: 40px 0;
    background-color: #f8f9fa;
}

.news-list-container {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.news-section h2 {
    margin-bottom: 20px;
    font-weight: bold;
    border-left: 5px solid #0056b3;
    padding-left: 10px;
}

.news-item {
    margin-bottom: 10px;
    display: flex;
    /* justify-content: space-between; */ /* Removed to allow items to align left */
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item .date {
    color: #6c757d;
    margin-right: 15px;
    white-space: nowrap;
}

.news-item .title {
    flex-grow: 1;
}

.more-news {
    text-align: right;
    margin-top: 20px;
}

.more-news a {
    color: #0056b3;
    text-decoration: none;
    font-weight: bold;
}

/* 精選商品區塊 */
.featured-products-section {
    padding: 60px 0;
    background-color: #0056b3;
    background-image: url(../img/bg_01.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
}

.featured-products-section h2 {
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
}

.featured-products-section .sub-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 0.9rem;
    color: #e0e0e0;
}

.product-card {
    background-color: #f8f9fa;
    border: none;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card img {
    max-height: 150px;
    object-fit: contain;
    margin: 20px auto 10px;
    padding: 10px;
}

.product-card .card-body {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.product-card .card-title {
    font-size: 1rem;
    font-weight: bold;
    margin-top: auto;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 15px;
    background-size: 60%;
}

.carousel-control-prev {
    /* left: -50px; /* REMOVED Global offset */
}

.carousel-control-next {
    /* right: -50px; /* REMOVED Global offset */
}

/* Specific offset for featured products carousel on DESKTOP ONLY */
@media (min-width: 992px) {
    .featured-products-section .carousel-control-prev {
        left: -50px;
    }
    .featured-products-section .carousel-control-next {
        right: -50px;
    }
}

/* 頁尾樣式 */
.footer {
    background-color: #343a40;
    color: #f8f9fa;
    padding: 40px 30px 20px;
    font-size: 0.9rem;
}

.footer img {
    max-height: 45px;
    margin-bottom: 10px;
}

.footer p {
    margin-bottom: 5px;
}

.footer .copyright {
    text-align: right;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #495057;
    font-size: 0.8rem;
    color: #adb5bd;
}

/* About.php specific styles - MOVED HERE */
.about-banner-section { /* This is a general hero-like section for about page */
    position: relative; /* Needed for absolute positioning of children */
    height: 210px;
    overflow: hidden; /* Ensure children don't overflow if something goes wrong */
}

.about-banner-section .hero-left-bg {
    width: 60%;
    background-image: linear-gradient(to right, #A6CBF7, #ffffff);
    background-color: unset; 
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 0; 
    z-index: 1;
}

.about-banner-section .hero-right-bg {
    width: 40%;
    /* background-image is set by inline style in HTML for top_bg_01.png */
    background-color: #004899; 
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    padding: 0; 
    z-index: 0;
    overflow: hidden; /* To contain the absolutely positioned SVG overlay */
}

.about-banner-section .hero-text-container {
    position: absolute; /* To overlay on hero-left-bg */
    left: 0;            /* Align with hero-left-bg */
    top: 0;             /* Align with hero-left-bg */
    width: 60%; 
    height: 100%;       /* Match height of parent */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* Default to left align for desktop */
    padding-left: 5%; 
    padding-right: 5%; 
    color: #004078; 
    background-image: url(../img/top_bg_02.svg); /* SVG background on top */
    background-repeat: no-repeat;               /* Prevent tiling of SVG */
    background-position: center center;         /* Example: Center the SVG */
    background-size: contain;                   /* Example: Scale SVG to fit without cropping */
    background-color: transparent; /* This allows .hero-left-bg gradient to show through */
    z-index: 2; /* Above both backgrounds */
}

.agent-card {
    border-top: 3px solid #0056b3;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

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

.partner-companies-section {
    padding: 60px 0; /* Added padding like featured-products */
    background-image: url(../img/bg_02.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white; 
}

.partner-companies-section h2,
.partner-companies-section .sub-title {
    color: white; 
}

.partner-logo {
    max-height: 60px; 
}

.partner-companies-section .carousel-control-prev-icon,
.partner-companies-section .carousel-control-next-icon {
    background-color: rgba(255, 255, 255, 0.3);
}

.hero-right-svg-overlay {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%; /* This will be 210px as per parent .about-banner-section */
    width: auto; /* Adjust if you need a specific width, or use object-fit carefully */
    /* object-fit: cover; /* Or contain, depending on desired SVG scaling */
    z-index: 1; /* Ensure it's above the background-image of .hero-right-bg if it had one */
}

/* 響應式調整 */
@media (max-width: 991.98px) {
    .header-wrap {
        flex-direction: column;
        margin-top: 0;
        margin-bottom: 0;
    }
    
    .nav-separator-graphic {
        display: none;
    }
    
    .logo-area {
        width: 100%;
        flex: none;
        justify-content: space-between; 
        padding: 15px;
        z-index: 1001;
        background-color: #f8f9fa;
    }
    
    .logo-area a {
        margin-left: 0;
    }
    
    .menu-area {
        position: fixed;
        top: 0;
        right: -12em;
        width: 12em;
        height: 100%;
        background-color: #222222;
        padding: 60px 0 20px;
        transition: right 0.3s ease-in-out;
        z-index: 1000;
        overflow-y: auto;
        display: block;
        box-shadow: -2px 0 5px rgba(0,0,0,0.5);
    }
    
    .menu-area.show {
        right: 0;
    }
    
    .mobile-toggle {
        display: block;
        margin-right: 15px;
    }
    
    .menu-list {
        flex-direction: column;
        padding: 10px 15px;
        align-items: flex-start;
    }
    
    .menu-list li {
        padding: 10px 0;
        width: 100%;
    }
    
    .menu-list li a {
        padding: 10px 15px;
        width: 100%;
        display: block;
    }
    
    .menu-list li:not(:last-child)::after {
        display: none;
    }
    
    /* Hero區域響應式設計 for index.php */
    .hero-section { /* Applies to index.php hero */
        height: auto;
        padding: 0; 
        background-color: #004899; /* Existing background color */
        background-image: url('../img/index_top_bg.svg'); /* Added SVG background for mobile */
        background-repeat: no-repeat;
        background-position: right bottom; /* Changed to right bottom */
        background-size: contain; /* Adjust as needed, e.g., cover or specific size */
    }
    
    .hero-section > .hero-left-bg { 
        display: none; 
    }
    
    .hero-section > .hero-right-bg { 
        display: none; 
    }
    
    .hero-section > .hero-text-container { 
        position: static;
        width: 100%;
        padding: 20px 15px; 
        text-align: center;
        align-items: center; /* 新增：使內部 flex 項目（h1, p）自身居中 */
        background-image: none;
        background-color: transparent; 
        color: #fff; 
    }
    
    .hero-section > .hero-image-container { 
        position: static;
        width: 100%;
        transform: none;
        text-align: center;
        margin-top: 30px;
    }

    /* About Page Banner Mobile Styles */
    .about-banner-section {
        height: auto; 
        padding: 30px 0; 
    }

    .about-banner-section .hero-left-bg { /* Will take full width due to .hero-right-bg display:none */
        width: 100%;
        position: static; 
        background-image: linear-gradient(to right, #A6CBF7, #e6f2ff); 
        padding: 0; 
    }

    .about-banner-section .hero-right-bg {
        display: none; /* Hide right background on mobile, this will also hide the SVG overlay inside it */
    }

    .about-banner-section .hero-text-container {
        width: 100%;
        position: static; 
        text-align: center; 
        align-items: center; /* Added for vertical centering since it's display:flex */
        padding: 20px 15px; 
        color: #004078; /* Default text color for this container on mobile, overridden for h1 below */
    }

    .about-banner-section .hero-text-container h1 {
        color: #ffffff; /* White text for h1 on mobile */
    }

    .about-banner-section .hero-text-container h1 small {
        color: #ffffff; /* Ensure small tag within h1 is also white on mobile */
        /* font-size: 0.5em; /* This is already inline, but can be controlled here too */ 
    }
}

@media (max-width: 767px) {
    .hero-section { /* Applies to index.php hero */
        padding: 20px 0; 
    }
    
    .hero-section h1 { /* Applies to index.php hero */
        font-size: 2rem;
    }
    
    .hero-tools-img { /* This class is not currently used in index.php hero */
        max-width: 70%; 
    }
    
    .news-item {
        flex-direction: column; 
        align-items: flex-start;
    }
    
    .news-item .date {
        margin-bottom: 5px;
    }
    
    .footer .col-md-4 {
        margin-bottom: 20px;
        text-align: center;
    }
    
    .footer .col-md-4:last-child {
        margin-bottom: 0;
    }
    
    .footer .copyright {
        text-align: center;
        margin-top: 10px;
    }
    
    .product-card {
        margin-left: auto;
        margin-right: auto;
        max-width: 280px; 
    }

    /* Carousel: single item on mobile for .featured-products-section */
    .featured-products-section .carousel-item .col-lg-3:not(:first-child) {
        display: none;
    }
    
    .featured-products-section .carousel-item .col-lg-3:first-child {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Carousel: partner logos - already handled by separate mobile carousel in HTML */
}

/* News Listing Page Specific Styles - news.php */
.news-listing-section {
    background-color: #f8f9fa; /* Light gray background for the section */
}

.news-item-detailed {
    display: flex;
    padding: 15px 0;
    transition: background-color 0.3s ease; /* Smooth transition */
}

.news-item-detailed a {
    text-decoration: none;
    color: inherit; /* Inherit text color from parent */
    display: flex; /* Use flex to align date and title */
    justify-content: space-between; /* Space out date and title */
    align-items: center; /* Align items vertically */
}

.news-item-detailed:hover {
    background-color: #ddedff;
}

.news-item-detailed .date {
    color: #555;
    font-size: 0.9em;
    margin-right: 15px; /* Add some space between date and title */
}

.news-item-detailed .title {
    flex-grow: 1;
    color: #333;
}

.news-listing-section hr {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    border: 0;
    border-top: 1px solid #e0e0e0; /* Lighter separator line */
}

.news-listing-section .pagination .page-item .page-link {
    color: #333; /* Darker pagination text */
    border: 1px solid #ccc; /* Visible border for pagination items */
    margin: 0 2px; /* Small margin between pagination buttons */
    border-radius: 0.25rem; /* Slightly rounded corners */
}

.news-listing-section .pagination .page-item.active .page-link {
    background-color: #333;
    border-color: #333;
    color: #fff;
}

.news-listing-section .pagination .page-item.disabled .page-link {
    color: #aaa;
    border-color: #ddd;
}

/* News Detail Page Specific Styles - news_detail.php */
.news-detail-section {
    background-color: #ffffff; /* White background for the content area */
}

.news-article-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow title and date to wrap on small screens */
}

.news-article-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0; /* Reset margin as flex handles spacing */
}

.news-article-date {
    font-size: 0.9rem;
    color: #6c757d;
    white-space: nowrap;
    margin-left: 15px; /* Space between title and date if on same line */
}

.news-detail-section hr {
    margin-top: 1rem;
    margin-bottom: 2rem;
    border-top: 1px solid #e0e0e0;
}

.news-article-content p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #555;
}

.news-article-content img {
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.news-navigation .btn {
    font-weight: 500;
    padding: 0.5rem 1.5rem;
}

/* Responsive adjustments for news detail */
@media (max-width: 575.98px) { /* Extra small devices */
    .news-article-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .news-article-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem; /* Add space below title when stacked */
    }
    .news-article-date {
        margin-left: 0; /* Remove left margin when stacked */
    }

    /* News detail navigation buttons on mobile - unified with product detail */
    .news-navigation, 
    .product-navigation { /* Apply to both news and product navigation */
        display: flex;
        justify-content: center; /* Center the group of buttons */
        align-items: center;     /* Vertically align buttons */
        flex-wrap: nowrap;       /* Prevent wrapping to new line */
    }

    .news-navigation .btn,
    .product-navigation .btn { /* Apply to buttons in both navigations */
        display: inline-block; /* Override display:block */
        width: auto;           /* Override width:100% */
        padding: 0.3rem 0.6rem; /* Reduced padding */
        font-size: 0.75rem;   /* Reduced font size */
        line-height: 1.4;     /* Adjust line height for smaller font */
        white-space: nowrap;  /* Ensure button text doesn't wrap */
        margin-bottom: 0;     /* Remove bottom margin if previously set for stacking */
    }

    /* Ensure Bootstrap margin utilities still work by being specific */
    .news-navigation .btn.mr-2, .product-navigation .btn.mr-2 {
        margin-right: 0.5rem !important; /* Bootstrap mr-2 */
    }
    .news-navigation .btn.ml-2, .product-navigation .btn.ml-2 {
        margin-left: 0.5rem !important; /* Bootstrap ml-2 */
    }
    .news-navigation .btn.mx-2, .product-navigation .btn.mx-2 {
        margin-left: 0.5rem !important; /* Bootstrap mx-2 */
        margin-right: 0.5rem !important;
    }

    /* Remove last-child specific margin if it was for stacking */
    .news-navigation .btn:last-child {
        margin-bottom: 0;
    }
}

/* Product Catalog Page Specific Styles - products.php */
.product-catalog-section {
    background-color: #f8f9fa; /* Light gray background for the section */
}

#productSearchInput {
    width: 17ch; /* Default width for desktop */
}

.product-sidebar {
    background-color: #004899; /* Changed background color */
    padding: 20px;
    border-radius: 5px;
    /* border: 1px solid #e0e0e0; */ /* Border might not be needed with dark bg */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    height: fit-content; /* Adjust height to content */
}

.product-sidebar .sidebar-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff; /* Changed text color to white */
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* Lighter border for dark bg */
    padding-bottom: 0.5rem;
}

.product-category-list .nav-link {
    color: rgba(255, 255, 255, 0.85); /* Changed text color to light white */
    padding: 0.4rem 0;
    font-size: 0.9rem;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.2); /* Lighter border for dark bg */
}

.product-category-list .nav-item:last-child .nav-link {
    border-bottom: none;
}

.product-category-list .nav-link:hover,
.product-category-list .nav-link.active {
    color: #ffffff; /* Full white for hover/active */
    font-weight: bold; /* Make active/hover bold */
    background-color: rgba(255,255,255,0.1); /* Slight background highlight on hover/active */
}

.product-main-area {
    /* No specific background needed, inherits from section or container */
}

.product-search-bar {
    background-color: #ffffff;
    border-radius: 5px;
    border: 0px solid #e0e0e0;
    
}

.product-list-card {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #ffffff;
    transition: box-shadow 0.2s ease-in-out;
    height: 100%; /* Ensure cards in a row have same height */
    display: flex;
    flex-direction: column;
}

.product-list-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-list-card .card-img-top {
    width: 100%;
    height: 200px; /* Fixed height for images */
    object-fit: contain; /* Scale image to fit within bounds, preserving aspect ratio */
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.product-list-card .card-body {
    text-align: center;
    padding: 15px;
    flex-grow: 1; /* Allows card body to take remaining space */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center title if card body has extra space */
}

.product-list-card .card-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0;
}

.product-list-card .card-title a {
    color: #333;
    text-decoration: none;
}

.product-list-card .card-title a:hover {
    color: #0056b3;
}

.product-catalog-section .pagination .page-item .page-link {
    color: #333;
    border: 1px solid #ccc;
    margin: 0 2px;
    border-radius: 0.25rem;
}

.product-catalog-section .pagination .page-item.active .page-link {
    background-color: #333;
    border-color: #333;
    color: #fff;
}

.product-catalog-section .pagination .page-item.disabled .page-link {
    color: #aaa;
    border-color: #ddd;
}

/* Responsive adjustments for filter bar - Now product-search-bar */
@media (max-width: 767.98px) { /* Apply to small devices and below */
    .product-search-bar .form-inline {
        flex-direction: column;
        align-items: stretch;
    }
    .product-search-bar .form-group {
        width: 100%;
        margin-right: 0 !important; /* Override inline Bootstrap margin */
        margin-bottom: 1rem !important; /* Add bottom margin */
    }
    .product-search-bar .form-group:last-of-type {
         margin-bottom: 1rem !important; /* Ensure search input also has bottom margin before button */
    }
    .product-search-bar #productSearchInput {
        width: 100%; /* Full width on mobile */
    }
    .product-search-bar .btn {
        width: 100%;
        margin-bottom: 0 !important;
    }
}

@media (max-width: 767px) {
    .hero-section { /* Applies to index.php hero */
        padding: 20px 0; 
    }
    
    .hero-section h1 { /* Applies to index.php hero */
        font-size: 2rem;
    }
    
    .hero-tools-img { /* This class is not currently used in index.php hero */
        max-width: 70%; 
    }
    
    .news-item {
        flex-direction: column; 
        align-items: flex-start;
    }
    
    .news-item .date {
        margin-bottom: 5px;
    }
    
    .footer .col-md-4 {
        margin-bottom: 20px;
        text-align: center;
    }
    
    .footer .col-md-4:last-child {
        margin-bottom: 0;
    }
    
    .footer .copyright {
        text-align: center;
        margin-top: 10px;
    }
    
    .product-card {
        margin-left: auto;
        margin-right: auto;
        max-width: 280px; 
    }

    /* Carousel: single item on mobile for .featured-products-section */
    .featured-products-section .carousel-item .col-lg-3:not(:first-child) {
        display: none;
    }
    
    .featured-products-section .carousel-item .col-lg-3:first-child {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Carousel: partner logos - already handled by separate mobile carousel in HTML */
}

/* Product Detail Page Specific Styles - product_detail.php */
.product-detail-section {
    background-color: #ffffff; /* White background for the content area */
}

.product-detail-image-container {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #fff; /* Ensure background is white if image has transparency */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px; /* Give some min height */
}

.product-detail-image {
    max-width: 100%;
    max-height: 350px; /* Max height for the product image */
    object-fit: contain;
}

.product-detail-info {
    padding-left: 30px; /* Space between image and info on medium+ screens */
}

.product-detail-title {
    font-size: 2rem; /* Larger title for product detail */
    font-weight: bold;
    color: #333;
}

.product-brief-description {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1rem;
}

.product-features-list {
    list-style: none;
    padding-left: 0;
    font-size: 0.95rem;
    color: #555;
}

.product-features-list li {
    margin-bottom: 0.5rem;
    padding-left: 0.7em; /* Reduced padding */
    position: relative;
}

.product-features-list li::before {
    content: "\2022"; /* Bullet character */
    color: #0056b3; /* Theme color for bullet */
    font-weight: bold;
    display: inline-block;
    width: auto; /* Changed from 1em to auto */
    position: absolute;
    left: 0;
}

.section-title-bar {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    padding-bottom: 0rem;
    margin-bottom: 1.5rem;
    /* border-bottom: 2px solid #0056b3; */ /* Removed bottom border */
    display: inline-block; /* So border only spans the text width */
    border-left: 5px solid #0056b3; /* Added left border like news title */
    padding-left: 10px; /* Padding for the left border */
}

.product-full-description p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: #555;
}

.product-navigation .btn {
    font-weight: 500;
    padding: 0.5rem 1.5rem;
}

/* Responsive adjustments for product detail */
@media (max-width: 767.98px) { /* MD breakpoint */
    .product-detail-info {
        padding-left: 15px; /* Reset padding for stacked layout */
        margin-top: 30px; /* Add space above info when stacked */
    }
    .product-detail-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 767px) {
    .hero-section { /* Applies to index.php hero */
        padding: 20px 0; 
    }
    
    .hero-section h1 { /* Applies to index.php hero */
        font-size: 2rem;
    }
    
    .hero-tools-img { /* This class is not currently used in index.php hero */
        max-width: 70%; 
    }
    
    .news-item {
        flex-direction: column; 
        align-items: flex-start;
    }
    
    .news-item .date {
        margin-bottom: 5px;
    }
    
    .footer .col-md-4 {
        margin-bottom: 20px;
        text-align: center;
    }
    
    .footer .col-md-4:last-child {
        margin-bottom: 0;
    }
    
    .footer .copyright {
        text-align: center;
        margin-top: 10px;
    }
    
    .product-card {
        margin-left: auto;
        margin-right: auto;
        max-width: 280px; 
    }

    /* Carousel: single item on mobile for .featured-products-section */
    .featured-products-section .carousel-item .col-lg-3:not(:first-child) {
        display: none;
    }
    
    .featured-products-section .carousel-item .col-lg-3:first-child {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Carousel: partner logos - already handled by separate mobile carousel in HTML */
}

/* Service Page Specific Styles - services.php */
.services-section {
    background-color: #f8f9fa; /* Light gray background for the section */
}

.service-item-row {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-bottom: 30px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    align-items: center; /* Vertically align logo and text */
}

.service-logo-container {
    flex: 0 0 200px; /* Fixed width for logo container */
    margin-right: 30px;
    text-align: center; /* Center logo if it's smaller than container */
    padding: 10px;
}

.service-logo-container img {
    max-width: 100%;

    object-fit: contain;
}

.service-description-container {
    flex: 1;
    min-width: 250px; /* Ensure description has enough space before wrapping logo */
}

.service-description-container p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 0; /* Remove default p margin if only one p */
}

/* Responsive adjustments for service items */
@media (max-width: 767.98px) { /* MD breakpoint */
    .service-item-row {
        flex-direction: column;
        align-items: flex-start; /* Align items to start when stacked */
        padding: 15px;
    }
    .service-logo-container {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%; /* Allow logo container to take full width */
        text-align: center; /* Center logo if it's smaller than container, or if width is not 100% */
    }
    .service-logo-container img {
        width: 100%; /* Ensure image takes full width of its container */
        object-fit: scale-down; /* Scales down if larger, maintains aspect ratio, otherwise original size */
    }
}

@media (max-width: 767px) {
    .hero-section { /* Applies to index.php hero */
        padding: 20px 0; 
    }
    
    .hero-section h1 { /* Applies to index.php hero */
        font-size: 2rem;
    }
    
    .hero-tools-img { /* This class is not currently used in index.php hero */
        max-width: 70%; 
    }
    
    .news-item {
        flex-direction: column; 
        align-items: flex-start;
    }
    
    .news-item .date {
        margin-bottom: 5px;
    }
    
    .footer .col-md-4 {
        margin-bottom: 20px;
        text-align: center;
    }
    
    .footer .col-md-4:last-child {
        margin-bottom: 0;
    }
    
    .footer .copyright {
        text-align: center;
        margin-top: 10px;
    }
    
    .product-card {
        margin-left: auto;
        margin-right: auto;
        max-width: 280px; 
    }

    /* Carousel: single item on mobile for .featured-products-section */
    .featured-products-section .carousel-item .col-lg-3:not(:first-child) {
        display: none;
    }
    
    .featured-products-section .carousel-item .col-lg-3:first-child {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Carousel: partner logos - already handled by separate mobile carousel in HTML */
}

/* Responsive adjustments for product catalog */
@media (max-width: 991.98px) { /* lg breakpoint and below */
    .product-sidebar {
        /* On smaller screens, you might want to stack it or hide it 
           if you implement a dropdown/modal for categories */
    }
    .mobile-category-container {
        display: flex; /* 使標籤和下拉選單並排 */
        align-items: center; /* 垂直居中對齊 */
        padding: 10px;
        background-color: #f8f9fa; /* 與整體背景協調 */
        border-radius: 5px;
        border: 1px solid #e0e0e0;
        margin-bottom: 1rem; /* Ensure space below it */
    }

    .mobile-category-label {
        margin-right: 15px; /* 標籤和下拉選單之間的間距 */
        font-weight: bold;
        white-space: nowrap; /* 防止文字換行 */
        color: #333;
    }

    .mobile-category-dropdown {
        flex-grow: 1; /* 使下拉選單佔滿剩餘空間 */
    }
}

/* Contact Page Specific Styles - contact.php */
.contact-section {
    /* background-color: #ffffff; */ /* Removed: Set background to white */
}

.contact-content-wrapper {
    background-color: #ffffff;
    padding: 30px; /* Add some padding inside the white box */
    border-radius: 5px; /* Optional: if you want rounded corners for the white box */
   
}

.contact-section .section-title-bar {
    /* Styles for section titles like "聯絡資訊" and "線上聯繫" are already defined globally */
    /* If specific adjustments are needed for contact page titles, add them here */
}

.contact-info-block p {
    margin-bottom: 0.5rem; /* Adjust spacing for contact info lines */
    font-size: 0.95rem;
}

.contact-info-block p strong {
    color: #333; /* Darker text for labels like 電話 */
    min-width: 60px; /* Ensure labels have some minimum width for alignment */
    display: inline-block;
}

.map-block img {
    border: 1px solid #ddd; /* Optional border for the map image */
    border-radius: 4px;
}

.contact-note p {
    line-height: 1.7;
    color: #555;
    font-size: 0.9rem;
}

.contact-form-block .form-row {
    /* Adjust form row alignment if needed, Bootstrap defaults are usually fine */
}

.contact-form-block label {
    font-size: 0.9rem;
    color: #333;
    /* text-align: right; */ /* Uncomment if labels should be right-aligned */
    /* padding-right: 15px; */ /* Add padding if labels are right-aligned */
}

.contact-form-block .form-control {
    font-size: 0.9rem;
    border-radius: 0.2rem; /* Slightly less rounded corners for inputs */
}

.contact-form-block textarea.form-control {
    min-height: 120px; /* Adjust textarea height */
}

.contact-form-block .form-check-label {
    font-size: 0.9rem;
    font-weight: normal; /* Ensure radio labels are not bold */
    margin-right: 10px;
}

.contact-form-block .btn {
    min-width: 100px; /* Give buttons a minimum width */
    font-size: 0.95rem;
    padding: 0.4rem 1rem;
}

.contact-form-block .btn-primary {
    background-color: #0056b3; /* Match image button color */
    border-color: #0056b3;
}

.contact-form-block .btn-primary:hover {
    background-color: #004085;
    border-color: #00376e;
}

.contact-form-block .btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

.contact-form-block .btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Responsive adjustments for Contact Form */
@media (max-width: 767.98px) { /* MD breakpoint and below */
    .contact-form-block .form-row .col-md-2 {
        text-align: left;
        margin-bottom: 5px; /* Add space below label on mobile */
    }
    .contact-info-block .col-md-6 {
        margin-bottom: 10px; /* Add space between info columns on mobile */
    }
    .contact-info-block .col-md-6:last-child {
        margin-bottom: 0;
    }
} 