/* ==========================================
   Vicky's Kitchen - Main Stylesheet
   手作杏仁茶品牌網站設計系統 - 精美優化版
   ========================================== */

/* ==========================================
   1. CSS Variables - Design Tokens (升級版)
   ========================================== */
:root {
  /* 增強的配色系統 - 更豐富的色彩層次 */
  --color-primary: #D4A574;
  --color-primary-light: #E8C598;
  --color-primary-dark: #C08F5A;
  --color-secondary: #8B6F47;
  --color-secondary-light: #A58965;
  --color-accent: #E8D5B7;
  --color-accent-light: #F4E8D6;
  --color-dark: #2C2416;
  --color-text: #4A4035;
  --color-text-light: #6B5F50;
  --color-bg: #FAF6F0;
  --color-white: #FFFFFF;

  /* 漸變色系統 */
  --gradient-primary: linear-gradient(135deg, #E8C598 0%, #D4A574 50%, #C08F5A 100%);
  --gradient-warm: linear-gradient(135deg, #FAF6F0 0%, #F5EFE6 50%, #E8D5B7 100%);
  --gradient-sunset: linear-gradient(135deg, #F4E8D6 0%, #E8C598 50%, #D4A574 100%);
  --gradient-overlay: linear-gradient(180deg, rgba(250, 246, 240, 0.95) 0%, rgba(250, 246, 240, 0.8) 100%);

  /* 玻璃擬態效果 */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px rgba(44, 36, 22, 0.1);

  /* Typography */
  --font-serif: 'Noto Serif TC', serif;
  --font-sans: 'Noto Sans TC', sans-serif;

  /* Font Sizes - 響應式 */
  --fs-xl: clamp(2.5rem, 5vw, 4rem);
  --fs-lg: clamp(2rem, 4vw, 3rem);
  --fs-md: clamp(1.5rem, 3vw, 2.25rem);
  --fs-base: clamp(1rem, 1.5vw, 1.125rem);
  --fs-sm: 1rem;
  --fs-xs: 0.875rem;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  --spacing-xxl: 8rem;

  /* Border Radius - 更柔和的圓角 */
  --radius-xs: 6px;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;

  /* Shadows - 多層次陰影系統 */
  --shadow-xs: 0 1px 4px rgba(44, 36, 22, 0.05);
  --shadow-sm: 0 2px 12px rgba(44, 36, 22, 0.08);
  --shadow-md: 0 8px 24px rgba(44, 36, 22, 0.12);
  --shadow-lg: 0 16px 48px rgba(44, 36, 22, 0.15);
  --shadow-xl: 0 24px 64px rgba(44, 36, 22, 0.2);
  --shadow-glow: 0 0 32px rgba(212, 165, 116, 0.3);

  /* Transitions */
  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 600ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 800ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* ==========================================
   2. Reset & Base Styles
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-base);
}

ul,
ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ==========================================
   3. Typography
   ========================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  color: var(--color-dark);
  line-height: 1.3;
  font-weight: 600;
}

h1 {
  font-size: var(--fs-xl);
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: var(--fs-lg);
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--spacing-sm);
}

p {
  font-size: var(--fs-base);
  margin-bottom: var(--spacing-sm);
}

.subtitle {
  font-size: var(--fs-md);
  font-family: var(--font-serif);
  color: var(--color-secondary);
  font-style: italic;
}

/* ==========================================
   4. Layout Utilities
   ========================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  position: relative;
}

.section-title .english {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  display: inline-block;
  position: relative;
}

.section-title .english::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* ==========================================
   7. Brand Story Section
   ========================================== */
.brand-story {
  background: var(--gradient-warm);
  position: relative;
  overflow: hidden;
}

.brand-story::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="%23D4A574" opacity="0.08"/></svg>');
  background-size: 40px 40px;
  pointer-events: none;
}

.story-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: var(--spacing-md);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--glass-border);
}

.story-content p {
  font-size: 1.1rem;
  line-height: 2;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

.story-highlight {
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  padding: 0 4px;
}

/* ==========================================
   8. Product Filter - 精美升級版
   ========================================== */
.product-filter {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.filter-btn {
  padding: 14px 28px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  color: var(--color-text);
  border: 2px solid rgba(212, 165, 116, 0.3);
  border-radius: var(--radius-lg);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: all var(--transition-base);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: -1;
}

.filter-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.filter-btn.active {
  background: var(--gradient-primary);
  color: var(--color-white);
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

/* ==========================================
   9. Product Cards - 精美升級版
   ========================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.product-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-smooth);
  opacity: 1;
  transform: translateY(0);
  position: relative;
}

/* 卡片光澤效果 */
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.4),
      transparent);
  transition: left 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

.product-card.hidden {
  display: none;
}

.product-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  border-color: rgba(212, 165, 116, 0.5);
}

.product-card:hover::before {
  left: 100%;
}

.product-image {
  width: 100%;
  height: 240px;
  background: var(--gradient-sunset);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* 圖片容器漸變背景動畫 */
.product-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.product-card:hover .product-image::before {
  opacity: 1;
}

.product-image img {
  width: 65%;
  height: auto;
  object-fit: contain;
  transition: transform var(--transition-slow);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
}

.product-card:hover .product-image img {
  transform: scale(1.1) rotate(2deg);
}

.product-category-badge {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-secondary);
  border: 1px solid rgba(212, 165, 116, 0.3);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.product-content {
  padding: var(--spacing-md);
  background: var(--color-white);
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-sm);
  gap: var(--spacing-sm);
}

.product-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.3;
}

.product-price {
  font-size: 1.35rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.product-tagline {
  font-style: italic;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-sm);
  font-size: var(--fs-sm);
  line-height: 1.6;
  font-weight: 500;
}

.product-description {
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: var(--color-text-light);
}

/* ==========================================
   10. Ordering Section - 精美升級版
   ========================================== */
.ordering {
  background: var(--gradient-warm);
  position: relative;
  overflow: hidden;
}

.ordering::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.1) 10%, transparent 60%);
  animation: rotateGradient 20s linear infinite;
}

@keyframes rotateGradient {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.ordering-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
  position: relative;
  z-index: 1;
}

.ordering-item {
  text-align: center;
  padding: var(--spacing-md);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.ordering-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.ordering-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-md);
  font-size: 2rem;
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-base);
}

.ordering-item:hover .ordering-icon {
  transform: scale(1.1) rotate(10deg);
}

.ordering-item h3 {
  margin-bottom: var(--spacing-sm);
  font-size: 1.4rem;
  color: var(--color-dark);
}

.ordering-item p {
  font-size: var(--fs-sm);
  line-height: 1.7;
}

.ordering-item a {
  color: var(--color-secondary);
  font-weight: 700;
  text-decoration: underline;
  transition: all var(--transition-fast);
}

.ordering-item a:hover {
  color: var(--color-primary);
  text-decoration-thickness: 2px;
}

.important-notes {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-top: var(--spacing-xl);
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(212, 165, 116, 0.2);
  position: relative;
  z-index: 1;
}

.important-notes h3 {
  color: var(--color-secondary);
  margin-bottom: var(--spacing-md);
  font-size: 1.5rem;
}

.note-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.note-item {
  display: flex;
  gap: var(--spacing-sm);
  align-items: flex-start;
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.note-item:hover {
  background-color: rgba(212, 165, 116, 0.05);
}

.note-icon {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.note-item p {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.7;
}

.note-item strong {
  color: var(--color-dark);
  font-weight: 700;
}

/* ==========================================
   11. Social Media Section - 精美升級版
   ========================================== */
.social-media {
  background-color: var(--color-white);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-xl);
  margin-top: var(--spacing-lg);
}

.social-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-base);
}

.social-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.social-card h3 {
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  font-size: 1.4rem;
}

.social-icon {
  width: 48px;
  height: 48px;
  transition: transform var(--transition-base);
}

.social-card:hover .social-icon {
  transform: scale(1.15) rotate(-5deg);
}

/* ==========================================
   12. Footer - 精美升級版
   ========================================== */
.footer {
  background: linear-gradient(135deg, #2C2416 0%, #1A1510 100%);
  color: var(--color-accent);
  padding: var(--spacing-xl) 0 var(--spacing-md);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="%23D4A574" opacity="0.1"/></svg>');
  background-size: 30px 30px;
  pointer-events: none;
}

.footer-content {
  margin-bottom: var(--spacing-md);
  position: relative;
  z-index: 1;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--color-white);
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

.footer-social a {
  color: var(--color-accent);
  font-size: 1.5rem;
  transition: all var(--transition-base);
  padding: var(--spacing-sm);
  border-radius: 50%;
  background: rgba(212, 165, 116, 0.1);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social a:hover {
  color: var(--color-primary);
  background: rgba(212, 165, 116, 0.2);
  transform: translateY(-5px) rotate(10deg);
  box-shadow: 0 8px 16px rgba(212, 165, 116, 0.3);
}

.footer-bottom {
  border-top: 1px solid rgba(232, 213, 183, 0.2);
  padding-top: var(--spacing-md);
  font-size: var(--fs-xs);
  position: relative;
  z-index: 1;
}

/* ==========================================
   13. Animations
   ========================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn var(--transition-slow) ease-out;
}

.slide-up {
  animation: slideUp var(--transition-slow) ease-out;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   14. Utility Classes
   ========================================== */
.text-center {
  text-align: center;
}

.mt-sm {
  margin-top: var(--spacing-sm);
}

.mt-md {
  margin-top: var(--spacing-md);
}

.mt-lg {
  margin-top: var(--spacing-lg);
}

.mb-sm {
  margin-bottom: var(--spacing-sm);
}

.mb-md {
  margin-bottom: var(--spacing-md);
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--gradient-primary);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: all var(--transition-base);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.btn:active {
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--gradient-primary);
  color: var(--color-white);
  border-color: transparent;
}