/* ===== Variables ===== */
:root {
  --bg: #0a0a0a;
  --bg-secondary: #141414;
  --bg-card: #1a1a1a;
  --gold: #b02848;
  --gold-light: #cc4060;
  --white: #f0f0f0;
  --gray: #c2c2c2;
  --gray-light: #999999;
  --border: #2a2a2a;
  --font: 'Noto Sans TC', sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-light); }

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

/* ===== Age Gate ===== */
#age-gate {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.97);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.age-gate-box {
  max-width: 480px;
  width: 100%;
  text-align: center;
  border: 1px solid var(--gold);
  padding: 3rem 2rem;
  background: var(--bg-card);
}

.age-gate-box h2 {
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.age-gate-box p {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.age-gate-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  font-family: var(--font);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover {
  background: var(--gold);
  color: var(--bg);
}

.btn-primary {
  background: var(--gold);
  color: var(--bg);
}

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

.btn-sm {
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
}

/* ===== Header / Nav ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-logo span {
  color: var(--white);
  font-weight: 300;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--gray);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--white);
  transition: all 0.2s;
}

/* ===== Cart Nav Icon ===== */
.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--gray);
  text-decoration: none;
  padding: 0.25rem;
  margin-left: 1.5rem;
  flex-shrink: 0;
  transition: color 0.2s;
}
.nav-cart:hover { color: var(--gold); }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--gold);
  color: var(--bg);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.65rem;
  font-weight: 700;
  align-items: center;
  justify-content: center;
}

/* ===== Product Buttons ===== */
.btn-group {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.btn-group .product-cart-btn,
.btn-group .product-buy-btn {
  flex: 1;
  margin-bottom: 0;
}

.product-cart-btn {
  display: block;
  width: 100%;
  padding: 0.85rem;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-align: center;
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}
.product-cart-btn:hover { background: var(--gold); color: var(--bg); }

nav.breadcrumb {
  display: block;
  height: auto;
  max-width: none;
  padding: 0;
  justify-content: initial;
}

/* ===== Hero ===== */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  background: radial-gradient(ellipse at center, #1a1500 0%, var(--bg) 70%);
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  max-width: 700px;
}

.hero-badge {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  padding: 0.3rem 1rem;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero p {
  color: var(--gray);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Section ===== */
.section {
  padding: 5rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-sm { padding: 3rem 1.5rem; }

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.section-title em {
  font-style: normal;
  color: var(--gold);
}

.section-sub {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 3rem;
}

.divider {
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 1rem 0 2.5rem;
}

/* ===== Product Grid ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.2rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.product-card:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 28px rgba(200, 168, 75, 0.12);
  transform: translateY(-2px);
}

.product-card-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-secondary);
  position: relative;
}
.product-card-ribbon-wrap {
  position: absolute;
  top: 0;
  right: 0;
  width: 72px;
  height: 72px;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.product-card-ribbon {
  position: absolute;
  top: 27px;
  right: -30px;
  width: 120px;
  background: #d4a840;
  color: #0a0a0a;
  text-align: center;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 0;
  transform: rotate(45deg);
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.35);
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-card-img img {
  transform: scale(1.04);
}

.product-card-body {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  text-transform: uppercase;
  width: fit-content;
}

.product-badge.preorder {
  border-color: var(--gray-light);
  color: var(--gray);
}

.product-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
}

.product-price {
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 700;
  margin-top: auto;
}

.product-price s {
  font-size: 0.85rem;
  color: var(--gray-light);
  font-weight: 400;
  margin-left: 0.4rem;
}

/* ===== Features ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
}

.feature-item {
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--gold);
}

.feature-item h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.feature-item p {
  color: var(--gray);
  font-size: 0.9rem;
}

/* ===== CTA Banner ===== */
.cta-banner {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4rem 1.5rem;
  text-align: center;
}

.cta-banner h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.cta-banner p {
  color: var(--gray);
  margin-bottom: 2rem;
}

/* ===== Footer ===== */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 2rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand p {
  color: var(--gray);
  font-size: 0.85rem;
  margin-top: 0.8rem;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col ul li {
  color: var(--gray);
  font-size: 0.85rem;
  word-break: break-all;
}

.footer-col ul a {
  color: var(--gray-light);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-col ul a:hover { color: var(--white); }

.footer-bottom {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--gray-light);
}

.footer-bottom a { color: var(--gray-light); }
.footer-bottom a:hover { color: var(--white); }

/* ===== Sticky Buy Bar（商品頁手機用）===== */
.sticky-buy-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 0.75rem 5.5rem 0.75rem 1rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.6);
  gap: 0.75rem;
  z-index: 100;
  align-items: center;
}
.sticky-buy-bar.visible { display: flex; }
.sticky-buy-bar .product-cart-btn,
.sticky-buy-bar .product-buy-btn {
  flex: 1;
  margin-bottom: 0;
  padding: 0.75rem;
  font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  /* Nav：logo 佔滿剩餘空間，toggle + cart 靠右並排 */
  .nav-logo { flex: 1; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.7);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.2rem;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-cart { margin-left: 0.75rem; }

  /* Products：手機固定兩欄 */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* Feature cards：手機兩欄 */
  .feature-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .feature-item { padding: 1rem; }
  .feature-icon { font-size: 1.2rem; margin-bottom: 0.6rem; }
  .feature-item h3 { font-size: 0.9rem; }

  footer { padding: 2rem 1.5rem 1.5rem; }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }

  .hero h1 { font-size: 2rem; }
  .section { padding: 3rem 1.2rem; }
}

/* Age gate：小螢幕按鈕直排，避免文字換行 */
@media (max-width: 480px) {
  .age-gate-actions {
    flex-direction: column;
    align-items: center;
  }
  .age-gate-actions .btn {
    width: 100%;
    max-width: 260px;
    white-space: nowrap;
  }
}
