/* ============================================
   髮治奈森 - 樣式表
   設計系統版本：v1.0
   ============================================ */

/* --------------------------------------------
   1. Tailwind CSS 配置
   -------------------------------------------- */

/* Tailwind 自定義配置 */
@layer base {
  :root {
    /* 主色調 */
    --color-primary: #2E5A44;
    --color-primary-dark: #244736;
    --color-primary-light: rgba(46, 90, 68, 0.1);
    
    /* 輔助色 */
    --color-secondary: #4A3B32;
    --color-secondary-dark: #362A23;
    --color-secondary-darker: #2A201A;
    
    /* 強調色 */
    --color-accent: #752D4F;
    
    /* 背景色 */
    --color-bg-light: #F9F8F6;
    --color-bg-white: #FFFFFF;
    --color-bg-dark: #1F2937;
    
    /* 文字色 */
    --color-text-primary: #333333;
    --color-text-secondary: #4A3B32;
    --color-text-muted: #6B7280;
    --color-text-light: #9CA3AF;
    
    /* 功能色 */
    --color-star: #FBBF24;
    --color-border: #E5E7EB;
    
    /* 間距 */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 5rem;
    
    /* 圓角 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* 陰影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  }
}

/* --------------------------------------------
   2. 基礎樣式
   -------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  background-color: var(--color-bg-light);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------
   3. 字體樣式
   -------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
}

h2 {
  font-size: clamp(1.875rem, 4vw, 2.25rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
}

/* --------------------------------------------
   4. 組件樣式
   -------------------------------------------- */

/* 按鈕 */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
  border-radius: var(--radius-full);
  padding: 0.75rem 1.5rem;
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-primary-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-secondary {
  background-color: #5a223d;
  color: white;
  border-radius: var(--radius-md);
  padding: 1rem 2rem;
  width: 100%;
}

/* 卡片 */
.card {
  background-color: var(--color-bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-bordered {
  border: 1px solid var(--color-border);
}

.card-bordered:hover {
  border-color: rgba(46, 90, 68, 0.2);
}

/* 標籤 */
.tag {
  display: inline-block;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid rgba(46, 90, 68, 0.2);
  border-radius: var(--radius-full);
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
  font-weight: 500;
}

/* 表單 */
.form-input {
  width: 100%;
  background-color: white;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: none;
  outline: none;
  transition: box-shadow 0.2s ease;
}

.form-input:focus {
  box-shadow: 0 0 0 2px var(--color-accent);
}

.form-label {
  display: block;
  color: white;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

/* 圖標容器 */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}

.icon-box-primary {
  background-color: var(--color-primary);
  color: white;
}

.icon-box-sm {
  width: 2.5rem;
  height: 2.5rem;
}

.icon-box-md {
  width: 3.5rem;
  height: 3.5rem;
}

.icon-box-lg {
  width: 4rem;
  height: 4rem;
}

/* 承諾卡片 */
.commitment-card {
  text-align: center;
}

.commitment-icon {
  width: 3.5rem;
  height: 3.5rem;
  background-color: var(--color-primary);
  color: white;
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}

.commitment-card:hover .commitment-icon {
  transform: scale(1.1);
}

.commitment-text {
  color: var(--color-text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.4;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.faq-button:focus {
  outline: none;
}

.faq-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-primary);
  transition: transform 0.2s ease;
}

.faq-icon.rotated {
  transform: rotate(180deg);
}

.faq-answer {
  padding-bottom: 1rem;
  color: var(--color-text-muted);
}

.faq-answer.hidden {
  display: none;
}

/* 統計數據 */
.stat-card {
  background-color: white;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.stat-number-accent {
  color: var(--color-accent);
}

.stat-label {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* 星星評分 */
.star-rating {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
}

.star {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-star);
  fill: currentColor;
}

/* --------------------------------------------
   5. 佈局樣式
   -------------------------------------------- */

/* 容器 */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-lg {
  max-width: 1024px;
}

.container-md {
  max-width: 768px;
}

/* 區塊 */
.section {
  padding: 5rem 0;
}

.section-lg {
  padding: 5rem 0;
}

.section-md {
  padding: 4rem 0;
}

/* 導航 */
.header {
  background-color: white;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-link {
  font-weight: 500;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--color-primary);
}

/* Hero */
.hero {
  background-color: white;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.hero-image-container {
  aspect-ratio: 1;
  background-color: rgba(46, 90, 68, 0.05);
  border-radius: var(--radius-2xl);
  border: 8px solid white;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* 頁腳 */
.footer {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  padding: 3rem 0;
  text-align: center;
}

.footer-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

/* 表單區塊 */
.booking-section {
  background-color: white;
  padding: 5rem 0;
}

.booking-card {
  background-color: var(--color-accent);
  border-radius: var(--radius-2xl);
  padding: 2rem;
  box-shadow: var(--shadow-xl);
}

@media (min-width: 768px) {
  .booking-card {
    padding: 3rem;
  }
}

/* --------------------------------------------
   6. 響應式設計
   -------------------------------------------- */

/* 手機優先，平板以上 */
@media (min-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }
  
  .grid-cols-md-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-cols-md-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-cols-md-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .grid-cols-md-5 {
    grid-template-columns: repeat(5, 1fr);
  }
  
  .flex-md-row {
    flex-direction: row;
  }
  
  .w-md-half {
    width: 50%;
  }
}

/* 桌面以上 */
@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* --------------------------------------------
   7. 工具類
   -------------------------------------------- */

/* 文字對齊 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Flexbox */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }

/* Grid */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* 間距 */
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-12 { margin-top: 3rem; }
.my-1 { margin-top: 0.25rem; margin-bottom: 0.25rem; }

/* 內邊距 */
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

/* 寬度 */
.w-full { width: 100%; }
.w-px { width: 1px; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }

/* 高度 */
.h-16 { height: 4rem; }
.h-64 { height: 16rem; }
.h-full { height: 100%; }

/* 顏色 */
.bg-white { background-color: white; }
.bg-primary { background-color: var(--color-primary); }
.bg-secondary { background-color: var(--color-secondary); }
.bg-bglight { background-color: var(--color-bg-light); }

.text-white { color: white; }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-accent { color: var(--color-accent); }
.text-gray-500 { color: var(--color-text-muted); }
.text-gray-600 { color: #4B5563; }

/* 邊框 */
.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-l { border-left-width: 1px; }
.border-gray-100 { border-color: #F3F4F6; }
.border-gray-200 { border-color: var(--color-border); }

/* 圓角 */
.rounded-md { border-radius: var(--radius-md); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

/* 陰影 */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* 溢出 */
.overflow-hidden { overflow: hidden; }

/* 定位 */
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

/* Z-index */
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

/* 轉換 */
.transition { transition-property: all; transition-duration: 0.3s; }
.transition-transform { transition-property: transform; transition-duration: 0.3s; }
.transition-shadow { transition-property: box-shadow; transition-duration: 0.3s; }
.transition-colors { transition-property: color, background-color; transition-duration: 0.2s; }

/* 變形 */
.hover\:scale-110:hover { transform: scale(1.1); }
.hover\:-translate-y-1:hover { transform: translateY(-0.25rem); }

/* 顯示 */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* 地圖 Modal */
#mapModal {
  display: none;
  animation: fadeIn 0.2s ease;
}

#mapModal[style*="flex"] {
  display: flex !important;
}

#mapModal .bg-white {
  animation: scaleIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* 其他 */
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-relaxed { line-height: 1.625; }
