/* H5購物網站樣式表 - 語系：zh-TW */

/* 重置樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基礎樣式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang TC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #212529;
    background-color: #f8f9fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 50px;
    padding-bottom: 60px;
}

/* 隱藏滾動條但保持功能 */
::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

/* 容器 */
.container {
    max-width: 100%;
    padding: 0 16px;
    margin: 0 auto;
}

/* 頂部導航欄 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}



.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 16px;
}

/* 新的三段式布局 */
.nav-left,
.nav-center,
.nav-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.nav-left {
    justify-content: flex-start;
}

.nav-center {
    justify-content: center;
}

.nav-right {
    justify-content: flex-end;
}

/* 网站标题样式 */
.site-title {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}

.site-title a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #FF6B6B;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-title a:hover {
    color: #e55a5a;
}

/* 导航按钮样式 */
.nav-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.nav-btn i {
    font-size: 14px;
}

/* 保持原有的 logo 样式以兼容其他页面 */
.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #FF6B6B;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.search-box {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 100%;
    height: 32px;
    padding: 0 40px 0 12px;
    border: 1px solid #ddd;
    border-radius: 16px;
    font-size: 14px;
    background: #f5f5f5;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    background: #fff;
    border-color: #FF6B6B;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

.search-box button {
    position: absolute;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icons {
    display: flex;
    gap: 8px;
}

.nav-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.nav-icon:hover {
    background: #f5f5f5;
    color: #FF6B6B;
}

/* 主要內容 */
.main-content {
    min-height: calc(100vh - 110px);
}

/* 輪播圖區域 */
.banner-section {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #f5f5f5;
}

.banner-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.banner-content h2 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 4px;
}

.banner-content p {
    font-size: 14px;
    opacity: 0.9;
}

.banner-indicators {
    position: absolute;
    bottom: 12px;
    right: 16px;
    display: flex;
    gap: 6px;
}

.indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #fff;
    transform: scale(1.2);
}

/* 分類導航 */
.category-nav {
    background: #fff;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.category-container {
    display: flex;
    gap: 16px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.category-item:hover {
    color: #FF6B6B;
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    margin-bottom: 6px;
    transition: transform 0.3s ease;
}

.category-item:hover .category-icon {
    transform: scale(1.1);
}

.category-name {
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
}

/* 區塊標題 */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.section-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.section-header h3 i {
    color: #FF6B6B;
}

.more-link {
    color: #666;
    text-decoration: none;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s ease;
}

.more-link:hover {
    color: #FF6B6B;
}

/* 限時搶購 */
.flash-sale {
    background: #fff;
    margin-top: 8px;
}

.countdown {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #FF6B6B;
}

.countdown .time {
    background: #FF6B6B;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

/* 商品滾動容器 */
.product-scroll {
    display: flex;
    gap: 12px;
    padding: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* 商品網格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
    background: #fff;
}

/* 商品卡片 */
.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    min-width: 140px;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.product-card:active {
    transform: scale(0.98);
}

.product-image {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
}

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

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

.product-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #FF6B6B;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.current-price {
    font-size: 16px;
    font-weight: bold;
    color: #FF6B6B;
}

.original-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.product-rating i {
    color: #ffc107;
}

/* 底部導航欄 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    display: flex;
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666;
    font-size: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item.active {
    color: #FF6B6B;
}

.nav-item i {
    font-size: 18px;
    margin-bottom: 2px;
}

.cart-badge {
    position: absolute;
    top: 8px;
    right: 50%;
    transform: translateX(50%);
    background: #FF6B6B;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    font-weight: bold;
}

/* 返回頂部按鈕 */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: #FF6B6B;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top:hover {
    background: #e55a5a;
    transform: translateY(-2px);
}

.back-to-top.show {
    display: flex;
}

/* 載入中遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: #FF6B6B;
}

.loading-spinner i {
    font-size: 24px;
    margin-bottom: 8px;
}

/* 彈窗樣式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h4 {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #FF6B6B;
}

.modal-body {
    padding: 16px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.contact-item i {
    width: 20px;
    color: #FF6B6B;
    margin-top: 2px;
}

.contact-item strong {
    display: block;
    margin-bottom: 4px;
    color: #333;
}

.contact-item p {
    color: #666;
    margin: 0;
}

/* 響應式設計 */
@media (max-width: 375px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 12px;
    }
    
    .product-card {
        min-width: auto;
    }
    
    .product-image {
        height: 100px;
    }
    
    .product-info {
        padding: 8px;
    }
}

/* 1px邊框解決方案 */
.border-1px::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e5e5;
    transform: scaleY(0.5);
    transform-origin: bottom;
}

/* 觸摸反饋 */
.touch-feedback:active {
    background: rgba(0,0,0,0.05);
}

/* 骨架屏動畫 */
@keyframes skeleton {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton 1.5s infinite;
}

/* 區塊間距 */
.hot-products,
.new-products {
    background: #fff;
    margin-top: 8px;
}

/* 商品詳情頁樣式 */
.product-detail {
    background: #f5f5f5;
    min-height: 100vh;
    padding-bottom: 80px;
}

.product-gallery {
    background: #fff;
    position: relative;
}

.gallery-main {
    position: relative;
    width: 100%;
    height: 375px;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.indicator.active {
    background: #fff;
    transform: scale(1.2);
}

.product-info-section {
    background: #fff;
    margin-top: 8px;
    padding: 16px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin-bottom: 8px;
}

.product-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.price-section {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.current-price {
    font-size: 24px;
    font-weight: 700;
    color: #FF6B6B;
}

.original-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
}

.discount-badge {
    background: #FF6B6B;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.rating-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ffc107;
    font-size: 14px;
}

.rating-text {
    font-size: 14px;
    color: #666;
}

.highlights {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.highlights h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.highlight-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.highlight-list li {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
    position: relative;
    padding-left: 12px;
}

.highlight-list li::before {
    content: '•';
    color: #4CAF50;
    position: absolute;
    left: 0;
}

.specs-section {
    background: #fff;
    margin-top: 8px;
    padding: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

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

.spec-label {
    font-size: 14px;
    color: #666;
}

.spec-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* 描述區塊 */
.description-section {
    background: #fff;
    margin-top: 8px;
    padding: 16px;
}

.description-content {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* 操作按鈕 */
.action-buttons {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 12px 16px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    z-index: 100;
}

.btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-primary {
    background: #FF6B6B;
    color: #fff;
}

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

.btn:active {
    transform: scale(0.98);
}

/* 商品詳情頁面樣式 */
.product-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background: #fff;
    margin: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image {
    width: 100%;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
}

.image-thumbnails img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.image-thumbnails img:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

.product-info h1 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 28px;
    font-weight: 700;
    color: #FF6B6B;
}

.original-price {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
}

.discount {
    background: #FF6B6B;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.product-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating i.fas.fa-star {
    color: #ddd;
    font-size: 16px;
}

.rating i.fas.fa-star.active {
    color: #ffc107;
}

.rating span {
    color: #666;
    font-size: 14px;
}

.sales {
    color: #666;
    font-size: 14px;
}

.product-description {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #555;
}

.product-features {
    margin-bottom: 20px;
}

.product-features h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.product-features ul {
    list-style: none;
    padding: 0;
}

.product-features li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: #555;
    position: relative;
    padding-left: 20px;
}

.product-features li:before {
    content: "•";
    color: #007bff;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.quantity-selector label {
    font-weight: 600;
    color: #333;
}

.quantity-selector button {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-selector button:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.quantity-selector input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.stock-info {
    color: #666;
    font-size: 14px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
}

.delivery-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.delivery-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
}

.delivery-item i {
    color: #28a745;
    font-size: 16px;
    width: 20px;
}

.product-specifications {
    background: #fff;
    margin: 10px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.product-specifications h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.product-specifications table {
    width: 100%;
    border-collapse: collapse;
}

.product-specifications td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.product-specifications td:first-child {
    font-weight: 600;
    color: #333;
    width: 30%;
}

.product-specifications td:last-child {
    color: #555;
}

.product-faq {
    background: #fff;
    margin: 10px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.product-faq h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.faq-item {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.faq-question {
    margin-bottom: 8px;
}

.faq-question strong {
    color: #333;
}

.faq-answer {
    color: #555;
    line-height: 1.5;
}

/* 訂單成功頁面樣式 */
.success-container {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    margin: 20px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

/* 為訂單成功頁面的主要內容添加底部內邊距 */
.order-success-page .main-content {
    padding-bottom: 150px;
}

/* 確保客服信息區域有足夠的底部間距 */
.order-success-page .customer-service {
    margin-bottom: 40px;
}



.success-icon {
    width: 80px;
    height: 80px;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: successPulse 1.5s ease-in-out;
}

.success-icon i {
    font-size: 36px;
    color: #fff;
}

@keyframes successPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.success-message {
    color: #666;
    font-size: 16px;
    margin-bottom: 0;
}

.order-info-card {
    background: #fff;
    margin: 20px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-basic-info {
    padding: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: #666;
    font-size: 14px;
}

.info-row .value {
    color: #333;
    font-weight: 500;
}

.order-no-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-no {
    font-family: monospace;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.copy-btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 24px;
}

.copy-btn:hover {
    background: #0056b3;
}

.copy-btn:active {
    transform: scale(0.95);
}

.status-pending {
    color: #ffc107;
    background: #fff3cd;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.delivery-info-section,
.order-items-section {
    padding: 20px;
    border-top: 1px solid #eee;
}

.delivery-info-section h3,
.order-items-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delivery-details p {
    margin: 8px 0;
    color: #555;
    line-height: 1.5;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
}

.item-details {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #666;
}

.item-total {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.amount-summary {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: #555;
}

.summary-row.total {
    border-top: 1px solid #ddd;
    margin-top: 8px;
    padding-top: 12px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.delivery-timeline {
    background: #fff;
    margin: 20px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    padding: 20px;
}

.delivery-timeline h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 30px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.timeline-item.active .timeline-icon {
    background: #28a745;
    color: #fff;
}

.timeline-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.timeline-content p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.action-buttons {
    display: flex;
    gap: 12px;
    padding: 20px;
    justify-content: center;
}

.customer-service {
    background: #fff;
    margin: 20px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    padding: 20px;
    text-align: center;
}

.customer-service h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.customer-service p {
    color: #666;
    margin-bottom: 15px;
}

.screenshot-tip {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #1565c0;
    line-height: 1.4;
}

.screenshot-tip i {
    color: #1976d2;
    margin-top: 2px;
    flex-shrink: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #555;
    font-size: 14px;
}

.contact-item i {
    color: #007bff;
    width: 16px;
}

/* 商品列表頁面樣式 */
.products-page .main-content {
    padding-bottom: 100px;
}

.search-bar {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-bar.active {
    max-height: 80px;
    padding: 16px 0;
}

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

.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
}

.search-input:focus {
    border-color: #FF6B6B;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

.search-submit {
    background: #FF6B6B;
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-submit:hover {
    background: #e55a5a;
}

/* 篩選區域樣式 */
.filter-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 18px 0;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

.filter-controls {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-item {
    flex: 1;
    min-width: 160px;
    max-width: 200px;
}

.filter-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.modern-select {
    width: 100%;
    height: 42px;
    padding: 0 35px 0 15px;
    border: 2px solid #e9ecef;
    border-radius: 21px;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    color: #495057;
    outline: none;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.modern-select:hover {
    border-color: #ced4da;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.modern-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.select-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 12px;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.modern-select:focus + .select-icon {
    transform: translateY(-50%) rotate(180deg);
    color: #007bff;
}

/* 選中狀態樣式 */
.modern-select option:checked {
    background: #007bff;
    color: white;
}

/* 當選擇器有值時的樣式 */
.modern-select:not([value=""]):valid {
    border-color: #007bff;
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
}

.filter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.category-filter,
.sort-filter {
    flex: 1;
}

.category-filter select,
.sort-filter select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    outline: none;
}

.results-info {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.results-count {
    color: #666;
    font-size: 14px;
}

.search-term {
    color: #FF6B6B;
    font-size: 14px;
    font-weight: 500;
}

.products-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

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

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #FF6B6B;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.out-of-stock {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.product-price {
    margin-bottom: 12px;
}

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: #FF6B6B;
}

.original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.stock-info,
.sales-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-products i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 20px;
}

.no-products h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.pagination {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.page-btn {
    padding: 10px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background: #f8f9fa;
    border-color: #FF6B6B;
    color: #FF6B6B;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-number:hover,
.page-number.active {
    background: #FF6B6B;
    border-color: #FF6B6B;
    color: white;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .filter-container {
        flex-direction: column;
        gap: 10px;
    }

    .results-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .filter-controls {
        gap: 10px;
    }

    .filter-item {
        max-width: none;
        min-width: auto;
    }

    .search-input {
        font-size: 16px; /* 防止 iOS 縮放 */
    }

    /* 小屏幕下隐藏按钮文字 */
    .nav-btn span {
        display: none;
    }

    .nav-btn {
        padding: 8px;
        border-radius: 50%;
    }

    .site-title {
        font-size: 14px;
    }

    .site-title span {
        font-size: 14px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }

    .page-btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    .page-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

/* 工具類 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none !important; }
.visible { display: block !important; }
