/* ============================================
   基礎設定 - DealVista 風格
   ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft JhengHei', 'PingFang TC', 'Helvetica Neue', Arial, sans-serif;
    background: #fff;
    color: #333;
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Content width helpers */
.content-narrow {
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.page-padding {
    padding: 24px 0;
}

/* ============================================
   Articles
   ============================================ */
.article-single {
    max-width: 780px;
    margin: 24px auto 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.article-header h1 {
    font-size: 2.1rem;
    line-height: 1.15;
    margin: 0 0 10px;
    letter-spacing: -0.3px;
}

.article-meta {
    display: inline-block;
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 18px;
}

.article-content {
    line-height: 1.9;
    font-size: 1.05rem;
    color: #222;
}

.article-content p {
    margin: 0 0 14px;
}

.article-content h2 {
    margin: 22px 0 10px;
    font-size: 1.25rem;
    line-height: 1.3;
    color: #111827;
}

.article-content ul,
.article-content ol {
    margin: 10px 0 14px 22px;
}

.article-content li {
    margin: 6px 0;
}

.article-content a {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 600;
}

.article-content a:hover {
    text-decoration: underline;
}

.article-footer {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-start;
}

/* ============================================
   Header
   ============================================ */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    flex-wrap: wrap;
}


.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    font-weight: 700;
    font-size: 1.4rem;
    text-decoration: none;
    color: #333;
    letter-spacing: -0.3px;
}

.region-form select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    color: #333;
    height: 36px;
    box-sizing: border-box;
}

.region-form select:focus {
    outline: none;
    border-color: #ff6b35;
}

/* ============================================
   Header 搜尋框（列表頁用，縮小版）
   ============================================ */
.header-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    height: 36px;
    box-sizing: border-box;
}

.header-search-icon {
    padding: 8px 10px;
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    background: transparent;
    height: 100%;
}

.header-search-input {
    padding: 8px 10px;
    border: none;
    font-size: 0.875rem;
    color: #333;
    background: transparent;
    outline: none;
    width: 200px;
    height: 100%;
    box-sizing: border-box;
}

.header-search-input::placeholder {
    color: #999;
}

.header-search-btn {
    padding: 8px 16px;
    border: none;
    background: #ff6b35;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 6px;
    height: 36px;
}

.header-search-btn:hover {
    background: #ff5722;
}

/* ============================================
   Main Content
   ============================================ */
main {
    padding: 20px 0 40px;
}

/* ============================================
   搜尋框 - 灰色背景區塊
   ============================================ */
.search-section {
    width: 100%;
    margin: 0 0 30px;
    padding: 30px 0;
    text-align: center;
    background: #f5f5f5;
}

.search-section .container {
    padding: 0 20px;
}

.search-title {
    font-size: 2rem;
    font-weight: 700;
    color: #000;
    margin: 0 0 20px;
    text-align: center;
}

.search-form-main {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 700px;
    margin: 0 auto;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: 48px;
}

.search-icon {
    padding: 14px 16px;
    color: #666;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    background: transparent;
    height: 100%;
}

.search-input-main {
    flex: 1;
    padding: 14px 16px;
    border: none;
    font-size: 1rem;
    color: #333;
    background: transparent;
    outline: none;
    height: 100%;
}

.search-input-main::placeholder {
    color: #999;
}

.search-btn-main {
    padding: 14px 28px;
    border: none;
    background: #ff6b35;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 8px;
    height: 48px;
}

.search-btn-main:hover {
    background: #ff5722;
}

/* ============================================
   熱門搜尋關鍵字
   ============================================ */
.popular-search-keywords {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.popular-search-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.keywords-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.keyword-tag {
    display: inline-block;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    color: #333;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    cursor: pointer;
}

.keyword-tag:hover {
    background: #ff6b35;
    border-color: #ff6b35;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.2);
}

/* ============================================
   主要優惠橫幅 - 橙色背景
   ============================================ */
.featured-deal-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 40px;
    background: linear-gradient(to bottom, #ff8c42, #ff6b35);
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

.deal-banner-left {
    flex: 1;
    color: #fff;
}

.deal-discount {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.1;
}

.deal-code {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 16px;
    font-weight: 600;
}

.btn-copy-banner {
    padding: 12px 24px;
    background: #fff;
    color: #ff6b35;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy-banner:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
}

.deal-banner-right {
    flex-shrink: 0;
    margin-left: 30px;
}

.deal-banner-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px;
}

/* ============================================
   Section Titles
   ============================================ */
.section-title {
    font-size: 1.3rem;
    margin: 0 0 16px;
    color: #333;
    font-weight: 600;
}

/* ============================================
   地區快速入口
   ============================================ */
.region-quick-access {
    margin-bottom: 32px;
}

/* 全部分類頁：自動換行，不左右滑 */
.all-categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.region-buttons-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-top: 4px;
    padding-bottom: 8px;
    /* 隱藏滾動條但保持功能 */
    scrollbar-width: thin;
    scrollbar-color: #ff6b35 #f5f5f5;
}

.region-buttons-grid::-webkit-scrollbar {
    height: 6px;
}

.region-buttons-grid::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.region-buttons-grid::-webkit-scrollbar-thumb {
    background: #ff6b35;
    border-radius: 3px;
}

.region-buttons-grid::-webkit-scrollbar-thumb:hover {
    background: #ff5722;
}

.region-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 20px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    min-width: 140px;
    width: 140px;
}

.region-quick-btn:hover {
    border-color: #ff6b35;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.15);
    transform: translateY(-2px);
}

.region-flag {
    font-size: 2rem;
}

.category-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.region-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
}

/* ============================================
   熱門品牌
   ============================================ */
.popular-brands {
    margin-bottom: 32px;
}

/* 區塊標題連結：外觀與一般文字相同，不變色、無底線 */
.section-title-link,
.section-title-link:visited,
.section-title-link:hover,
.section-title-link:active {
    color: inherit;
    text-decoration: none;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.brand-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.brand-card:hover {
    border-color: #ff6b35;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.15);
    transform: translateY(-2px);
}

.brand-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.brand-logo-placeholder {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #999;
}

.brand-name {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: #333;
}

.brand-count {
    font-size: 0.85rem;
    color: #666;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 12px;
}

/* ============================================
   品牌列表頁 - 標題長條（全寬灰色背景，與首頁搜尋區一致）
   ============================================ */
.brand-header-section {
    width: 100%;
    margin-bottom: 30px;
    padding: 30px 0;
    background: #f5f5f5;
}

.brand-header-section .container {
    padding: 0 20px;
}

.brand-header {
    margin: 0;
    padding: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.brand-header-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.brand-header h1 {
    font-size: 1.8rem;
    margin: 0;
    color: #333;
    font-weight: 700;
}

.coupons-list-section {
    margin-bottom: 32px;
}

.coupons-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================
   優惠列表卡片 - DealVista 風格
   ============================================ */
.coupon-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.coupon-list-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.coupon-list-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.coupon-merchant-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 8px;
}

.coupon-merchant-logo-placeholder {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 1.2rem;
    font-weight: 700;
    color: #9ca3af;
}

.coupon-list-content {
    flex: 1;
    min-width: 0;
}

.coupon-list-title {
    margin: 0 0 6px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
}

.coupon-list-description {
    margin: 0 0 6px;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 500;
}

.coupon-list-description-small {
    margin: 0 0 8px;
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

.coupon-list-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.coupon-list-region {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 0.85rem;
    padding: 4px 8px;
    background: #f5f5f5;
    border-radius: 4px;
}

.coupon-list-expiry {
    color: #6b7280;
    font-size: 0.85rem;
}

.coupon-list-countdown {
    display: inline-flex;
    align-items: center;
    color: #f59e0b;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 8px;
    background: #fff7ed;
    border-radius: 4px;
}

.coupon-list-countdown.warning {
    color: #dc2626;
    background: #fee2e2;
}

.coupon-list-countdown.urgent {
    color: #fff;
    background: #dc2626;
}

/* 動畫效果（可透過設定控制） */
.coupon-list-countdown.urgent.animated {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.coupon-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #10b981;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    white-space: nowrap;
}

.coupon-last-used {
    display: inline-flex;
    align-items: center;
    color: #059669;
    font-size: 0.8rem;
    padding: 4px 8px;
    background: #d1fae5;
    border-radius: 4px;
}

.coupon-success-rate {
    display: inline-flex;
    align-items: center;
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 8px;
    background: #dbeafe;
    border-radius: 4px;
}

.coupon-list-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.coupon-discount-large {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff6b35;
    text-align: right;
    margin-bottom: 4px;
    line-height: 1.2;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: #ff6b35;
    color: #fff;
    border: none;
    font-weight: 600;
    border-radius: 6px;
}

.btn-primary:hover {
    background: #ff5722;
}

.btn-get-deal {
    padding: 12px 24px;
    font-size: 0.95rem;
    white-space: nowrap;
    background: #ff6b35;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.btn-get-deal:hover {
    background: #ff5722;
}

/* 有優惠碼的 GET DEAL 按鈕 - 右上角反折掀開效果 */
.btn-get-deal.has-code {
    position: relative;
}

/* 主要文字 GET DEAL - 最上層，正常顯示 */
.btn-get-deal.has-code .btn-main-text {
    position: relative;
    z-index: 4;
    display: inline-block;
}

/* 優惠碼層 - 底層 */
.btn-get-deal.has-code .btn-code-layer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 12px 24px;
    padding-right: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    letter-spacing: 1px;
    z-index: 1;
    color: #fff;
    white-space: nowrap;
}

/* 遮罩層 - 遮住大部分優惠碼，只在右上角留缺口 */
.btn-get-deal.has-code .btn-cover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ff6b35;
    z-index: 2;
    clip-path: polygon(0% 0%, 97% 0%, 100% 3%, 100% 100%, 0% 100%);
    transition: clip-path 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 右上角三角形 - 模擬反折效果 */
.btn-get-deal.has-code .btn-corner {
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #ff6b35;
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%);
    z-index: 3;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -1px 1px 3px rgba(0, 0, 0, 0.15);
}

/* Hover 狀態 */
.btn-get-deal.has-code:hover .btn-cover {
    clip-path: polygon(0% 0%, 75% 0%, 100% 25%, 100% 100%, 0% 100%);
    background: #ff5722;
}

.btn-get-deal.has-code:hover .btn-corner {
    width: 35px;
    height: 35px;
    background: #ff5722;
    box-shadow: -2px 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-get-deal.has-code:hover .btn-main-text {
    color: #fff;
    opacity: 1;
}

.btn-get-deal.has-code:hover {
    background: #ff5722;
}


.btn-copy-code {
    padding: 10px 20px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-copy-code:hover {
    background: #e8e8e8;
    border-color: #ddd;
}

/* ============================================
   Modal - 優惠碼彈窗
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    display: none;
    padding: 16px;
}

.modal-overlay[style*="flex"] {
    display: flex !important;
}

.modal {
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
    z-index: 10;
    line-height: 1;
}

.modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.3;
}

.modal-merchant {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-merchant-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    background: #f5f5f5;
    padding: 4px;
}

.modal-merchant-name {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

.modal-description {
    margin-top: 12px;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.modal-expiry {
    margin-top: 8px;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 600;
}

.modal-terms {
    margin-top: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #d1d5db;
}

.modal-terms strong {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-size: 0.9rem;
}

.modal-terms-text {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-line;
}

.modal-body {
    padding: 24px;
}

.code-section {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
}

.code-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
    display: block;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-display {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    font-family: 'Courier New', 'Monaco', monospace;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.code-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-copy,
.btn-shop,
.btn-share {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #e0e0e0;
}

.btn-copy:hover {
    background: #e8e8e8;
    border-color: #ddd;
}

.btn-shop {
    background: #ff6b35;
    color: #fff;
}

.btn-shop:hover {
    background: #ff5722;
}

.btn-share {
    background: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
}

.btn-share:hover {
    background: #e5e5e5;
    border-color: #ccc;
}

/* Toast 通知（彈窗外，固定於畫面頂部） */
.toast-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.toast-notification.show {
    display: flex;
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ============================================
   No Coupons
   ============================================ */
.no-coupons {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.no-coupons p {
    margin-bottom: 16px;
    font-size: 1rem;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: #fff;
    color: #666;
    padding: 24px 0;
    margin-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.footer-inner {
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 12px;
}

.footer-nav a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-nav a:hover {
    color: #ff6b35;
}

.site-footer p {
    font-size: 0.85rem;
    margin: 0;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .hero-search {
        padding: 32px 16px;
        margin-left: -12px;
        margin-right: -12px;
        border-radius: 0;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-search-form {
        flex-direction: column;
    }

    .hero-search-input {
        width: 100%;
        border-radius: 6px 6px 0 0;
    }

    .hero-search-btn {
        width: 100%;
        border-radius: 0 0 6px 6px;
    }

    .popular-search-keywords {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        margin-top: 16px;
    }

    .popular-search-label {
        font-size: 0.85rem;
    }

    .keywords-list {
        justify-content: center;
        gap: 6px;
    }

    .keyword-tag {
        font-size: 0.8rem;
        padding: 5px 12px;
    }

    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .brand-header {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }

    .brand-header h1 {
        font-size: 1.5rem;
    }

    .coupon-list-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .coupon-list-left {
        width: 100%;
    }

    .coupon-list-right {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .btn-get-deal {
        width: auto;
        flex: 1;
    }

    .modal {
        margin: 16px;
        max-height: calc(100vh - 32px);
    }

    .modal-header {
        padding: 20px 20px 12px;
    }

    .modal-body {
        padding: 20px;
    }

    .code-display {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    .code-actions {
        flex-direction: column;
    }

    .btn-copy,
    .btn-shop,
    .btn-share {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .brands-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   滾回頂部按鈕
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ff6b35;
    color: #fff;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(255, 107, 53, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #ff5722;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.5);
}
