/* 全局基礎與框架配置 */
body { background-color: #f1f5f9; color: #0f172a; font-family: ui-sans-serif, system-ui, sans-serif; margin: 0; padding: 0; }
.site-container { max-width: 1024px; margin: 0 auto; width: 100%; box-sizing: border-box; }

/* 雙層固定置頂懸浮層（廣告 + 導覽列） */
.sticky-wrapper { position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.ad-slot { background-color: #e2e8f0; text-align: center; font-size: 0.75rem; color: #64748b; padding: 12px 16px; border-radius: 12px 12px 0 0; margin-top: 16px; box-sizing: border-box; }
.ad-box { margin: 0 auto; max-width: 728px; height: 90px; background-color: #e2e8f0; display: flex; align-items: center; justify-content: center; border-radius: 6px; border: 1px dashed #cbd5e1; }

header { background-color: #1e1b4b; color: #ffffff; border-bottom: 1px solid #312e81; }
.header-container { padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; box-sizing: border-box; }
.logo { font-size: 1.25rem; font-weight: 900; color: #818cf8; text-decoration: none; letter-spacing: -0.025em; text-transform: lowercase; }


/* 導覽列按鈕 */
.btn-top, .btn-back { font-size: 0.75rem; background-color: #312e81; color: #a5b4fc; padding: 6px 14px; border-radius: 9999px; font-weight: 700; text-decoration: none; border: 1px solid #4338ca; transition: all 0.2s; }
.btn-top:hover, .btn-back:hover { background-color: #4f46e5; color: #ffffff; }

/* Hero 橫幅大區塊頂部強力等高切齊 */
.hero, .hero-inner { background-color: #1e1b4b; background-image: linear-gradient(to bottom, #1e1b4b, #0f172a); color: #ffffff; height: 200px; display: flex; flex-direction: column; justify-content: flex-start; padding-top: 52px; border-bottom: 1px solid #1e293b; box-sizing: border-box; }
.hero-content { max-width: 1024px; margin: 0 auto; width: 100%; padding: 0 24px; box-sizing: border-box; text-align: left; }

.hero h1, .hero-inner h1 { font-size: 2rem; font-weight: 900; margin: 0 0 8px 0; letter-spacing: -0.025em; line-height: 1.2; color: #ffffff; }
@media (min-width: 768px) { .hero h1, .hero-inner h1 { font-size: 2.25rem; } }

.hero p { color: #94a3b8; font-size: 0.95rem; max-width: 44rem; margin: 0; line-height: 1.5; }

/* 麵包屑優化樣式表 */
.bread { font-size: 0.95rem; color: #818cf8; margin: 0; line-height: 1.5; font-weight: 600; }
.bread span:first-child { color: #64748b; }
.bread .sep { color: #4338ca; margin: 0 4px; }
.bread a { color: #818cf8; text-decoration: none; transition: color 0.15s; }
.bread a:hover { color: #ffffff; }
.bread #bread { color: #a5b4fc; font-weight: 700; }

/* 主布局配置 */
.main-wrapper { padding: 40px 0; box-sizing: border-box; }
.main-flex { display: flex; flex-direction: row; justify-content: space-between; width: 100%; align-items: flex-start; }
.content-area { flex: 0 0 66%; max-width: 66%; box-sizing: border-box; }
.sidebar-area { flex: 0 0 calc(34% - 32px); max-width: calc(34% - 32px); box-sizing: border-box; position: sticky; top: 180px; }

/* 卡片與數據大框框樣式 */
.card { background-color: #ffffff; padding: 32px; border-radius: 16px; border: 1px solid #e2e8f0; box-sizing: border-box; }
.card h2 { font-size: 1.5rem; font-weight: 800; margin: 0 0 8px 0; }
.card p.sub { color: #64748b; font-size: 0.875rem; margin: 0 0 24px 0; }
.article-card { background-color: #ffffff; padding: 32px; border-radius: 16px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); border: 1px solid #e2e8f0; box-sizing: border-box; min-height: 620px; }

.grid-data { display: grid; grid-template-cols: 1fr; gap: 20px; margin-bottom: 32px; }
@media (min-width: 768px) { .grid-data { grid-template-cols: 1fr 1fr; } }
.box-blue { background-color: #eff6ff; padding: 24px; border-radius: 12px; border: 1px solid #bfdbfe; text-align: center; cursor: pointer; transition: all 0.15s ease; position: relative; }
.box-blue:hover { background-color: #dbeafe; border-color: #3b82f6; transform: translateY(-1px); }
.box-amber { background-color: #fffbeb; padding: 24px; border-radius: 12px; border: 1px solid #fef3c7; text-align: center; }
.box-label { font-size: 0.75rem; font-weight: 700; color: #2563eb; text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 6px; }
.box-label.amber { color: #d97706; }
.box-val { font-size: 1.75rem; font-family: ui-monospace, SFMono-Regular, monospace; color: #1d4ed8; font-weight: 900; }
.box-val.amber { color: #ca8a04; font-family: inherit; }
.box-copy-tag { font-size: 0.65rem; color: #3b82f6; background-color: #ffffff; padding: 2px 6px; border-radius: 4px; border: 1px solid #bfdbfe; font-weight: bold; margin-left: 8px; vertical-align: middle; display: inline-block; transition: all 0.15s; }
.box-blue:hover .box-copy-tag { color: #ffffff; background-color: #2563eb; border-color: #2563eb; }

h2 { font-size: 1.35rem; font-weight: 800; color: #0f172a; margin: 40px 0 16px 0; letter-spacing: -0.02em; }
.compliance-container { background-color: #f8fafc; padding: 24px; border-radius: 12px; border: 1px solid #e2e8f0; font-size: 0.95rem; color: #334155; line-height: 1.6; }

/* 總表資料表格佈局 */
.table-container { overflow-x: auto; border-radius: 12px; border: 1px solid #e2e8f0; }
table { width: 100%; text-align: left; border-collapse: collapse; font-size: 0.9rem; table-layout: fixed; }
th, td { padding: 18px 16px; box-sizing: border-box; vertical-align: middle; white-space: nowrap; }
th { background-color: #f8fafc; border-bottom: 2px solid #e2e8f0; color: #475569; font-weight: 700; text-transform: uppercase; font-size: 0.75rem; }
td { border-bottom: 1px solid #f1f5f9; color: #334155; }

th:nth-child(1), td:nth-child(1) { width: 38%; text-align: left; }
th:nth-child(2), td:nth-child(2) { width: 27%; text-align: left; }
th:nth-child(3), td:nth-child(3) { width: 17%; text-align: left; }
th:nth-child(4), td:nth-child(4) { width: 18%; text-align: center; }

.prod-name { color: #0f172a; font-weight: 700; white-space: normal; }
.code-container { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: background 0.15s; }
.code-container:hover { background-color: #e0e7ff; }
.code-mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: #4f46e5; font-weight: 700; }
.copy-icon { font-size: 0.7rem; color: #a5b4fc; background: #f1f5f9; padding: 2px 5px; border-radius: 4px; border: 1px solid #e2e8f0; }
.code-container:hover .copy-icon { color: #4f46e5; background: #ffffff; border-color: #c7d2fe; }
.duty-amber { color: #ca8a04; font-weight: 700; }

/* 動作與廣告按鈕 */
.btn-view { font-size: 0.75rem; background-color: #eff6ff; color: #2563eb; padding: 8px 14px; border-radius: 8px; border: 1px solid #bfdbfe; font-weight: 700; text-decoration: none; display: inline-block; width: 84px; text-align: center; box-sizing: border-box; }
.btn-view:hover { background-color: #2563eb; color: #ffffff; }
.btn-aff { display: block; text-align: center; background-color: #f59e0b; color: #0f172a; font-weight: 800; font-size: 0.875rem; padding: 14px; border-radius: 10px; text-decoration: none; font-weight: 900; }
.btn-aff:hover { background-color: #d97706; }

/* 🚀 核心優化：全新設計的細分亞馬遜商品按鈕樣式 */
.btn-amazon-item { display: block; text-align: center; background-color: #0f172a; color: #ffffff; font-weight: 700; font-size: 0.8rem; padding: 10px; border-radius: 8px; text-decoration: none; border: 1px solid #1f2937; transition: all 0.2s ease; margin-bottom: 10px; }
.btn-amazon-item:hover { background-color: #232f3e; color: #ff9900; border-color: #ff9900; }
.btn-amazon-item:last-child { margin-bottom: 0; }

/* 側邊欄卡片 */
.sidebar-card { padding: 32px; background-color: #0f172a; background-image: linear-gradient(to bottom right, #1e293b, #0f172a); color: #ffffff; border-radius: 16px; margin-bottom: 24px; box-sizing: border-box; }
.sidebar-card h3 { font-size: 1.25rem; font-weight: 800; margin: 0 0 12px 0; color: #ffffff; }
.sidebar-card p { color: #94a3b8; font-size: 0.85rem; line-height: 1.6; margin: 0 0 24px 0; }
.sidebar-card-secondary { padding: 32px; background-color: #ffffff; color: #334155; border-radius: 16px; border: 1px solid #e2e8f0; box-sizing: border-box; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); }
.sidebar-card-secondary h3 { font-size: 1.15rem; font-weight: 800; margin: 0 0 12px 0; color: #0f172a; }
.sidebar-card-secondary p { color: #64748b; font-size: 0.85rem; line-height: 1.6; margin: 0 0 16px 0; }

.banner-indigo { margin-top: 48px; padding: 36px; background-color: #0f172a; background-image: linear-gradient(to bottom right, #1e293b, #0f172a); color: #ffffff; border-radius: 16px; border: 1px solid #1e293b; position: relative; overflow: hidden; }
.banner-indigo h3 { font-size: 1.35rem; font-weight: 800; color: #f59e0b; margin: 0 0 12px 0; }
.banner-indigo p { color: #94a3b8; font-size: 0.875rem; line-height: 1.6; margin: 0 0 24px 0; max-width: 44rem; }
.btn-banner { display: inline-block; background-color: #f59e0b; color: #0f172a; font-weight: 800; font-size: 0.875rem; padding: 12px 28px; border-radius: 10px; text-decoration: none; font-weight: 900; transition: all 0.2s ease; }
.btn-banner:hover { background-color: #d97706; }

footer { background-color: #0f172a; color: #64748b; text-align: center; padding: 48px 24px; font-size: 0.75rem; border-radius: 0 0 12px 12px; margin-bottom: 32px; border-top: 1px solid #1e293b; }
footer a { color: #64748b; text-decoration: none; margin: 0 8px; transition: color 0.15s; }
footer a:hover { color: #818cf8; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background-color: #0f172a; color: #ffffff; padding: 10px 20px; border-radius: 8px; font-size: 0.8rem; font-weight: 700; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3); z-index: 1000; display: none; border: 1px solid #1e2937; }
