/* ================= 全局變數與重置 (Global Styles) ================= */
:root {
  --primary-color: #3E5448;      /* 清新深苔綠 */
  --primary-light: #6A8273;      /* 柔和植物綠 */
  --accent-gold: #C5A880;        /* 典雅香檳金 */
  --bg-sand: #FAF9F6;            /* 溫暖有機暖白 */
  --bg-card: #FFFFFF;            /* 純白卡片 */
  --text-main: #2C302E;          /* 質感深灰文字 */
  --text-muted: #737875;         /* 柔和次要文字 */
  --border-color: #E8E6E1;       /* 極淺灰邊框 */
  --font-heading: 'Noto Serif TC', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1700px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-sand);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* 按鈕樣式 */
.btn-primary {
  display: inline-block;
  background-color: var(--primary-color);
  color: #fff;
  padding: 12px 32px;
  border-radius: 40px;
  font-size: 0.95rem;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(62, 84, 72, 0.2);
}

.btn-outline {
  display: inline-block;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 10px 28px;
  border-radius: 40px;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: #fff;
}

.full-width {
  width: 100%;
}


/* ================= 1. Header 樣式 (RWD) ================= */
/*鑽石*/
.header-top {
  padding: 8px;
  text-align: center;
  background-color: #e8e6e1;
}
/* 外層容器 flex 垂直置中 */
.member-status {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* 鑽石與文字之間的間距 */
}

/* 調整鑽石尺寸與垂直微調 */
.diamond-icon {
  display: block;
  flex-shrink: 0;
}

/* 文字樣式設定 */
.member-text {
  font-size: 0.9rem;
  color: #555555; /* 精緻灰色文字 */
  font-weight: 400;
  letter-spacing: 0.5px;
  line-height: 1;
}




.main-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}
.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* LOGO (圖+文) */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary-color);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text .en {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1;
}

.logo-text .zh {
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 電腦版選單與展開效果 */
.desktop-nav .nav-list {
  display: flex;
  gap: 36px;
}

.desktop-nav .nav-item {
  position: relative;
  padding: 10px 0;
}

.desktop-nav .nav-item > a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.desktop-nav .nav-item > a i {
  font-size: 0.7rem;
  transition: var(--transition-smooth);
}

.desktop-nav .nav-item:hover > a {
  color: var(--primary-color);
}

.desktop-nav .nav-item:hover > a i {
  transform: rotate(180deg);
}

/* 下拉選單動畫 */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-card);
  min-width: 180px;
  padding: 12px 0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border: 1px solid var(--border-color);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.desktop-nav .nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 24px;
  font-size: 1rem;
  color: var(--text-main);
}

.dropdown-menu a:hover {
  background-color: var(--bg-sand);
  color: var(--primary-color);
}

/* 右側功能按鈕 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  background-color: #EFECE6;
  border-radius: 30px;
  padding: 10px 16px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.85rem;
  width: 140px;
  transition: var(--transition-smooth);
}

.search-box input:focus {
  width: 180px;
}

.search-box button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.action-btn {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 20px;
  transition: var(--transition-smooth);
}

.action-btn:hover {
  color: var(--primary-color);
  background-color: rgba(62, 84, 72, 0.08);
}

.action-btn .btn-text {
  font-size: 0.85rem;
  font-weight: 500;
}

.cart-btn {
  position: relative;
}

.cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: var(--accent-gold);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-toggle-btn {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-main);
  cursor: pointer;
}

/* 手機版抽屜式選單 */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background-color: var(--bg-card);
  z-index: 2000;
  padding: 30px;
  box-shadow: -5px 0 25px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
  overflow-y: auto;
}

.mobile-nav-drawer.active {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.close-drawer-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-menu-list {
  margin-top: 20px;
}

.mobile-menu-item {
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu-item .menu-title, .mobile-menu-item > a {
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  cursor: pointer;
}

.mobile-menu-item .submenu {
  display: none;
  background-color: var(--bg-sand);
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.mobile-menu-item .submenu a {
  display: block;
  padding: 12px 0;
  font-size: 1rem;
  color: var(--text-muted);
}
.mobile-menu-item .submenu a:hover {
  background-color: rgba(62, 84, 72, 0.08);
  padding: 10px;
}

.mobile-contact-info {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.mobile-contact-info h4 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.mobile-contact-info p {
  margin-bottom: 6px;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}


/* ================= 1. 手機版搜尋列樣式 ================= */
.mobile-search-row {
  display: none; /* 電腦版隱藏 */
  padding: 8px 16px 12px;
  background-color: var(--bg-sand);
  border-top: 1px solid var(--border-color);
}

.mobile-search-box {
  display: flex;
  align-items: center;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.mobile-search-box input {
  flex-grow: 1;
  border: none;
  padding: 10px 14px;
  font-size: 0.9rem;
  outline: none;
  background: transparent;
}

.mobile-search-box button {
  background-color: #EFECE6;
  border: none;
  padding: 11px 16px;
  color: var(--text-muted);
  cursor: pointer;
  border-left: 1px solid var(--border-color);
}

/* RWD 斷點設定 */
@media (max-width: 1180px) {
  .desktop-search {
    display: none; /* 隱藏電腦版 Header 內的搜尋欄 */
  }
  .mobile-search-row {
    display: block; /* 手機與平板顯示獨立搜尋欄 */
  }
}

/* 1. 徹底防止手機版畫面產生橫向滾動/滑出側欄的效果 */
html, body {
  max-width: 100%;
  overflow-x: clip;
  position: relative;
}


/* 2. 確保選單在隱藏狀態下完全不佔用空間，並關閉觸控滑動干擾 */
@media (max-width: 1180px) {
  /* 假設您的手機側欄選單 class 是 .mobile-nav 或 .desktop-nav */
  .desktop-nav:not(.active),
  .mobile-nav:not(.active) {
    visibility: hidden; /* 未開啟選單時徹底隱藏，防止手勢滑出 */
    pointer-events: none; /* 防止誤觸點擊 */
  }

  /* 當點擊漢堡選單展開時 (通常會加 .active) 再還原顯示 */
  .desktop-nav.active,
  .mobile-nav.active {
    visibility: visible;
    pointer-events: auto;
  }
}

.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0px 40px;
}



/* ===中間 Content (max-width 1700px) === */
/* =====內容=========================================================================*/

/* ==========================================================================
   全域變數與基本設定
   Primary Color: #5b8c71 (清新自然風格)
   ========================================================================== */
:root {
  --primary-color: #3e5448;
  --primary-hover: #48705a;
  --primary-light: #eaf2ed;
  --accent-color: #d98880;
  --text-color: #333333;
  --text-muted: #777777;
  --bg-color: #f7f9f8;
  --card-bg: #ffffff;
  --border-color: #e2e8e4;
  --danger-color: #e74c3c;
  --warning-color: #f39c12;
  --radius: 10px;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: 'Noto Sans TC', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

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



/* 抬頭與麵包屑 */
.site-header {
  background-color: var(--card-bg);
  padding: 30px 0 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.page-title {
  font-size: 1.8rem;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 5px;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumb .sep {
  margin: 0 8px;
  color: #ccc;
}

.breadcrumb .current {
  color: var(--text-color);
  font-weight: 500;
}

/* 步驟進度條樣式 */
.checkout-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 35px;
  background: var(--card-bg);
  padding: 20px 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.45;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.step-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #e5e5e5;
  color: #777777;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: all 0.3s ease;
}

.step-check {
  display: none;
}

/* 狀態 1：當前進行中 (Active) */
.step.active {
  opacity: 1;
}

.step.active .step-icon {
  background-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(91, 140, 113, 0.2);
}

.step.active .step-text {
  color: var(--primary-color);
  font-weight: 700;
}

/* 狀態 2：已完成 (Completed) - 綠底填滿 + 勾勾 */
.step.completed {
  opacity: 1;
}

.step.completed .step-icon {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
}

.step.completed .step-num {
  display: none;
}

.step.completed .step-check {
  display: inline-block;
}

.step.completed .step-text {
  color: var(--text-color);
  font-weight: 500;
}

/* 步驟連接線 */
.step-line {
  flex: 1;
  height: 2px;
  background-color: #e0e0e0;
  margin: 0 15px;
  transition: background-color 0.3s ease;
}

.step-line.active {
  background-color: var(--primary-color);
}

/* 卡片與容器 */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sticky-card {
  position: sticky;
  top: 20px;
}

/* 步驟切換動畫 */
.step-content {
  display: none;
}

.step-content.active {
  display: block;
  animation: fadeIn 0.4s ease-in-out;
}
/* ==========================================================================
   新增紅框處：配送方式三選一按鈕與展開說明樣式
   ========================================================================== */
.shipping-method-section {
  border-top: 1px dashed var(--border-color);
  padding-top: 15px;
}

.shipping-btn-group {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.ship-btn-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--card-bg);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  user-select: none;
}

.ship-btn-item input[type="radio"] {
  display: none; /* 隱藏原生單選鈕，改用按鈕卡片質感 */
}

.ship-btn-item:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.ship-btn-item.active {
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(91, 140, 113, 0.2);
}

/* 展開說明與附屬欄位視窗 */
.shipping-subbox {
  background-color: #f8faf9;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-top: 12px;
  animation: fadeIn 0.3s ease-in-out;
}

.cvs-btn-row {
  display: flex;
  gap: 12px;
}

.selected-store-info {
  background-color: #ffffff;
  border: 1px solid var(--primary-color);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-color);
}

.grid-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 12px;
}

/* 超商門市選擇視窗 (Mock Modal) */
.store-list-mock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.store-mock-item {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.store-mock-item:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.font-weight-bold { font-weight: 700; }
.font-size-sm { font-size: 0.85rem; }
.mb-0 { margin-bottom: 0 !important; }

/* RWD 響應式：手機版按鈕自動直排 */
@media (max-width: 600px) {
  .shipping-btn-group {
    flex-direction: column;
    gap: 8px;
  }
  
  .cvs-btn-row {
    flex-direction: column;
  }

  .grid-3col {
    grid-template-columns: 1fr;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 表格樣式 */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.cart-table th, .cart-table td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.cart-table th {
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-weight: 700;
}

.product-img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
}

.product-link {
  font-weight: 500;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: 4px;
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-weight: 500;
}

.badge-accent {
  background-color: #fdeed9;
  color: #e67e22;
}

.badge-warning {
  background-color: #fff3cd;
  color: #856404;
}

/* 數量控制 */
.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  width: fit-content;
  overflow: hidden;
}

.btn-qty {
  width: 30px;
  height: 30px;
  background: var(--bg-color);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.btn-qty:hover {
  background: #e2e2e2;
}

.input-qty {
  width: 45px;
  height: 30px;
  border: none;
  text-align: center;
  font-size: 0.95rem;
}

.btn-delete {
  background: none;
  border: none;
  color: #bbb;
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s;
}

.btn-delete:hover {
  color: var(--danger-color);
}

/* 網格系統 */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 500px;
  gap: 25px;
}


/* 表單元件 */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.form-group label.required::after {
  content: ' *';
  color: var(--danger-color);
}

.form-control {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(91, 140, 113, 0.15);
}

.form-control-sm {
  padding: 10px 10px;
  font-size: 0.85rem;
}

.input-with-btn {
  display: flex;
  gap: 8px;
}

.toggle-box {
  background-color: var(--bg-color);
  padding: 15px;
  border-radius: 6px;
  margin-top: 10px;
}

.hidden {
  display: none !important;
}

.radio-label, .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 15px;
  cursor: pointer;
  font-size: 0.95rem;
}

/* 付款方式選項 */
.payment-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border-color);
  padding: 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.payment-item:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.payment-item.active {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

#installment-period {
  width: 100%;
  max-width: 330px;
  font-size: 1rem;
}

#mobile-pay-type {
  width: 170px;
  max-width: 100%;
  font-size: 1rem;
}

.google-pay-test-note {
  margin-top: 8px;
  color: #0879c9;
  font-size: 0.85rem;
  line-height: 1.5;
}

.payment-content {
  flex: 1;
}

.payment-title {
  font-weight: 700;
  margin-bottom: 4px;
}


.card-preview-info {
  font-size: 0.85rem;
  color: var(--primary-color);
  margin-top: 6px;
  font-weight: 500;
}

/* 按鈕樣式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background-color: #3e5448;
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #fff;
}

.btn-secondary {
  background-color: #6c757d;
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: #68937b;
}

.btn-danger {
  background-color: var(--danger-color);
  color: #fff;
}

.btn-link {
  background: none;
  color: var(--text-muted);
  text-decoration: underline;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 20px;
  font-size: 0.85rem;
}

/* 訂單摘要 */
.summary-card {
  background-color: #fafcfb;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.summary-line.vertical-align {
  align-items: center;
}

.summary-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin: 16px 0;
  font-size: 0.95rem;
}

.summary-form .form-control {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.checkout-wallet-toggle {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.checkout-wallet-toggle input {
  flex-shrink: 0;
}

#checkout-credit-status:empty {
  display: none;
}

.summary-line.total {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 10px;
}

.price-total {
  color: #fd4d4d;
}

.divider {
  border: none;
  border-top: 1px dashed var(--border-color);
  margin: 15px 0;
}

.step-actions {
  display: flex;
  margin-top: 20px;
}

.step-actions.right { justify-content: flex-end; }
.step-actions.center { justify-content: center; }
.step-actions.vertical { flex-direction: column; gap: 10px; }

/* Modal 彈窗 */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top:0; left:0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
}

.modal-dialog {
  position: relative;
  background: #fff;
  width: 90%;
  max-width: 650px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  z-index: 1001;
  overflow: hidden;
  animation: modalPop 0.3s ease;
}

.modal-dialog.small {
  max-width: 400px;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 信用卡 Modal (圖片呈現) */
.cc-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #ddd;
}

.cc-table th, .cc-table td {
  border: 1px solid #e9e9e9;
  padding: 12px;
  font-size: 0.88rem;
}

.cc-table th {
  background: #f5f5f5;
  color: #333;
}

.highlight-row {
  background-color: #fefce8;
}

.cc-notice {
  font-size: 0.78rem;
  color: #856404;
  margin-top: 8px;
  line-height: 1.4;
}

.btn-modal-close {
  background: #fff;
  border: 1px solid #ccc;
  padding: 6px 25px;
  border-radius: 20px;
  cursor: pointer;
}

.btn-modal-submit {
  background: #c2185b;
  color: #fff;
  border: none;
  padding: 6px 25px;
  border-radius: 20px;
  cursor: pointer;
}

/* 綠界視窗特有樣式 */
.ecpay-header {
  background-color: #0088da;
  color: #fff;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 步驟 3 訂單成立 */
.order-complete-card {
  text-align: center;
}

.success-icon {
  font-size: 4rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.order-details-box {
  background: #fcfdfc;
  border: 1px solid var(--border-color);
  padding: 25px;
  border-radius: 8px;
  margin-top: 25px;
  text-align: left;
}

.print-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 10px;
}

.order-final-summary {
  text-align: right;
  margin-top: 20px;
  font-size: 0.95rem;
}

/* 輔助類別 */
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-muted { color: var(--text-muted); }
.text-blue { color: #1a73e8; }
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-30 { margin-top: 30px; }
.mb-20 { margin-bottom: 20px; }
.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.form-inline { display: flex; align-items: center; }

/* ==========================================================================
   RWD 手機版排版優化 (文字自動垂直排列對齊、絕不疊字、不產生橫向卷軸)
   ========================================================================== */
@media (max-width: 768px) {
  .checkout-steps {
    padding: 16px 10px;
    margin-bottom: 20px;
    overflow: hidden;
  }

  .step {
    flex-direction: column;
    gap: 6px;
    text-align: center;
    flex: 1;
    min-width: 0;
  }

  .step-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .step-text {
    font-size: 0.75rem;
    line-height: 1.2;
    white-space: nowrap;
    letter-spacing: -0.3px;
  }

  .step-line {
    margin: 0 4px;
    transform: translateY(-10px);
  }

  .grid-2col {
    grid-template-columns: 1fr;
  }

  /* 購物車表格卡片化 */
  .cart-table thead {
    display: none;
  }

  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td {
    display: block;
    width: 100%;
  }

  .cart-table tr {
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    background: #fff;
  }

  .cart-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--border-color);
    padding: 8px 5px;
  }

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

  .cart-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.85rem;
  }
  .input-with-btn {
  flex-direction: column;
  }
}

@media (max-width: 375px) {
  .step-text {
    font-size: 0.7rem;
  }
}

/* 列印專用 CSS */
@media print {
  body * {
    visibility: hidden;
  }
  #printable-area, #printable-area * {
    visibility: visible;
  }
  #printable-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none;
  }
}

/* =====內容=========================================================================*/





/* ================= 4. Footer 樣式 ================= */
.main-footer {
  background-color: #24332B;
  color: #E2E8E4;
  padding-top: 80px;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px 60px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 50px;
}

.footer-logo {
  color: #fff;
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 0.9rem;
  color: #A3B0A7;
  margin-bottom: 24px;
  max-width: 320px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.social-links a:hover {
  background-color: var(--accent-gold);
  transform: translateY(-3px);
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.footer-col ul li a {
  color: #A3B0A7;
}

.footer-col ul li a:hover {
  color: var(--accent-gold);
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #A3B0A7;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 24px 0;
  background-color: #1B2721;
}

.footer-bottom-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #839187;
}

.payment-logistics-badges {
  display: block;
  gap: 20px;
}

.badge-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}


/* ================= 5. Modal 彈出視窗 ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background-color: var(--bg-card);
  width: 90%;
  max-width: 440px;
  padding: 40px;
  border-radius: 20px;
  position: relative;
  transform: translateY(20px);
  transition: var(--transition-smooth);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-box h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: #3e5448;
  margin-bottom: 24px;
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  outline: none;
  font-size: 0.9rem;
}

.form-group input:focus {
  border-color: var(--primary-color);
}
/* 分隔線與文字 */
.social-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0 16px;
  color: #a0a0a0;
  font-size: 12px;
}

.social-divider::before,
.social-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e0e0e0;
}

.social-divider span {
  padding: 0 10px;
}

/* 快速登入按鈕容器 */
.social-login-group {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

/* 按鈕通用基礎樣式 */
.btn-social {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px;
  background-color: #ffffff;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
  white-space: nowrap;
}

/* 各別品牌顏色樣式 */
/* 1. Google 帳號 */
.btn-social.btn-google {
  border: 1px solid #d1d5db;
  color: #333333;
}
.btn-social.btn-google:hover {
  background-color: #f9fafb;
}

/* 2. LINE 登入 */
.btn-social.btn-line {
  border: 1px solid #00c300;
  color: #00c300;
}
.btn-social.btn-line:hover {
  background-color: #f0fdf4;
}

/* 3. Facebook */
.btn-social.btn-fb {
  border: 1px solid #1877f2;
  color: #1877f2;
}
.btn-social.btn-fb:hover {
  background-color: #f0f6ff;
}

/* 購物車 Modal 特殊設定 */
.cart-modal-box {
  max-width: 500px;
}

.cart-items-list {
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.cart-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.item-detail {
  flex-grow: 1;
}

.item-detail h4 {
  font-size: 0.9rem;
}

.item-price {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.remove-item {
  background: none;
  border: none;
  color: #d9534f;
  cursor: pointer;
}

.cart-summary {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.summary-line.highlight {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 20px;
}
/* 上方紅框：忘記密碼 | 驗證信補發 */
.form-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 16px 0 20px;
  font-size: 0.9rem;
}

.form-links a {
  color: #555555;
  text-decoration: none;
  transition: color 0.2s ease;
}

.form-links a:hover {
  color: #2b2b2b;
}

.form-links .divider {
  color: #cccccc;
  font-size: 0.8rem;
}

/* 下方紅框：還不是會員嗎？立即註冊 */
.form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.95rem;
  color: #333333;
}

.form-footer .register-link {
  color: #c4a482; /* 棕金色連結 */
  text-decoration: none;
  font-weight: 500;
  margin-left: 4px;
  transition: opacity 0.2s ease;
}

.form-footer .register-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* 購物車 Modal 特殊設定 */
.cart-modal-box {
  max-width: 500px;
}

.cart-items-list {
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.cart-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.item-detail {
  flex-grow: 1;
}

.item-detail h4 {
  font-size: 0.9rem;
}

.item-price {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.remove-item {
  background: none;
  border: none;
  color: #d9534f;
  cursor: pointer;
}

.cart-summary {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.summary-line.highlight {
  color: #3e5448;
  font-weight: 600;
  margin-bottom: 20px;
}
/* 上方紅框：忘記密碼 | 驗證信補發 */
.form-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 16px 0 20px;
  font-size: 0.9rem;
}

.form-links a {
  color: #555555;
  text-decoration: none;
  transition: color 0.2s ease;
}

.form-links a:hover {
  color: #2b2b2b;
}

.form-links .divider {
  color: #cccccc;
  font-size: 0.8rem;
}

/* 下方紅框：還不是會員嗎？立即註冊 */
.form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.95rem;
  color: #333333;
}

.form-footer .register-link {
  color: #c4a482; /* 棕金色連結 */
  text-decoration: none;
  font-weight: 500;
  margin-left: 4px;
  transition: opacity 0.2s ease;
}

.form-footer .register-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ================= 6. GO TOP 按鈕 ================= */
.go-top-btn {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.go-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.go-top-btn:hover {
  background-color: var(--accent-gold);
  transform: translateY(-4px);
}


/* ================= 滾動顯現特效 Class ================= */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: transform 0.8s ease, opacity 0.8s ease;
}

.reveal-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ================= 響應式 RWD Media Queries ================= */
@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr); /* 平板改為 3 行 */
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1180px) {
  .desktop-nav, .search-box {
    display: none; /* 隱藏電腦版選單與搜尋列 */
  }
  .mobile-toggle-btn {
    display: block; /* 顯示手機版漢堡按鈕 */
  }
  .story-grid, .course-card {
    grid-template-columns: 1fr;
  }
  .slide-content h2 {
    font-size: 2.2rem;
  }
  .news-desc {
    max-width: 400px;
  }
}

/* 電腦版隱藏手機專用的會員/訂單按鈕列 */
@media (min-width: 769px) {
  .mobile-member-tabs {
    display: none !important;
  }
}

@media (max-width: 768px) {
  /* 1. 外層容器設為多層 Flex 佈局 */
  .header-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0; /* 滿版樣式，由各子元素自訂內邊距 */
  }

  /* 2. 第一列：LOGO 靠左 (order: 1) */
  .brand-logo {
    order: 1;
    padding: 12px 16px;
  }

  /* 3. 第一列右側：只保留 購物車 與 漢堡按鈕 (order: 2) */
  .header-actions {
    order: 2;
    margin-left: auto; /* 擠向最右側 */
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    width: auto; /* 取消滿版 */
  }

  /* 隱藏第一列原本的會員登入與訂單按鈕 (只留購物車與漢堡) */
  .header-actions .action-btn:not(.cart-btn) {
    display: none;
  }

  /* 4. 第二列：會員登入與訂單按鈕列 (order: 3) */
  .mobile-member-tabs {
    order: 3;
    width: 100%;
    display: flex;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
  }

  .mobile-member-tabs .tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
  }

  /* 左側：會員登入（深綠底白字） */
  .mobile-member-tabs .tab-login {
    background-color: #3d5346;
    color: #ffffff;
  }

  /* 右側：訂單查詢（淺灰底黑字） */
  .mobile-member-tabs .tab-order {
    background-color: #e0ded9;
    color: #333333;
  }

  /* 5. 第三列：搜尋欄位 (order: 4) */
  .search-box {
    order: 4;
    width: 100%;
    padding: 12px 16px;
  }


  .main-content {
    padding: 40px 10px;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr); /* 手機改為 2 行 */
    gap: 16px;
  }
  .slider-arrow {
    display: none; /* 手機隱藏課程滑動箭頭 */
  }
  /* 1. 調整外框容器：增加上方內邊距 (Padding)，確保第一張圖不被裁切 */
  .news-vertical-carousel {
    height: 580px;         /* 保持固定輪播高度 */
    padding: 24px 16px;    /* 稍微加大上下 padding 留出安全邊界 */
    box-sizing: border-box;
  }
  
  /* 2. 內部軌道容器與滑動區塊 */
  .news-track-wrapper {
    height: 100%;
    overflow: hidden;      /* 確保超出範圍隱藏，但內部足夠容納 3 筆 */
  }

  .news-block {
    height: 332px;         /* 精確設定三筆項目的總高度 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
  }

  .news-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .news-img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    flex-shrink: 0;
  }

  .news-title {
    font-size: 0.9rem;
    line-height: 1.35;
    margin: 2px 0 0 0;
  }

  .news-desc {
    display: none; /* 手機版隱藏簡述，保持三筆畫面的整潔與高度精準 */
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 0 20px 40px;
  }
  .footer-bottom-container {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* 真實信用卡付款選擇視窗：卡號欄位由綠界 PCI DSS 頁面提供。 */
.btn-outline-card {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 18px;
  color: #36584a;
  background: #fff;
  border: 1px solid #36584a;
  border-radius: 8px;
  font-weight: 700;
}
.btn-outline-card:hover { background: #eef5f1; }
.selected-credit-info {
  margin-top: 10px;
  color: #69776f;
  font-size: 15px;
  line-height: 1.6;
}
/* Keep the actions inside the viewport even when the hosted form grows. */
html.credit-selector-open,
body.credit-selector-open { overflow: hidden; }
.credit-selector-modal {
  z-index: 4000;
  height: 100vh;
  height: 100dvh;
  padding: 16px;
  overflow: hidden;
}
.credit-selector-modal > .modal-overlay {
  position: absolute;
  z-index: 0;
  opacity: 1;
  visibility: visible;
}
.credit-selector-modal > .credit-dialog {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 860px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  min-height: 0;
  margin: 0;
  z-index: 1;
}
.credit-dialog > .modal-header,
.credit-dialog > .modal-footer { flex: 0 0 auto; }
.credit-dialog > .modal-header { padding: 10px 16px; }
.credit-dialog > .modal-header .btn-close-modal { width: 40px; height: 40px; }
.credit-dialog > .credit-selector-body {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  padding: 16px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
.credit-table-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  background: #f5f5f5;
  border: 1px solid #dedede;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}
.credit-table-head span { padding: 10px 8px; }
.credit-table-head span:first-child { border-right: 1px solid #dedede; }
.credit-choice {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid #dedede;
  border-top: 0;
  background: #fff;
}
.credit-choice.active { background: #fffceb; }
.credit-choice > input { margin: auto; width: 20px; height: 20px; }
.credit-radio-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 6px;
  padding: 12px;
  border-left: 1px solid #dedede;
}
.credit-radio-copy strong { color: #263b33; font-size: 18px; }
.credit-radio-copy small { color: #786b39; font-size: 14px; line-height: 1.5; }
.ecpay-sitepay-host { width: 100%; min-width: 0; min-height: 0; }
/* Size only the iframe element; the payment provider owns its secure contents. */
.ecpay-sitepay-host iframe { display: block; width: 100%; max-width: 100%; border: 0; }
.ecpay-sitepay-host:not(:empty) { min-height: 180px; margin-top: 4px; padding-top: 10px; border-top: 1px solid #e2dcb9; }
.ecpay-sitepay-loading { color: #52685e; font-weight: 700; padding: 18px 0; }
.ecpay-sitepay-error { color: #b3261e; font-weight: 700; padding: 18px 0; }
.credit-security-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #5f6c65;
  background: #f1f6f3;
  font-size: 13px;
  line-height: 1.65;
}
.credit-modal-footer { gap: 10px; padding: 12px 16px; }
.credit-modal-footer .btn { min-height: 44px; }
.btn-confirm-credit {
  min-width: 120px;
  color: #fff;
  background: #c90f57;
  border-color: #c90f57;
}
@media (max-width: 640px) {
  .credit-selector-modal { padding: 8px; }
  .credit-selector-modal > .credit-dialog {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }
  .credit-dialog > .credit-selector-body { padding: 8px; }
  .credit-table-head { display: none; }
  .credit-choice { display: block; border-top: 1px solid #dedede; }
  .credit-choice > input { margin: 12px 12px 0; }
  .credit-radio-copy { border-left: 0; padding: 8px; }
  .credit-modal-footer { padding: 10px; }
  .credit-modal-footer .btn { flex: 1; min-width: 0; }
}
