/* ============================================================
   1016shop - 全站樣式
   風格: Warm Trust v8.1 (暖橘色 + 圓角)
   ============================================================ */

:root {
  --primary: #f59e0b;
  --primary-dark: #d97706;
  --primary-light: #fbbf24;
  --primary-50: #fffbeb;
  --primary-100: #fef3c7;
  --primary-200: #fde68a;
  --secondary: #84cc16;
  --secondary-dark: #65a30d;

  --text: #1c1917;
  --text-soft: #57534e;
  --text-muted: #a8a29e;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;

  --bg: #fafaf9;
  --bg-card: #ffffff;
  --bg-soft: #fff7ed;

  --danger: #dc2626;
  --warning: #eab308;
  --success: #16a34a;
  --info: #0284c7;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-2xl: 32px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(245, 158, 11, 0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.10);

  --transition: 0.2s cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC",
               "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0 0 0.6em; line-height: 1.3; font-weight: 700; }
h1 { font-size: 2.2em; }
h2 { font-size: 1.7em; }
h3 { font-size: 1.25em; }
p { margin: 0 0 1em; }
.muted { color: var(--text-muted); font-size: 0.9em; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* ============== Header ============== */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 20px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; font-weight: 800; font-size: 18px;
  padding: 8px 12px; border-radius: var(--r-md);
  letter-spacing: -0.5px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 800; color: var(--text); font-size: 17px; }
.brand-sub { font-size: 12px; color: var(--text-muted); }

.search-box {
  flex: 1; display: flex; max-width: 500px; margin: 0 auto;
  border: 2px solid var(--border); border-radius: 999px;
  overflow: hidden; background: var(--bg);
}
.search-box input {
  flex: 1; border: 0; padding: 10px 18px;
  font-size: 14px; background: transparent; outline: none;
}
.search-box button {
  border: 0; background: var(--primary); color: white;
  padding: 0 18px; cursor: pointer; transition: background var(--transition);
}
.search-box button:hover { background: var(--primary-dark); }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-actions .ic {
  display: flex; flex-direction: column; align-items: center;
  font-size: 11px; color: var(--text-soft); text-decoration: none;
  transition: color var(--transition);
}
.header-actions .ic:hover { color: var(--primary); }
.header-actions .ic svg { margin-bottom: 2px; }

.site-nav {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.site-nav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 4px;
}
.site-nav a {
  display: block; padding: 10px 18px;
  color: var(--text-soft); font-size: 14px; font-weight: 500;
  border-radius: var(--r-sm);
  transition: all var(--transition);
}
.site-nav a:hover {
  color: var(--primary-dark); background: rgba(245, 158, 11, 0.08);
}

/* ============== Buttons ============== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border: 0; cursor: pointer;
  border-radius: var(--r-md); font-size: 14px; font-weight: 600;
  text-decoration: none; transition: all var(--transition);
  font-family: inherit;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; }
.btn-secondary { background: var(--text); color: white; }
.btn-secondary:hover { background: #000; color: white; }
.btn-outline { background: transparent; color: var(--primary-dark); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-ghost { background: var(--bg-soft); color: var(--text); }
.btn-ghost:hover { background: var(--primary-100); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ============== Flash ============== */
.flash {
  padding: 12px 0; font-weight: 500; text-align: center;
  border-bottom: 1px solid var(--border);
}
.flash-success { background: #dcfce7; color: #166534; }
.flash-warn { background: #fef3c7; color: #854d0e; }
.flash-error { background: #fee2e2; color: #991b1b; }
.flash-info { background: #dbeafe; color: #1e40af; }

/* ============== Hero ============== */
.hero {
  background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 50%, #fdba74 100%);
  padding: 60px 0 80px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(245,158,11,0.3), transparent 70%);
}
.hero h1 { font-size: 2.8em; max-width: 700px; }
.hero p { font-size: 1.2em; color: var(--text-soft); max-width: 600px; }
.hero .hero-cta { display: flex; gap: 12px; margin-top: 24px; }

/* ============== Sections ============== */
.section { padding: 60px 0; }
.section-title {
  text-align: center; margin-bottom: 40px;
}
.section-title h2 { font-size: 2em; }
.section-title p { color: var(--text-soft); }

/* ============== Product Grid ============== */
.product-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.product-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex; flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.product-card .cover {
  aspect-ratio: 1; overflow: hidden;
  background: var(--bg-soft);
  position: relative;
}
.product-card .cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--transition);
}
.product-card:hover .cover img { transform: scale(1.05); }
.product-card .badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--danger); color: white;
  padding: 3px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
}
.product-card .body {
  padding: 14px 16px; flex: 1;
  display: flex; flex-direction: column;
}
.product-card .name {
  font-size: 14px; font-weight: 500; color: var(--text);
  margin: 0 0 8px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.8em;
}
.product-card .price {
  display: flex; align-items: baseline; gap: 8px;
  margin-top: auto;
}
.product-card .price .now { color: var(--danger); font-weight: 800; font-size: 18px; }
.product-card .price .was { color: var(--text-muted); text-decoration: line-through; font-size: 12px; }
.product-card .meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 8px; }

/* ============== Forms ============== */
.form-card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 36px;
  max-width: 480px; margin: 40px auto;
}
.form-card h2 { text-align: center; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; margin-bottom: 6px;
  font-weight: 500; color: var(--text-soft);
  font-size: 14px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px; font-family: inherit;
  background: var(--bg-card);
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--primary);
}
.form-group .help { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-actions { margin-top: 24px; }
.form-bottom { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-soft); }

.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }
.checkbox-row label { margin: 0; cursor: pointer; }

/* ============== Filters Bar ============== */
.filter-bar {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px 20px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-bottom: 24px;
}
.filter-bar .grp { display: flex; align-items: center; gap: 8px; }
.filter-bar select,
.filter-bar input {
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 6px 10px; font-size: 14px; background: var(--bg-card);
}
.filter-bar .result { color: var(--text-muted); font-size: 14px; margin-left: auto; }

/* ============== Product Detail ============== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 40px 0; }
.gallery-main {
  aspect-ratio: 1; border-radius: var(--r-xl);
  background: var(--bg-soft); overflow: hidden;
  border: 1px solid var(--border);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs img {
  width: 70px; height: 70px; object-fit: cover;
  border-radius: var(--r-sm); cursor: pointer;
  border: 2px solid transparent; transition: border var(--transition);
}
.gallery-thumbs img.active { border-color: var(--primary); }
.product-info h1 { font-size: 1.8em; margin-bottom: 8px; }
.product-info .summary { color: var(--text-soft); margin-bottom: 20px; }
.product-info .price-block {
  background: var(--bg-soft);
  padding: 20px; border-radius: var(--r-lg);
  margin-bottom: 20px;
}
.product-info .price-now { color: var(--danger); font-size: 2.4em; font-weight: 800; }
.product-info .price-was { color: var(--text-muted); text-decoration: line-through; margin-left: 12px; }
.product-info .price-tag { display: inline-block; background: var(--danger); color: white; padding: 2px 8px; border-radius: var(--r-sm); font-size: 12px; margin-left: 8px; }
.product-info .price-cost { color: var(--text-muted); font-size: 13px; margin-top: 8px; }
.product-info .qty-row { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.qty-input { display: flex; align-items: center; border: 2px solid var(--border); border-radius: var(--r-md); }
.qty-input button { border: 0; background: transparent; padding: 8px 12px; cursor: pointer; font-size: 16px; }
.qty-input input { width: 60px; text-align: center; border: 0; font-size: 16px; }
.product-actions { display: flex; gap: 12px; margin-top: 16px; }
.product-meta { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-soft); }
.product-meta .row { display: flex; padding: 4px 0; }
.product-meta .row .lbl { width: 100px; color: var(--text-muted); }

.description { background: var(--bg-card); padding: 24px; border-radius: var(--r-lg); margin-top: 24px; line-height: 1.8; }
.description img { max-width: 100%; border-radius: var(--r-md); margin: 8px 0; }

/* ============== Cart ============== */
.cart-page { padding: 40px 0; display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.cart-list { background: var(--bg-card); border-radius: var(--r-lg); padding: 8px 0; }
.cart-item {
  display: grid; grid-template-columns: 80px 1fr auto auto auto;
  gap: 16px; align-items: center; padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: 0; }
.cart-item img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--r-sm); }
.cart-item .name { font-size: 14px; font-weight: 500; }
.cart-item .variant { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.cart-item .subtotal { color: var(--danger); font-weight: 700; min-width: 100px; text-align: right; }
.cart-summary { background: var(--bg-card); border-radius: var(--r-lg); padding: 24px; height: fit-content; position: sticky; top: 100px; }
.cart-summary h3 { margin-bottom: 16px; }
.cart-summary .row { display: flex; justify-content: space-between; padding: 8px 0; }
.cart-summary .total { font-size: 1.4em; font-weight: 800; color: var(--danger); }
.cart-empty { text-align: center; padding: 60px 20px; }
.cart-empty .icon { font-size: 4em; margin-bottom: 12px; }

/* ============== Tables ============== */
.data-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: var(--r-lg); overflow: hidden; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table th { background: var(--bg-soft); font-weight: 600; color: var(--text-soft); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover { background: var(--primary-50); }

/* ============== Status badges ============== */
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.tag-info { background: #dbeafe; color: #1e40af; }
.tag-success { background: #dcfce7; color: #166534; }
.tag-warning { background: #fef3c7; color: #854d0e; }
.tag-danger { background: #fee2e2; color: #991b1b; }
.tag-muted { background: var(--border); color: var(--text-soft); }

/* ============== Footer ============== */
.site-footer {
  background: #1c1917; color: #d6d3d1;
  margin-top: 80px; padding-top: 40px;
}
.site-footer h4 { color: white; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 4px 0; font-size: 14px; }
.site-footer a { color: #d6d3d1; }
.site-footer a:hover { color: var(--primary-light); }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; padding-bottom: 40px;
}
.footer-bottom {
  border-top: 1px solid #44403c; padding: 20px 0;
  text-align: center; font-size: 13px; color: var(--text-muted);
}
.contact-list li { padding: 4px 0; }

/* ============== Admin ============== */
.admin-body { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: var(--bg); }
.admin-sidebar {
  background: linear-gradient(180deg, #1c1917, #292524);
  color: #d6d3d1; padding: 24px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-sidebar .brand-mark { background: var(--primary); }
.admin-sidebar h2 { color: white; padding: 0 24px; font-size: 18px; }
.admin-sidebar nav { padding: 0 12px; }
.admin-sidebar .group { margin: 18px 0 8px; padding: 0 12px; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-sidebar a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: var(--r-md);
  color: #d6d3d1; font-size: 14px; margin-bottom: 2px;
}
.admin-sidebar a:hover { background: rgba(255,255,255,0.08); color: white; }
.admin-sidebar a.active { background: var(--primary); color: white; }
.admin-sidebar a svg { flex-shrink: 0; }

.admin-main { padding: 24px 32px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-topbar h1 { font-size: 1.8em; margin: 0; }
.admin-card { background: var(--bg-card); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.admin-card h2 { margin-bottom: 16px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi { background: var(--bg-card); padding: 20px; border-radius: var(--r-lg); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--primary); }
.kpi .lbl { color: var(--text-muted); font-size: 13px; }
.kpi .val { font-size: 2em; font-weight: 800; color: var(--text); margin-top: 4px; }
.kpi.warn::before { background: var(--warning); }
.kpi.success::before { background: var(--success); }
.kpi.danger::before { background: var(--danger); }

.admin-table-wrap { background: var(--bg-card); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.admin-toolbar { padding: 16px 20px; display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--border); }
.admin-toolbar form { display: flex; gap: 8px; align-items: center; flex: 1; }
.admin-toolbar input { border: 1px solid var(--border); border-radius: var(--r-md); padding: 6px 10px; font-size: 14px; flex: 1; max-width: 300px; }

.toolbar-actions { display: flex; gap: 8px; }

@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .search-box { order: 3; flex-basis: 100%; }
  .product-detail { grid-template-columns: 1fr; }
  .cart-page { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .admin-body { grid-template-columns: 1fr; }
  .admin-sidebar { position: relative; height: auto; }
  .site-nav ul { font-size: 13px; gap: 0; }
  .site-nav a { padding: 8px 10px; }
  .hero h1 { font-size: 1.8em; }
  .hero p { font-size: 1em; }
  .section-title h2 { font-size: 1.5em; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card .name { font-size: 13px; }
  .product-card .price .now { font-size: 16px; }
  .container { padding: 0 12px; }
  h1 { font-size: 1.6em; }
  h2 { font-size: 1.3em; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .header-actions { gap: 8px; }
  .header-actions .ic span { display: none; }
  .hero { padding: 30px 0 40px; }
  .section { padding: 30px 0; }
}

/* 公告跑馬燈 */
.announcement-bar {
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
}
.announcement-bar .container {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  flex-wrap: wrap;
}
.announce-link {
  margin-left: 12px;
  padding: 3px 12px;
  border: 1px solid;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.announce-link:hover { background: rgba(255,255,255,0.2); }

/* 部落格頁面 */
.blog-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin: 30px 0;
}
.blog-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.blog-card .cover {
  aspect-ratio: 16/9; overflow: hidden; background: var(--bg-soft);
}
.blog-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-card .body { padding: 20px; }
.blog-card .cat {
  display: inline-block; background: var(--primary-100); color: var(--primary-dark);
  padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.blog-card h3 { font-size: 1.1em; margin: 12px 0 8px; line-height: 1.4; }
.blog-card h3 a { color: var(--text); text-decoration: none; }
.blog-card h3 a:hover { color: var(--primary); }
.blog-card .excerpt { color: var(--text-soft); font-size: 14px; line-height: 1.6; }
.blog-card .meta { display: flex; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--text-muted); }
.blog-detail h1 { font-size: 2em; margin: 20px 0; }
.blog-detail .hero-img { aspect-ratio: 21/9; border-radius: var(--r-lg); overflow: hidden; margin-bottom: 20px; }
.blog-detail .hero-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-detail .body { background: var(--bg-card); padding: 32px; border-radius: var(--r-lg); line-height: 1.9; }
.blog-detail .body h2 { font-size: 1.5em; margin-top: 1.5em; padding-bottom: 8px; border-bottom: 2px solid var(--primary); }
.blog-detail .body h3 { color: var(--primary-dark); margin-top: 1.2em; }
.blog-detail .body p, .blog-detail .body li { color: var(--text-soft); }

/* 商品評價 */
.review-list { margin-top: 24px; }
.review-item {
  background: var(--bg-card);
  padding: 16px 20px;
  border-radius: var(--r-md);
  margin-bottom: 12px;
  border-left: 4px solid var(--primary);
}
.review-item .stars { color: #f59e0b; font-size: 16px; }
.review-item .reviewer { color: var(--text-soft); font-size: 13px; margin-top: 4px; }
.review-item .review-content { margin-top: 8px; }
.review-form {
  background: var(--bg-soft);
  padding: 20px;
  border-radius: var(--r-md);
  margin-top: 20px;
}
.star-rating { display: inline-flex; gap: 4px; font-size: 24px; cursor: pointer; }
.star-rating .star { color: #ddd; transition: color 0.2s; }
.star-rating .star.active, .star-rating .star:hover { color: #f59e0b; }
.star-rating input { display: none; }

/* 客服留言 */
.contact-form {
  background: var(--bg-card);
  padding: 32px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

/* 麵包屑導航 */
.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  padding: 12px 0;
  background: transparent;
}
.breadcrumb .container { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .bc-sep { color: var(--text-muted); opacity: 0.5; }
.breadcrumb .bc-current { color: var(--text); font-weight: 500; }

/* 漢堡選單按鈕（mobile） */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
}
.menu-toggle svg { width: 24px; height: 24px; }

@media (max-width: 768px) {
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  .main-nav { display: none; }
  .main-nav.is-open { display: block; }
  .main-nav .nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 0;
    gap: 0;
  }
  .main-nav .nav-list li { border-bottom: 1px solid var(--border-soft, #f3f4f6); }
  .main-nav .nav-list a { display: block; padding: 14px 20px; }
}

/* 圖片懶加載淡入 */
img[loading="lazy"] { opacity: 0; transition: opacity 0.4s; }
img[loading="lazy"].loaded,
img[loading="lazy"]:not([data-src]) { opacity: 1; }

/* 收藏按鈕 */
.btn-fav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding: 12px 20px;
  background: var(--bg-card, #fff);
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: var(--r-md, 12px);
  color: var(--text, #1f2937);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-fav:hover { border-color: #ef4444; color: #ef4444; }
.btn-fav .heart { font-size: 18px; line-height: 1; transition: transform 0.2s; }
.btn-fav.is-fav { border-color: #ef4444; color: #ef4444; background: #fef2f2; }
.btn-fav.is-fav .heart { transform: scale(1.15); }

/* 願望清單頁 */
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.wishlist-card {
  background: var(--bg-card, #fff);
  border-radius: var(--r-lg, 16px);
  overflow: hidden;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
  transition: transform 0.2s, box-shadow 0.2s;
}
.wishlist-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.08)); }
.wishlist-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.wishlist-info { padding: 12px 14px 14px; }
.wishlist-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin: 4px 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
}
.wishlist-info .price-sale { color: #dc2626; font-weight: 700; }
.wishlist-info .price-origin { color: var(--text-muted); text-decoration: line-through; margin-left: 6px; font-size: 12px; }
.wishlist-actions { display: flex; gap: 6px; margin-top: 10px; }
.wishlist-actions .btn { flex: 1; padding: 8px 10px; font-size: 12px; }

/* 會員頁頭 */
.member-page-head { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border-soft, #f3f4f6); }
.member-page-head h1 { margin: 0 0 4px; font-size: 24px; }

/* 空狀態 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card, #fff);
  border-radius: var(--r-lg, 16px);
}
.empty-state p { color: var(--text-muted); margin-bottom: 16px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1f2937;
  color: #fff;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 9999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

