/* ════════════════════════════════════════════════════
   大明星創意行銷 · 線上商店樣式 shop.css
   對應官網 style.css v3 品牌系統
   主色 #0269C0｜米灰 #F2F1EE｜深底 #0B1E33
   字體：Noto Serif TC（標題）/ Noto Sans TC（本文）/ Courier Prime（數字）
   ════════════════════════════════════════════════════ */

:root {
  --ink:      #0B1E33;
  --blue:     #0269C0;
  --blue-dk:  #0051A0;
  --blue-lt:  #B5C3E6;
  --blue-sky: #4594CF;
  --cream:    #F2F1EE;
  --offwhite: #F6F9F9;
  --gray:     #C9CDD0;
  --gray-ln:  #C9CDD0;
  --gray-bg:  #F6F9F9;
  --gray-tx:  #5C6770;
  --white:    #FFFFFF;
  --serif:    'Noto Serif TC', serif;
  --sans:     'Noto Sans TC', sans-serif;
  --display:  'Courier Prime', 'Noto Sans TC', monospace;
  --nav-h:    64px;
  --radius:   10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.hidden { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans); color: var(--ink);
  background: var(--white); line-height: 1.7; overflow-x: hidden;
}

.container { max-width: 1040px; margin: 0 auto; padding: 0 28px; }

/* ─── Typography ─── */
.eyebrow {
  display: inline-block; font-family: var(--display);
  font-size: 11.5px; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--blue-sky); margin-bottom: 18px;
}
.section-h2 {
  font-family: var(--serif); font-size: clamp(24px, 3.6vw, 38px);
  font-weight: 900; line-height: 1.2; color: var(--ink);
}
.section-lead {
  font-size: 16px; color: var(--gray-tx);
  line-height: 1.85; margin-top: 14px; max-width: 620px;
}
.amber-bar {
  width: 40px; height: 4px; background: var(--blue);
  border-radius: 2px; margin: 20px 0 36px;
}

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue); color: var(--white);
  font-size: 15px; font-weight: 700; letter-spacing: .04em;
  padding: 14px 28px; border-radius: 4px;
  text-decoration: none; border: none; cursor: pointer;
  transition: background .2s, transform .18s, box-shadow .2s;
  box-shadow: 0 6px 28px rgba(2,105,192,.32);
}
.btn-primary:hover { background: var(--blue-dk); transform: translateY(-2px); box-shadow: 0 10px 36px rgba(2,105,192,.38); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--blue);
  font-size: 15px; font-weight: 700; letter-spacing: .04em;
  padding: 13px 26px; border-radius: 4px; border: 1.5px solid var(--blue);
  text-decoration: none; cursor: pointer; transition: background .2s, color .2s;
}
.btn-secondary:hover { background: var(--blue); color: var(--white); }

/* ════════════════════════════════ NAV ════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: #0269c0; border-bottom: 1px solid rgba(255,255,255,.12);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); padding: 0 28px; max-width: 1040px; margin: 0 auto;
}
.nav-logo {
  font-family: var(--serif); font-size: 16px; font-weight: 900;
  color: var(--white); text-decoration: none;
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.nav-logo-img { height: 44px; max-width: 240px; object-fit: contain; display: block; }
.nav-logo-fallback {
  align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 15px; font-weight: 900; color: var(--white);
}
.nav-star {
  width: 26px; height: 26px; background: rgba(255,255,255,.18); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0;
}
.nav-back {
  font-size: 12.5px; font-weight: 500; color: rgba(255,255,255,.8);
  text-decoration: none; letter-spacing: .03em; padding: 7px 12px; border-radius: 4px;
  transition: color .2s, background .2s; display: inline-flex; align-items: center; gap: 5px;
}
.nav-back:hover { color: var(--white); background: rgba(255,255,255,.15); }
.nav-right { display: flex; align-items: center; gap: 6px; }

/* Cart button */
.cart-toggle {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); color: var(--blue);
  font-size: 13.5px; font-weight: 700; letter-spacing: .03em;
  padding: 8px 16px; border-radius: 4px; border: none; cursor: pointer;
  transition: background .2s;
}
.cart-toggle:hover { background: var(--cream); }
.cart-toggle svg { width: 17px; height: 17px; }
.cart-count {
  position: absolute; top: -7px; right: -7px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--ink); color: var(--white);
  font-family: var(--display); font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border-radius: 999px;
}

/* ─── Page banner ─── */
.page-banner {
  background: #0269c0; padding: calc(var(--nav-h) + 56px) 0 60px;
  position: relative; overflow: hidden;
}
.page-banner::after {
  content: '★'; position: absolute; right: 4%; bottom: -40px;
  font-size: 200px; color: rgba(255,255,255,.04);
  font-family: var(--serif); line-height: 1; pointer-events: none;
}
.page-banner-inner { position: relative; z-index: 1; }
.page-banner .eyebrow { color: rgba(255,255,255,.55); }
.page-banner h1 {
  font-family: var(--serif); font-size: clamp(30px, 4.6vw, 50px);
  font-weight: 900; color: var(--white); line-height: 1.15; margin-bottom: 16px;
}
.page-banner h1 .accent { color: var(--ink); }
.page-banner p { font-size: 16px; color: rgba(255,255,255,.68); max-width: 560px; line-height: 1.85; }

/* ─── Intro / 選擇你的下一步 ─── */
.intro-section { background: var(--cream); padding: 60px 0; }
.intro-text p {
  font-size: 15.5px; color: var(--ink); line-height: 1.95; margin-bottom: 14px;
}
.intro-text p:last-child { margin-bottom: 0; }
.intro-caption {
  font-size: 13.5px; color: var(--gray-tx); font-style: italic;
  line-height: 1.8; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--gray-ln);
}
.intro-cta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 24px;
}
.intro-cta-label { font-family: var(--serif); font-size: 15px; font-weight: 900; color: var(--ink); }

/* ─── Products ─── */
.products-section { padding: 72px 0 96px; background: var(--white); }
.products-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
}
.product-card {
  background: var(--white); border: 1px solid var(--gray-ln);
  border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.product-card:hover {
  transform: translateY(-5px); border-color: var(--blue);
  box-shadow: 0 20px 48px rgba(2,105,192,.12);
}
.product-head { background: var(--blue); padding: 26px 28px 22px; }
.product-label {
  display: block; font-family: var(--display); font-size: 11.5px; font-weight: 700;
  letter-spacing: .12em; color: rgba(255,255,255,.65); text-transform: uppercase; margin-bottom: 6px;
}
.product-title {
  font-family: var(--serif); font-size: 19px; font-weight: 900;
  color: var(--white); line-height: 1.35; margin-bottom: 10px; word-break: keep-all;
}
.product-tagline { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.82); word-break: keep-all; }
.product-quota {
  display: inline-block; font-family: var(--display); font-size: 10.5px; font-weight: 700;
  letter-spacing: .05em; color: var(--white); background: rgba(255,255,255,.18);
  border-radius: 999px; padding: 3px 10px; margin-top: 12px;
}
.product-quota.is-empty { visibility: hidden; }
.product-body { padding: 22px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.product-audience { font-size: 13px; color: var(--gray-tx); line-height: 1.75; margin-bottom: 12px; word-break: keep-all; }
.field-tag {
  display: inline-block; background: var(--blue); color: var(--white);
  font-size: 11.5px; font-weight: 700; letter-spacing: .03em;
  border-radius: 4px; padding: 2px 8px; margin-right: 8px;
  vertical-align: 1px;
}
.product-includes { list-style: none; margin: 0 0 12px; padding: 0; flex: 1; counter-reset: pi; }
.product-includes li {
  counter-increment: pi; font-size: 13px; color: var(--ink); line-height: 1.7;
  padding-left: 22px; position: relative; margin-bottom: 6px; word-break: keep-all;
}
.product-includes li::before {
  content: counter(pi) '.'; position: absolute; left: 0; top: 0;
  font-family: var(--display); font-weight: 700; color: var(--blue); font-size: 12.5px;
}
.product-note { font-size: 12px; color: var(--gray-tx); line-height: 1.7; margin-bottom: 4px; word-break: keep-all; }
.product-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 22px; flex-wrap: wrap;
}
.product-price {
  font-family: var(--serif); font-size: 22px; font-weight: 900; color: var(--blue);
}
.product-price .unit { font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--gray-tx); margin-left: 4px; }
.btn-add {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ink); color: var(--white);
  font-size: 13px; font-weight: 700; letter-spacing: .03em;
  padding: 10px 18px; border-radius: 4px; border: none; cursor: pointer;
  transition: background .2s;
}
.btn-add:hover { background: var(--blue); }

.products-error {
  grid-column: 1 / -1; text-align: center; color: #c0392b;
  font-size: 14px; line-height: 1.9; padding: 40px 0;
}
.products-error code { background: var(--cream); padding: 2px 6px; border-radius: 3px; font-family: var(--display); }

/* ─── Add-on / terms (greyed, not purchasable) ─── */
.addon-section { margin-top: 64px; opacity: .5; pointer-events: none; user-select: none; }
.addon-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.addon-head h2 { font-family: var(--serif); font-size: 20px; font-weight: 900; color: var(--ink); }
.addon-badge {
  font-family: var(--display); font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  background: var(--gray); color: var(--gray-tx);
}
.addon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.addon-card { background: var(--offwhite); border: 1px solid var(--gray-ln); border-radius: var(--radius); padding: 18px 20px; }
.addon-card .name { font-weight: 700; color: var(--ink); font-size: 14.5px; }
.addon-card .note { font-size: 13px; color: var(--gray-tx); margin-top: 5px; line-height: 1.7; }
.addon-card .price { font-size: 13.5px; font-weight: 700; color: var(--blue); margin-top: 10px; font-family: var(--display); }
.terms-box {
  background: var(--offwhite); border: 1px solid var(--gray-ln); border-radius: var(--radius);
  padding: 20px 22px; font-size: 13px; color: var(--gray-tx); line-height: 1.9;
}
.terms-box .terms-title { font-weight: 700; color: var(--ink); margin-bottom: 10px; font-size: 14px; }

/* ════════════════════════════════ CART DRAWER ════════════════════════════════ */
.cart-overlay { position: fixed; inset: 0; background: rgba(11,30,51,.45); z-index: 240; display: none; }
.cart-overlay.open { display: block; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 100%; max-width: 400px;
  background: var(--white); box-shadow: -12px 0 48px rgba(11,30,51,.18);
  z-index: 250; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--gray-ln);
}
.cart-drawer-head h2 { font-family: var(--serif); font-size: 18px; font-weight: 900; color: var(--ink); }
.cart-close { background: none; border: none; font-size: 26px; line-height: 1; color: var(--gray-tx); cursor: pointer; padding: 0 4px; }
.cart-close:hover { color: var(--ink); }
.cart-body { flex: 1; overflow-y: auto; padding: 0 22px; }
.cart-empty { text-align: center; color: var(--gray-tx); font-size: 14px; padding: 48px 0; }

.cart-item { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--gray-ln); }
.cart-item-thumb {
  width: 60px; height: 60px; flex-shrink: 0; border-radius: 8px; overflow: hidden;
  background: var(--blue); display: flex; align-items: center; justify-content: center;
}
.cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-thumb .ph { font-family: var(--serif); font-weight: 900; color: var(--white); font-size: 18px; }
.cart-item-main { flex: 1; min-width: 0; }
.cart-item-name { font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.cart-item-unit { font-size: 12.5px; color: var(--gray-tx); margin-top: 2px; }
.cart-qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cart-qty button {
  width: 24px; height: 24px; border: 1px solid var(--gray-ln); background: var(--white);
  color: var(--gray-tx); border-radius: 4px; cursor: pointer; font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.cart-qty button:hover { border-color: var(--blue); color: var(--blue); }
.cart-qty .q { min-width: 22px; text-align: center; font-size: 13px; font-family: var(--display); }
.cart-item-remove {
  margin-left: 12px; font-size: 12.5px; color: #c0392b;
  background: none; border: 1px solid rgba(192,57,43,.35); border-radius: 6px;
  padding: 7px 16px; line-height: 1; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s;
}
.cart-item-remove:hover { background: #c0392b; color: var(--white); border-color: #c0392b; }
.cart-item-sub { font-size: 13.5px; font-weight: 700; color: var(--ink); font-family: var(--display); white-space: nowrap; }

.cart-foot { padding: 18px 22px; border-top: 1px solid var(--gray-ln); display: flex; flex-direction: column; gap: 14px; }
.cart-total-row { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 700; color: var(--ink); }
.cart-total-row .amount { font-family: var(--serif); font-size: 20px; font-weight: 900; color: var(--blue); }

.field-label { display: block; font-size: 13px; color: var(--gray-tx); margin-bottom: 6px; }
.field-label .req { color: #c0392b; }
.field-input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--gray-ln);
  border-radius: 6px; font-size: 14px; font-family: var(--sans); color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(2,105,192,.15); }
.field-input.error { border-color: #c0392b; }
.field-error { margin-top: 5px; font-size: 12px; color: #c0392b; }
.field-error.hidden { display: none; }

.checkout-btn { width: 100%; padding: 14px; font-size: 15px; }

/* ─── Footer ─── */
.shop-footer { background: #061322; padding: 44px 0 28px; margin-top: 0; }
.shop-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.shop-footer .brand { font-family: var(--serif); font-size: 16px; font-weight: 900; color: var(--white); }
.shop-footer .links { display: flex; gap: 18px; flex-wrap: wrap; }
.shop-footer .links a { font-size: 13px; color: rgba(255,255,255,.5); text-decoration: none; transition: color .2s; }
.shop-footer .links a:hover { color: var(--white); }
.shop-footer .copy { width: 100%; font-size: 11.5px; color: rgba(255,255,255,.25); padding-top: 20px; margin-top: 8px; border-top: 1px solid rgba(255,255,255,.06); }

/* ─── Reveal ─── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }

/* ─── Responsive ─── */
@media (max-width: 860px) {
  .products-grid { grid-template-columns: 1fr 1fr; }
  .addon-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .nav-back span { display: none; }
}
@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .products-grid { grid-template-columns: 1fr; }
  .page-banner { padding: calc(var(--nav-h) + 40px) 0 44px; }
  .nav-logo-img { height: 38px; max-width: 190px; }
}
