/* 手機一頁式 — mobile first */
:root {
  --pink-50: #fff5f6;
  --pink-100: #fde8eb;
  --pink-400: #e07d8f;
  --pink-500: #d4627a;
  --pink-600: #c04d66;
  --text: #3d3a3a;
  --white: #fff;
  --page-max: 480px;
  --top-h: 48px;
  --buy-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: "Noto Sans TC", -apple-system, "PingFang TC", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: #2a2a2a;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

/* 手機畫布：全寬；桌機置中模擬手機 */
.page {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  min-height: 100dvh;
  background: var(--pink-50);
  padding-bottom: calc(var(--buy-h) + var(--safe-b) + 12px);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.35);
}

@media (min-width: 520px) {
  body { padding: 12px 0; }
}

/* 頂部列 */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--top-h) + var(--safe-t));
  padding: var(--safe-t) 16px 0;
  background: rgba(255, 245, 246, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(224, 125, 143, 0.2);
}

.top-bar-logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--pink-600);
}

.top-bar-cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(135deg, var(--pink-400), var(--pink-500));
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}

/* 直向圖片流 — 核心一頁式 */
.slides {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.slide {
  width: 100%;
  margin: 0;
  line-height: 0;
  background: var(--pink-50);
}

.slide img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  user-select: none;
  -webkit-user-drag: none;
}

/* 頁尾 */
.page-foot {
  padding: 16px;
  text-align: center;
  font-size: 0.7rem;
  color: #999;
  background: var(--pink-100);
}

/* 捲動進度條 */
.scroll-progress {
  position: fixed;
  top: calc(var(--safe-t));
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--page-max), 100%);
  height: 3px;
  z-index: 60;
  background: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--pink-400), var(--pink-600));
  transition: width 0.1s linear;
}

/* 底部固定購買列 */
.sticky-buy {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(var(--page-max), 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: calc(var(--buy-h) + var(--safe-b));
  padding: 10px 20px calc(10px + var(--safe-b));
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, #e8899a 0%, var(--pink-500) 50%, var(--pink-600) 100%);
  box-shadow: 0 -4px 24px rgba(192, 77, 102, 0.35);
  transition: transform 0.25s ease;
}

.sticky-buy:active {
  transform: translateX(-50%) scale(0.98);
}

.sticky-buy.hidden {
  transform: translateX(-50%) translateY(110%);
}

/* 選購區（META 風格：折扣碼 + 規格切換） */
.shop-section {
  line-height: 1.5;
  padding: 16px 14px 24px;
  background: #f3f0ee;
}

.shop-card {
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  margin-bottom: 14px;
  overflow: hidden;
}

/* —— 折扣碼 —— */
.shop-discount {
  padding: 16px;
}

.shop-discount-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.shop-discount-icon {
  font-size: 1.1rem;
}

.shop-discount-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.shop-discount-input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 12px 14px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fafafa;
  color: var(--text);
}

.shop-discount-input:focus {
  outline: 2px solid rgba(212, 98, 122, 0.45);
  outline-offset: 1px;
}

.shop-discount-apply {
  flex-shrink: 0;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pink-400), var(--pink-500));
  cursor: pointer;
  transition: background 0.2s;
}

.shop-discount-apply.is-applied {
  background: linear-gradient(135deg, #e85d6f, #d43f55);
  pointer-events: none;
}

.shop-promo-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  text-align: left;
  font: inherit;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: #fff0e8;
  cursor: pointer;
}

.shop-promo-tag {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--white);
  background: #e85d6f;
  padding: 3px 8px;
  border-radius: 6px;
  line-height: 1.3;
}

.shop-promo-text {
  font-size: 0.8rem;
  color: #5c4a42;
  line-height: 1.45;
}

.shop-promo-text strong {
  color: #c04d66;
  letter-spacing: 0.06em;
}

.shop-discount-success {
  margin-top: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #2d8a5e;
  line-height: 1.4;
}

.shop-discount-error {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #c04d66;
}

/* —— 商品卡 —— */
.shop-product {
  padding: 0 0 18px;
}

.shop-hero {
  position: relative;
  background: linear-gradient(180deg, #faf6f4 0%, #f5ebe8 100%);
  padding: 12px 12px 0;
}

.shop-hero-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--pink-600);
  background: var(--white);
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.shop-hero-img {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 12px;
}

.shop-info {
  padding: 16px 16px 0;
}

.shop-product-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pink-600);
  margin-bottom: 4px;
}

.shop-product-sub {
  font-size: 0.82rem;
  color: #888;
  margin-bottom: 14px;
}

.shop-price-block {
  margin-bottom: 4px;
}

.shop-price-original {
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 2px;
}

.shop-price-original span {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.shop-price-main {
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1;
}

.shop-price-currency {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pink-600);
}

.shop-price-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--pink-600);
  letter-spacing: -0.02em;
}

.shop-price-save {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, #e8899a, var(--pink-500));
  padding: 4px 10px;
  border-radius: 999px;
}

.shop-specs {
  padding: 16px 16px 0;
}

.shop-specs-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.shop-spec-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.shop-spec-tab {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  padding: 12px 6px;
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.shop-spec-tab.is-active {
  color: var(--white);
  background: linear-gradient(135deg, var(--pink-400), var(--pink-600));
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(192, 77, 102, 0.3);
}

.shop-spec-crown {
  font-size: 0.75rem;
}

.shop-note {
  margin: 16px;
  padding: 14px 14px 14px 16px;
  background: #faf6f0;
  border-left: 4px solid var(--pink-500);
  border-radius: 0 10px 10px 0;
}

.shop-note-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.shop-note-body {
  font-size: 0.82rem;
  color: #6b6565;
  line-height: 1.55;
}

.shop-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 16px;
}

.shop-qty-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.shop-qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid #e8e8e8;
  border-radius: 10px;
  overflow: hidden;
}

.shop-qty-btn {
  width: 40px;
  height: 40px;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  border: none;
  background: #fafafa;
  cursor: pointer;
}

.shop-qty-btn:active {
  background: var(--pink-100);
}

.shop-qty-value {
  min-width: 44px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  border-left: 1.5px solid #e8e8e8;
  border-right: 1.5px solid #e8e8e8;
  padding: 8px 4px;
}

.shop-buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 16px;
  padding: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--pink-400), var(--pink-600));
  box-shadow: 0 6px 20px rgba(192, 77, 102, 0.35);
}

.shop-buy-btn:active {
  transform: scale(0.99);
}

