/* ====================================
   ONEONELITE - 商家首頁增強樣式
   保持原有風格，增加統一性和微調優化
   ==================================== */

/* Fixed header 適配 - 覆蓋預設的 140px */
/* PC 版才需要 padding-top */
@media (min-width: 1200px) {
    body.index {
        padding-top: 140px !important; /* 增加 20px 額外空間確保不被遮蔽 */
    }
}

/* 平板版（768-1199px）也需要 padding-top，避免橫向時被 fixed header 擋住 */
@media (min-width: 768px) and (max-width: 1199px) {
    body.index {
        padding-top: 140px !important; /* 平板版也需要避開 fixed header */
        padding-bottom: 0 !important;
    }
}

/* 手機版 padding-top 和 padding-bottom 為 0 */
@media (max-width: 767px) {
    body.index {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
}

/* 增強的頭像樣式 */
.enhanced-avatar img {
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.enhanced-avatar:hover img {
    transform: scale(1.05);
}

/* 增強的標題樣式 */
.enhanced-title {
    color: #333;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ==== 現代化 Hero Section 樣式 - 左右分佈版本 ==== */
.modern-seller-hero-split {
    border-radius: 24px !important;
    overflow: hidden !important;
    margin-bottom: 2rem !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    min-height: 350px !important;
    background: #ffffff !important;
}

/* 確保 Bootstrap row 正確顯示 */
.modern-seller-hero-split .row {
    margin: 0 !important;
    height: 100% !important;
    min-height: 350px !important;
}

.modern-seller-hero-split .col-lg-6,
.modern-seller-hero-split .col-md-12 {
    padding: 0 !important;
}

/* 左側圖片區域 */
.hero-image-section {
    height: 100% !important;
    min-height: 350px !important;
}

.hero-cover-image {
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative !important;
    display: block !important;
}

/* 圖片佔位符 */
.hero-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    text-align: center;
    color: white;
}

.placeholder-content i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.placeholder-content span {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.9;
}

/* 右側資訊區域 */
.hero-info-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
    height: 350px !important;
    max-height: 350px !important;
    min-height: 350px !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    overflow: hidden !important;
}

.modern-info-content {
    padding: 0 !important;
    width: 100% !important;
    position: relative !important;
    z-index: 2 !important;
}

/* 內容區域重新設計 - 固定高度 */
.info-layout {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 350px;
    max-height: 350px;
    padding: 2.5rem;
    overflow: visible;
}

/* 商家標題區域 - 頂部區塊 */
.store-header {
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
}

.modern-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 0.4rem 0 !important; /* 覆蓋 main.css 的 margin 並保留底部間距 */
    letter-spacing: -0.02em;
    line-height: 1.2;
    /* 覆蓋 main.css 的 h1 樣式 */
    padding: 0 !important; /* 覆蓋 main.css 的 padding: 20px 0 */
    text-align: left !important; /* 覆蓋 main.css 的 text-align: center */
}

.modern-description {
    font-size: 1.15rem;
    color: #555;
    line-height: 1.7;
    margin: 0;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}

/* 商店介紹展開功能 */
.description-container {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    overflow: visible !important;
    z-index: 5;
}

.modern-description {
    flex: 1;
    transition: all 0.3s ease;
    max-width: calc(100% - 36px); /* 為按鈕留出空間 */
}

.modern-description.expanded {
    -webkit-line-clamp: unset !important;
    display: block !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
}

.description-toggle {
    position: absolute;
    right: 0;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #6c757d;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 10;
}

.description-toggle:hover {
    background: #5a6268;
    transform: scale(1.1);
}

.description-toggle.hidden {
    display: none;
}

/* 手機版介紹按鈕 - 桌面版隱藏 */
.mobile-info-btn {
    display: none;
}

/* PC版tooltip */
.pc-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    color: #333;
    padding: 2rem;
    border-radius: 16px;
    font-size: 1.1rem;
    line-height: 1.8;
    width: 600px;
    max-width: 80vw;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 10000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pc-tooltip.show {
    opacity: 1;
    visibility: visible;
}

.pc-tooltip-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pc-tooltip-overlay.show {
    opacity: 1;
    visibility: visible;
}

.pc-tooltip-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.pc-tooltip-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

/* 中間區域 - 狀態標籤 */
.store-middle {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 狀態標籤重新設計 */
.modern-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 30px;
    color: #333;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    width: 180px;
    min-width: 180px;
}

.status-badge:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.status-badge i {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* 操作按鈕區域重新設計 */
.store-actions {
    margin: 0;
}

/* 底部區域 - 社群連結 */
.store-footer {
    padding-top: 1rem;
}

.modern-social-links {
    text-align: left;
}

/* 主要按鈕 */
.btn-modern-primary {
    position: relative;
    padding: 1.25rem 2.5rem;
    background: linear-gradient(135deg, #D1080F 0%, #FF4757 100%);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(209, 8, 15, 0.4);
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent);
    transition: left 0.6s ease;
}

.btn-modern-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 48px rgba(209, 8, 15, 0.6);
}

.btn-modern-primary:hover .btn-glow {
    left: 100%;
}

.btn-modern-primary:active {
    transform: translateY(-1px);
}

/* 社群媒體連結 */
.modern-social-links {
    text-align: center;
}

/* 移除社群標籤文字 - 讓版面更簡潔大氣 */
.social-label {
    display: none;
}

.social-icons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

.modern-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #666;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.modern-social-icon:hover {
    transform: translateY(-3px);
    text-decoration: none;
}

.modern-social-icon.fb:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
    box-shadow: 0 8px 24px rgba(24, 119, 242, 0.3);
}

.modern-social-icon.ig:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
    border-color: #bc1888;
    box-shadow: 0 8px 24px rgba(188, 24, 136, 0.3);
}

.modern-social-icon.youtube:hover {
    background: #ff0000;
    color: white;
    border-color: #ff0000;
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.3);
}

.modern-social-icon.line:hover {
    background: #00c300;
    color: white;
    border-color: #00c300;
    box-shadow: 0 8px 24px rgba(0, 195, 0, 0.3);
}

/* 響應式設計 */
@media (max-width: 991px) {
    .modern-seller-hero-split {
        min-height: auto;
    }

    .hero-image-section {
        min-height: 300px;
    }

    .hero-info-section {
        min-height: auto;
    }

    .modern-info-content {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .modern-seller-hero-split {
        border-radius: 16px;
        margin-bottom: 1.5rem;
    }

    .hero-image-section {
        min-height: 200px;
        height: 200px;
        max-height: 200px;
    }

    .hero-info-section {
        height: 200px !important;
        max-height: 200px !important;
        min-height: 200px !important;
    }

    .info-layout {
        padding: 1.25rem 1.5rem;
        text-align: center;
        height: 200px;
        max-height: 200px;
        gap: 1rem;
    }

    .store-header {
        margin-bottom: 2rem;
        padding-bottom: 1rem;
    }

    .modern-title {
        font-size: 2.2rem;
    }

    .modern-description {
        font-size: 1rem;
    }

    .store-middle {
        gap: 1.5rem;
    }

    .modern-badges {
        justify-content: center;
        gap: 0.75rem;
    }

    .status-badge {
        padding: 0.8rem 1.2rem;
        font-size: 0.85rem;
    }

    .btn-modern-primary {
        padding: 1rem 2rem;
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
    }

    .store-footer {
        padding-top: 1rem;
    }

    .modern-social-links {
        text-align: center;
    }

    .social-icons {
        justify-content: center;
        gap: 0.75rem;
    }

    .modern-social-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* ==== 浮動充值按鈕 ==== */
.floating-topup-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1050;
}

.btn-floating-topup {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #D1080F 0%, #FF4757 100%);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(209, 8, 15, 0.4);
    backdrop-filter: blur(10px);
}

.btn-floating-topup:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 48px rgba(209, 8, 15, 0.6);
}

.btn-floating-topup:active {
    transform: translateY(-1px) scale(1.02);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.btn-text span {
    font-size: 0.9rem;
    font-weight: 700;
}

.btn-ripple {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent);
    transition: left 0.6s ease;
}

.btn-floating-topup:hover .btn-ripple {
    left: 100%;
}

/* 手機版浮動按鈕調整 */
@media (max-width: 768px) {
    .floating-topup-btn {
        bottom: 1rem;
        right: 1rem;
    }

    .btn-floating-topup {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }

    .btn-icon {
        font-size: 1.1rem;
    }

    .btn-text span {
        font-size: 0.85rem;
    }
}

/* 增強的按鈕樣式 */
.enhanced-btn {
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 40px; /* height=border-radius×2 規則 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
}

.enhanced-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* 增強的資訊標籤 */
.enhanced-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
    font-weight: 500;
    border-radius: 20px;
    transition: all 0.2s ease;
    height: 40px; /* height=border-radius×2 規則 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
}

.enhanced-info:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

/* 增強的社群連結 */
.social-links-enhanced {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.social-links-enhanced .btn-social.enhanced-social {
    width: 40px !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
    border: 2px solid transparent !important;
    transform: translateY(0) !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 0 0 10px !important;
    overflow: hidden !important;
    text-decoration: none !important;
}

.social-links-enhanced .btn-social.enhanced-social:hover {
    border-color: #D1080F !important;
    background: rgba(209, 8, 15, 0.1) !important;
    transform: translateY(-2px) !important;
    text-decoration: none !important;
}

.social-links-enhanced .btn-social.enhanced-social img,
.social-links-enhanced .btn-social.enhanced-social:hover img {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    object-fit: contain !important;
    margin: 0 !important;
    margin-right: 0 !important;
    transition: none !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    vertical-align: top !important;
}

/* 增強的橫幅樣式 */
.enhanced-banner {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.enhanced-banner:hover {
    transform: translateY(-4px);
}

.enhanced-banner img {
    transition: transform 0.3s ease;
}

.enhanced-banner:hover img {
    transform: scale(1.02);
}

/* 增強的商品卡片 */
.enhanced-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    background: #fff;
}

.enhanced-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: #D1080F;
}

/* 增強的商品圖片 */
.enhanced-product-link {
    display: block;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    height: 0; /* 改為 0，使用 padding-bottom 實現比例 */
    padding-bottom: 100%; /* 方形比例 */
    text-decoration: none !important; /* 移除下底線 */
    position: relative;
    background-color: #f8f9fa; /* 無圖片時的背景色 */
}

.enhanced-product-link:hover,
.enhanced-product-link:focus,
.enhanced-product-link:active {
    text-decoration: none !important; /* 確保所有狀態都無下底線 */
    outline: none; /* 移除 focus 外框 */
}

.enhanced-product-image {
    transition: transform 0.3s ease, filter 0.3s ease;
    position: absolute; /* 絕對定位填滿容器 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* 填滿容器 */
    object-fit: cover; /* 保持比例裁切 */
    object-position: center; /* 居中顯示 */
}

/* 無圖片時的佔位符 */
.enhanced-product-link.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
    font-size: 3rem;
}

.enhanced-product-link.no-image::before {
    content: "\f03e"; /* FontAwesome image icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    opacity: 0.3;
}

.enhanced-card:hover .enhanced-product-image {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* 增強的剩餘數量標籤 */
.enhanced-remain {
    font-weight: 600;
    border-radius: 6px;
    border: none; /* 移除白色邊框 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 增強的卡片內容 */
.enhanced-card-body {
    padding: 1.25rem;
}

.enhanced-product-title {
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 增強的價格顯示 */
.enhanced-price {
    font-weight: 700;
    font-size: 1.1rem;
}

.enhanced-price .special-price {
    color: #D1080F;
    font-size: 1.2em;
    margin-right: 0.5rem;
}

.enhanced-price .original-price {
    color: #6c757d;
    font-size: 0.9em;
    text-decoration: line-through;
}

/* 增強的組合標籤 */
.enhanced-badges {
    gap: 0.25rem;
}

.enhanced-combo-badge {
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.enhanced-combo-badge:hover {
    transform: scale(1.1);
}

/* 增強的空狀態 */
.enhanced-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin: 2rem 0;
}

.enhanced-empty .empty-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
}

.enhanced-empty h3 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.enhanced-empty p {
    color: #6c757d;
    margin: 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* 響應式優化 */
@media (max-width: 768px) and (min-width: 577px) {
    /* 平板版維持 fixed header 的設定 */
    body.index {
        padding-top: 0 !important; /* 平板版保持原始 fixed header 高度 */
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 768px) {
    /* Hero section mobile height adjustments */
    .modern-seller-hero-split {
        min-height: 420px !important;
        max-height: 420px !important;
        flex-direction: column; /* 手機版改為上下排列 */
    }

    .modern-seller-hero-split .row {
        flex-direction: column !important;
        height: 100% !important;
        margin: 0 !important; /* 移除Bootstrap的預設margin */
    }

    /* 移除Bootstrap列間距 */
    .modern-seller-hero-split .col-lg-6 {
        padding: 0 !important; /* 移除Bootstrap的預設padding */
        margin: 0 !important;
    }

    .hero-image-section {
        height: 246px !important; /* 手機版圖片區域增加 */
        max-height: 246px !important;
        min-height: 246px !important;
    }

    .hero-info-section {
        height: 175px !important; /* 手機版資訊區域增加 */
        max-height: 175px !important;
        min-height: 175px !important;
        overflow: visible !important; /* 讓tooltip能夠顯示 */
    }

    .modern-info-content {
        height: 175px !important;
        max-height: 175px !important;
        /* padding: 1.6rem !important; 手機版內距略增 */
    }

    .info-layout {
        height: 175px !important;
        max-height: 175px !important;
        padding: 0.75rem !important; /* 手機版內距緊湊 */
        gap: 0.25rem !important; /* 緊湊的間距 */
        justify-content: flex-start !important; /* 從上開始排列 */
        overflow: visible !important; /* 確保內容不被裁切 */
    }

    .modern-title {
        font-size: 1.5rem !important; /* 手機版標題稍大 */
        margin-bottom: 0.5rem !important; /* 適中的標題下方間距 */
        line-height: 1.3 !important; /* 適中行高 */
        text-align: center !important; /* 手機版標題置中 */
    }

    .modern-description {
        display: none !important; /* 手機版隱藏介紹文字 */
    }

    .description-container {
        display: none !important; /* 手機版隱藏整個介紹容器 */
    }

    /* 手機版介紹按鈕 */
    .mobile-info-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center !important;
        gap: 0.4rem;
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 20px;
        padding: 0.4rem 0.5rem;
        font-size: 0.9rem;
        color: #6c757d;
        cursor: pointer;
        transition: all 0.3s ease;
        height: auto;
        white-space: nowrap;
        flex: 1 !important; /* 與其他按鈕平均分配寬度 */
        max-width: 120px !important; /* 限制最大寬度 */
    }

    .mobile-info-btn:hover {
        background: #e9ecef;
        border-color: #adb5bd;
        color: #495057;
    }

    /* 讓按鈕與狀態標籤統一樣式 */
    .mobile-info-btn i {
        font-size: 0.7rem;
    }

    /* 手機版tooltip */
    .mobile-tooltip {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(0, 0, 0, 0.9);
        color: white;
        padding: 2rem;
        border-radius: 16px;
        font-size: 1.1rem;
        line-height: 1.7;
        width: 85vw;
        max-width: 500px;
        max-height: 70vh;
        overflow-y: auto;
        z-index: 10000;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-tooltip.show {
        opacity: 1;
        visibility: visible;
    }

    .mobile-tooltip-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-tooltip-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .mobile-tooltip-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 30px;
        height: 30px;
        border: none;
        background: rgba(255, 255, 255, 0.2);
        color: white;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        transition: all 0.3s ease;
    }

    .mobile-tooltip-close:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(1.1);
    }

    /* 手機版商家標題區域間距調整 */
    .store-header {
        margin-bottom: 0.25rem !important; /* 更緊湊的底部間距 */
        padding-bottom: 0 !important; /* 移除底部內距 */
        flex-shrink: 0; /* 防止標題區域被壓縮 */
    }

    /* 手機版中間區域間距調整 */
    .store-middle {
        margin-bottom: 0.25rem !important; /* 更緊湊的底部間距 */
        flex-shrink: 0; /* 防止按鈕區域被壓縮 */
        flex: none !important; /* 手機版不要佔用剩餘空間，避免撑開 */
    }

    /* 手機版底部區域調整 */
    .store-footer {
        flex-shrink: 0; /* 防止社群區域被壓縮 */
        margin-top: 0 !important; /* 移除自動推底部 */
        flex: none !important; /* 手機版不要佔用剩餘空間 */
    }

    /* 確保社群圖標在手機版正常顯示 */
    .modern-social-icon {
        width: 35px !important; /* 手機版較小的社群圖標 */
        height: 35px !important;
        font-size: 0.9rem !important;
        margin: 0 !important; /* 移除多餘間距 */
    }

    .social-icons {
        gap: 0.5rem !important; /* 手機版緊湊間距 */
    }

    /* 覆蓋main.css的.btn-social樣式 - 手機版專用 */
    .store-footer .modern-social-icon {
        margin: 0 !important; /* 覆蓋main.css的margin: 0 3px 10px */
    }

    /* 手機版底部區域緊湊間距 */
    .store-footer {
        margin-top: 0 !important;
        padding-top: 0.5rem !important; /* 增加頂部內距 */
    }

    .modern-badges {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        align-items: center !important;
    }

    .modern-badges .status-badge {
        font-size: 0.9rem !important; /* 手機版標籤稍大 */
        padding: 0.4rem 0.5rem !important; /* 調整內距 */
        flex-shrink: 0 !important; /* 防止按鈕被壓縮 */
        width: auto !important; /* 覆蓋PC版固定寬度 */
        min-width: auto !important; /* 覆蓋PC版最小寬度 */
        flex: 1 !important; /* 三個按鈕平均分配寬度 */
        max-width: 120px !important; /* 限制最大寬度避免過寬 */
        justify-content: center !important; /* 內容置中 */
    }

    .modern-social-icon {
        width: 40px !important; /* 手機版較小的社群圖標 */
        height: 40px !important;
        font-size: 1rem !important;
    }

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

    .social-links-enhanced {
        margin-left: 0;
        margin-top: 0.5rem;
        justify-content: flex-start;
    }

    .enhanced-card {
        margin-bottom: 1rem;
    }

    .enhanced-card-body {
        padding: 1rem;
    }

    .enhanced-product-title {
        font-size: 1rem;
        height: 2.4em;
    }

    .enhanced-price {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    body.index {
        padding-top: 0 !important; /* 手機版 header 非 fixed，不需要 padding */
    }

    .container {
        padding-top: 1rem; /* 添加基本的上邊距 */
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* 手機版圖片高度調整 */
    .enhanced-product-link {
        height: 0 !important; /* 使用 padding-bottom 實現比例 */
        padding-bottom: 100% !important; /* 手機版也是方形 */
        background-color: #f8f9fa; /* 確保背景色在手機版也生效 */
    }

    .enhanced-product-image {
        position: absolute !important; /* 絕對定位 */
        top: 0;
        left: 0;
        width: 100%;
        height: 100% !important; /* 填滿容器 */
    }

    /* 手機版無圖片佔位符調整 */
    .enhanced-product-link.no-image {
        font-size: 2.5rem; /* 手機版較小的圖標 */
    }

    .enhanced-empty {
        padding: 2rem 1rem;
    }

    .enhanced-empty .empty-icon {
        font-size: 3rem;
    }
}

/* 載入動畫 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.enhanced-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* 為每個商品卡片添加延遲動畫 */
.enhanced-card:nth-child(1) { animation-delay: 0.1s; }
.enhanced-card:nth-child(2) { animation-delay: 0.2s; }
.enhanced-card:nth-child(3) { animation-delay: 0.3s; }
.enhanced-card:nth-child(4) { animation-delay: 0.4s; }
.enhanced-card:nth-child(5) { animation-delay: 0.5s; }
.enhanced-card:nth-child(6) { animation-delay: 0.6s; }

/* 改善文字可讀性 */
.seller-info h2,
.enhanced-title {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 改善互動回饋 */
.enhanced-card,
.enhanced-btn,
.enhanced-social {
    cursor: pointer;
}

.enhanced-card:active {
    transform: translateY(-2px) scale(0.98);
}

.enhanced-btn:active {
    transform: translateY(0) scale(0.96);
}

/* 改善焦點樣式（無障礙友善） */
.enhanced-btn:focus,
.enhanced-social:focus {
    outline: 2px solid #D1080F;
    outline-offset: 2px;
}

/* 商品連結不顯示 focus outline，已在前面設定 */

/* 針對 seller-button-group 的特定樣式 */
.seller-button-group .btn {
    border-radius: 20px !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 1rem !important;
}

.seller-button-group .enhanced-btn,
.seller-button-group .enhanced-info {
    border-radius: 20px !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 1rem !important;
}

/* 確保儲值模態框與 buyer-center.css 兼容 */
.buyer-modal.show {
    display: block !important;
}

/* 修正 PC 版模態框被 fixed header 遮蔽的問題 */
@media (min-width: 577px) {
    .buyer-modal-dialog {
        margin-top: 180px !important; /* 考慮 140px header + 40px 額外空間 */
        margin-bottom: 3rem !important;
    }
}

/* 手機版保持原有位置 */
@media (max-width: 576px) {
    .buyer-modal-dialog {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }
}

/* 儲值特定樣式 */
.buyer-topup-merchant-info {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

/* Radio button 樣式 */
.buyer-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.buyer-radio-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.buyer-radio-item:hover {
    border-color: #D1080F;
    background-color: #f8f9fa;
}

.buyer-radio-item input[type="radio"] {
    margin-right: 0.75rem;
    accent-color: #D1080F;
}

.buyer-radio-label {
    font-weight: 500;
    color: #333;
}

.buyer-merchant-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.buyer-merchant-info-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.buyer-merchant-info-name {
    font-weight: 600;
    color: #333;
}

.buyer-merchant-usage-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #D1080F;
    font-size: 0.85rem;
}

.buyer-topup-plans-simple {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.buyer-topup-simple-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
}

.buyer-topup-simple-amount {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.buyer-topup-simple-price {
    color: #D1080F;
    font-weight: 600;
    font-size: 1.1rem;
}

.buyer-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.buyer-btn-primary {
    background: #D1080F;
    color: white;
    border-color: #D1080F;
}

.buyer-btn-primary:hover {
    background: #B50710;
    border-color: #B50710;
}

.buyer-btn-secondary {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.buyer-btn-outline-primary {
    color: #D1080F;
    border-color: #D1080F;
}

.buyer-btn-outline-primary:hover {
    background: #D1080F;
    color: white;
}

.buyer-btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.buyer-topup-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 1.5rem;
}

.buyer-warning-content {
    display: flex;
    gap: 0.75rem;
}

.buyer-warning-content i {
    color: #856404;
    margin-top: 0.2rem;
}

.buyer-warning-text strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #856404;
}

.buyer-warning-text p {
    margin: 0;
    color: #856404;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 步驟指示器 */
.buyer-step-indicator {
    color: #6c757d;
    font-weight: 400;
    font-size: 0.9rem;
}

/* 步驟標題 */
.buyer-step-header h6 {
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.buyer-text-muted {
    color: #6c757d !important;
}

.buyer-small {
    font-size: 0.875rem;
}

/* 發票表單樣式 */
.buyer-invoice-form {
    margin-bottom: 1.5rem;
}

.buyer-text-danger {
    color: #dc3545;
}

.buyer-invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* 付款說明 */
.buyer-payment-notice h6 {
    margin-bottom: 0.75rem;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.buyer-payment-notice ul {
    margin: 0;
    padding-left: 1.5rem;
}

.buyer-payment-notice li {
    margin-bottom: 0.5rem;
    color: #495057;
}

/* 確認頁面樣式 */
.buyer-confirm-summary {
    margin-bottom: 1.5rem;
}

.buyer-confirm-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.buyer-confirm-section-title {
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.buyer-topup-summary-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
}

.buyer-topup-summary-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.buyer-topup-summary-amount {
    text-align: center;
}

.buyer-amount-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #D1080F;
}

.buyer-amount-unit {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.buyer-topup-summary-divider {
    color: #6c757d;
    font-size: 1.2rem;
}

.buyer-topup-summary-price {
    text-align: center;
}

.buyer-price-label {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.buyer-price-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

.buyer-topup-summary-note {
    text-align: center;
    font-size: 0.875rem;
    color: #6c757d;
    padding-top: 0.75rem;
    border-top: 1px solid #dee2e6;
}

.buyer-confirm-details {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
}

.buyer-confirm-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.buyer-confirm-item:last-child {
    border-bottom: none;
}

.buyer-confirm-label {
    font-weight: 500;
    color: #6c757d;
}

.buyer-confirm-value {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 最終警告 */
.buyer-final-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* 按鈕變體 - 僅添加 buyer-center.css 沒有的樣式 */
.buyer-btn-back {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.buyer-btn-back:hover {
    background: #5a6268;
    border-color: #5a6268;
}

/* ========================================
   商家頁面 modern-info-content 優化
   ======================================== */

/* 預設隱藏手機版社群連結（在手機版才顯示） */
.social-icons-mobile {
  display: none !important;
}

/* PC 版和 Pad 版：縮小出貨天數、商品數按鈕 */
@media (min-width: 769px) and (max-width: 1199px) {
  /* iPad 版本 */
  .status-badge {
    padding: 0.7rem 1rem !important;
    font-size: 0.85rem !important;
    width: 140px !important;
    min-width: 140px !important;
    gap: 0.5rem !important;
  }

  .status-badge i {
    font-size: 0.95rem !important;
  }
}

@media (min-width: 1200px) {
  /* PC 版本 - 也縮小 */
  .status-badge {
    padding: 0.7rem 1rem !important;
    font-size: 0.85rem !important;
    width: 140px !important;
    min-width: 140px !important;
    gap: 0.5rem !important;
  }

  .status-badge i {
    font-size: 0.95rem !important;
  }
}

/* iPad Pro 1024x1366 使用 iPad 版本樣式 */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: portrait),
       (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
  .status-badge {
    padding: 0.7rem 1rem !important;
    font-size: 0.85rem !important;
    width: 140px !important;
    min-width: 140px !important;
    gap: 0.5rem !important;
  }

  .status-badge i {
    font-size: 0.95rem !important;
  }
}

/* 手機版樣式優化 */
@media (max-width: 768px) {
  /* 重新排列：商家名稱靠左、社群連結在右方並排 */
  .store-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    margin-bottom: 0.8rem !important;
    padding-bottom: 0.5rem !important;
  }

  .store-header .modern-title {
    font-size: 1.4rem !important;
    margin: 0 !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .store-header .description-container {
    display: none !important; /* 手機版隱藏介紹文字，改用按鈕 */
  }

  /* 社群連結容器 - 顯示在商家名稱右方 */
  .social-icons-mobile {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.3rem !important;
    align-items: center !important;
    flex-shrink: 0 !important;
  }

  .social-icons-mobile .modern-social-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.9rem !important;
  }

  /* 原本的社群連結在手機版隱藏 */
  .store-footer .social-icons {
    display: none !important;
  }

  /* 縮小狀態標籤 */
  .status-badge {
    padding: 0.5rem 0.8rem !important;
    font-size: 0.8rem !important;
    width: auto !important;
    min-width: auto !important;
    gap: 0.4rem !important;
    flex: 1 !important;
  }

  .status-badge i {
    font-size: 0.9rem !important;
  }

  .modern-badges {
    gap: 0.5rem !important;
  }

  /* 手機版介紹按鈕樣式 */
  .mobile-info-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    padding: 0.5rem 0.8rem !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 30px !important;
    color: #333 !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    flex: 1 !important;
  }
}
