/* ==========================================================================
   EDS Studio — 新增頁面與互動元件樣式
   (通知中心、訂單、優惠券、地址、設定、訂單完成、toast 等)
   ========================================================================== */

/* ---------- 全站字體:英文與數字用 Jost,中文回退 Noto Sans TC ---------- */

body {
  font-family: "Jost", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.detail-price,
.price-row strong,
.checkout-total strong,
.sale-body strong,
.summary-totals dd,
.timer {
  letter-spacing: 0.02em;
}

/* ---------- 工具類 ---------- */

.is-hidden {
  display: none !important;
}

/* ---------- 輕量提示 toast ---------- */

.eds-toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  z-index: 99;
  max-width: min(86vw, 360px);
  padding: 11px 18px;
  color: #fff;
  border-radius: 999px;
  background: rgba(41, 41, 46, 0.92);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.eds-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 既有元素改為連結後的樣式補齊 ---------- */

.coupon-box .coupon-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--muted);
  border-radius: 50%;
  background: #fafaff;
}

.quick-actions a {
  display: grid;
  justify-items: center;
  gap: 2px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 900;
}

.checkout-button.is-disabled {
  opacity: 0.55;
}

/* ---------- 空狀態 ---------- */

.empty-state {
  margin: 26px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

/* ---------- 通知中心 ---------- */

.inbox-tabs {
  margin: 0 0 14px;
  padding: 0;
}

.notice-list {
  display: grid;
  gap: 10px;
}

.notice-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.notice-item.is-unread {
  border-color: var(--brand);
  background: #fbfaff;
}

.notice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--brand-deep);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f6f5ff;
}

.notice-icon svg {
  width: 19px;
  height: 19px;
}

.notice-body h2 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 900;
}

.notice-body p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.notice-body time {
  color: #aaaab2;
  font-size: 11px;
}

/* ---------- 我的訂單 ---------- */

.order-tabs {
  margin: 0 0 14px;
  padding: 0;
}

.order-list {
  display: grid;
  gap: 12px;
}

.order-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.order-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.order-status-tag {
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 900;
}

.order-card-body {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.order-card-body img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
}

.order-card-body h2 {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 900;
}

.order-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.order-card-body strong {
  font-size: 13.5px;
}

.order-card-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 14px 12px;
}

.order-action {
  height: 34px;
  padding: 0 16px;
  color: var(--brand-deep);
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: #fbfaff;
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
}

/* ---------- 專屬優惠券 ---------- */

.coupon-list {
  display: grid;
  gap: 12px;
}

.coupon-card {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.coupon-card.is-used {
  opacity: 0.55;
}

.coupon-value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 8px;
  border-right: 1px dashed #ddddef;
}

.coupon-value strong {
  color: var(--brand-deep);
  font-size: 19px;
  font-weight: 900;
  text-align: center;
}

.coupon-info h2 {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 900;
}

.coupon-info p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
}

.coupon-info time {
  color: #aaaab2;
  font-size: 11px;
}

.coupon-use {
  height: 32px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  color: #fff;
  border-radius: 999px;
  background: var(--brand);
  font-size: 12.5px;
  font-weight: 900;
}

.coupon-used-tag {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

/* ---------- 收件地址管理 ---------- */

.address-list {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.address-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.address-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13.5px;
}

.address-top span {
  color: var(--muted);
  font-size: 12.5px;
}

.default-badge {
  padding: 2px 8px;
  color: var(--brand-deep);
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: #f6f5ff;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 900;
}

.address-info p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.address-actions {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 8px;
}

.address-actions button:first-child {
  height: 30px;
  padding: 0 12px;
  color: var(--brand-deep);
  border: 1px solid #ddddef;
  border-radius: 999px;
  background: #fafaff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

/* ---------- 設定 ---------- */

.settings-group + .settings-group {
  margin-top: 18px;
}

.settings-title {
  margin: 0 0 8px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.settings-list {
  margin-top: 0;
}

.settings-list .settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 0 14px 0 16px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 14px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.settings-list .settings-row:last-child {
  border-bottom: 0;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.toggle-switch i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #e3e3ec;
  transition: background 0.2s ease;
  pointer-events: none;
}

.toggle-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(38, 38, 52, 0.18);
  transition: transform 0.2s ease;
}

.toggle-switch input:checked + i {
  background: var(--brand);
}

.toggle-switch input:checked + i::after {
  transform: translateX(20px);
}

.settings-version {
  margin: 22px 0 0;
  color: #aaaab2;
  font-size: 11.5px;
  text-align: center;
}

/* ---------- 個人資料 ---------- */

.profile-avatar {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px 0 16px;
}

.profile-avatar .avatar-wrap {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: var(--shadow);
}

.profile-avatar .avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-edit {
  height: 32px;
  padding: 0 14px;
  color: var(--brand-deep);
  border: 1px solid #ddddef;
  border-radius: 999px;
  background: #fafaff;
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
}

.demo-form .primary-action {
  margin-top: 16px;
}

/* ---------- 客服中心 ---------- */

.support-contact {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.textarea-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e2e2ee;
  border-radius: 8px;
  background: #fafaff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  resize: vertical;
}

.textarea-field textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 0;
}

/* ---------- 忘記密碼 ---------- */

.forgot-card {
  padding-top: 22px;
}

.forgot-card .auth-form {
  display: grid;
  gap: 14px;
}

/* ---------- 訂單完成 ---------- */

.complete-content {
  min-height: 100vh;
  padding: 56px 18px 40px;
  background: linear-gradient(180deg, #fbfbfd 0%, #ffffff 38%);
}

.complete-hero {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 24px;
  text-align: center;
}

.complete-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin-bottom: 6px;
  color: var(--brand-deep);
  border-radius: 50%;
  background: #f6f5ff;
  box-shadow: 0 10px 24px rgba(143, 144, 198, 0.22);
}

.complete-icon svg {
  width: 38px;
  height: 38px;
}

.complete-hero h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
}

.complete-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.complete-summary {
  margin-bottom: 22px;
}

.complete-actions {
  display: grid;
  gap: 10px;
}

.complete-actions .primary-action {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ghost-action {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  color: var(--brand-deep);
  border: 1px solid #ddddef;
  border-radius: 999px;
  background: #fafaff;
  font-size: 15px;
  font-weight: 900;
}

/* ---------- 首頁:跑馬燈公告列 ---------- */

.ticker-bar {
  margin: -14px -14px 0;
  overflow: hidden;
  color: var(--eds-ticker-color, #fff);
  background: var(--eds-ticker-bg, linear-gradient(90deg, var(--brand-deep) 0%, var(--brand) 100%));
}

.ticker-track {
  display: flex;
  width: max-content;
  padding: 7px 0;
  animation: eds-ticker var(--eds-ticker-duration, 18s) linear infinite;
}

.ticker-track span {
  padding-right: 56px;
  white-space: nowrap;
  font-size: var(--eds-ticker-size, 12px);
  font-weight: 700;
  letter-spacing: 0.04em;
}

@keyframes eds-ticker {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- 首頁:形象輪播 ---------- */

.hero-carousel {
  position: relative;
  height: 264px;
  margin: 0 -14px;
  overflow: hidden;
  border-radius: 0 0 18px 18px;
  background: var(--soft);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.hero-slide.is-active {
  z-index: 1;
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(165deg, rgba(143, 144, 198, 0.28) 0%, rgba(20, 20, 24, 0) 42%),
    linear-gradient(180deg, rgba(20, 20, 24, 0.02) 30%, rgba(20, 20, 24, 0.62) 100%);
}

.hero-copy {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 22px;
  z-index: 1;
  color: #fff;
}

.hero-tag {
  display: inline-flex;
  margin-bottom: 9px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
}

.hero-title {
  margin: 0;
  font-size: 27px;
  font-weight: 900;
  line-height: 1.16;
  text-shadow: 0 2px 14px rgba(20, 20, 24, 0.35);
}

.hero-text {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  height: 36px;
  padding: 0 16px;
  color: var(--eds-hero-cta-color, var(--text));
  border-radius: 999px;
  background: var(--eds-hero-cta-bg, #fff);
  font-size: 12.5px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(20, 20, 24, 0.25);
}

.hero-cta svg {
  width: 15px;
  height: 15px;
}

.hero-dots {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  gap: 6px;
}

.hero-dots button {
  width: 6px;
  height: 6px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 18px;
  background: #fff;
}

/* ---------- 登入頁:LINE 登入 ---------- */

.line-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 48px;
  margin-top: 14px;
  color: #fff;
  border-radius: 999px;
  background: #06c755;
  font-size: 14.5px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(6, 199, 85, 0.24);
}

.line-login svg {
  width: 21px;
  height: 21px;
}

/* ---------- 首頁:頂部列(品牌靠左、動作鈕靠右) ---------- */

.topbar.topbar-split {
  grid-template-columns: 1fr auto;
}

.topbar.topbar-split .brand {
  justify-content: flex-start;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- 首頁:限時特賣卡片與邊緣間距 ----------
   卡片設定 scroll-snap-align,瀏覽器載入時會把第一張卡吸附到
   滾動容器邊框而忽略 14px 內距;以 scroll-padding 校正吸附基準。 */

.sale-scroller {
  scroll-padding-inline: 14px;
}

/* ---------- 首頁:熱賣商品(等高卡片) ---------- */

.product-grid.hot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  column-count: auto;
}

.hot-grid .product-card {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.hot-grid .product-card > a {
  position: relative;
  display: block;
}

.hot-grid .product-card img {
  aspect-ratio: 1 / 1.15;
  object-fit: cover;
}

.hot-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7a8a 0%, #ff4d6d 100%);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 10px rgba(255, 77, 109, 0.4);
}

.hot-grid .product-info {
  flex: 1;
  align-content: space-between;
  gap: 6px;
}

.sold-tag {
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 800;
}

/* ---------- 首頁:品牌資訊(關於我們 / 購物說明) ---------- */

.home-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 6px 2px 16px;
}

.home-divider i {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--brand) 55%, var(--brand-deep) 100%);
}

.home-divider i:last-child {
  background: linear-gradient(270deg, transparent 0%, var(--brand) 55%, var(--brand-deep) 100%);
}

.home-divider span {
  color: var(--brand-deep);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
}

.info-cards {
  display: grid;
  gap: 10px;
}

.info-card {
  display: grid;
  grid-template-columns: 42px 1fr 18px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(38, 38, 52, 0.06);
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--brand-deep);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f6f5ff;
}

.info-icon svg {
  width: 19px;
  height: 19px;
}

.info-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.info-body strong {
  font-size: 14px;
  font-weight: 900;
}

.info-body small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.info-card > svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.home-footnote {
  margin: 14px 0 0;
  color: #aaaab2;
  font-size: 11.5px;
  text-align: center;
}

.home-footnote a {
  color: var(--muted);
  font-weight: 700;
}

/* ---------- 關於我們 / 購物說明 ---------- */

.company-note {
  margin: 14px 0 0;
  color: #aaaab2;
  font-size: 11.5px;
}

.guide-footnote {
  margin: 18px 4px 0;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

.guide-footnote a,
.product-description a {
  color: var(--brand-deep);
  font-weight: 800;
  text-decoration: underline;
}

/* ---------- 收藏清單 ---------- */

.wishlist-content {
  min-height: calc(100vh - 60px);
}

/* ---------- 通知中心:整合單一列表 + 類型配色 ---------- */
.notice-item {
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  transition: box-shadow 0.16s ease, transform 0.16s ease;
}
a.notice-item:hover {
  box-shadow: 0 10px 22px rgba(38, 38, 52, 0.08);
  transform: translateY(-2px);
}
.notice-go {
  display: inline-flex;
  align-items: center;
  color: #c9c9d4;
}
.notice-go svg { width: 18px; height: 18px; }

/* 類型配色(圖示底色 + 描邊) */
.notice-item--promo .notice-icon { background: #fff3e9; color: #d98a3d; border-color: #f6e0cc; }
.notice-item--order .notice-icon { background: #e9f4ee; color: #2f9e6a; border-color: #cfe9da; }
.notice-item--points .notice-icon { background: #fff6da; color: #b8861f; border-color: #f0e3b0; }
.notice-item--system .notice-icon { background: #f6f5ff; color: var(--brand-deep); border-color: #e7e7f4; }

/* ---------- 通知中心 v2:兩段式 + 鈴鐺未讀紅點 ---------- */
.notice-section-title {
  margin: 4px 2px 10px;
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
}
.notice-section-title + .notice-list { margin-bottom: 22px; }

.notice-body h2,
.notice-body h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 900;
}

/* 兩類圖示配色 */
.notice-item--announce .notice-icon { background: #fff3e9; color: #d98a3d; border-color: #f6e0cc; }
.notice-item--welcome .notice-icon { background: #f6f5ff; color: var(--brand-deep); border-color: #e7e7f4; }

/* 首頁鈴鐺:#8f90c6 圓圈 + 白色鈴鐺 */
.notice-bell {
  position: relative;
  color: #fff;
  background: #8f90c6;
  border-color: #8f90c6;
}
.notice-bell svg { color: #fff; }

/* 未讀紅點/數字徽章 */
.notice-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #e15b6a;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
