/* Navbar 基本樣式 */
/* Navbar */
.navbar {position:sticky;top:0;z-index:1000;background:#fff;border-bottom:1px solid rgba(0,0,0,.06);}
.navbar.scrolled {box-shadow:0 8px 28px rgba(0,0,0,.12);}
.navbar-inner {display:flex;align-items:center;justify-content:space-between;padding:14px 20px;}
.logo-link {display:flex;align-items:center;gap:10px;text-decoration:none;}
.logo img {height:40px;}
.logo-text {font-weight:700;font-size:18px;color:#c2185b;}
.main-nav ul {display:flex;gap:16px;list-style:none;margin:0;padding:0;}
.main-nav a {text-decoration:none;color:#333;padding:6px 10px;border-radius:6px;transition:background .2s;}
.main-nav a:hover {background:rgba(0,0,0,.06);}
.hamburger {display:none;flex-direction:column;gap:5px;background:none;border:none;cursor:pointer;}
.hamburger span {width:24px;height:2px;background:#333;display:block;}
@media(max-width:768px){.main-nav ul{display:none;flex-direction:column;background:#fff;position:absolute;top:60px;right:20px;box-shadow:0 8px 20px rgba(0,0,0,.1);padding:12px;border-radius:8px;}
.main-nav.open ul{display:flex;}
.hamburger{display:flex;}}

/* Hero */
.hero {text-align:center;padding:60px 20px;background:linear-gradient(145deg,#fff0f5,#ffe6f1);}
.hero h1 {font-size:32px;color:#c2185b;margin-bottom:12px;}
.hero p {font-size:18px;color:#555;}

/* Gallery */
.gallery {display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;padding:40px 20px;background:#fff;}
.card {border-radius:12px;overflow:hidden;box-shadow:0 6px 22px rgba(0,0,0,.08);background:#fff;}
.card img {width:100%;height:auto;display:block;}
.label {padding:10px;font-weight:600;text-align:center;background:#ffe6f1;color:#c2185b;}

/* Footer */
.site-footer {background:#f8f8f8;padding:20px;text-align:center;}
.footer-links a {margin:0 8px;color:#c2185b;text-decoration:none;}
.footer-links a:hover {text-decoration:underline;}

/* Back to top */
.back-to-top {position:fixed;bottom:20px;right:20px;display:none;padding:10px 14px;border:none;border-radius:50%;background:#c2185b;color:#fff;cursor:pointer;}
.back-to-top.show {display:block;}

/* Petal animation */
@keyframes fall {
  0% {transform:translateY(-10vh) rotate(0deg);}
  100% {transform:translateY(100vh) rotate(360deg);}
}
.petal {position:fixed;top:-10vh;pointer-events:none;}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
  transition: box-shadow .25s ease;
}
.navbar.scrolled {
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
}

/* 內部排版 */
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}

/* LOGO 區塊 */
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo img {
  height: 40px;
}
.logo-text {
  font-weight: 700;
  font-size: 18px;
  color: #c2185b;
}

/* 主選單 */
.main-nav ul {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  text-decoration: none;
  color: #333;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background .2s ease;
}
.main-nav a:hover {
  background: rgba(0,0,0,.06);
}

/* 漢堡選單按鈕 */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span {
  width: 24px;
  height: 2px;
  background: #333;
  display: block;
}

/* RWD：手機版選單 */
/* 針對手機版 (螢幕小於 768px) 的修正 */
/* 強制修正手機版圖片比例，讓它變回長方形 */
/* 手機版最終修正：一排兩張，比例自然 */
/* 手機版排版與比例最終優化設定 */
@media screen and (max-width: 768px) {
    /* 1. 修正上方導覽選單重疊問題 */
    .header, .nav, .menu-container {
        display: block !important;
        text-align: center !important;
    }
    
    /* 2. 讓圖片一排只顯示 2 張，避免太擠 */
    .gallery, .group-container, .grid-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 10px !important;
    }

    /* 3. 統一圖片比例為 3:4 長方形，適合展示禮服 */
    .item {
        width: 100% !important;
        height: auto !important;
        margin-bottom: 15px !important;
    }

    .img-wrapper {
        aspect-ratio: 3 / 4 !important; /* 固定長方形比例 */
        height: auto !important;
        overflow: hidden !important;
        border-radius: 8px !important;
    }

    .img-wrapper img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; /* 確保圖片不變形填滿格子 */
    }

    /* 4. 修正下方按鈕與標籤文字大小 */
    .tag-label {
        font-size: 14px !important;
        padding: 6px 0 !important;
        display: block !important;
    }

    .goto-link {
        font-size: 13px !important;
        padding: 8px !important;
        margin-top: 5px !important;
        display: block !important;
        background-color: #A67C52 !important; /* 確保按鈕顏色明顯 */
        color: #fff !important;
        text-decoration: none !important;
        border-radius: 4px !important;
    }
}
  .main-nav.open ul {
    display: flex;
  }
  .hamburger {
    display: flex;
  }
}
.hero-gradient {
  background: linear-gradient(145deg, #fff0f5, #ffe6f1);
  text-align: center;
  padding: 60px 20px;
}
.hero-gradient h1 {
  font-size: 32px;
  color: #c2185b;
  margin-bottom: 12px;
}
.hero-gradient p {
  font-size: 18px;
  color: #555;
}

.brand-values {
  background: #fff;
  text-align: center;
  padding: 40px 20px;
}
.brand-values h2 {
  font-size: 24px;
  color: #c2185b;
  margin-bottom: 10px;
}
.brand-values p {
  font-size: 16px;
  color: #666;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 40px 20px;
  background: #fff;
}
.card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(0,0,0,.08);
  background: #fff;
}
.card img {
  width: 100%;
  height: auto;
  display: block;
}
.label {
  padding: 10px;
  font-weight: 600;
  text-align: center;
  background: #ffe6f1;
  color: #c2185b;
}

/* Reset & base */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Microsoft JhengHei", "Noto Sans TC", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: #333;
  background: #f8f8f8;
  line-height: 1.6;
}

/* Layout container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid rgba(0,0,0,.06);
  transition: box-shadow .25s ease, background .25s ease;
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.navbar .brand { font-weight: 700; letter-spacing: .5px; }
.navbar .nav { display: flex; gap: 16px; }
.navbar .nav a { text-decoration: none; color: #333; padding: 6px 10px; border-radius: 6px; transition: background .2s ease; }
.navbar .nav a:hover { background: rgba(0,0,0,.06); }
.navbar.scrolled { box-shadow: 0 8px 28px rgba(0,0,0,.12); }

/* Mode toggle chips */
.mode-toggle { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 24px; }
.mode-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border: 1px solid rgba(0,0,0,.12);
  border-radius: 999px; cursor: pointer; color: #444; background: #fff;
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
}
.mode-chip:hover { transform: translateY(-1px); box-shadow: 0 8px 16px rgba(0,0,0,.08); }
.mode-chip.active { background: #ffe6f1; border-color: #ff8fbc; color: #c2185b; }

/* Section titles */
.section { padding: 40px 0; }
.section-title {
  font-weight: 800; font-size: 24px; letter-spacing: .5px; margin: 0 0 18px;
}
.section-subtitle { color: #666; margin-bottom: 20px; }

/* Gallery grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.gallery .card {
  position: relative; overflow: hidden; border-radius: 12px; background: #fff;
  box-shadow: 0 6px 22px rgba(0,0,0,.08); transition: transform .25s ease, box-shadow .25s ease;
}
.gallery .card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.12); }
.gallery .card img { width: 100%; height: auto; display: block; }
.gallery .label {
  position: absolute; left: 10px; bottom: 10px; padding: 6px 10px;
  border-radius: 999px; font-size: 13px; backdrop-filter: blur(3px);
  color: #fff; background: rgba(0,0,0,.38);
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.8);
  display: none; align-items: center; justify-content: center; padding: 24px;
  z-index: 3000;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(92vw, 1400px); max-height: 86vh; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.lightbox .close {
  position: absolute; top: 20px; right: 20px;
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.85);
  display: grid; place-items: center; color: #333; font-weight: 700; cursor: pointer;
}

/* CTA */
.cta {
  position: relative; overflow: hidden; border-radius: 16px; background: linear-gradient(135deg,#ffe6f1,#fff);
  padding: 22px; box-shadow: 0 10px 26px rgba(0,0,0,.08);
  opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease;
}
.cta.visible { opacity: 1; transform: translateY(0); }
.cta .title { font-size: 20px; font-weight: 800; margin: 0 0 8px; }
.cta .desc { color: #555; }
.cta .btn { margin-top: 14px; display: inline-block; padding: 10px 14px; border-radius: 10px; background: #ff5fa2; color: #fff; text-decoration: none; font-weight: 700; }
.cta .btn:hover { filter: brightness(1.05); }

/* Typing slogan */
.typing {
  font-size: 20px; font-weight: 800; color: #c2185b;
  border-right: 2px solid #c2185b; white-space: nowrap; overflow: hidden;
}

/* Back to top */
#backToTop {
  position: fixed; right: 18px; bottom: 18px; z-index: 1200;
  width: 42px; height: 42px; border-radius: 50%;
  background: #ff5fa2; color: #fff; display: none; place-items: center;
  box-shadow: 0 10px 26px rgba(0,0,0,.15); cursor: pointer; font-weight: 700;
}
#backToTop.show { display: grid; }

/* Footer social bar */
.footer {
  border-top: 1px solid rgba(0,0,0,.08); margin-top: 40px; background: #fff;
}
.footer-inner { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 16px 20px; }
.footer .social { display: flex; gap: 10px; }
.footer .social a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: #f2f2f2; color: #333; text-decoration: none; }
.footer .social a:hover { background: #e8e8e8; }

/* Modes (page themes) */
.mode-white { background: #fafafa; color: #333; }
.mode-white .section-title { color: #111; }
.mode-pink { background: linear-gradient(145deg,#fff,#fff0f5 60%); color: #422; }
.mode-pink .section-title { color: #b01562; }
.mode-dark { background: #1d1d1f; color: #eaeaea; }
.mode-dark .section-title { color: #fff; }
.mode-dark .gallery .card { background: #2b2b2e; }

/* Petals (global falling flower layer) */
.petals {
  position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 4000;
}
.petal { position: absolute; width: 18px; height: 18px; opacity: 0; will-change: transform; filter: drop-shadow(0 3px 4px rgba(0,0,0,.18)); }
@keyframes fall {
  0% { transform: translate3d(0,-40px,0) rotate(0deg); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translate3d(0,100vh,0) rotate(360deg); opacity: 0; }
}

/* Responsive */
@media (max-width: 1024px) {
  .gallery { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 768px) {
  .navbar-inner { padding: 12px 16px; }
  .gallery { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .section { padding: 30px 0; }
}
@media (max-width: 480px) {
  .gallery { grid-template-columns: 1fr; }
  #backToTop { right: 14px; bottom: 14px; width: 40px; height: 40px; }
}

/* Utility fades */
.fade-in { opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .45s ease; }
.fade-in.show { opacity: 1; transform: translateY(0); }
html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; }

.navbar-inner { flex-wrap: wrap; }
.navbar.scrolled { background: rgba(255,255,255,.95); }

.gallery .card img { object-fit: cover; }
.gallery .label { font-weight: 600; }

.lightbox { cursor: zoom-out; }
.lightbox img { animation: fade-in .3s ease; }

.cta { max-width: 600px; margin: 0 auto; }
.cta .btn { transition: all .25s ease; }

#backToTop { opacity: 0; transition: opacity .3s ease; }
#backToTop.show { opacity: 1; }

@media (max-width: 768px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
/* Reset & base */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; scroll-behavior: smooth; }
img { max-width: 100%; height: auto; }
body {
  font-family: "Microsoft JhengHei", "Noto Sans TC", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: #333;
  background: #f8f8f8;
  line-height: 1.6;
}

/* Navbar */
.navbar { position: sticky; top: 0; z-index: 1000; background: #fff; }
.navbar.scrolled { box-shadow: 0 8px 28px rgba(0,0,0,.12); background: rgba(255,255,255,.95); }

/* Gallery grid */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery .card img { object-fit: cover; }

/* Lightbox */
.lightbox { cursor: zoom-out; }
.lightbox img { animation: fade-in .3s ease; }

/* CTA */
.cta { max-width: 600px; margin: 0 auto; }
.cta .btn { transition: all .25s ease; }

/* Back to top */
#backToTop {
  position: fixed; right: 18px; bottom: 18px; z-index: 1200;
  width: 42px; height: 42px; border-radius: 50%;
  background: #ff5fa2; color: #fff; opacity: 0;
  display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(0,0,0,.15); cursor: pointer; font-weight: 700;
  transition: opacity .3s ease;
}
#backToTop.show { opacity: 1; }

/* Footer */
.site-footer { background: #fff; border-top: 1px solid rgba(0,0,0,.08); margin-top: 40px; padding: 20px; }
.footer-content { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.footer-social ul { display: flex; gap: 10px; list-style: none; padding: 0; }
.footer-social a { text-decoration: none; padding: 6px 10px; border-radius: 999px; background: #f2f2f2; color: #333; }
.footer-social a:hover { background: #e8e8e8; }

/* Responsive */
@media (max-width: 1024px) { .gallery { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 768px) {
  .gallery { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .footer-content { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .gallery { grid-template-columns: 1fr; }
  #backToTop { right: 14px; bottom: 14px; width: 40px; height: 40px; }
}
/* 花瓣容器 */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 4000;
}
/* Petals global animation */
ready(()=> {
  const layer = document.querySelector('.petals');
  if (!layer) return;

  const SPRITES = [
    '/images/petal.png',
    '/images/petal2.png',
    '/images/petal3.png'
  ];

  function spawn() {
    const p = document.createElement('img');
    p.className = 'petal';
    p.src = SPRITES[Math.floor(Math.random() * SPRITES.length)];

    // 隨機大小
    const size = 12 + Math.random() * 18; 
    p.style.width = `${size}px`;
    p.style.height = `${size}px`;

    // 隨機位置
    p.style.left = `${Math.random() * 100}%`;

    // 隨機旋轉角度
    const rotate = Math.random() * 360;
    p.style.transform = `rotate(${rotate}deg)`;

    // 隨機透明度
    p.style.opacity = 0.6 + Math.random() * 0.4;

    // 飄落時間
    const dur = 6 + Math.random() * 6;
    p.style.animation = `fall ${dur}s linear forwards`;

    layer.appendChild(p);

    // 移除花瓣避免堆積
    setTimeout(() => p.remove(), (dur + 0.5) * 1000);
  }

  // 每 1 秒生成一片花瓣
  let interval = setInterval(spawn, 1000);

  // 當頁面隱藏時暫停，回來時恢復
  document.addEventListener('visibilitychange', () => {
    if (document.hidden) {
      clearInterval(interval);
    } else {
      interval = setInterval(spawn, 1000);
    }
  });
});

/* 花瓣樣式 */
.petal {
  position: absolute;
  will-change: transform, opacity;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.18));
  border-radius: 50%;
}

/* 花瓣飄落動畫：左右搖擺 + 旋轉 */
@keyframes fall {
  0% {
    transform: translate3d(0,-40px,0) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 1; }
  30% {
    transform: translate3d(-20px,30vh,0) rotate(120deg);
    opacity: 0.9;
  }
  60% {
    transform: translate3d(20px,60vh,0) rotate(240deg);
    opacity: 0.8;
  }
  100% {
    transform: translate3d(-10px,100vh,0) rotate(360deg);
    opacity: 0;
  }
}

/* 顏色漸層花瓣 */
.petal-gradient {
  background: radial-gradient(circle at center, #ffc0cb 0%, #fff 70%);
}
/* Reset + base */
*,*::before,*::after{box-sizing:border-box}
body{margin:0;font-family:"Segoe UI",PingFang TC,"Noto Sans TC",sans-serif;color:#333;background:#fff}
img{max-width:100%;display:block}

/* Navbar */
.navbar{position:sticky;top:0;z-index:1000;background:#fff;border-bottom:1px solid rgba(0,0,0,.06);transition:box-shadow .25s}
.navbar.scrolled{box-shadow:0 8px 28px rgba(0,0,0,.12)}
.navbar-inner{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;max-width:1080px;margin:0 auto}
.logo-link{display:flex;align-items:center;gap:10px;text-decoration:none}
.logo-text{font-weight:700;font-size:18px;color:#c2185b}
.main-nav ul{display:flex;gap:14px;list-style:none;margin:0;padding:0}
.main-nav a{text-decoration:none;color:#333;padding:6px 10px;border-radius:6px;transition:background .2s}
.main-nav a:hover{background:rgba(0,0,0,.06)}
.hamburger{display:none;flex-direction:column;gap:5px;background:none;border:none;cursor:pointer}
.hamburger span{width:24px;height:2px;background:#333;display:block}
@media (max-width:768px){
  .hamburger{display:flex}
  .main-nav ul{display:none;position:absolute;top:60px;right:20px;flex-direction:column;background:#fff;padding:12px;border-radius:8px;box-shadow:0 8px 20px rgba(0,0,0,.1)}
  .main-nav.open ul{display:flex}
}

/* Hero */
.hero{text-align:center;padding:60px 20px;background:linear-gradient(145deg,#fff0f5,#ffe6f1)}
.hero h1{margin:0;font-size:36px;color:#c2185b}
.subtitle{margin-top:8px;color:#555}

/* Story */
.fade-section{max-width:860px;margin:32px auto;padding:0 20px;text-align:center}
.fade-section h2{margin:0 0 8px;color:#c2185b}
#slogan{min-height:1.6em;color:#555}

/* Gallery */
.gallery{max-width:1080px;margin:24px auto;padding:0 20px;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.card{border-radius:12px;overflow:hidden;box-shadow:0 6px 22px rgba(0,0,0,.08);background:#fff;transition:transform .3s ease,box-shadow .3s ease}
.card img{width:100%;height:auto}
.card img:hover{transform:scale(1.03);box-shadow:0 8px 24px rgba(0,0,0,.15)}
.label{padding:10px;font-weight:600;text-align:center;background:#ffe6f1;color:#c2185b}

/* Lightbox */
.lightbox{position:fixed;inset:0;background:rgba(0,0,0,.75);display:none;align-items:center;justify-content:center;z-index:1500}
.lightbox.open{display:flex}
.lightbox img{max-width:90vw;max-height:80vh;border-radius:8px;box-shadow:0 12px 40px rgba(0,0,0,.4)}
.lightbox .close{position:absolute;top:16px;right:20px;font-size:28px;color:#fff;cursor:pointer}

/* Footer */
.site-footer{background:#f8f8f8;padding:24px 20px;margin-top:32px}
.footer-inner{max-width:1080px;margin:0 auto;text-align:center}
.footer-links a{margin:0 8px;color:#c2185b;text-decoration:none}
.footer-links a:hover{text-decoration:underline}

/* Back to top */
.back-to-top{position:fixed;bottom:20px;right:20px;display:none;padding:10px 12px;border:none;border-radius:50%;background:#c2185b;color:#fff;cursor:pointer}
.back-to-top.show{display:block}

/* Petals */
@keyframes fall{0%{transform:translateY(-10vh) rotate(0deg)}100%{transform:translateY(100vh) rotate(360deg)}}
.petals{position:fixed;inset:0;pointer-events:none;z-index:500}
.petal{position:fixed;top:-10vh}

