/* ==========================================================================
   東南亞熱帶島嶼風格 + 3D 立體冰箱貼商品牆 + Telegram Mini App 響應式 CSS
   ========================================================================== */

:root {
    --emerald: #059669;
    --emerald-dark: #064e3b;
    --emerald-light: #d1fae5;
    --ocean: #0284c7;
    --ocean-hover: #0369a1;
    --gold: #d97706;
    --gold-light: #fef3c7;
    --sand: #fdfbf7;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-lg: 20px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: radial-gradient(circle at 20% 20%, #fdfbf7 0%, #e8f1ee 100%);
    color: var(--text-main);
    line-height: 1.6;
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
    min-height: var(--tg-viewport-stable-height, 100vh);
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }

/* 頂部導覽列 */
.navbar {
    background: rgba(253, 251, 247, 0.94);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid #a7f3d0;
    box-shadow: 0 4px 16px rgba(6, 78, 59, 0.08);
    padding: 12px 18px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--emerald-dark);
}

.nav-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-links a:not(.btn-tg-top) {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-main);
}
.nav-links a:not(.btn-tg-top):hover { color: var(--emerald); }

.btn-upload-top {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    color: #fff !important;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid #34d399;
    box-shadow: 0 3px 0 #047857;
}

.btn-admin-top {
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
    color: var(--emerald-dark);
    border: 1px solid #6ee7b7;
    padding: 8px 13px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 3px 0 #a7f3d0;
}
.btn-admin-top.admin-active {
    background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-color: #f59e0b;
    box-shadow: 0 3px 0 #d97706;
}

.btn-tg-top {
    background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff !important;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 3px 0 #0369a1;
}

/* 漢堡選單 (頂部) */
.nav-toggle {
    display: none;
    background: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
}
.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--emerald-dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hero 區與今日造訪人數膠囊 */
.hero {
    background: linear-gradient(135deg, #064e3b 0%, #059669 55%, #0284c7 100%);
    color: #fff;
    padding: 40px 18px 60px;
    text-align: center;
}

.hero-top-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.82rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-visit-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(6px);
    color: #fef3c7;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid rgba(254, 243, 199, 0.45);
}
.hero-visit-pill strong {
    color: #ffffff;
    font-size: 0.9rem;
}

.hero h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 10px; }
.hero p { max-width: 640px; margin: 0 auto 22px; font-size: 0.94rem; opacity: 0.94; }

.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.btn-hero-primary {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    padding: 11px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.94rem;
    border: 1px solid #fbbf24;
    box-shadow: 0 4px 0 #b45309;
}
.btn-hero-secondary {
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
    color: var(--emerald-dark);
    padding: 11px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.94rem;
    box-shadow: 0 4px 0 #a7f3d0;
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: -30px auto 40px;
    padding: 0 14px;
    position: relative;
    z-index: 10;
}

/* 即時匯率面板與篩選器 */
.fx-panel, .filter-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f8fcfa 100%);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 3px solid #ffffff;
    box-shadow: inset 0 0 0 1px #a7f3d0, 0 4px 0 #d1fae5, 0 12px 24px rgba(4, 120, 87, 0.1);
    margin-bottom: 24px;
}

.fx-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.fx-updated { font-size: 0.78rem; color: var(--text-muted); }

.fx-base-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--emerald-dark);
}

.fx-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.fx-card {
    background: #fff;
    border: 1.5px solid #d1fae5;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.fx-card:hover {
    border-color: var(--emerald);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.12);
}
.fx-card-top { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.fx-card-top strong { color: var(--text-main); }
.fx-card-val { font-size: 1.15rem; font-weight: 700; color: var(--emerald-dark); margin-top: 2px; }

.fx-calc-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
    border-radius: 14px;
    padding: 16px;
    border: 1.5px solid #bae6fd;
}
.fx-calc-title { font-size: 0.92rem; font-weight: 700; color: var(--emerald-dark); margin-bottom: 10px; }

.fx-calc-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
}
.fx-input-group {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 6px;
}
.fx-result-input {
    background: #ffffff !important;
    font-weight: 700;
    color: var(--ocean);
}
.btn-swap-fx {
    background: #ffffff;
    border: 1.5px solid #7dd3fc;
    color: var(--ocean);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fx-calc-rate-note {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
}

/* 搜尋與篩選 */
.search-box { margin-bottom: 14px; }
.search-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #6ee7b7;
    border-radius: var(--radius-md);
    font-size: 0.94rem;
    background: #f0fdf4;
}
.search-input:focus { outline: none; border-color: var(--emerald); background: #fff; }

.filter-group { margin-bottom: 12px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-label { font-size: 0.82rem; font-weight: 700; color: var(--emerald-dark); margin-bottom: 6px; display: block; }

.chip-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.chip-list::-webkit-scrollbar { display: none; }

.chip {
    padding: 6px 13px;
    border-radius: 50px;
    font-size: 0.83rem;
    font-weight: 600;
    background: #fff;
    color: var(--text-main);
    white-space: nowrap;
    border: 1px solid #cbd5e1;
}
.chip.active {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    color: #fff;
    border-color: #059669;
}

/* ==========================================================================
   🧲 3D 立體冰箱貼牆與壓克力厚磁鐵卡片
   ========================================================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.section-title { font-size: 1.18rem; font-weight: 700; color: var(--emerald-dark); }
.result-count { font-size: 0.84rem; color: var(--text-muted); }

.fridge-wall {
    background:
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.35) 0px,
            rgba(255, 255, 255, 0.35) 1px,
            transparent 1px,
            transparent 6px
        ),
        linear-gradient(155deg, #f8fafc 0%, #e2ece9 52%, #d9e6e2 100%);
    border-radius: 28px;
    padding: 26px 20px 30px;
    border: 2px solid #ffffff;
    box-shadow:
        inset 0 4px 14px rgba(15, 23, 42, 0.08),
        inset 0 -4px 12px rgba(255, 255, 255, 0.7),
        0 14px 32px rgba(6, 78, 59, 0.1);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
    gap: 32px 26px;
    perspective: 1200px;
}

.product-card.magnet-card {
    position: relative;
    background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
    border-radius: 28px;
    padding: 9px;
    display: flex;
    flex-direction: column;
    overflow: visible;
    transform-style: preserve-3d;
    box-shadow:
        inset 0 2px 3px rgba(255, 255, 255, 1),
        inset 0 -2px 4px rgba(148, 163, 184, 0.28),
        0 0 0 1.5px rgba(255, 255, 255, 0.9),
        0 2px 0 #e2e8f0,
        0 4px 0 #d5dee8,
        0 6px 0 #c4d0dd,
        0 8px 0 #b0bfcf,
        0 10px 0 #94a3b8,
        4px 16px 22px rgba(15, 23, 42, 0.24),
        0 22px 34px rgba(15, 23, 42, 0.14);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.38s ease;
    z-index: 1;
}

.product-card.magnet-card:nth-child(odd)  { transform: rotateZ(-1.4deg) rotateX(2deg); }
.product-card.magnet-card:nth-child(even) { transform: rotateZ(1.2deg) rotateX(2deg); }
.product-card.magnet-card:nth-child(3n)   { transform: rotateZ(-0.6deg) rotateX(2deg); }

.product-card.magnet-card:hover {
    transform: translateY(-12px) translateZ(26px) rotateX(4deg) rotateY(-4deg) rotateZ(0deg) scale(1.02);
    z-index: 15;
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 1),
        0 0 0 2px #6ee7b7,
        0 3px 0 #d1fae5,
        0 6px 0 #a7f3d0,
        0 9px 0 #6ee7b7,
        0 12px 0 #34d399,
        10px 26px 38px rgba(6, 78, 59, 0.32),
        0 32px 48px rgba(15, 23, 42, 0.2);
}

.product-card.magnet-card.menu-open {
    transform: translateY(-4px) rotateZ(0deg);
    z-index: 50;
}

.product-card.is-hidden {
    opacity: 0.72;
    filter: grayscale(0.28);
}

.magnet-pin {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) translateZ(16px);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 28%, #ffffff 0%, #6ee7b7 22%, #059669 68%, #064e3b 100%);
    box-shadow:
        inset 0 2px 3px rgba(255, 255, 255, 0.85),
        inset 0 -3px 4px rgba(0, 0, 0, 0.3),
        0 4px 6px rgba(6, 78, 59, 0.4),
        0 8px 14px rgba(0, 0, 0, 0.22);
    z-index: 12;
    pointer-events: none;
}

.product-card.magnet-card:nth-child(3n+2) .magnet-pin {
    background: radial-gradient(circle at 30% 28%, #ffffff 0%, #7dd3fc 22%, #0284c7 68%, #0c4a6e 100%);
}
.product-card.magnet-card:nth-child(3n) .magnet-pin {
    background: radial-gradient(circle at 30% 28%, #ffffff 0%, #fde68a 22%, #d97706 68%, #78350f 100%);
}

.magnet-inner {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    border: 1px solid #dbe4ee;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.magnet-inner::after {
    content: "";
    position: absolute;
    top: -40%;
    left: -60%;
    width: 150%;
    height: 150%;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 32%,
        rgba(255, 255, 255, 0.45) 48%,
        rgba(255, 255, 255, 0.08) 56%,
        rgba(255, 255, 255, 0) 68%
    );
    transform: translateX(-25%);
    transition: transform 0.65s ease;
    pointer-events: none;
    z-index: 4;
}
.product-card.magnet-card:hover .magnet-inner::after {
    transform: translateX(35%);
}

/* ☰ 右上角三條線漢堡功能按鈕與下拉選單 */
.card-more-wrap {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 30;
    transform: translateZ(20px);
}

.btn-card-hamburger {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    transition: all 0.2s ease;
}
.btn-card-hamburger span {
    display: block;
    width: 16px;
    height: 2.2px;
    background: var(--emerald-dark);
    border-radius: 2px;
    transition: all 0.22s ease;
}
.btn-card-hamburger:hover {
    background: var(--emerald);
    border-color: var(--emerald);
    transform: scale(1.08);
}
.btn-card-hamburger:hover span { background: #ffffff; }

.btn-card-hamburger.active {
    background: var(--emerald-dark);
    border-color: var(--emerald-dark);
}
.btn-card-hamburger.active span { background: #ffffff; }
.btn-card-hamburger.active span:nth-child(1) { transform: translateY(6.2px) rotate(45deg); }
.btn-card-hamburger.active span:nth-child(2) { opacity: 0; }
.btn-card-hamburger.active span:nth-child(3) { transform: translateY(-6.2px) rotate(-45deg); }

.card-more-dropdown {
    display: none;
    position: absolute;
    top: 42px;
    right: 0;
    min-width: 136px;
    background: #ffffff;
    border-radius: 14px;
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.24);
    padding: 6px;
    flex-direction: column;
    gap: 3px;
    z-index: 35;
}
.card-more-dropdown.open {
    display: flex;
    animation: fadeDrop 0.16s ease;
}

@keyframes fadeDrop {
    from { opacity: 0; transform: translateY(-6px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.card-more-dropdown button {
    width: 100%;
    text-align: left;
    background: transparent;
    padding: 8px 10px;
    border-radius: 9px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-main);
    transition: background 0.15s ease;
}
.card-more-dropdown button:hover { background: #f0fdf4; color: var(--emerald-dark); }
.card-more-dropdown button.danger { color: #dc2626; }
.card-more-dropdown button.danger:hover { background: #fef2f2; }

/* 卡片圖片與內容 */
.card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f8fafc;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.product-card:hover .card-img-wrap img { transform: scale(1.05); }

.play-badge {
    position: absolute;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
}
.audio-card-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--emerald-dark);
    font-weight: 700;
}
.audio-card-cover span { font-size: 46px; }

.badge-country {
    position: absolute;
    top: 10px;
    left: 10px;
    max-width: calc(100% - 62px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(6, 78, 59, 0.9);
    color: #fff;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.74rem;
    font-weight: 700;
    z-index: 2;
}
.badge-hidden {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(71, 85, 105, 0.92);
    color: #fff;
    padding: 3px 9px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    z-index: 2;
}
.badge-photo-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    padding: 3px 9px;
    border-radius: 50px;
    font-size: 0.72rem;
    z-index: 2;
}

.card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; position: relative; z-index: 2; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.tag-cat { background: #d1fae5; color: var(--emerald-dark); font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.tag-verified { background: #fef3c7; color: #92400e; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.tag-mine { background: #e0f2fe; color: #0369a1; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }

.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-price-row, .modal-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.card-price { font-size: 1.12rem; font-weight: 700; color: var(--gold); }
.card-price span { font-size: 0.78rem; color: var(--text-muted); font-weight: 400; }

.card-views {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.card-desc-preview {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-actions { margin-top: auto; display: grid; grid-template-columns: 1fr 1.2fr; gap: 8px; }
.btn-detail {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    color: var(--text-main);
    border: 1px solid #cbd5e1;
    padding: 9px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 2px 0 #cbd5e1;
}
.btn-contact-tg {
    background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
    padding: 9px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 3px 0 #0369a1;
}

/* 表單與多選服務國家膠囊 */
.form-group { margin-bottom: 13px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 5px; color: var(--emerald-dark); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.country-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.country-check-pill {
    display: inline-flex !important;
    align-items: center;
    margin-bottom: 0 !important;
    cursor: pointer;
    user-select: none;
}
.country-check-pill input[type="checkbox"] { display: none; }
.country-check-pill span {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.83rem;
    font-weight: 600;
    background: #ffffff;
    color: var(--text-main);
    border: 1.5px solid #cbd5e1;
    transition: all 0.18s ease;
}
.country-check-pill input[type="checkbox"]:checked + span {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-color: #059669;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #a7f3d0;
    border-radius: 10px;
    font-size: 0.92rem;
    background: #f0fdf4;
}
.form-control:focus { outline: none; border-color: var(--emerald); background: #fff; }

.tg-import-box {
    background: #e0f2fe;
    border: 1.5px solid #7dd3fc;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 14px;
}
.tg-import-box label { display: block; font-size: 0.82rem; font-weight: 700; color: #0369a1; margin-bottom: 6px; }
.tg-import-row { display: flex; gap: 8px; }
.btn-fetch-tg {
    background: var(--ocean);
    color: #fff;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.media-upload-area {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.btn-upload-file {
    background: #fff;
    border: 1.5px dashed var(--emerald);
    color: var(--emerald-dark);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    flex: 1;
}
.upload-status { font-size: 0.8rem; color: var(--emerald); font-weight: 600; }

.media-preview-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 10px;
}
.media-preview-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.media-type-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}
.media-type-thumb span { font-size: 0.65rem; font-weight: 700; color: var(--text-muted); }

.btn-remove-media {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    font-size: 0.85rem;
    line-height: 1;
}

/* Modal 與燈箱 */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 14px;
}
.modal-box {
    background: var(--sand);
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 22px;
    border: 3px solid #fff;
}
.modal-close {
    position: sticky;
    top: 0;
    float: right;
    background: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.3rem;
    border: 1px solid #e2e8f0;
    z-index: 10;
}
.lightbox-main-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #0f172a;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px 0;
    overflow: hidden;
}
.lightbox-main-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.audio-stage {
    width: 100%;
    height: 100%;
    background: #f0fdf4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.lightbox-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.thumb-item {
    aspect-ratio: 1 / 1;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.thumb-item.active { border-color: var(--emerald); }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }

/* 3秒彈窗 */
.tg-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.tg-popup-card {
    background: #fff;
    border-radius: 20px;
    padding: 26px 22px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    position: relative;
}

/* 手機底部 Navigation Bar */
.mobile-app-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(62px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-top: 2px solid #a7f3d0;
    box-shadow: 0 -4px 16px rgba(6, 78, 59, 0.1);
    z-index: 999;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: 6px;
    padding-bottom: env(safe-area-inset-bottom);
}
.app-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    gap: 2px;
    flex: 1;
}
.app-bar-item span.icon { font-size: 1.25rem; }
.app-bar-item.active { color: var(--emerald); }
.app-bar-item.highlight { color: var(--ocean); }

/* 響應式斷點 */
@media (max-width: 900px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(253, 251, 247, 0.98);
        flex-direction: column;
        padding: 18px;
        gap: 10px;
        border-bottom: 2px solid #a7f3d0;
        display: none;
    }
    .nav-links.active { display: flex; }
    .nav-links a, .nav-links button { width: 100%; text-align: center; }
}

@media (max-width: 768px) {
    .mobile-app-bar { display: flex; }
    .hero h1 { font-size: 1.45rem; }
    .fx-calc-row { grid-template-columns: 1fr; }
    .btn-swap-fx { margin: 0 auto; transform: rotate(90deg); }
    .fridge-wall { padding: 18px 10px 22px; border-radius: 20px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
    .product-card.magnet-card { padding: 6px; border-radius: 22px; }
    .magnet-inner { border-radius: 16px; }
    .magnet-pin { width: 20px; height: 20px; top: -9px; }
    .card-more-wrap { top: 11px; right: 11px; }
    .btn-card-hamburger { width: 32px; height: 32px; gap: 3.5px; }
    .btn-card-hamburger span { width: 14px; }
    .btn-card-hamburger.active span:nth-child(1) { transform: translateY(5.7px) rotate(45deg); }
    .btn-card-hamburger.active span:nth-child(3) { transform: translateY(-5.7px) rotate(-45deg); }
    .card-body { padding: 10px; }
    .card-actions { grid-template-columns: 1fr; }
    .media-preview-list { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 400px) {
    .product-grid { grid-template-columns: 1fr; }
    .form-row-2 { grid-template-columns: 1fr; }
}