/* ============================================================
   DLPY 日貨官網 — 前台 Base CSS
   CSS Variables + Reset + Typography + Utility
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Color */
  --c-ink:        #26201A;
  --c-muted:      #8A7A6C;
  --c-cream:      #FAF8F3;
  --c-cream-mid:  #F2EDE2;
  --c-cream-dark: #E6DCCC;
  --c-navy:       #9A7860;
  --c-navy-deep:  #806250;
  --c-brick:      #A88878;
  --c-brick-dark: #9A7860;
  --c-gold:       #C8A880;
  --c-gold-light: #E2CAAA;
  --c-sage:       #5A8A6A;
  --c-alert:      #C04838;
  --c-white:      #ffffff;

  /* Typography */
  --font-serif:   'Noto Serif TC', 'Georgia', serif;
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-ui:      'Inter', system-ui, sans-serif;

  /* Spacing */
  --container:    1200px;
  --gutter:       32px;

  /* Transition */
  --t-fast:   150ms ease;
  --t-normal: 250ms ease;
  --t-slow:   400ms ease;

  /* Shadow */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12);
}

/* ── Color Themes ──────────────────────────────────────────── */
/* a 桜霞 */
body[data-theme="a"] {
  --c-cream: #FEF5F7; --c-cream-mid: #F9E8EF; --c-cream-dark: #EED4DC;
  --c-ink: #2C1A22;   --c-muted: #8A6272;
  --c-navy: #B85470;  --c-navy-deep: #9A4058;
  --c-brick: #CC7890; --c-brick-dark: #B4607A;
  --c-gold: #E8A4A0;  --c-gold-light: #F5CBC4;
}
/* b 新芽 */
body[data-theme="b"] {
  --c-cream: #F4F9F2; --c-cream-mid: #E6F2E2; --c-cream-dark: #CAE2C4;
  --c-ink: #1A2A18;   --c-muted: #587852;
  --c-navy: #3A7854;  --c-navy-deep: #2C6040;
  --c-brick: #589A6A; --c-brick-dark: #448052;
  --c-gold: #94C870;  --c-gold-light: #BCE894;
}
/* c 藤花 */
body[data-theme="c"] {
  --c-cream: #F8F6FC; --c-cream-mid: #EEE8F8; --c-cream-dark: #DDD0EE;
  --c-ink: #1E1828;   --c-muted: #7068A0;
  --c-navy: #6854A4;  --c-navy-deep: #54409A;
  --c-brick: #8E78C4; --c-brick-dark: #7460B0;
  --c-gold: #C0A0E0;  --c-gold-light: #DCC8F4;
}
/* d 白雲 */
body[data-theme="d"] {
  --c-cream: #F2F7FC; --c-cream-mid: #E2EDF8; --c-cream-dark: #C8DCF0;
  --c-ink: #182030;   --c-muted: #4E6A8A;
  --c-navy: #3A72B4;  --c-navy-deep: #2C5C9A;
  --c-brick: #5A90CC; --c-brick-dark: #4078B8;
  --c-gold: #7EBCE8;  --c-gold-light: #B4DCF4;
}
/* e 橙風 */
body[data-theme="e"] {
  --c-cream: #FEF8F0; --c-cream-mid: #FCE8D8; --c-cream-dark: #F4D8B8;
  --c-ink: #281E0E;   --c-muted: #8A7048;
  --c-navy: #CC7818;  --c-navy-deep: #AA600A;
  --c-brick: #E09038; --c-brick-dark: #CC7820;
  --c-gold: #F0C060;  --c-gold-light: #F8DC98;
}
/* f 粉藕（莫蘭迪）*/
body[data-theme="f"] {
  --c-cream: #FAF5F5; --c-cream-mid: #F2E8E8; --c-cream-dark: #E4D4D4;
  --c-ink: #2E1E1E;   --c-muted: #907070;
  --c-navy: #A07880;  --c-navy-deep: #88606A;
  --c-brick: #BC909A; --c-brick-dark: #A07880;
  --c-gold: #D4A8B0;  --c-gold-light: #EAC8CC;
}
/* g 苔青（莫蘭迪）*/
body[data-theme="g"] {
  --c-cream: #F5F8F5; --c-cream-mid: #E8EEE6; --c-cream-dark: #D4DECC;
  --c-ink: #1E2A1C;   --c-muted: #6E7E68;
  --c-navy: #7E9870;  --c-navy-deep: #6A8460;
  --c-brick: #98B088; --c-brick-dark: #7E9870;
  --c-gold: #B4CCA4;  --c-gold-light: #CCE0BC;
}
/* h 奶黃（莫蘭迪）*/
body[data-theme="h"] {
  --c-cream: #FAF8F0; --c-cream-mid: #F4EEDC; --c-cream-dark: #EAE0C4;
  --c-ink: #2A2410;   --c-muted: #7E7450;
  --c-navy: #A89C60;  --c-navy-deep: #908450;
  --c-brick: #C0B478; --c-brick-dark: #A89C60;
  --c-gold: #D8CC90;  --c-gold-light: #ECE4B4;
}
/* i 霧藍（莫蘭迪）*/
body[data-theme="i"] {
  --c-cream: #F4F6FA; --c-cream-mid: #E6EAF4; --c-cream-dark: #D0D8E8;
  --c-ink: #1A2030;   --c-muted: #6A7888;
  --c-navy: #7890A8;  --c-navy-deep: #607890;
  --c-brick: #90A8C0; --c-brick-dark: #7890A8;
  --c-gold: #ACCAD8;  --c-gold-light: #C8DEEA;
}
/* j 薄荷（莫蘭迪）*/
body[data-theme="j"] {
  --c-cream: #F4FAF8; --c-cream-mid: #E4F2EE; --c-cream-dark: #C8E2DC;
  --c-ink: #1A2824;   --c-muted: #5E7870;
  --c-navy: #709C8C;  --c-navy-deep: #5A8478;
  --c-brick: #88B4A8; --c-brick-dark: #709C8C;
  --c-gold: #A8CCCA;  --c-gold-light: #C4E4DE;
}

/* ── Hero Slide & Feature Block Gradients（各主題覆蓋）────────── */
body[data-theme="a"] .hero-slide:nth-child(1):not(.has-img){background:linear-gradient(135deg,#F2C0D2 0%,#E8A8BC 55%,#DC90A4 100%)!important}
body[data-theme="a"] .hero-slide:nth-child(2):not(.has-img){background:linear-gradient(135deg,#D8ECD8 0%,#C0E0C4 55%,#A8D0AC 100%)!important}
body[data-theme="a"] .hero-slide:nth-child(3):not(.has-img){background:linear-gradient(135deg,#ECD4EC 0%,#E0BCDC 55%,#D0A4CC 100%)!important}
body[data-theme="a"] .feature-block:nth-child(1) .promo-bg:not(.has-img){background:linear-gradient(135deg,#CC8090 0%,#B86878 50%,#A45060 100%)!important}
body[data-theme="a"] .feature-block:nth-child(2) .promo-bg:not(.has-img){background:linear-gradient(135deg,#8AB8A0 0%,#72A088 50%,#5A8870 100%)!important}

body[data-theme="b"] .hero-slide:nth-child(1):not(.has-img){background:linear-gradient(135deg,#BCE8C8 0%,#A0D8B0 55%,#84C898 100%)!important}
body[data-theme="b"] .hero-slide:nth-child(2):not(.has-img){background:linear-gradient(135deg,#C8ECD4 0%,#AEE0BC 55%,#94D0A4 100%)!important}
body[data-theme="b"] .hero-slide:nth-child(3):not(.has-img){background:linear-gradient(135deg,#B4E0C4 0%,#9AD0AC 55%,#80C094 100%)!important}
body[data-theme="b"] .feature-block:nth-child(1) .promo-bg:not(.has-img){background:linear-gradient(135deg,#4A8A60 0%,#3A7450 50%,#2C6040 100%)!important}
body[data-theme="b"] .feature-block:nth-child(2) .promo-bg:not(.has-img){background:linear-gradient(135deg,#5A9878 0%,#488064 50%,#386850 100%)!important}

body[data-theme="c"] .hero-slide:nth-child(1):not(.has-img){background:linear-gradient(135deg,#E0D0F8 0%,#D0BCE8 55%,#BCA8D8 100%)!important}
body[data-theme="c"] .hero-slide:nth-child(2):not(.has-img){background:linear-gradient(135deg,#D8CCF0 0%,#C4B4E8 55%,#B09EDC 100%)!important}
body[data-theme="c"] .hero-slide:nth-child(3):not(.has-img){background:linear-gradient(135deg,#E8DCF8 0%,#D8CAEE 55%,#C4B4E4 100%)!important}
body[data-theme="c"] .feature-block:nth-child(1) .promo-bg:not(.has-img){background:linear-gradient(135deg,#6854A0 0%,#584090 50%,#482E80 100%)!important}
body[data-theme="c"] .feature-block:nth-child(2) .promo-bg:not(.has-img){background:linear-gradient(135deg,#7868B0 0%,#64549E 50%,#50408C 100%)!important}

body[data-theme="d"] .hero-slide:nth-child(1):not(.has-img){background:linear-gradient(135deg,#C0D8EE 0%,#A8C8E6 55%,#90B4DA 100%)!important}
body[data-theme="d"] .hero-slide:nth-child(2):not(.has-img){background:linear-gradient(135deg,#B8D0EC 0%,#A0C0E4 55%,#88ACDA 100%)!important}
body[data-theme="d"] .hero-slide:nth-child(3):not(.has-img){background:linear-gradient(135deg,#C8E0F4 0%,#B0D0EC 55%,#98C0E4 100%)!important}
body[data-theme="d"] .feature-block:nth-child(1) .promo-bg:not(.has-img){background:linear-gradient(135deg,#3A72B4 0%,#2C5E9C 50%,#1E4A84 100%)!important}
body[data-theme="d"] .feature-block:nth-child(2) .promo-bg:not(.has-img){background:linear-gradient(135deg,#4A84C4 0%,#3870AC 50%,#285C94 100%)!important}

body[data-theme="e"] .hero-slide:nth-child(1):not(.has-img){background:linear-gradient(135deg,#F8D8A4 0%,#F0C080 55%,#E4A85C 100%)!important}
body[data-theme="e"] .hero-slide:nth-child(2):not(.has-img){background:linear-gradient(135deg,#FCDCA8 0%,#F4C884 55%,#ECB460 100%)!important}
body[data-theme="e"] .hero-slide:nth-child(3):not(.has-img){background:linear-gradient(135deg,#F8D4A0 0%,#F0BC78 55%,#E4A450 100%)!important}
body[data-theme="e"] .feature-block:nth-child(1) .promo-bg:not(.has-img){background:linear-gradient(135deg,#CC7818 0%,#B06010 50%,#944808 100%)!important}
body[data-theme="e"] .feature-block:nth-child(2) .promo-bg:not(.has-img){background:linear-gradient(135deg,#B87820 0%,#9C6010 50%,#804800 100%)!important}

body[data-theme="f"] .hero-slide:nth-child(1):not(.has-img){background:linear-gradient(135deg,#EED4D8 0%,#E4C0C4 55%,#D8ACAC 100%)!important}
body[data-theme="f"] .hero-slide:nth-child(2):not(.has-img){background:linear-gradient(135deg,#E8D4DC 0%,#DCC0C8 55%,#D0ACB8 100%)!important}
body[data-theme="f"] .hero-slide:nth-child(3):not(.has-img){background:linear-gradient(135deg,#F2DCD8 0%,#E8C8C4 55%,#DCB4B0 100%)!important}
body[data-theme="f"] .feature-block:nth-child(1) .promo-bg:not(.has-img){background:linear-gradient(135deg,#A07880 0%,#88606A 50%,#704858 100%)!important}
body[data-theme="f"] .feature-block:nth-child(2) .promo-bg:not(.has-img){background:linear-gradient(135deg,#9C8088 0%,#846878 50%,#6C5064 100%)!important}

body[data-theme="g"] .hero-slide:nth-child(1):not(.has-img){background:linear-gradient(135deg,#CCE0C8 0%,#B8D2B2 55%,#A4C4A0 100%)!important}
body[data-theme="g"] .hero-slide:nth-child(2):not(.has-img){background:linear-gradient(135deg,#C8DCCA 0%,#B4CEB8 55%,#A0C0A4 100%)!important}
body[data-theme="g"] .hero-slide:nth-child(3):not(.has-img){background:linear-gradient(135deg,#D0E4CC 0%,#BCD4B8 55%,#A8C8A4 100%)!important}
body[data-theme="g"] .feature-block:nth-child(1) .promo-bg:not(.has-img){background:linear-gradient(135deg,#7E9870 0%,#6A8460 50%,#567050 100%)!important}
body[data-theme="g"] .feature-block:nth-child(2) .promo-bg:not(.has-img){background:linear-gradient(135deg,#8AA888 0%,#769474 50%,#628060 100%)!important}

body[data-theme="h"] .hero-slide:nth-child(1):not(.has-img){background:linear-gradient(135deg,#F2EACC 0%,#EAE0B0 55%,#E2D698 100%)!important}
body[data-theme="h"] .hero-slide:nth-child(2):not(.has-img){background:linear-gradient(135deg,#EEE6C4 0%,#E6DAA8 55%,#DECC90 100%)!important}
body[data-theme="h"] .hero-slide:nth-child(3):not(.has-img){background:linear-gradient(135deg,#F4ECD0 0%,#ECE4B4 55%,#E4D89C 100%)!important}
body[data-theme="h"] .feature-block:nth-child(1) .promo-bg:not(.has-img){background:linear-gradient(135deg,#A89C60 0%,#908450 50%,#786C40 100%)!important}
body[data-theme="h"] .feature-block:nth-child(2) .promo-bg:not(.has-img){background:linear-gradient(135deg,#B0A468 0%,#988C58 50%,#807448 100%)!important}

body[data-theme="i"] .hero-slide:nth-child(1):not(.has-img){background:linear-gradient(135deg,#C8D8EC 0%,#B4C8E4 55%,#A0B8DA 100%)!important}
body[data-theme="i"] .hero-slide:nth-child(2):not(.has-img){background:linear-gradient(135deg,#C0D0E8 0%,#AEC4E0 55%,#9AB4D8 100%)!important}
body[data-theme="i"] .hero-slide:nth-child(3):not(.has-img){background:linear-gradient(135deg,#CCDCF0 0%,#B8CCEC 55%,#A4BCE4 100%)!important}
body[data-theme="i"] .feature-block:nth-child(1) .promo-bg:not(.has-img){background:linear-gradient(135deg,#7890A8 0%,#607890 50%,#486078 100%)!important}
body[data-theme="i"] .feature-block:nth-child(2) .promo-bg:not(.has-img){background:linear-gradient(135deg,#8098B0 0%,#688298 50%,#506C80 100%)!important}

body[data-theme="j"] .hero-slide:nth-child(1):not(.has-img){background:linear-gradient(135deg,#C4E0DC 0%,#ACCEC8 55%,#94BEB8 100%)!important}
body[data-theme="j"] .hero-slide:nth-child(2):not(.has-img){background:linear-gradient(135deg,#BCDAD8 0%,#A4CAC8 55%,#8CBAB8 100%)!important}
body[data-theme="j"] .hero-slide:nth-child(3):not(.has-img){background:linear-gradient(135deg,#CCE4E0 0%,#B4D4D0 55%,#9CC4C0 100%)!important}
body[data-theme="j"] .feature-block:nth-child(1) .promo-bg:not(.has-img){background:linear-gradient(135deg,#709C8C 0%,#5A8478 50%,#446C60 100%)!important}
body[data-theme="j"] .feature-block:nth-child(2) .promo-bg:not(.has-img){background:linear-gradient(135deg,#7AACAC 0%,#64989A 50%,#4E8488 100%)!important}

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

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

body {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-ink);
  background: var(--c-cream);
  -webkit-font-smoothing: antialiased;
}

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

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ── Container ─────────────────────────────────────────────── */
.container {
  max-width: none;
  padding-inline: 150px;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 28px;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.12em;
  transition: background var(--t-normal), color var(--t-normal), border-color var(--t-normal);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--c-brick);
  color: var(--c-white);
  border-color: var(--c-brick);
}
.btn-primary:hover {
  background: var(--c-brick-dark);
  border-color: var(--c-brick-dark);
}

.btn-secondary {
  background: var(--c-navy);
  color: var(--c-white);
  border-color: var(--c-navy);
}
.btn-secondary:hover {
  background: var(--c-navy-deep);
  border-color: var(--c-navy-deep);
}

.btn-outline {
  background: transparent;
  color: var(--c-ink);
  border-color: var(--c-cream-dark);
}
.btn-outline:hover {
  border-color: var(--c-ink);
}

.btn-ghost {
  background: transparent;
  color: var(--c-muted);
  border-color: transparent;
}
.btn-ghost:hover {
  color: var(--c-ink);
}

/* ── Typography ─────────────────────────────────────────────── */
/* 注意：裸元素選擇器僅用於 body 層級的少數情境，
   頁面結構元件一律用元件前綴，保護 .rich-content */

/* ── Utility ────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.hidden   { display: none !important; }
.flex     { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-8 { gap: 32px; }
.text-center { text-align: center; }
.text-muted  { color: var(--c-muted); }
.text-brick  { color: var(--c-brick); }
.text-gold   { color: var(--c-gold); }
.w-full      { width: 100%; }

/* ── Loading Spinner ─────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--c-cream-dark);
  border-top-color: var(--c-brick);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ───────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 20px;
  background: var(--c-navy);
  color: var(--c-white);
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-md);
  animation: slideIn 0.25s ease;
}
.toast.success { background: var(--c-sage); }
.toast.error   { background: var(--c-alert); }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
