*{
    padding: 0;
    margin: 0;
}
header{
    display: flex;
    align-items: center; /* 讓標題和導航列垂直置中 */
    justify-content: space-between; /* 讓標題靠左，導覽列靠右 */
    padding: 0 20px;
    background-color: #231c1a; /* 確保背景與標題顏色一致 */
    height: 80px;
    position: fixed; /* 🚀 讓標題固定在最上方 */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* 確保在最上層 */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3); /* 加陰影增加層次感 */
}
/* 🔹 確保內容不被標題擋住 */
body {
    padding-top: 100px; /* 避免 header 蓋住內容 */
}
header h1 {
    background-image: url("images/123.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 300px; /* 設定圖片寬度 */
    height: 80px; /* 確保與 header 高度一致 */
    margin: 0; /* 避免有額外間距 */
    padding: 0; /* 確保不會有多餘空間 */
    text-indent: -9999px; /* 隱藏文字 */
}

header ul{
    position:absolute;
    right:5vw;
    top:0;
    line-height:80px;
}
h1{
    position:absolute;
    left:120px;
    top:0;
    line-height: 80px;
}
header li{
    display:inline;
    margin-right:4vw;
}
header a{
    color:white;
    text-decoration: none;
}
header a:hover {
    text-decoration: :underline;
}
.news {
    background-color: antiquewhite;
    color:white;
    height:95vh;
    background-image: url("images/car.png");
    background-repeat: no-repeat;
    background-size:cover;
    background-position: center;
    display: flex;
    align-items: flex-end; /* 讓內容靠底部對齊 */
    justify-content: flex-start; /* 讓內容靠左 */
    position: relative; /* 讓 .news 內的內容不受 ::after 影響 */
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url("images/car.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.news::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* 黑色半透明遮罩，讓圖片更清晰 */
    z-index: 0;
}
.news blockquote {
    position: relative;
    z-index: 1; /* 確保文字不被 ::after 遮罩影響 */
    list-style-type: none;
    font-size: 22px;
    font-weight: bold;
    color: white;
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.5); /* 讓文字有半透明黑底 */
    border-radius: 10px;
}

.slogan {
    background: linear-gradient(90deg, #3f4c4b, #5c6b6b); /* 深色漸變，增加層次感 */
    color: white;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
    line-height: 1.8em;
    font-weight: bold;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.5); /* 增加文字陰影，提高對比度 */
    letter-spacing: 2px; /* 讓字間距更均勻 */
    padding: 20px; /* 增加內邊距，避免文字貼邊 */
}

footer {
    background-color: #485652;
    color: #e0e0e0; /* 讓文字更亮，對比更明顯 */
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
}

img {
    display: block;  /* 讓 img 變成區塊元素 */
    margin: 0 auto;  /* 自動置中 */
    max-width: 100%; /* 確保圖片不會超過父容器 */
    height: auto;   
}
nav {
    display: flex;
    align-items: center;
}
nav a {
    font-size: 18px;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    transition: all 0.3s ease-in-out;
}

nav a:hover {
    color: #FFD700; /* 滑鼠移上去變金色 */
    text-decoration: underline;
}
.card-container {
    display: flex;
    justify-content: center; /* 水平置中 */
    align-items: center; /* 垂直置中（如果需要） */
    margin-top: 20px; /* 與上方內容保持間距 */
}

.card-container img {
    max-width: 50%; /* 限制圖片寬度，避免太大 */
    height: auto;
    border-radius: 10px; /* 圓角邊框，讓圖片更有質感 */
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3); /* 陰影，讓圖片更有立體感 */
}

.products {
    text-align: center;
    padding: 40px 20px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    justify-content: center;
}

.product {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.product img {
    width: 100%;
    border-radius: 10px;
}

.price {
    color: #e74c3c;
    font-size: 18px;
    font-weight: bold;
}

button {
    background: #e74c3c;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
button:hover {
    background: #c0392b;
}


.store-info {
    text-align: center;
    padding: 40px 20px;
}

.store-info h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

.store-info p {
    font-size: 18px;
    margin: 10px 0;
}

.store-info iframe {
    border-radius: 10px;
    box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.2);
}


/* 全局樣式，讓整體頁面更有質感 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* 🔹 頁首 Header */
header {
    background-color: #231c1a;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

header h1 {
    font-size: 28px;
    margin-left: 20px;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s ease-in-out;
}

nav ul li a:hover {
    color: #FFD700;
}

/* 🔹 主要內容 Main */
main {
    padding: 40px 20px;
    text-align: center;
}

/* 🔹 關於我們區塊 */
.about {
    background: white;
    padding: 40px;
    margin: 20px auto;
    max-width: 900px;
    border-radius: 10px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
}

.about h2 {
    font-size: 28px;
    color: #231c1a;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.about p {
    font-size: 18px;
    margin-bottom: 20px;
}

.about ul {
    list-style: none;
    padding: 0;
}

.about ul li {
    font-size: 18px;
    margin: 10px 0;
    background: #FFD700;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    color: black;
}

/* 🔹 圖片區塊 */
.about-banner {
    width: 100%;
    max-width: 800px;
    display: block;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
}

/* 🔹 頁腳 Footer */
footer {
    background-color: #485652;
    color: #e0e0e0;
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

/* 📌 預設樣式 (適用於桌機) */
body {
    font-size: 18px;
}

/* 🔹 平板版 (寬度小於 1024px) */
@media (max-width: 1024px) {
    header {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }

    nav ul {
        flex-direction: column;
        padding: 10px 0;
    }

    nav ul li {
        margin: 5px 0;
    }

    .about {
        padding: 20px;
    }

    .about-banner {
        max-width: 90%;
    }
}

/* 🔹 手機版 (寬度小於 768px) */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* 讓字體稍微變小，避免擠壓 */
    }

    header {
        flex-direction: column;
        padding: 10px;
    }

    header h1 {
        font-size: 24px; /* 縮小標題，避免佔用過多空間 */
    }

    nav ul {
        flex-direction: column;
        text-align: center;
    }

    .about {
        width: 95%;
        padding: 15px;
        font-size: 16px;
    }

    .about-banner {
        max-width: 100%;
    }

    footer {
        font-size: 12px;
        padding: 10px;
    }
}






/*410行到548行是商品詳情的頁面)
/* 📌 主要容器佈局 */
.container {
    display: flex;
    padding-top: 20px;
}

.sidebar {
    width: 250px;  /* 設定左側分類寬度 */
    background: #f8f9fa; /* 淺灰色背景 */
    padding: 20px;
    border-radius: 10px; /* 圓角 */
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1); /* 陰影 */
    font-size: 16px;
}

.sidebar h2 {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin: 10px 0;
}

.sidebar ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    display: block;
    padding: 8px 12px;
    border-radius: 5px;
    transition: 0.3s;
}

.sidebar ul li a:hover {
    background: #d9534f;
    color: white;
}
.sidebar {
    width: 260px;  /* 調整寬度 */
    background: #f8f9fa;
    padding: 20px;
    margin-left: 10px;  /* 讓它不要貼太邊 */
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}


/* 📌 確保分類清單可見 */
.category-list {
    list-style: none;
    padding: 0;
}

.category-list li {
    margin-bottom: 10px;
}

/* 📌 點擊分類按鈕 */
.category-list a {
    text-decoration: none;
    color: #333;
    display: block;
    padding: 8px 10px;
    border-radius: 5px;
    transition: background 0.3s;
}

.category-list a:hover {
    background: #f1f1f1;
    color: #d9534f;
}

/* 📌 主要商品內容 */
.product-container {
    flex-grow: 1;
    margin-left: 300px;
    padding: 20px;
}

/* 📌 商品區標題 */
.products h2 {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
}

/* 📌 商品區塊 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    justify-content: center;
}

/* 📌 商品卡片 */
.product {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease-in-out;
}

.product:hover {
    transform: translateY(-5px);
}

/* 📌 商品圖片 */
.product img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    border-radius: 10px;
}

/* 📌 價格與按鈕 */
.product .price {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #d9534f;
    margin: 10px 0;
}

.product button {
    background: #d9534f;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.product button:hover {
    background: #b52b27;
}

@media (max-width: 768px) {
  /* 手機版樣式放這裡 */
  .navbar {
    flex-direction: column;
  }
  .banner img {
    width: 100%;
  }
}

