/* ========================
   CSS 變數（色彩設定）
======================== */
:root {
  --primary-color: #0051a5;
  --secondary-color: #ff6b00;
  --light-gray: #f5f5f5;
  --dark-gray: #333;
  --white: #ffffff;
}

/* ========================
   全域設定
======================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft JhengHei", "Heiti TC", "LiHei Pro", Arial, sans-serif;
}

body {
  color: var(--dark-gray);
  background-color: #f4f4f4;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* ========================
   Container 通用容器
======================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ========================
   Scroll to Top 按鈕
======================== */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-size: 20px;
  background-color: #000;
  color: white;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 999;
}

/* ========================
   Header 導覽列
======================== */
header {
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-menu li {
  margin-left: 25px;
}

.nav-menu a {
  text-decoration: none;
  color: var(--dark-gray);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-menu a:hover {
  color: var(--primary-color);
}

/* ========================
   Hero 區塊
======================== */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("../carfilm/images/窗簾.jpeg") no-repeat center center/cover;
  height: 500px;
  display: flex;
  align-items: center;
  color: var(--white);
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.btn {
  display: inline-block;
  background-color: var(--secondary-color);
  color: white;
  padding: 12px 30px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #e55f00;
}

/* ========================
   Features 區塊
======================== */
.features {
  padding: 80px 0;
  background-color: var(--light-gray);
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  color: var(--primary-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--white);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-10px);
}

.feature-icon {
  font-size: 40px;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.feature-card h3 {
  margin-bottom: 15px;
}

/* ========================
   Products 系列區塊
======================== */
.products {
  padding: 80px 0;
}

.product-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  margin: 0 10px 10px;
  position: relative;
}

.tab-btn.active {
  color: var(--primary-color);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
}

.product-content {
  display: none;
}

.product-content.active {
  display: block;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.product-card {
  color: white;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-img {
  height: 200px;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-info {
  padding: 20px;
}

.product-info h3 {
  margin-bottom: 10px;
}

/* ========================
   商品詳情頁樣式
======================== */
.product-container {
  display: flex;
  max-width: 1200px;
  margin: 50px auto;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.product-image {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}
/*商品圖片*/
.image-container {
  max-width: 100%;
  height: 600px;
  overflow: hidden;
}
.image-container img {
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;/*這會讓圖片等比例縮放，並填滿容器，即使會裁切掉部分圖片。圖片會以最大的尺寸完全覆蓋容器，但會保持比例。*/
  position: absolute;/*這樣做的目的是將圖片的中心對齊容器的中心，確保圖片始終居中。*/
  transform: translate(-50%, -50%);
}

.description {
  font-size: 16px;
  color: #777;
  margin-bottom: 20px;
}

.price {
  font-size: 22px;
  color: #e60012;
  margin: 10px 0;
}

label {
  font-size: 16px;
}

select {
  padding: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  width: 100%;
}

.product-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-choices button {
  padding: 12px;
  background-color: var(--white);
  color: black;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
  font-size: 15px;
}

.product-choices button:hover {
  background-color: #d8d8d8;
  border-color: #444;
}

.add-to-cart {
  margin-top: 20px;
}

.add-to-cart button {
  padding: 14px 30px;
  background-color: #797676;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.3s;
}

.add-to-cart button:hover {
  background-color: #333533;
}

/* 數量選擇輸入框與按鈕 */
input[type="number"] {
  text-align: center;
  width: 100px;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.btn-primary {
  width: 50px;
  height: 50px;
  font-size: 20px;
}
/*MAP*/
#map {
  margin: 0 auto;
  height: 500px;
  width: 80%;
}
/* ========================
   應用案例區塊
======================== */
.applications {
  padding: 80px 0;
  background-color: var(--light-gray);
}

.application-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.application-card {
  position: relative;
  height: 250px;
  overflow: hidden;
  border-radius: 8px;
}

.application-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.application-card:hover .application-img {
  transform: scale(1.1);
}

.application-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 20px;
}

/* ========================
   聯絡我們 Contact
======================== */
.contact {
  padding: 80px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 50px;
}

.contact-info h3 {
  margin-bottom: 20px;
  color: var(--primary-color);
}

.contact-detail {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
}

.contact-icon {
  margin-right: 15px;
  color: var(--primary-color);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.contact-form textarea {
  height: 150px;
}

/* ========================
   Footer 頁尾
======================== */
footer {
  background-color: var(--dark-gray);
  color: var(--white);
  padding: 50px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer-col h4 {
  margin-bottom: 20px;
  font-size: 18px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--white);
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #555;
  font-size: 14px;
  color: #ccc;
}

/* ========================
   響應式設計
======================== */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }
}
