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

:root {
    /* ==============================
       1. 品牌核心 (Brand Colors)
       --- 用於代表品牌的關鍵色 ---
       ============================== */

    /* 品牌主色：色卡中段磚紅（呼應招牌紅字） */
    --primary: #862617;

    /* 品牌次色：珊瑚橘（用於次要標題） */
    --secondary: #ab3d27;

    /* 品牌強調色：粉橘（用於點綴或互動狀態） */
    --accent: #b44f36;


    /* ==============================
       2. 功能性 (Functional Colors)
       --- 用於文字、背景、狀態 ---
       ============================== */

    /* 文字相關 (Text) */
    --text: #621b11;
    /* 預設深焦茶文字 */
    --text-muted: #8c8c8c;
    /* 建議新增：次要文字灰色 */
    --text-white: #ffffff;
    /* 建議新增：反白文字 */

    /* 背景相關 (Background) */
    --bg: #F6F8F5;
    /* 你指定的米綠色底色 */
    --bg-alt: #ffffff;
    /* 建議新增：替代白色背景 */

    /* 狀態相關 (State) */
    --interactive-hover: #ea9a87;
    /* 強調粉橘，用於按鈕/連結懸停 */
    --shadow: rgba(0, 0, 0, 0.1);
    /* 建議統一投影顏色 */

    /* ==============================
    3. 基礎色板 (Color Palette)
    --- 命名標準：palette - [抽象名] - [深淺階層] ---
    ============================== */

    /* [Core / Neutral 系列] - 專案核心色板 (從最深 900 到最淺 100) */
    /* 用於所有磚紅/焦茶色系，在未來專案可對應其主色系 */
    --core-900: #190604;
    /* 最深，接近黑 */
    --core-800: #621b11;
    /* (原深焦茶色) */
    --core-700: #862617;
    /* (原主磚紅) */
    --core-600: #de5a3f;
    /* (原次珊瑚橘) */
    --core-500: #ea9a87;
    /* (原強粉橘) */
    --core-400: #cf3f23;
    /* (原暖橘色) */
    --core-300: #e47b63;
    /* (原柔桃色) */


    /* [灰色系列] - 用於通用的灰色邊框、陰影、未強調文字 (建議新增) */
    /* 灰色在每個專案中都是通用的基礎 */
    --gray-900: #333333;
    --gray-700: #666666;
    --gray-500: #999999;
    --gray-300: #cccccc;
    --gray-100: #eeeeee;
    /* 最淺灰色，用於背景區隔 */

    /* 區塊節奏 */
    --section-spacing-y: 6rem;
    --section-title-gap: 2.5rem;

    /* 【總開關】修改這裡的 px 數值，整體就會等比例縮放 */
    font-size: 16px;
}

/* 將此樣式加入到 html 標籤中 */
html {
    /* 關鍵：設定捲動時的頂部預留空間 */
    /* 請測量你導覽列實際的高度 (例如 80px)，將數值填入 */
    scroll-padding-top: 80px;

    /* 建議同時加上平滑捲動效果，體驗更好 */
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Serif TC', serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* 導航欄 */
nav {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 100%);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    /* 核心修正 1：設定層級，確保選單在最前面 */
    z-index: 1000;
    transition: all 0.3s ease;
}

nav.scrolled {
    background-color: var(--bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-icon {
    /* 設定 Logo 的寬高比例，根據你的橫式 Logo 調整 */
    width: 250px;
    height: 45px;

    /* 設定背景顏色（這就是你的 Logo 顏色） */
    background-color: var(--bg);
    transition: background-color 0.3s ease;

    /* 核心技術：使用 mask 將 SVG 當作遮罩 */
    -webkit-mask: url('image/上興棉被行橫.svg') no-repeat center;
    mask: url('image/上興棉被行橫.svg') no-repeat center;

    /* 讓遮罩完整覆蓋容器 */
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* 當導航欄變白底時 (.scrolled)，我們直接改背景色，Logo 就會變磚紅 */
nav.scrolled .logo-icon {
    background-color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle-bar {
    width: 18px;
    height: 2px;
    background-color: var(--bg);
    border-radius: 999px;
    transition: all 0.25s ease;
}

nav.scrolled .nav-toggle {
    border-color: rgba(134, 38, 23, 0.35);
}

nav.scrolled .nav-toggle-bar {
    background-color: var(--primary);
}

.nav-links a {
    text-decoration: none;
    color: var(--bg);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav.scrolled .nav-links a {
    color: var(--text);
}

.nav-links a:hover {
    color: var(--accent);
}

nav.scrolled .nav-links a:hover {
    color: var(--primary);
}

/* 英雄區 */
.hero {
    /* background: linear-gradient(135deg, var(--primary) 0%, var(--brand-secondary) 100%); */
    background-image: url(image/s/cozy-colorful-quilt-soft-bedroom-light.jpg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 100vh;
    position: relative;
    color: var(--bg);
    padding: 8rem 2rem;
    text-align: center;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* 確保內容不會被 fixed 的 nav 遮到 */
    padding-top: 300px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-family: 'Noto Serif TC', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-btn {
    background-color: var(--primary);
    color: var(--bg);
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.hero-btn:hover {
    background-color: var(--bg);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}


/* 關於我們 */

/* 整體容器：左右不對稱佈局 */
.about-section {
    max-width: 1200px;
    margin: var(--section-spacing-y) auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* 左側略窄，右側略寬 */
    gap: 50px;
    align-items: start;
}

.about-left {
    position: sticky;
    top: 100px;
    align-self: start;
}

.title-group {
    margin-bottom: 40px;
    /* 職人紅裝飾線 */
    padding-left: 40px;
    display: flex;
    align-items: start;
    border-left: 4px solid var(--primary);
    position: relative;
}

.section-title {
    font-size: 3rem;
    letter-spacing: 0.8rem;
    color: var(--primary);
    margin: 0 0 var(--section-title-gap);
}

.slogan-v {
    font-size: 1.5rem;
    /* border-right: 4px solid var(--primary); */
    color: var(--secondary);
    /* 關鍵：文字轉直排 */
    writing-mode: vertical-lr;
    /* text-orientation: sideways; */
    /* margin-bottom: 10rem; */
    letter-spacing: 0.2em;
    padding-top: 10px;
    margin-left: 15px;
    margin-top: 50px;
    font-weight: 500;
}

.intro-box p {
    color: var(--core-900);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.about-image {
    width: 100%;
    /* 設定比例，1000以下等比例縮放 */
    aspect-ratio: 16 / 10;
    max-height: 420px;
    /* 大螢幕限制高度，避免過長 */
    /* height: 300px; */
    /* background: linear-gradient(135deg, var(--accent) 0%, var(--brand-secondary) 100%); */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    overflow: hidden;
    border-radius: 10px;
}

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

.about-image-stack {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 400px;
    margin: 40px auto;
    overflow: hidden;
}

.about-image-stack img {
    width: 100%;
    height: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: blocks;
}

/* 前方圖片 */
.img-front {
    position: absolute;
    width: 70%;
    border-radius: 20px;
    bottom: 70px;
    left: -30px;
    z-index: 0;
    overflow: hidden;
}

.img-front img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    transform: scale(1.1);
    transform-origin: center;
}

/* 後方圖片 */
.img-back {
    border-radius: 20px;
    overflow: hidden;
    position: absolute;
    width: 70%;
    bottom: 0;
    left: 40%;
    z-index: 0;
}

.img-back img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: left top;
    transform: scale(1.1);
    transform-origin: center;
}

/* 特色區 */

#features {
    width: 100%;
    max-width: none;
    margin: var(--section-spacing-y) 0;
    padding: 2.5rem 0;
    background: linear-gradient(180deg, rgba(134, 38, 23, 0.05) 0%, rgba(134, 38, 23, 0.02) 100%);
}

.feature-grid {
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-alt);
    padding: 2rem;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 8px 22px rgba(134, 38, 23, 0.08);
    border: 1px solid rgba(134, 38, 23, 0.12);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 28px rgba(134, 38, 23, 0.14);
}

.feature-desc {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--core-800);
    max-width: 240px;
    /* 關鍵：設定寬度讓文字形成區塊 */
    margin: 15px auto 0;
    text-align: center;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-icon i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 16px;
    opacity: 0.8;
}

.feature-card h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.feature-card p {
    width: 100%;
    max-width: 260px;
    margin: 0.75rem auto 0;
    color: var(--core-800);
    font-weight: normal;
}

/* 產品展示 */
.products-section {
    /* background-color: var(--accent); */
<<<<<<< HEAD
    padding: 6rem 2rem;
    margin: 3rem 0;
    background-color: var(--bg);
=======
    max-width: 1200px;
    padding: 0 2rem;
    margin: var(--section-spacing-y) auto;
>>>>>>> 7ada413ed8267370d0a6e8c5f4e900c27933e0e9
}

.section-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 2.5rem;
    text-align: center;
    color: var(--primary);
    margin-bottom: var(--section-title-gap);
    font-weight: 700;
}

#features .section-title,
#products .section-title,
#contact .section-title {
    letter-spacing: 0.25rem;
    margin-bottom: var(--section-title-gap);
}

.about-section .section-title {
    margin: 0;
}

#features .section-title,
#contact .section-title {
    text-align: right;
    padding-right: 20px;
    border-right: 4px solid var(--primary);
    border-left: none;
    /* 確保沒有左邊框干擾 */
    width: fit-content;
    margin-left: auto;
    /* 靠右 */
    margin-right: 0;
    /* 確保貼齊網格邊緣 */
}

#products .section-title {
    text-align: left;
    padding-left: 20px;
    border-left: 4px solid var(--primary);
    width: fit-content;
}

.products-grid {
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
    /* 讓卡片居中，不要強行撐開 */
    gap: 2rem;
    justify-content: center;
    align-items: stretch;
}

.product-card {
    background: var(--bg-alt);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(134, 38, 23, 0.1);
    border: 1px solid rgba(171, 61, 39, 0.2);
    transition: all 0.3s ease;
}

#features .feature-grid {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

#features .section-title {
    max-width: 1200px;
    padding-left: 2rem;
    padding-right: 2rem;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.product-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--brand-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.product-info {
    padding: 1.5rem;
    background-color: var(--bg-alt);
}

.product-info h3 {
    background-color: var(--primary);
    color: var(--text-white);
    margin: -1.5rem -1.5rem 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    min-height: 3.5rem;
    padding: 1rem 1.5rem;
    text-align: center;
}


.product-desc {
<<<<<<< HEAD
    line-height: 1.8;
    font-size: 0.9rem;
    color: var(--core-800);
    max-width: 220px;
    /* 關鍵：設定寬度讓文字自動換行，形成精緻的區塊感 */
    margin: 10px auto 0;
    text-align: center;
=======
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 0.75rem;
    color: var(--core-800);
>>>>>>> 7ada413ed8267370d0a6e8c5f4e900c27933e0e9
}

/* 聯絡我們 */
.contact-section {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: var(--section-spacing-y) auto;
    padding: 0 2rem;
}

.contact-info-container {
    display: flex;
    width: 100%;
    gap: 60px;
    margin: 0 auto;
    align-items: stretch;
    /* 讓左右高度一致 */
}

.contact-section iframe {
    flex: 1.5;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow);
    filter: grayscale(0.15) sepia(0.2) contrast(0.9) brightness(1.05);
    /* filter: invert(10%) hue-rotate(360deg) saturate(0.8) sepia(0.2) contrast(0.9) brightness(1.1); */
}

.contact-info-content {
    flex: 0.8;
    background-color: var(--bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.contact-info-content .logo {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--secondary);
    padding-bottom: 20px;
}

.contact-section .logo-icon {
    width: 300px;
    background-color: var(--secondary);
    -webkit-mask: url('image/上興棉被行橫.svg') no-repeat center;
    mask: url('image/上興棉被行橫.svg') no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.contact-info {
    padding: 0;
}

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

.contact-item i {
    color: var(--secondary);
    font-size: 0.72rem;
    width: 30px;
    text-align: center;
    margin-top: 5px;
}

/* 頁腳 */
footer {
    background-color: var(--text);
    color: var(--bg);
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* 響應式設計 */
@media (max-width: 1024px) {
    :root {
        --section-spacing-y: 5rem;
        --section-title-gap: 2rem;
    }

    .nav-container,
    .about-section,
    .products-section,
    .contact-section,
    #features .section-title,
    #features .feature-grid {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .about-section {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-left {
        position: static;
    }

    .about-image-stack {
        max-width: 520px;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-info-container {
        gap: 2rem;
    }

    .contact-section .logo-icon {
        width: 240px;
    }
}


@media (max-width: 768px) {
    :root {
        --section-spacing-y: 4rem;
        --section-title-gap: 1.5rem;
    }

    html {
        scroll-padding-top: 72px;
    }

    nav {
        padding: 0.75rem 0;
    }

    .nav-container {
        position: relative;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .logo-icon {
        width: 200px;
        height: 38px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0;
        right: 0;
        background-color: var(--bg-alt);
        border: 1px solid rgba(134, 38, 23, 0.18);
        border-radius: 12px;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
        padding: 0;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        flex-direction: column;
        gap: 0;
        transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease;
    }

    nav.nav-open .nav-links {
        max-height: 320px;
        opacity: 1;
        pointer-events: auto;
        padding: 0.5rem 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        width: 100%;
        color: var(--text);
        font-size: 0.95rem;
        padding: 0.7rem 1rem;
    }

    .nav-links a:hover {
        color: var(--primary);
        background-color: rgba(171, 61, 39, 0.08);
    }

    nav.nav-open .nav-toggle-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    nav.nav-open .nav-toggle-bar:nth-child(2) {
        opacity: 0;
    }

    nav.nav-open .nav-toggle-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero {
        background-attachment: scroll;
        min-height: 520px;
        padding: 7rem 1.25rem 3rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.05rem;
    }

    .section-title {
        font-size: 1.9rem;
        letter-spacing: 0.18rem;
    }

    #features .section-title,
    #products .section-title,
    #contact .section-title {
        width: fit-content;
        text-align: left;
        border-right: none;
        padding-right: 0;
        padding-left: 16px;
        border-left: 4px solid var(--primary);
        margin-left: 0;
        margin-right: 0;
    }

    .title-group {
        padding-left: 20px;
        margin-bottom: 1.5rem;
    }

    .slogan-v {
        font-size: 1.1rem;
        margin-top: 24px;
    }

    .about-image-stack {
        height: 320px;
    }

    .about-image {
        max-height: 280px;
    }

    .img-front img,
    .img-back img {
        height: 240px;
    }

    .feature-grid,
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .product-info h3 {
        font-size: 1.15rem;
    }

    .contact-info-container {
        flex-direction: column;
    }

    .contact-section iframe {
        min-height: 300px;
    }

    .contact-section iframe,
    .contact-info-content {
        width: 100%;
    }

    .contact-info-content {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .nav-links a {
        font-size: 0.9rem;
    }

    .nav-toggle {
        width: 38px;
        height: 38px;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.65rem;
    }

    .about-image {
        max-height: 220px;
    }

    .feature-card,
    .product-info {
        padding: 1.1rem;
    }

    .product-info h3 {
        margin: -1.1rem -1.1rem 0.9rem;
        padding: 0.85rem 1.1rem;
    }
}