/**
 * 查價格按鈕前端樣式
 * 
 * @package Uni_Shopee_Affiliate_TW
 * @since 1.5.18
 */

/* 按鈕容器 */
.shopee-price-check-wrapper {
    margin: 20px 0;
    display: flex;
}

.shopee-price-check-wrapper.align-left {
    justify-content: flex-start;
}

.shopee-price-check-wrapper.align-center {
    justify-content: center;
}

.shopee-price-check-wrapper.align-right {
    justify-content: flex-end;
}

/* 按鈕基本樣式 */
.shopee-price-check-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    outline: none;
    position: relative;
    overflow: hidden;
}

.shopee-price-check-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.shopee-price-check-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.shopee-price-check-button:focus {
    outline: 2px solid rgba(102, 126, 234, 0.3);
    outline-offset: 2px;
}

/* 按鈕圖示 */
.shopee-price-check-button .button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.shopee-price-check-button:hover .button-icon {
    transform: scale(1.1);
}

.shopee-price-check-button .button-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* 按鈕文字 */
.shopee-price-check-button .button-text {
    font-weight: inherit;
    font-size: inherit;
    line-height: 1;
}

/* 載入狀態 */
.shopee-price-check-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.shopee-price-check-button.loading .button-icon {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 波紋效果 */
.shopee-price-check-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.shopee-price-check-button:active::before {
    width: 300px;
    height: 300px;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .shopee-price-check-wrapper {
        margin: 15px 0;
    }
    
    .shopee-price-check-button {
        font-size: 14px !important;
        padding: 10px 20px !important;
    }
    
    .shopee-price-check-button .button-icon svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .shopee-price-check-wrapper {
        width: 100%;
    }
    
    .shopee-price-check-wrapper.align-left,
    .shopee-price-check-wrapper.align-center,
    .shopee-price-check-wrapper.align-right {
        justify-content: stretch;
    }
    
    .shopee-price-check-button {
        width: 100%;
    }
}

/* 無障礙支援 */
@media (prefers-reduced-motion: reduce) {
    .shopee-price-check-button,
    .shopee-price-check-button .button-icon,
    .shopee-price-check-button::before {
        transition: none;
        animation: none;
    }
}


/* ========================================
   查價模組樣式
   ======================================== */

/* 模組遮罩層 */
.shopee-price-check-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.price-check-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

/* 模組容器 */
.price-check-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

/* 模組標題區 */
.price-check-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 28px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    flex-shrink: 0;
}

.price-check-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-check-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* TIPS 按鈕 */
.price-check-tips-btn {
    width: 18px !important;
    height: 18px !important; 
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: 1px solid #d7d7d7 !important;
    border-radius: 50% !important;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.price-check-tips-btn:hover {
    background: var(--usa-primary-color, linear-gradient(135deg, #ee4d2d 0%, #d73211 100%));
    border-color: var(--usa-primary-color, #ee4d2d);
    color: var(--usa-arrow-color, #ffffff);
    transform: scale(1.1);
}

.price-check-tips-btn:active {
    transform: scale(0.95);
}

/* TIPS 彈窗 */
.price-check-tips-popup {
    position: absolute;
    top: 80px;
    left: 28px;
    right: 28px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
    z-index: 10002;
    animation: tipsFadeIn 0.3s ease;
}

@keyframes tipsFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.price-check-tips-popup .tips-content {
    color: #78350f;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.price-check-tips-popup .tips-content strong {
    color: #92400e;
    font-weight: 700;
}

.price-check-close {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--usa-primary-color, linear-gradient(135deg, #ee4d2d 0%, #d73211 100%)) !important;
    border: 3px solid #ffffff;
    border-radius: 50% !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(238, 77, 45, 0.5), 0 2px 8px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 10001;
}

/* 用 CSS 畫 X（更可靠） */
.price-check-close::before,
.price-check-close::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 2px;
    background: var(--usa-arrow-color, #ffffff);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.price-check-close::before {
    transform: rotate(45deg);
}

.price-check-close::after {
    transform: rotate(-45deg);
}

.price-check-close:hover {
    transform: scale(1.15) rotate(90deg);
    background: var(--usa-primary-color, linear-gradient(135deg, #ee4d2d 0%, #d73211 100%));
    opacity: 0.9;
    box-shadow: 0 6px 24px rgba(238, 77, 45, 0.7), 0 4px 12px rgba(0, 0, 0, 0.35);
    border-color: #fff;
}

/* 隱藏 SVG，改用 CSS */
.price-check-close svg {
    display: none;
}

.price-check-close:active {
    transform: scale(1.05) rotate(90deg);
    box-shadow: 0 2px 12px rgba(238, 77, 45, 0.5);
}

/* 搜尋區域 */
.price-check-search {
    padding: 20px 28px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* 搜尋區域收縮狀態（手機版） */
@media (max-width: 480px) {
    .price-check-search.collapsed {
        position: absolute;
        top: 45px; 
        left: 50%;
        transform: translateX(-50%);
        width: 35px;
        height: 35px;
        padding: 0;
        border: none;
        background: var(--usa-primary-color, linear-gradient(135deg, #ee4d2d 0%, #d73211 100%));
        border-radius: 50%;
        cursor: pointer;
        z-index: 100;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .price-check-search.collapsed:hover {
        transform: translateX(-50%) translateY(2px);
        box-shadow: 0 8px 24px rgba(238, 77, 45, 0.5),
                    0 4px 12px rgba(0, 0, 0, 0.2);
    }
    
    .price-check-search.collapsed:active {
        transform: translateX(-50%) translateY(4px) scale(0.95);
        box-shadow: 0 4px 16px rgba(238, 77, 45, 0.3),
                    0 2px 6px rgba(0, 0, 0, 0.1);
    }
    
    .price-check-search.collapsed .search-input-wrapper,
    .price-check-search.collapsed .price-check-quick-tags-wrapper {
        display: none;
    }
    
    /* 收縮時顯示向下箭頭 */
    .price-check-search.collapsed::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 0;
        height: 0;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 10px solid var(--usa-arrow-color, #ffffff);
    }
    
    .price-check-search.collapsed::after {
        display: none;
    }
    
    .price-check-search.collapsed * {
        pointer-events: none;
    }
    
    /* 收縮時調整 body 上邊距 */
    .price-check-search.collapsed ~ .price-check-body {
        margin-top: 20px;
    }
}

/* 快速標籤區域包裝 */
.price-check-quick-tags-wrapper {
    margin-top: 12px;
    border-top: 1px dashed #e5e7eb;
    animation: quickTagsFadeIn 0.3s ease;
}

/* 展開/收縮按鈕 */
.quick-tags-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.quick-tags-toggle:hover {
    opacity: 0.7;
}

.quick-tags-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-tags-arrow {
    font-size: 10px;
    color: #9ca3af;
    transition: transform 0.3s ease;
}

/* 收縮狀態 */
.price-check-quick-tags-wrapper.collapsed .quick-tags-arrow {
    transform: rotate(-90deg);
}

.price-check-quick-tags-wrapper.collapsed .price-check-quick-tags {
    display: none;
}

/* 快速標籤區域 */
.price-check-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 4px;
}

@keyframes quickTagsFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quick-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.quick-tag-chip:hover {
    background: var(--usa-primary-color, linear-gradient(135deg, #ee4d2d 0%, #d73211 100%));
    border-color: var(--usa-primary-color, #ee4d2d);
    color: var(--usa-arrow-color, #ffffff);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(238, 77, 45, 0.3);
}

.quick-tag-chip:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(238, 77, 45, 0.2);
}

.quick-tag-chip::before {
    content: '#';
    font-weight: 600;
    opacity: 0.6;
}

/* 活動狀態的標籤 */
.quick-tag-chip.active {
    background: var(--usa-primary-color, linear-gradient(135deg, #ee4d2d 0%, #d73211 100%));
    border-color: var(--usa-primary-color, #ee4d2d);
    color: var(--usa-arrow-color, #ffffff);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.quick-tag-chip.active::before {
    opacity: 0.8;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 4px 4px 4px 16px;
    transition: all 0.2s ease;
}

/* 搜尋圖標基礎樣式 - Unicode 字符 */
.search-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0 !important;
    width: 20px;
    height: 20px;
    font-size: 18px;
    line-height: 1;
    color: #9ca3af;
    user-select: none;
}

.search-input-wrapper:focus-within {
    border-color: var(--usa-primary-color, #ee4d2d);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

/* Focus 時圖標變色 */
.search-input-wrapper:focus-within .search-icon {
    color: var(--usa-primary-color, #ee4d2d);
}

.price-check-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #1a1a1a;
    outline: none;
    padding: 10px 0;
}

.price-check-input::placeholder {
    color: #9ca3af;
}

/* 清除按鈕 - 使用文字符號更明顯 */
.clear-search-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    color: #ef4444;
    border: 1px solid #fecaca;
    border-radius: 12px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    margin-right: 8px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    font-family: Arial, sans-serif;
}

.clear-search-btn:hover {
    background: #fecaca;
    color: #dc2626;
    border-color: #fca5a5;
    transform: scale(1.05);
}

.clear-search-btn:active {
    background: #fca5a5;
    color: #b91c1c;
    transform: scale(0.98);
}

.search-btn {
    flex-shrink: 0;
    padding: 10px 24px;
    background: var(--usa-primary-color, linear-gradient(135deg, #ee4d2d 0%, #d73211 100%));
    color: #ffffff !important;
    border: none;
    border-radius: 12px !important;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(238, 77, 45, 0.25);
    letter-spacing: 0.5px;
}

.search-btn:hover {
    background: var(--usa-primary-color, linear-gradient(135deg, #ee4d2d 0%, #d73211 100%));
    opacity: 0.9;
    color: var(--usa-arrow-color, #ffffff) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.search-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(238, 77, 45, 0.25);
}

/* 模組內容區 */
.price-check-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 28px;
}

/* 自訂滾動條 */
.price-check-body::-webkit-scrollbar {
    width: 8px;
}

.price-check-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.price-check-body::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

.price-check-body::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* 結果區域 */
.price-check-results {
    min-height: 300px;
}

/* 載入狀態 */
.results-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #ee4d2d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results-loading p {
    font-size: 15px;
    margin: 0;
}

/* 空狀態 */
.results-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6b7280;
    text-align: center;
}

.results-empty svg {
    stroke: #d1d5db;
    margin-bottom: 16px;
}

.results-empty p {
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    max-width: 400px;
}

.results-empty p strong {
    color: #ee4d2d;
    font-weight: 600;
}

/* 結果內容 - 使用 Grid 網格佈局 */
.results-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    animation: fadeIn 0.4s ease;
    width: 100%;
}

/* 完全使用 USA List 商品卡片樣式 - 整張卡片可點擊 */
.results-content .usa-product-card {
    width: 100%;
    min-width: 0;
    margin: 0;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    pointer-events: auto;
    text-decoration: none;
    color: inherit;
}

.results-content .usa-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

/* 商品圖片 */
.results-content .usa-product-image {
    position: relative;
    width: 100%;
    height: 100px;
    overflow: hidden;
    background: #f8f9fa;
}

.results-content .usa-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.results-content .usa-product-card:hover .usa-product-image img {
    transform: scale(1.05);
}

/* 商品內容 */
.results-content .usa-product-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* 商品標題 */
.results-content .usa-product-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1e1e1e;
    margin: 0 0 10px 0;
    line-height: 1.3;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 店家名稱 */
.results-content .usa-product-shop {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

/* 價格區域 */
.results-content .usa-product-price {
    margin-bottom: 12px;
}

.results-content .usa-price-current {
    font-size: 16px !important;
    font-weight: 700;
    color: #cf4d1e;
}

/* 隱藏原價顯示，節省空間 */
.results-content .usa-price-original {
    display: none;
}

.results-content .usa-product-commission {
    background: var(--usa-primary-color, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    color: var(--usa-arrow-color, #ffffff);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 16px;
    display: inline-block;
}

/* 統計資訊 */
.results-content .usa-product-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.results-content .usa-rating-stars {
    color: #ffc107;
    font-size: 14px;
}

.results-content .usa-product-sales {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

/* 查看商品按鈕（視覺用，整張卡片可點擊） */
.results-content .usa-product-actions {
    margin-top: auto;
    padding: 0;
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.results-content .usa-product-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 16px;
    background: var(--usa-primary-color, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    color: var(--usa-arrow-color, #ffffff) !important;
    text-decoration: none !important;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    pointer-events: none;
    position: relative;
    z-index: 1;
}

.results-content .usa-product-card:hover .usa-product-link {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}


/* 黑名單按鈕（管理員可見） */
.results-content .usa-blacklist-button {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
}

.results-content .blacklist-toggle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #ff4757;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    pointer-events: auto !important;
    position: relative;
    z-index: 20;
}

.results-content .blacklist-toggle:hover {
    background: #ff4757;
    color: #fff;
    transform: scale(1.1);
}

.results-content .blacklist-toggle.active {
    background: #2ed573;
    color: #fff;
}

.results-content .blacklist-toggle.active::before {
    content: '✓';
}

/* 翻頁控制（預設隱藏，只在手機版顯示） */
.price-check-pagination-controls {
    display: none;
}

/* 動畫效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   響應式設計 - 平板
   ======================================== */
@media (max-width: 1024px) {
    .price-check-container {
        max-width: 95%;
    }
    
    .results-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .results-content .usa-product-image {
        height: 100px;
    }
    
    .results-content .usa-product-title {
        font-size: 14px;
    }
}

/* ========================================
   響應式設計 - 手機
   ======================================== */
@media (max-width: 768px) {
    .shopee-price-check-modal {
        padding: 0;
    }
    
    @media (max-width: 480px) {
        .price-check-container {
            width: 95%;
            max-height: 95vh;
            border-radius: 16px;
        }
        
        /* 手機版隱藏查看商品按鈕 */
        .results-content .usa-product-actions {
            display: none;
        }
        
        /* 優化商品卡片間距 */
        .results-content .usa-product-card {
            padding: 8px;
            gap: 6px;
        }
        
        /* 優化商品內容間距 */
        .results-content .usa-product-content {
            padding: 8px;
            gap: 4px;
        }
        
        /* 手機版圖片高度與 usa-list 一致 */
        .results-content .usa-product-image {
            height: 100px;
        }
        
        /* 手機版標題樣式與 usa-list 一致 */
        .results-content .usa-product-title {
            font-size: 12px !important;
            min-height: 30px;
            height: auto;
            margin-bottom: 6px;
            line-height: 1.3;
            -webkit-line-clamp: 2;
            line-clamp: 2;
        }
        
        /* 手機版店家名稱 */
        .results-content .usa-product-shop {
            font-size: 10px;
            margin-bottom: 6px;
        }
        
        /* 手機版價格區域 */
        .results-content .usa-product-price {
            margin-bottom: 6px;
            font-size: 12px;
        }
        
        /* 手機版價格 */
        .results-content .usa-price-current {
            font-size: 13px !important;
        }
        
        /* 手機版統計資訊 */
        .results-content .usa-product-stats {
            margin-bottom: 8px;
            font-size: 10px;
        }
        
        /* 手機版分潤標籤 */
        .results-content .usa-product-commission {
            font-size: 10px;
            padding: 3px 6px;
        }
        
        .price-check-header {
            padding: 20px;
        }
    
    .price-check-title {
        font-size: 18px;
    }
    
    .price-check-close {
        width: 39px;
        height: 39px;
    }
    
    .price-check-close::before,
    .price-check-close::after {
        width: 16px;
        height: 2.5px;
    }
    
    .price-check-search {
        padding: 16px 20px;
    }
    
    .search-input-wrapper {
        padding: 4px 4px 4px 12px;
    }
    
    .price-check-input {
        font-size: 14px;
        padding: 8px 0;
    }
    
    .clear-search-btn {
        width: 34px;
        height: 34px;
        margin-right: 6px;
        font-size: 18px;
    }
    
    .search-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .price-check-body {
        padding: 20px;
        padding-bottom: 0;
    }
    
    /* TIPS 彈窗平板版 */
    .price-check-tips-popup {
        top: 70px;
        left: 20px;
        right: 20px;
        padding: 14px 18px;
    }
    
    .price-check-tips-popup .tips-content {
        font-size: 13px;
    }
    
    .price-check-tips-btn {
        width: 21px;
        height: 21px;
        font-size: 13px;
    }
    
    /* 快速標籤平板版 */
    .price-check-quick-tags-wrapper {
        margin-top: 10px;
    }
    
    .quick-tags-toggle {
        padding: 8px 0;
    }
    
    .quick-tags-label {
        font-size: 11px;
    }
    
    .price-check-quick-tags {
        gap: 6px;
        padding-top: 6px;
    }
    
    .quick-tag-chip {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    /* 平板顯示 2 欄 */
    .results-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    .results-content .usa-product-image {
        height: 100px;
    }
    
    .results-content .usa-product-title {
        font-size: 13px;
    }
    
    .results-empty p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .price-check-header {
        padding: 10px 16px;
    }
    
    .price-check-title {
        font-size: 16px;
    }
    
    .price-check-close {
        width: 37px;
        height: 37px;
    }
    
    .price-check-close::before,
    .price-check-close::after {
        width: 15px;
        height: 2.5px;
    }
    
    /* TIPS 手機版 */
    .price-check-tips-popup {
        top: 65px;
        left: 16px;
        right: 16px;
        padding: 12px 16px;
    }
    
    .price-check-tips-popup .tips-content {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .price-check-tips-btn {
        width: 19px;
        height: 19px;
        font-size: 12px;
    }
    
    /* 手機版清除按鈕加大點擊區域 */
    .clear-search-btn {
        min-width: 44px;
        min-height: 44px;
        font-size: 22px;
    }
    
    .price-check-search {
        padding: 12px 16px 10px;
    }
    
    /* 快速標籤手機版 - 預設收縮 */
    .price-check-quick-tags-wrapper {
        margin-top: 8px;
    }
    
    .quick-tags-toggle {
        padding: 8px 0;
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
        border-radius: 8px;
        padding: 8px 12px;
        margin-bottom: 4px;
    }
    
    .quick-tags-toggle:active {
        background: #f3f4f6;
    }
    
    .quick-tags-label {
        font-size: 11px;
        color: #ee4d2d;
    }
    
    .quick-tags-arrow {
        font-size: 12px;
        font-weight: bold;
    }
    
    .price-check-quick-tags {
        gap: 6px;
        padding-top: 6px;
        padding-bottom: 2px;
    }
    
    .quick-tag-chip {
        padding: 6px 12px;
        font-size: 11px;
        border-radius: 16px;
        min-height: 32px; /* 加大點擊區域 */
    }
    
    .search-input-wrapper {
        flex-wrap: wrap;
        padding: 8px;
        gap: 8px;
    }
    
    .price-check-input {
        width: 100%;
        order: 1;
        padding: 8px;
    }
    
    /* 手機版搜尋圖標 - 與桌面版一致 */
    .search-icon {
        order: 0;
    }
    
    /* 手機版 Focus 時圖標變色 */
    .search-input-wrapper:focus-within .search-icon {
        color: var(--usa-primary-color, #ee4d2d);
    }
    
    .clear-search-btn {
        order: 3;
        width: 40px;
        height: 40px;
        margin-right: 0;
        margin-left: auto;
        font-size: 20px;
    }
    
    .search-btn {
        width: 100%;
        order: 4;
        padding: 10px;
    }
    
    .price-check-body {
        padding: 16px;
        padding-bottom: 0;
    }
    
    /* 手機版 - 使用 2x2 滑動頁面（與 usa-list 相同） */
    .results-content {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 0;
        padding: 0 0 20px 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-behavior: smooth;
        align-items: stretch;
    }
    
    .results-content::-webkit-scrollbar {
        display: none;
    }
    
    /* 滑動頁面容器 */
    .results-content .price-check-slide-page {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 8px;
        min-width: 100%;
        max-width: 100%;
        scroll-snap-align: start;
        flex-shrink: 0;
        box-sizing: border-box;
        padding: 0 8px;
        align-items: stretch;
    }
    
    .results-content .usa-product-card {
        width: 100%;
        min-width: 0;
        max-width: none;
        padding: 10px;
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    /* 平板版也隱藏按鈕，節省空間 */
    .results-content .usa-product-actions {
        display: none;
    }
    
    .results-content .usa-product-image {
        height: 100px;
        flex-shrink: 0;
    }
    
    .results-content .usa-product-content {
        padding: 8px 0 0;
        display: flex;
        flex-direction: column;
        gap: 6px;
        flex: 1;
        justify-content: space-between;
    }
    
    .results-content .usa-product-title {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .results-content .usa-product-image {
        height: 100px;
    }
    
    /* 縮小商品標題 */
    .results-content .usa-product-title {
        font-size: 13px;
        line-height: 1.4;
        max-height: 2.8em;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 4px;
    }
    
    /* 縮小店家資訊 */
    .results-content .usa-shop-name {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    /* 縮小價格 */
    .results-content .usa-product-price {
        margin: 4px 0;
    }
    
    .results-content .usa-price-current {
        font-size: 18px !important;
    }
    
    /* 縮小評分區 */
    .results-content .usa-product-rating {
        font-size: 11px;
        gap: 6px;
        margin-top: auto;
    }
    
    .results-content .usa-product-shop {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .results-content .usa-price-current {
        font-size: 16px !important;
    }
    
    .results-content .usa-product-stats {
        font-size: 11px;
    }
    
    .results-content .usa-product-link {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .results-empty {
        padding: 40px 16px;
    }
    
    .results-empty p {
        font-size: 13px;
    }
}
    
    /* 翻頁控制（完全複製 usa-list 樣式）- 只在手機版顯示 */
    .price-check-pagination-controls {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 20px;
        margin-top: 10px;
        padding: 0 12px 12px;
    }
    
    /* 左右箭頭按鈕（與 usa-list 完全相同） */
    .price-check-nav-button {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        border-radius: 50% !important;
        background: var(--usa-primary-color, linear-gradient(135deg, #667eea 0%, #764ba2 100%)) !important;
        border: 2px solid rgba(255, 255, 255, 0.5) !important;
        color: white !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 4px 14px rgba(102, 126, 234, 0.5) !important;
        -webkit-tap-highlight-color: transparent !important;
        position: relative !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        flex-shrink: 0;
    }
    
    .price-check-nav-button::before {
        content: '' !important;
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.2) !important;
        opacity: 0 !important;
        transition: opacity 0.3s ease !important;
    }
    
    .price-check-nav-button:active::before {
        opacity: 1 !important;
    }
    
    .price-check-nav-button:active {
        transform: scale(0.9) !important;
        box-shadow: 0 2px 10px rgba(102, 126, 234, 0.6) !important;
    }
    
    .price-check-nav-button:disabled {
        background: #e0e0e0 !important;
        color: #9e9e9e !important;
        cursor: not-allowed !important;
        box-shadow: none !important;
        opacity: 0.4 !important;
        border-color: transparent !important;
    }
    
    .price-check-nav-button svg {
        width: 22px !important;
        height: 22px !important;
        fill: var(--usa-arrow-color, white) !important;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4)) !important;
        display: block !important;
        pointer-events: none !important;
    }
    
    /* 圓點分頁指示器（與 usa-list 完全相同） */
    .price-check-pagination-dots {
        display: flex;
        gap: 8px;
        align-items: center;
    }
    
    .price-check-pagination-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #d1d5db;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
        flex-shrink: 0;
        will-change: width, background, border-radius;
    }
    
    .price-check-pagination-dot.active {
        width: 28px;
        border-radius: 5px;
        background: var(--usa-primary-color, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
        box-shadow: 0 2px 10px rgba(102, 126, 234, 0.5);
    }
}


/* ========================================
   無障礙支援
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .shopee-price-check-modal,
    .price-check-overlay,
    .price-check-container,
    .loading-spinner {
        animation: none;
        transition: none;
    }
}

