/* ========================
   CSS 變數（色彩設定）
======================== */
:root {
  --primary-color: #000000;
  --secondary-color: #ff6b00;
  --light-gray: #000000;
  --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); */
  color: #000000;
  background-color: #000000;
  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 {
  text-align: center;
  color: #fcd34d;
  background-color: #1a1a1a;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  justify-content: center;
  /* 水平置中 */
  align-items: center;
  padding: 15px 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 20px;
  /* 每個選項間距 */
}

.nav-menu a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 1000;
}

.nav-menu a:hover {
  /* color: var(--primary-color); */
  color: #eeff00;
}

/* ========================
   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 {
  max-width: 500px;
  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 Container */
footer {
  margin-top: 4em;
  background-color: #1a1a1a;
  font-size: 1em;
  padding: 2em 1em;
  color: #aaa;
  text-align: center;
}

/* Footer Links */
footer a {
  color: #ccc;
  text-decoration: none;
}

footer a:hover {
  color: #fcd34d;
}

/* Footer Grid Layout */
.footer-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2em;
  padding: 2em 1em;
}

.footer-grid div {
  min-width: 280px;
  text-align: left;
}

/* Footer Headings */
.footer-grid h4 {
  margin-bottom: 0.5em;
  color: #fcd34d;
  font-size: 1.2em;
}

/* Company Info Text */
.company-info p {
  font-size: 1.2em;
  color: #e5e7eb;
  line-height: 1.8;
}

/* Brand Name Styling */
.brand-name {
  color: gold;
  font-size: 1.5em;
  font-weight: bold;
}

/* Optional: Social Icons Container (可自訂間距) */
.social-icons img {
  height: 40px;
  margin-right: 10px;
}

.social-icons img:last-child {
  margin-right: 0;
}

/* ========================
   響應式設計
======================== */
@media (max-width: 768px) {
  .navbar {
    justify-content: space-between;
    /* 手機：左右分散避免跑版 */
    padding: 15px 15px;
  }

  .nav-menu {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }
}

/* ================================
   Navbar 手機版（含 ☰ → ✕ 動畫）
================================ */

/* 左右預留空白（PC/手機共用）*/
.nav-left,
.nav-right {
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 漢堡按鈕（PC 隱藏） */
.hamburger {
  width: 32px;
  height: 24px;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 4px;
  background: white;
  border-radius: 4px;
  transition: 0.3s;
}

/* ☰ → ✕ 動畫 */
.hamburger.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* ================================
   手機版 768px 以下
================================ */
@media (max-width: 768px) {

  /* Navbar 改左右 */
  .navbar {
    justify-content: space-between !important;
    padding: 15px 15px;
  }

  /* 顯示漢堡按鈕 */
  .hamburger {
    display: flex;
  }

  /* 手機：側邊選單（預設關閉） */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -260px;
    /* 藏在右側 */
    width: 260px;
    height: 100vh;
    background: #1a1a1a;
    flex-direction: column;
    padding: 80px 20px;
    gap: 20px;
    transition: right 0.3s ease;
    z-index: 9999;
    display: flex;
    /* 手機模式：用 flex 垂直排列 */
  }

  /* 手機：點漢堡 → 滑出 */
  .nav-menu.active {
    right: 0;
  }

  /* 手機：選單內文字大小 */
  .nav-menu a {
    font-size: 20px;
  }
}

/* ================================
   PC 版 nav-menu（避免衝突）
================================ */
@media (min-width: 769px) {
  .nav-menu {
    position: static;
    display: flex;
    flex-direction: row;
    height: auto;
    background: none;
    padding: 0;
    gap: 20px;
  }
}