/* ==========================================================================
   全局重置与基础样式
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-y: auto !important; /* 💡 核心：强制全站任何浏览器允许纵向滑动 */
    height: auto !important;
}
body {
    font-family: 'Helvetica Neue', Arial, 'Microsoft JhengHei', sans-serif;
    background: #f9f9f9;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* ==========================================================================
   導航欄
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #8b0015; /* 国际贸易红 */
    color: #fff;
    padding: 15px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
}
.logo-img {
    height: 45px;          /* 限制Logo高度 */
    width: auto;           /* 等比例缩放防变形 */
    object-fit: contain;
    display: block;
}
nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 25px;
    font-weight: 500;
    transition: color 0.3s;
}
nav a:hover, nav a.active {
    color: #ffd700; /* 企业金 */
}

/* ==========================================================================
   橫幅區（Hero）- 自动调用您的集装箱海运货轮大图
   ========================================================================== */
.hero {
    height: 75vh; 
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.65)), url('images/store_front.jpg') center/cover no-repeat;
    background-attachment: fixed; /* 视差滚动 */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 0 20px;
    margin-top: 70px;
}
.hero-content h1 {
    font-size: 48px;
    color: #ffd700;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.hero-content h3 {
    font-size: 22px;
    margin-bottom: 20px;
    font-weight: 300;
}
.hero-content p {
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 30px;
}
.btn {
    display: inline-block;
    padding: 12px 32px;
    background: #ffd700;
    color: #8b0015;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 16px;
    transition: transform 0.3s, background 0.3s;
    border: none;
    cursor: pointer;
}
.btn:hover {
    transform: translateY(-3px);
    background: #ffe240;
}

/* ==========================================================================
   通用區塊與排版
   ========================================================================== */
section {
    padding: 80px 8% 60px;
}
h2 {
    text-align: center;
    color: #8b0015;
    margin-bottom: 15px;
    font-size: 30px;
}
h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #ffd700;
    margin: 10px auto 0;
}
.section-desc {
    text-align: center;
    color: #666;
    max-width: 700px;
    margin: 0 auto 40px;
}

/* 內頁專用基礎容器 */
.page-container {
    max-width: 1200px;
    margin: 100px auto 60px;
    padding: 0 20px;
}
.page-content {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* 關於我們 */
.about-content {
    font-size: 17px;
    color: #444;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}
.feature-item {
    padding: 25px;
    background: #fdfdfd;
    border-top: 4px solid #8b0015;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 0 0 8px 8px;
    text-align: left;
}
.feature-item h4 {
    color: #8b0015;
    margin-bottom: 10px;
    font-size: 18px;
}

/* 產品網格 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}
.card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}
.card:hover {
    transform: translateY(-5px);
}
.card img {
    width: 100%;
    height: 240px; /* 统一裁切高度，利于高挑货架图紧凑展示 */
    object-fit: cover;
}
.card .card-body {
    padding: 20px;
}
.card h3 {
    font-size: 18px;
    color: #8b0015;
    margin-bottom: 8px;
}
.card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}
.card-btn {
    display: inline-block;
    padding: 6px 15px;
    background: #8b0015;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    border-radius: 4px;
    transition: background 0.3s;
}
.card-btn:hover {
    background: #a00019;
}

/* 品牌牆 */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}
.brand-card {
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 20px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    color: #555;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    transition: all 0.3s;
}
.brand-card:hover {
    background: #8b0015;
    color: #fff;
    border-color: #8b0015;
}

/* 聯絡我們 */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}
.contact-info {
    line-height: 2;
    font-size: 16px;
}
.contact-info b {
    font-size: 22px;
    color: #8b0015;
    display: inline-block;
    margin-bottom: 15px;
}
.contact-info a {
    color: #8b0015;
    text-decoration: none;
    font-weight: bold;
}
.contact-map iframe {
    width: 100%;
    height: 280px;
    border: 0;
    border-radius: 8px;
}
.back-bar {
    margin-bottom: 20px;
}
.back-link {
    color: #8b0015;
    text-decoration: none;
    font-weight: bold;
}

/* 頁腳 */
footer {
    background: #8b0015;
    color: #fff;
    text-align: center;
    padding: 25px 20px;
    font-size: 14px;
    border-top: 3px solid #ffd700;
}

/* 響應式移動端斷點 */
@media(max-width:768px){
    header {
        padding: 15px 4%;
        flex-direction: column;
        text-align: center;
    }
    nav {
        margin-top: 10px;
    }
    nav a {
        margin: 0 10px;
        font-size: 14px;
    }
    .hero {
        height: 60vh;
    }
    .hero-content h1 {
        font-size: 32px;
    }
    section {
        padding: 60px 4% 40px;
    }
    .page-container {
        margin: 140px auto 40px;
    }
    .page-content {
        padding: 20px;
    }
}
