/* ============================================
   isaya 官網 — 深邃神秘・金色傳承（沿用聖輪宗色系）
   新增：商品格、加購選項、購物車、結帳表單、訂單
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@400;600;700;900&family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

:root {
  --midnight: #0F172A;
  --midnight-light: #1a2744;
  --gold: #D4AF37;
  --gold-soft: #E9D38A;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --ivory: #F8F5EE;
  --burgundy: #7A1F2B;
  --text-primary: #F8F5EE;
  --text-muted: #A8A4D8;
  --card-bg: rgba(26,39,68,.6);
  --line: rgba(212,175,55,.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--midnight);
  color: var(--ivory);
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 300;
  line-height: 1.8;
  margin: 0;
}

h1, h2, h3, h4 {
  font-family: 'Noto Serif TC', serif;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.4;
}

a { text-decoration: none; color: inherit; transition: all .3s; }
a:hover { color: var(--gold-soft); }

img { max-width: 100%; }

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(15,23,42,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212,175,55,.15);
  padding: 0 2rem;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  gap: 1.5rem;
}
.nav-logo {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.15rem; font-weight: 900;
  color: var(--gold); letter-spacing: .1em;
  white-space: nowrap;
}
.nav-links {
  display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0;
  align-items: center;
}
.nav-links a {
  font-size: .85rem; letter-spacing: .1em;
  color: var(--text-muted);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }

/* 購物車導航項 */
.nav-cart { position: relative; display: inline-block; }
.cart-badge {
  display: inline-block;
  min-width: 18px; height: 18px; line-height: 18px;
  text-align: center;
  background: var(--gold);
  color: var(--midnight);
  font-size: .7rem; font-weight: 700;
  border-radius: 9px;
  margin-left: .3rem;
  padding: 0 .35rem;
}

/* ---- 內容頁容器（top-nav 需讓出空間） ---- */
.page { padding-top: 64px; }
.page-hero {
  text-align: center;
  padding: 4rem 2rem 2rem;
  background: radial-gradient(ellipse at 50% 0%, var(--midnight-light) 0%, var(--midnight) 70%);
}
.page-hero h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin-bottom: .5rem; }
.page-hero p { color: var(--text-muted); max-width: 640px; margin: 0 auto; font-size: .95rem; }

.section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-dark {
  background: linear-gradient(180deg, var(--midnight) 0%, var(--midnight-light) 50%, var(--midnight) 100%);
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-align: center;
  margin: 0 0 .5rem;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 3rem;
  font-size: .95rem;
}
.section-center { text-align: center; }

/* ---- 首頁 hero ---- */
.hero {
  min-height: 92vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #1a2744 0%, #0F172A 70%);
  padding-top: 64px;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 800'%3E%3Ccircle cx='400' cy='400' r='350' fill='none' stroke='%23D4AF37' stroke-width='0.5' opacity='0.1'/%3E%3Ccircle cx='400' cy='400' r='280' fill='none' stroke='%23D4AF37' stroke-width='0.4' opacity='0.08'/%3E%3Ccircle cx='400' cy='400' r='200' fill='none' stroke='%23D4AF37' stroke-width='0.3' opacity='0.06'/%3E%3Ccircle cx='400' cy='400' r='120' fill='none' stroke='%23D4AF37' stroke-width='0.3' opacity='0.05'/%3E%3C/svg%3E") center/cover no-repeat;
  animation: rotateMandala 60s linear infinite;
}
@keyframes rotateMandala {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.hero-title {
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: .3em;
  text-shadow: 0 0 60px rgba(212,175,55,.4);
  position: relative; z-index: 1; margin: 0;
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  letter-spacing: .5em;
  color: var(--gold-soft);
  margin-top: 1.5rem;
  position: relative; z-index: 1;
}
.hero-tagline {
  font-size: 1rem; color: var(--text-muted);
  margin-top: 2rem; max-width: 560px; line-height: 2;
  position: relative; z-index: 1;
}
.hero-btns {
  display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center;
  margin-top: 3rem; position: relative; z-index: 1;
}

/* ---- 按鈕 ---- */
.btn-gold {
  display: inline-block;
  padding: .8rem 2.5rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: .95rem;
  letter-spacing: .15em;
  transition: all .3s; position: relative; overflow: hidden;
  background: transparent; cursor: pointer;
  font-family: inherit;
}
.btn-gold::before {
  content: ''; position: absolute; inset: 0;
  background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s; z-index: -1;
}
.btn-gold:hover { color: var(--midnight); }
.btn-gold:hover::before { transform: scaleX(1); }
.btn-gold.solid { background: var(--gold); color: var(--midnight); }
.btn-gold.solid::before { display: none; }
.btn-outline {
  display: inline-block;
  padding: .8rem 2.5rem;
  border: 1px solid rgba(248,245,238,.3);
  color: var(--ivory); font-size: .95rem; letter-spacing: .15em;
  transition: all .3s; cursor: pointer; background: transparent; font-family: inherit;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* 加購小按鈕（商品卡內） */
.btn-add {
  display: inline-block;
  padding: .5rem 1.2rem;
  border: 1px solid var(--gold);
  color: var(--gold); font-size: .85rem; letter-spacing: .1em;
  transition: all .3s; cursor: pointer; background: transparent; font-family: inherit;
  width: 100%;
}
.btn-add:hover { background: var(--gold); color: var(--midnight); }

/* ---- Cards ---- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  padding: 2.5rem;
  transition: all .3s;
}
.card:hover {
  border-color: rgba(212,175,55,.35);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.card-icon { font-size: 2.5rem; margin-bottom: 1.2rem; }
.card-title { font-size: 1.3rem; margin-bottom: .8rem; }
.card-text { color: var(--text-muted); font-size: .92rem; line-height: 1.8; }

/* ---- Grid ---- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
}

/* ---- 商品格 ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: all .3s;
}
.product-card:hover {
  border-color: rgba(212,175,55,.35);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.product-img {
  width: 100%; height: 220px; object-fit: cover;
  display: block; background: #080e1a;
}
.product-img-ph {
  width: 100%; height: 220px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #080e1a, #1a2744);
  color: rgba(212,175,55,.4); font-size: 2.5rem;
}
.product-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.product-name {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.05rem; color: var(--gold-soft);
  font-weight: 700; margin-bottom: .5rem;
}
.product-blurb {
  color: var(--text-muted); font-size: .85rem; line-height: 1.7;
  margin-bottom: 1rem; flex: 1;
}
.product-optselect {
  margin-bottom: .8rem;
}
.product-optselect label {
  display: block; color: var(--text-muted);
  font-size: .75rem; margin-bottom: .3rem; letter-spacing: .05em;
}
.product-optselect select {
  width: 100%; padding: .5rem;
  background: #080e1a; color: var(--ivory);
  border: 1px solid var(--line); font-size: .85rem;
}
.product-price-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .5rem; margin-bottom: .5rem; flex-wrap: wrap;
}
.product-price {
  color: var(--gold); font-size: 1.15rem; font-weight: 700;
}
.product-price .cur { font-size: .8rem; color: var(--text-muted); font-weight: 400; }
.product-price.free { color: #7fd4a0; }
.product-note {
  color: var(--text-muted); font-size: .75rem;
}
.stock-line {
  font-size: .78rem; color: var(--gold-soft); margin-bottom: .5rem;
}
.tag-consult {
  display: inline-block; background: rgba(212,175,55,.15);
  border: 1px solid var(--gold); color: var(--gold);
  font-size: .72rem; padding: .15rem .5rem; letter-spacing: .05em;
}

/* ---- 商品詳情頁 ---- */
.detail-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.detail-img {
  width: 100%; min-height: 300px;
  object-fit: cover; display: block;
  border: 1px solid var(--line);
  background: #080e1a;
}
.detail-img-ph {
  min-height: 300px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #080e1a, #1a2744);
  color: rgba(212,175,55,.4); font-size: 4rem;
  border: 1px solid var(--line);
}
.detail-name { font-size: 1.8rem; margin-bottom: .5rem; }
.detail-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.detail-list li {
  color: var(--text-muted); font-size: .9rem; line-height: 1.9;
  padding: .5rem 0 .5rem 1.2rem; position: relative;
}
.detail-list li::before {
  content: '◆'; color: var(--gold); position: absolute; left: 0; font-size: .7rem;
}
.detail-options { margin: 1rem 0; }
.detail-options label { display: block; margin-bottom: .4rem; color: var(--text-muted); font-size: .9rem; }

/* ---- 購物車 ---- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td {
  text-align: left; padding: .8rem .6rem;
  border-bottom: 1px solid var(--line); font-size: .9rem;
}
.cart-table th { color: var(--text-muted); font-weight: 500; font-size: .8rem; letter-spacing: .1em; }
.cart-table .num { text-align: center; }
.qty-input {
  width: 56px; text-align: center;
  background: #080e1a; color: var(--ivory);
  border: 1px solid var(--line); padding: .3rem; font-size: .9rem;
}
.cart-empty { text-align: center; padding: 3rem 0; color: var(--text-muted); }
.summary-box {
  background: var(--card-bg); border: 1px solid var(--line);
  padding: 1.5rem; margin-top: 1.5rem;
}
.summary-row { display: flex; justify-content: space-between; padding: .4rem 0; color: var(--text-muted); font-size: .95rem; }
.summary-row.total {
  color: var(--gold); font-size: 1.3rem; font-weight: 700;
  border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .5rem;
}
.summary-note { font-size: .8rem; color: var(--text-muted); margin-top: .8rem; }

/* ---- 表單 ---- */
.form-card {
  background: var(--card-bg); border: 1px solid var(--line);
  padding: 2rem; max-width: 560px; margin: 0 auto;
}
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; color: var(--text-muted); font-size: .85rem; margin-bottom: .35rem; }
.form-control {
  width: 100%; padding: .7rem;
  background: #080e1a; color: var(--ivory);
  border: 1px solid var(--line); font-size: .95rem; font-family: inherit;
}
.form-control:focus { border-color: var(--gold); outline: none; }
textarea.form-control { min-height: 80px; resize: vertical; }
.pay-radio { display: flex; gap: 1rem; flex-wrap: wrap; }
.pay-radio label { color: var(--text-muted); font-size: .9rem; display: flex; align-items: center; gap: .4rem; }
.pay-radio input { accent-color: var(--gold); }

/* ---- 登入 gate / 提示 ---- */
.auth-gate {
  text-align: center; padding: 2rem;
  background: var(--card-bg); border: 1px solid var(--line);
  max-width: 560px; margin: 0 auto;
}
.auth-gate p { color: var(--text-muted); margin-bottom: 1.5rem; }
.member-banner {
  text-align: center; padding: 2.5rem;
  background: radial-gradient(ellipse at center, rgba(212,175,55,.12) 0%, transparent 70%);
  border: 1px solid rgba(212,175,55,.25);
  margin: 1rem auto; max-width: 720px;
}
.greet { color: var(--gold); font-size: 1.2rem; margin-bottom: .5rem; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--midnight-light); border: 1px solid var(--gold);
  color: var(--ivory); padding: .8rem 1.5rem; font-size: .9rem;
  z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,.5);
  transition: opacity .4s; opacity: 0; pointer-events: none;
}
.toast.show { opacity: 1; }

/* ---- 訂單列表 ---- */
.order-card {
  background: var(--card-bg); border: 1px solid var(--line);
  padding: 1.5rem; margin-bottom: 1.2rem;
}
.order-head {
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: .5rem; align-items: center; margin-bottom: .8rem;
}
.order-no { color: var(--gold); font-weight: 700; font-family: 'Noto Serif TC', serif; }
.order-status {
  display: inline-block; padding: .2rem .7rem; font-size: .78rem;
  border: 1px solid var(--line); border-radius: 3px;
}
.status-pending { color: var(--gold); border-color: var(--gold); }
.status-paid { color: #7fd4a0; border-color: #7fd4a0; }
.status-shipping { color: #7fb8d4; border-color: #7fb8d4; }
.status-done { color: var(--text-muted); }
.order-items { color: var(--text-muted); font-size: .88rem; margin-bottom: .6rem; }
.order-foot { color: var(--text-muted); font-size: .82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

/* ---- CTA Banner ---- */
.cta-banner {
  background: radial-gradient(ellipse at center, rgba(212,175,55,.12) 0%, transparent 70%);
  border-top: 1px solid rgba(212,175,55,.2);
  border-bottom: 1px solid rgba(212,175,55,.2);
  text-align: center; padding: 5rem 2rem;
}
.cta-banner h2 { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 1rem; }
.cta-banner p { color: var(--text-muted); margin-bottom: 2rem; }

/* ---- Footer ---- */
.footer {
  background: #080e1a;
  border-top: 1px solid rgba(212,175,55,.1);
  padding: 3rem 2rem; text-align: center;
}
.footer-logo {
  font-family: 'Noto Serif TC', serif; font-size: 1.3rem; font-weight: 900;
  color: var(--gold); letter-spacing: .2em; margin-bottom: .3rem;
}
.footer-tag { color: var(--text-muted); font-size: .85rem; margin-bottom: 1.5rem; }
.footer-links, .footer-ext {
  display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.footer-links a, .footer-ext a { color: var(--text-muted); font-size: .85rem; letter-spacing: .1em; }
.footer-ext a { color: var(--gold-soft); }
.footer-copy { color: rgba(168,164,216,.5); font-size: .8rem; margin-top: 1rem; }

/* ---- 文案段落（about / buddha-chip） ---- */
.prose { max-width: 760px; margin: 0 auto; }
.prose p { color: var(--text-muted); line-height: 2; font-size: .95rem; }
.prose h3 { color: var(--gold); margin: 2rem 0 1rem; font-size: 1.3rem; }
.prose ul { color: var(--text-muted); padding-left: 1.5rem; line-height: 2; }
.prose ul li { margin-bottom: .5rem; }

/* ---- 響應式 ---- */
@media (max-width: 768px) {
  .nav { padding: 0 1rem; }
  .nav-links {
    display: none;
  }
  .nav-mobile-btn {
    display: block; background: none; border: none;
    color: var(--gold); font-size: 1.5rem; cursor: pointer;
  }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(15,23,42,.97);
    padding: 1.5rem 2rem; gap: 1.2rem;
    border-bottom: 1px solid rgba(212,175,55,.15);
  }
  .hero-title { letter-spacing: .15em; }
  .section { padding: 3rem 1.2rem; }
  .detail-wrap { grid-template-columns: 1fr; gap: 1.5rem; }
  .cart-table { font-size: .82rem; }
  .cart-table th, .cart-table td { padding: .6rem .4rem; }
}

/* ---- 滾動動畫 ---- */
.fade-in { opacity: 0; transform: translateY(24px); transition: all .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
