/* 文字選取樣式 */
::selection {
  background-color: #3e2723 !important;
  color: #ffffff !important;
}

::-moz-selection {
  background-color: #3e2723 !important;
  color: #ffffff !important;
}

/* 確保所有元素都使用自定義選取樣式 */
* ::selection {
  background-color: #3e2723 !important;
  color: #ffffff !important;
}

* ::-moz-selection {
  background-color: #3e2723 !important;
  color: #ffffff !important;
}

:root {
  --primary-color: #f8f5f1;
  --secondary-color: #2f2f2f;
  --accent-color: #ff6348;
  --accent-gold: #d4af37;
  --accent-brown: #a0826d;
  --accent-gray: #b8a99a;
  --text-dark: #2f2f2f;
  --text-light: #666666;
}

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

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

/* 容器樣式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 自定義游標 */
.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
  transition: background 0.2s ease;
}

.cursor.hover {
  transform: scale(2);
  background: var(--accent-gold);
}

.custom-cursor.on-dark {
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.6) 70%,
    transparent 100%
  );
}

.custom-cursor.on-light {
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.6) 70%,
    transparent 100%
  );
}

.custom-cursor.on-footer {
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.6) 70%,
    transparent 100%
  );
}

/* 導航欄 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 5px 0;
  background: linear-gradient(
    135deg,
    rgba(248, 245, 241, 0.1) 0%,
    rgba(255, 255, 255, 0.2) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-top: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  z-index: 1000;
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    backdrop-filter 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
  background: linear-gradient(
    135deg,
    rgba(248, 245, 241, 0.2) 0%,
    rgba(255, 255, 255, 0.3) 100%
  );
  backdrop-filter: blur(25px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-top: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(255, 255, 255, 0.2);
  padding: 5px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 5px 0 5px 20px;
  width: 100%;
}

.nav-container .nav-menu {
  margin-left: auto;
}

.nav-container .cart-icon {
  margin-left: 20px;
}

.logo {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--text-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-image {
  height: 80px;
  width: auto;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 40px;
  align-items: center;
  margin: 0;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 300;
  font-size: 16px;
  transition: all 0.3s ease;
  position: relative;
  line-height: 1.2;
  display: flex;
  align-items: center;
}

.nav-menu a:hover {
  color: var(--accent-gold);
  font-weight: 400;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-gold);
  transition: width 0.3s ease;
}

.nav-menu a:hover::after {
  width: 100%;
}

/* 漢堡選單 */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--text-dark);
  transition: all 0.3s ease;
}

/* 漢堡選單激活狀態 */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.6;
}

.hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
  letter-spacing: 3px;
  margin-bottom: 30px;
  opacity: 0;
  transform: translateY(50px);
  color: white;
}

.hero p {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: white;
  margin-bottom: 50px;
  opacity: 0;
  transform: translateY(30px);
}

.cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: transparent;
  border: 2px solid white;
  color: white;
  text-decoration: none;
  font-weight: 400;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.cta-button:hover {
  background: white;
  color: var(--text-dark);
  transform: translateY(-2px);
}

/* 品牌精神區塊 */
.brand-spirit {
  padding: 120px 50px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  text-align: center;
  margin-bottom: 80px;
  letter-spacing: 2px;
}

.spirit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 60px;
  margin-top: 80px;
}

.spirit-item {
  text-align: center;
  padding: 40px 20px;
  transition: transform 0.3s ease;
}

.spirit-item:hover {
  transform: translateY(-10px);
}

.spirit-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 30px;
  background: var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.spirit-item h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  font-weight: 400;
}

.spirit-item p {
  color: var(--text-light);
  line-height: 1.8;
}

/* 產品展示區 */
.products-preview {
  padding: 120px 50px;
  background: #fefcfa;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.product-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
  width: 100%;
  height: 300px;
  position: relative;
  overflow: hidden;
  background: #f8f8f8;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}

/* 移除 ::before 偽元素，因為它會覆蓋背景圖片 */

.product-info {
  padding: 30px;
}

.product-info h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  font-weight: 400;
}

.product-info p {
  color: var(--text-light);
  margin-bottom: 20px;
}

.product-price {
  font-size: 1.2rem;
  color: var(--accent-gold);
  font-weight: 500;
}

/* Footer */
.footer {
  background: #4b4944;
  color: var(--primary-color);
  padding: 80px 50px 40px;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.footer-section h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  font-weight: 400;
}

.footer-section p,
.footer-section a {
  color: #cccccc;
  text-decoration: none;
  line-height: 1.8;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--accent-gold);
}

.newsletter {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.newsletter input {
  flex: 1;
  padding: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 4px;
}

.newsletter input::placeholder {
  color: #cccccc;
}

.newsletter button {
  padding: 12px 20px;
  background: var(--accent-gold);
  border: none;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.newsletter button:hover {
  background: #b8941f;
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #666;
  color: #cccccc;
}

/* 通知樣式 */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  max-width: 300px;
}

.notification.show {
  transform: translateX(0);
}

.notification-success {
  background: #474541;
}

.notification-error {
  background: #f5f2ee;
  color: #57514d;
}

.notification-info {
  background: var(--accent-gold);
}

/* 載入動畫 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(248, 245, 241, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid #e5e5e5;
  border-top: 3px solid var(--accent-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 產品篩選 */
.product-filters {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto 40px auto;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-group label {
  font-size: 14px;
  color: var(--text-light);
}

.filter-group select {
  padding: 8px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  background: white;
}

/* 搜索框 */
.search-container {
  margin-bottom: 30px;
  max-width: 1400px;
  margin: 0 auto 30px auto;
}

.search-input {
  width: 100%;
  max-width: 400px;
  padding: 12px 20px;
  border: 2px solid #e5e5e5;
  border-radius: 25px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

/* 產品卡片增強 */
.product-details {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
  font-size: 14px;
  color: var(--text-light);
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}

/* placeholder-icon 樣式已移除 */

.no-products {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
  grid-column: 1 / -1;
}

/* 聯絡表單 */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.form-group textarea {
  height: 120px;
  resize: vertical;
}

/* 聯絡表單按鈕樣式 - 電腦和平板端 */
.form-group select {
  padding: 15px 20px;
  font-size: 16px;
  min-height: 50px;
  width: auto;
  min-width: 200px;
  border: 1px solid #ccc;
  background: white;
  color: black;
  border-radius: 100px;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 12px;
  padding-right: 40px;
}

.submit-btn {
  padding: 18px 35px;
  font-size: 16px;
  font-weight: 500;
  border: 1px solid #ccc;
  background: white;
  color: black;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.submit-btn:hover {
  background: #f5f5f5;
}

/* 響應式設計 */
@media (max-width: 900px) {
  .product-filters {
    flex-direction: column;
  }

  .contact-form {
    margin: 3px;
    padding: 30px 20px;
    max-width: none;
    width: calc(100% - 10px);
  }

  /* 可頌對對碰手機版佈局 - 4列3行 */
  .game-board {
    grid-template-columns: repeat(4, 1fr);
    width: 95%;
    max-width: 400px;
    gap: 2%;
    padding: 3%;
    margin: 0 auto;
  }

  .card {
    width: 100%;
    aspect-ratio: 1;
    font-size: 4vw;
    max-font-size: 18px;
    min-font-size: 12px;
  }

  .card-back-image {
    width: 40%;
    height: 40%;
  }

  /* 手機版口味分類和內餡選單文字改為黑色 */
  .filter-group label {
    color: black;
  }

  .filter-group select {
    color: black;
    padding: 15px 12px;
    height: auto;
    min-height: 50px;
  }

  /* 聯絡表單手機版樣式 */
  .form-group select {
    padding: 18px 20px;
    font-size: 18px;
    min-height: 60px;
    width: 100%;
    border: 1px solid #ccc;
    background: white;
    color: black;
    border-radius: 100px;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 14px;
    padding-right: 45px;
  }

  .submit-btn {
    padding: 20px 40px;
    font-size: 18px;
    font-weight: 500;
    border: 1px solid #ccc;
    background: white;
    color: black;
    border-radius: 100px;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .submit-btn:hover {
    background: #f5f5f5;
  }

  /* 手機端隱藏游標，但保留購物車側邊欄的金色游標 */
  * {
    cursor: none !important;
  }

  /* 購物車側邊欄保留自定義游標 */
  .cart-sidebar,
  .cart-sidebar * {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="%23d4af37"/></svg>')
        12 12,
      auto !important;
  }

  /* 購物車側邊欄內的可點擊元素保留指針游標 */
  .cart-sidebar button,
  .cart-sidebar .cart-close,
  .cart-sidebar .quantity-btn,
  .cart-sidebar .remove-btn,
  .cart-sidebar .checkout-btn {
    cursor: pointer !important;
  }

  /* 結帳頁面保留正常游標 */
  .checkout-main,
  .checkout-main * {
    cursor: auto !important;
  }

  /* 結帳頁面的可點擊元素保留指針游標 */
  .checkout-main button,
  .checkout-main input,
  .checkout-main select,
  .checkout-main textarea,
  .checkout-main a,
  .checkout-main .payment-option,
  .checkout-main label {
    cursor: pointer !important;
  }

  .navbar {
    padding: 8px 20px;
  }

  .navbar.scrolled {
    padding: 8px 20px;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: linear-gradient(
      135deg,
      rgba(248, 245, 241, 0.95) 0%,
      rgba(255, 255, 255, 0.9) 100%
    );
    backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 50px;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    margin: 0px 0;
  }

  .nav-menu a {
    font-size: 1.2rem;
    font-weight: 400;
  }

  .hamburger {
    display: flex;
    align-items: center;
    order: 2;
  }

  .cart-icon {
    order: 3;
    margin-left: 15px;
  }

  .nav-container {
    padding: 5px 0;
    width: 100%;
    display: flex;
    align-items: center;
  }

  .nav-container .logo {
    order: 1;
    margin-right: auto;
  }

  /* 手機版 logo 縮小 30% */
  .logo-image {
    height: 56px;
  }

  .hero {
    padding: 0 20px;
  }

  .brand-spirit,
  .products-preview {
    padding: 80px 20px;
  }

  .spirit-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    padding: 60px 20px 30px;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* 滾動動畫 */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s ease;
}

/* 頁面特定樣式 */
.page-header {
  padding: 120px 50px 80px;
  text-align: center;
}

.products-section {
  margin-bottom: 80px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #f5f2ee 100%);
}

.page-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.page-subtitle {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.content-section {
  padding: 80px 50px;
  max-width: 1200px;
  margin: 0 auto;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.content-card {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.content-card:hover {
  transform: translateY(-5px);
}

.content-card h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.content-card p {
  color: var(--text-light);
  line-height: 1.8;
}

/* 聯絡頁面特定樣式 */
.contact-section {
  padding: 80px 50px;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.contact-form-section {
  padding: 0;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.contact-item {
  text-align: center;
  padding: 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background: var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.contact-item h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.contact-item p {
  color: var(--text-light);
}

.map-section {
  margin: 60px 0;
}

.map-container {
  margin: 60px 0;
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.faq-section {
  margin-top: 60px;
}

.faq-item {
  background: white;
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.faq-question {
  padding: 20px;
  background: var(--primary-color);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: #f0ede8;
}

.faq-answer {
  padding: 20px;
  color: var(--text-light);
  line-height: 1.8;
  display: none;
}

.faq-answer.active {
  display: block;
}

/* 品牌故事頁面特定樣式 */
.story-section {
  margin-bottom: 80px;
}

/* 品牌故事頁面特定樣式 */
.about-section {
  padding: 80px 50px;
  max-width: 1200px;
  margin: 0 auto;
}

.story-block {
  margin-bottom: 60px;
  padding: 40px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.story-block h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--text-dark);
  font-weight: 300;
}

.story-block p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 20px;
}

.story-content {
  margin-bottom: 60px;
}

.story-cards-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 60px;
  position: relative;
  height: 400px;
  perspective: 1000px;
}

.story-card {
  position: absolute;
  width: 250px;
  height: 250px;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.6s ease;
  transform-style: preserve-3d;
  transform-origin: bottom center;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.story-card:nth-child(1) {
  transform: translateX(-200px) rotate(-25deg);
  z-index: 1;
}

.story-card:nth-child(2) {
  transform: translateX(-70px) rotate(-10deg);
  z-index: 2;
}

.story-card:nth-child(3) {
  transform: translateX(70px) rotate(10deg);
  z-index: 2;
}

.story-card:nth-child(4) {
  transform: translateX(200px) rotate(25deg);
  z-index: 1;
}

.story-card:hover {
  transform: translateX(var(--hover-x, 0)) rotate(var(--hover-rotation, 0deg))
    translateY(-40px) scale(1.15);
  z-index: 10;
}

.story-card:hover .card-front {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 10px 20px rgba(0, 0, 0, 0.1),
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    inset 0 -2px 0 rgba(255, 255, 255, 0.15), 0 0 40px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}

.story-card:hover .card-front::before {
  opacity: 0.8;
}

.story-card:hover .card-front::after {
  transform: rotate(-45deg) translateX(100%);
}

/* 當第一張卡片被懸停時，其他卡片的推擠效果 */
.story-cards-container:has(.story-card:nth-child(1):hover)
  .story-card:nth-child(2) {
  transform: translateX(-100px) rotate(-15deg) translateY(15px) scale(0.9)
    translateZ(0);
  opacity: 0.7;
}

.story-cards-container:has(.story-card:nth-child(1):hover)
  .story-card:nth-child(3) {
  transform: translateX(120px) rotate(20deg) translateY(20px) scale(0.9)
    translateZ(0);
  opacity: 0.7;
}

.story-cards-container:has(.story-card:nth-child(1):hover)
  .story-card:nth-child(4) {
  transform: translateX(250px) rotate(30deg) translateY(25px) scale(0.9)
    translateZ(0);
  opacity: 0.7;
}

/* 當第二張卡片被懸停時，其他卡片的推擠效果 */
.story-cards-container:has(.story-card:nth-child(2):hover)
  .story-card:nth-child(1) {
  transform: translateX(-250px) rotate(-30deg) translateY(20px) scale(0.9)
    translateZ(0);
  opacity: 0.7;
}

.story-cards-container:has(.story-card:nth-child(2):hover)
  .story-card:nth-child(3) {
  transform: translateX(120px) rotate(15deg) translateY(15px) scale(0.9)
    translateZ(0);
  opacity: 0.7;
}

.story-cards-container:has(.story-card:nth-child(2):hover)
  .story-card:nth-child(4) {
  transform: translateX(250px) rotate(30deg) translateY(25px) scale(0.9)
    translateZ(0);
  opacity: 0.7;
}

/* 當第三張卡片被懸停時，其他卡片的推擠效果 */
.story-cards-container:has(.story-card:nth-child(3):hover)
  .story-card:nth-child(1) {
  transform: translateX(-250px) rotate(-30deg) translateY(25px) scale(0.9)
    translateZ(0);
  opacity: 0.7;
}

.story-cards-container:has(.story-card:nth-child(3):hover)
  .story-card:nth-child(2) {
  transform: translateX(-120px) rotate(-15deg) translateY(15px) scale(0.9)
    translateZ(0);
  opacity: 0.7;
}

.story-cards-container:has(.story-card:nth-child(3):hover)
  .story-card:nth-child(4) {
  transform: translateX(250px) rotate(30deg) translateY(20px) scale(0.9)
    translateZ(0);
  opacity: 0.7;
}

/* 當第四張卡片被懸停時，其他卡片的推擠效果 */
.story-cards-container:has(.story-card:nth-child(4):hover)
  .story-card:nth-child(1) {
  transform: translateX(-250px) rotate(-30deg) translateY(25px) scale(0.9)
    translateZ(0);
  opacity: 0.7;
}

.story-cards-container:has(.story-card:nth-child(4):hover)
  .story-card:nth-child(2) {
  transform: translateX(-100px) rotate(-15deg) translateY(20px) scale(0.9)
    translateZ(0);
  opacity: 0.7;
}

.story-cards-container:has(.story-card:nth-child(4):hover)
  .story-card:nth-child(3) {
  transform: translateX(100px) rotate(15deg) translateY(15px) scale(0.9)
    translateZ(0);
  opacity: 0.7;
}

.story-card:nth-child(1):hover {
  --hover-x: -200px;
  --hover-rotation: -20deg;
}

.story-card:nth-child(2):hover {
  --hover-x: -70px;
  --hover-rotation: -8deg;
}

.story-card:nth-child(3):hover {
  --hover-x: 70px;
  --hover-rotation: 8deg;
}

.story-card:nth-child(4):hover {
  --hover-x: 200px;
  --hover-rotation: 20deg;
}

.card-front {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: box-shadow, background, border;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  position: relative;
}

.card-front::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0.1) 25%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0.1) 75%,
    rgba(255, 255, 255, 0.3) 100%
  );
  border-radius: 20px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.card-front::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: rotate(-45deg) translateX(-100%);
  transition: transform 1.2s ease;
  pointer-events: none;
  z-index: 2;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  opacity: 0.8;
  mix-blend-mode: overlay;
  position: relative;
  z-index: 0;
}

.story-card:hover .card-image {
  transform: scale(1.08);
}

.card-title {
  display: none;
}

/* 模態框樣式 */
.photo-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  animation: fadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: modalSlideIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateY(0);
  will-change: transform;
}

.modal-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  animation: imageZoomIn 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: scale(1);
  will-change: transform;
}

.modal-text {
  display: none;
}

.modal-text h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: var(--accent-gold);
}

.modal-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.9;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  transition: all 0.3s ease;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  100% {
    opacity: 1;
    backdrop-filter: blur(5px);
  }
}

@keyframes modalSlideIn {
  0% {
    transform: translateY(100vh);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes imageZoomIn {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slideUp {
  0% {
    transform: translateY(60px) scale(0.95);
    opacity: 0;
  }
  50% {
    transform: translateY(20px) scale(0.98);
    opacity: 0.8;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.story-text h3 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.story-text p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 20px;
}

.story-image {
  height: 300px;
  background: var(--accent-gray);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 1.2rem;
}

.values-section {
  margin-top: 80px;
}

.values-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--text-dark);
  font-weight: 300;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.value-item {
  text-align: center;
  padding: 40px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.value-item:hover {
  transform: translateY(-10px);
}

.value-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 30px;
  background: var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.value-item h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.value-item p {
  color: var(--text-light);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .page-header {
    padding: 130px 20px 60px;
  }

  .content-section {
    padding: 60px 20px;
  }

  .about-section {
    padding: 60px 20px;
  }

  .story-block {
    padding: 30px 20px;
  }

  .story-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .story-cards-container {
    height: auto;
    flex-direction: column;
    gap: 15px;
    perspective: none;
  }

  .story-card {
    position: relative;
    width: 280px;
    height: 320px;
    transform: none !important;
  }

  .story-card:hover {
    transform: translateY(-10px) scale(1.05) !important;
  }

  .card-image {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
  }

  .modal-content {
    padding: 10px;
  }

  .modal-image {
    max-height: 50vh;
  }

  .modal-text h2 {
    font-size: 1.5rem;
  }

  .modal-text p {
    font-size: 1rem;
  }

  .close-btn {
    top: 10px;
    right: 15px;
    font-size: 30px;
    width: 40px;
    height: 40px;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-section {
    padding: 60px 20px;
  }

  .contact-info {
    grid-template-columns: 1fr;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }
}

/* 購物車樣式 */
.cart-icon {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.cart-icon:hover {
  background-color: transparent;
}

.cart-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-dark);
  transition: stroke 0.3s ease;
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--accent-gold);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  min-width: 20px;
}

.cart-count.hidden {
  display: none;
}

/* 購物車側邊欄 */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="%23d4af37"/></svg>')
      12 12,
    auto;
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h3 {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-dark);
}

.cart-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
  padding: 5px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.cart-close:hover {
  background-color: transparent;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.cart-empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.cart-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  background: #f8f8f8;
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cart-item-name {
  font-weight: 500;
  color: var(--text-dark);
  font-size: 14px;
}

.cart-item-price {
  color: var(--accent-gold);
  font-weight: 600;
  font-size: 14px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.quantity-btn {
  background: #f0f0f0;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.quantity-btn:hover {
  background: #e0e0e0;
}

.quantity-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.quantity-display {
  font-weight: 500;
  min-width: 20px;
  text-align: center;
}

.remove-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  margin-left: auto;
}

.remove-btn:hover {
  background: rgba(239, 68, 68, 0.1);
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid #e5e5e5;
  background: #fafafa;
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-light);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  padding-top: 10px;
  border-top: 1px solid #e5e5e5;
  margin-bottom: 20px;
}

/* 結帳按鈕 */
.checkout-btn {
  width: 100%;
  background: var(--accent-gold);
  color: white;
  border: none;
  padding: 15px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  margin-top: 15px;
}

.checkout-btn:hover:not(:disabled) {
  background: #b8941f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.checkout-btn:active:not(:disabled) {
  transform: translateY(0);
}

.checkout-btn:disabled {
  background: #cccccc;
  color: #888888;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.checkout-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

/* 結帳頁面樣式 */
.checkout-main {
  min-height: calc(100vh - 200px);
  padding: 180px 0 60px;
  background: linear-gradient(135deg, #f8f5f1 0%, #ffffff 100%);
}

.checkout-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.checkout-header {
  text-align: center;
  margin-bottom: 50px;
}

.checkout-header h1 {
  font-size: 2.5rem;
  color: var(--text-dark);
  margin-bottom: 10px;
  font-weight: 300;
}

.checkout-header p {
  color: var(--text-light);
  font-size: 1.1rem;
}

.checkout-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  align-items: start;
}

/* 訂單摘要 */
.order-summary {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 120px;
}

.order-summary h2 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 25px;
  font-weight: 400;
  border-bottom: 2px solid var(--accent-gold);
  padding-bottom: 10px;
}

.order-summary-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--accent-gold);
}

.order-summary-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-dark);
  font-weight: 600;
}

.order-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
}

.order-item:last-child {
  border-bottom: none;
}

.item-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.item-details {
  flex: 1;
}

.item-details h4 {
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 5px;
  font-weight: 500;
}

.item-details p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 3px;
}

.item-quantity strong {
  color: var(--accent-gold);
  font-weight: 600;
}

.item-price {
  color: var(--text-dark) !important;
  font-weight: 600 !important;
}

.item-price strong {
  color: var(--accent-gold);
}

.order-total {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 2px solid #f0f0f0;
}

.total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 1rem;
}

.final-total {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
  margin-top: 15px;
}

/* 付款表單 */
.payment-form {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.payment-form h2 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 25px;
  font-weight: 400;
  border-bottom: 2px solid var(--accent-gold);
  padding-bottom: 10px;
}

.form-section {
  margin-bottom: 30px;
}

.form-section h3 {
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-bottom: 15px;
  font-weight: 500;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.form-group select {
  cursor: pointer;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* 付款方式選項 */
.payment-methods {
  display: grid;
  gap: 15px;
}

.payment-option {
  display: flex;
  align-items: center;
  padding: 15px;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.payment-option:hover {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.05);
}

.payment-option input[type="radio"] {
  margin-right: 12px;
  width: 18px;
  height: 18px;
}

.payment-option input[type="radio"]:checked + .payment-label {
  color: var(--accent-gold);
  font-weight: 600;
}

.payment-option:has(input:checked) {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.1);
}

.payment-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: var(--text-dark);
  transition: color 0.3s ease;
}

.payment-label svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* 優惠代碼樣式 */
.promo-code-container {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.promo-code-container input {
  flex: 1;
}

.btn-apply-promo {
  background: var(--accent-gold);
  color: white;
  border: 2px solid var(--accent-gold);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-apply-promo:hover {
  background: #b8941f;
  border-color: #b8941f;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.btn-apply-promo:active {
  transform: translateY(0);
}

.promo-message {
  margin-top: 8px;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 4px;
  display: none;
}

.promo-message.success {
  background: #3e2723;
  color: #ffffff;
  border: 1px solid #5d4037;
  display: block;
}

.promo-message.error {
  background: #3e2723;
  color: #ffffff;
  border: 1px solid #5d4037;
  display: block;
}

/* 訂單摘要中的折扣顯示 */
.order-discount {
  color: #28a745;
  font-weight: 500;
}

.order-discount .discount-amount {
  color: #28a745;
  font-weight: 600;
}

/* 響應式設計 - 優惠代碼 */
@media (max-width: 768px) {
  .promo-code-container {
    flex-direction: column;
    gap: 8px;
  }
  
  .btn-apply-promo {
    width: 100%;
    padding: 12px;
  }
}

/* 表單按鈕 */
.form-actions {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #f0f0f0;
}

.btn-secondary {
  background: #f5f5f5;
  color: var(--text-dark);
  border: 2px solid #e5e5e5;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #e5e5e5;
  border-color: #d0d0d0;
}

.btn-primary {
  background: var(--accent-gold);
  color: white;
  border: 2px solid var(--accent-gold);
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #b8941f;
  border-color: #b8941f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

/* 響應式設計 */
@media (max-width: 768px) {
  .checkout-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .order-summary {
    position: static;
    order: 2;
  }

  .payment-form {
    order: 1;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .form-actions {
    flex-direction: column;
  }

  .checkout-header h1 {
    font-size: 2rem;
  }

  .checkout-container {
    padding: 0 15px;
  }

  .order-summary,
  .payment-form {
    padding: 20px;
  }
}

/* 加入購物車按鈕 */
.add-to-cart-btn {
  background: var(--accent-gold);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  width: 140px;
  justify-content: center;
  font-size: 14px;
  margin-left: auto;
  margin-right: 0;
}

.add-to-cart-btn:hover {
  background: #b8941f;
  transform: translateY(-2px);
}

.add-to-cart-btn:active {
  transform: translateY(0);
}

.add-to-cart-btn svg {
  width: 16px;
  height: 16px;
}

/* 產品卡片底部 */
.product-footer {
  padding: 20px 30px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.product-footer .product-price {
  margin-left: -30px;
  padding-left: 0;
}

.product-footer .add-to-cart-btn {
  margin-right: -30px;
  margin-left: 0;
}

/* 購物車覆蓋層 */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cart-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .cart-sidebar {
    width: 100vw;
    right: -100vw;
    transition: right 0.3s ease;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .cart-sidebar.open {
    right: 0;
  }

  .cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    /* 確保有足夠空間給footer */
    max-height: calc(100vh - 200px);
  }

  .cart-footer {
    flex-shrink: 0;
    padding: 20px;
    border-top: 1px solid #e5e5e5;
    background: #fafafa;
    /* 確保footer始終可見 */
    position: relative;
    z-index: 1;
  }

  .cart-item {
    flex-direction: column;
    gap: 10px;
  }

  .cart-item-image {
    width: 60px;
    height: 60px;
  }

  .cart-item-controls {
    justify-content: space-between;
  }
}

/* 極小螢幕優化 */
@media (max-width: 400px) {
  .cart-sidebar {
    width: 100vw;
    right: -100vw;
    transition: right 0.3s ease;
    transform: none;
  }

  .cart-sidebar.open {
    right: 0;
    transform: none;
  }
}
