/* ========== 統一帳戶頁面樣式（購物車、訂單、收藏） ========== */

/* 通用頁面容器 */
.account-page-section {
    padding: 40px 0;
    background: #f8f9fa;
    min-height: 60vh;
}

/* 統一頁面標題區域 */
.account-page-header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.account-page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-page-header h1 i {
    color: #4CAF50;
    font-size: 1.2em;
}

.account-page-breadcrumb {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-page-breadcrumb a {
    color: #4CAF50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.account-page-breadcrumb a:hover {
    color: #45A049;
    text-decoration: underline;
}

.account-page-breadcrumb span {
    color: #999;
}

/* 統一卡片樣式 */
.account-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.account-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* 收藏清單頁面商品卡片樣式 - 覆蓋 main.css 中的動畫效果 */
.account-card .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.account-card .product-card {
    opacity: 1 !important; /* 覆蓋 main.css 中的 opacity: 0 */
    transform: translateY(0) !important; /* 覆蓋 main.css 中的 transform */
    animation: none !important; /* 禁用動畫 */
}

/* 統一按鈕樣式 */
.account-btn-primary {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.account-btn-primary:hover {
    background: linear-gradient(135deg, #45A049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    color: white;
    text-decoration: none;
}

.account-btn-secondary {
    background: white;
    color: #4CAF50;
    border: 2px solid #4CAF50;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.account-btn-secondary:hover {
    background: #4CAF50;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
    text-decoration: none;
}

.account-btn-outline {
    background: transparent;
    color: #666;
    border: 2px solid #ddd;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.account-btn-outline:hover {
    border-color: #4CAF50;
    color: #4CAF50;
    background: #f0f8f0;
    text-decoration: none;
}

/* 統一空狀態顯示 */
.account-empty-state {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 80px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 空狀態共用圖示與半透明浮動購物按鈕 */
.empty-state-visual {
    position: relative;
    width: 120px;
    height: 108px;
    margin: 0 auto 2px;
    display: grid;
    place-items: center;
}

.empty-state-visual > i {
    display: block;
    margin: 0;
    font-size: 5rem;
    line-height: 1;
    color: #e6e6e6;
    opacity: .8;
}

.empty-state-copy {
    position: absolute;
    inset: 50% 0 auto;
    z-index: 1;
    transform: translateY(-50%);
    padding: 8px 14px;
    text-align: center;
}

.account-empty-state .empty-state-copy h3 {
    position: static;
    transform: none;
    margin: 0 0 8px;
    color: #213d35;
    font-size: 1.4rem;
    font-weight: 700;
}

.account-empty-state .empty-state-copy p {
    max-width: 380px;
    margin: 0 auto;
    color: #64746e;
    font-size: .95rem;
    line-height: 1.6;
}

.empty-state-copy {
    position: static;
    transform: none;
    padding: 0;
}

.empty-state-new-action {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid #284d43;
    border-radius: 7px;
    background: rgba(255, 255, 255, .76);
    color: #284d43;
    opacity: .72;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    margin-top: 5px;
    box-shadow: 0 3px 8px rgba(33, 61, 53, .08);
    transition: background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.empty-state-new-action i {
    font-size: 1rem;
    line-height: 1;
}

.empty-state-new-action:hover {
    background: #284d43;
    color: #fff;
    opacity: .96;
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(33, 61, 53, .16);
}

.empty-state-new-action:focus-visible {
    outline: 3px solid rgba(40, 77, 67, .22);
    outline-offset: 3px;
}

.empty-state-action {
    position: relative;
    z-index: 1;
    display: flex;
    width: fit-content;
    margin: -4px auto 21px;
    min-height: 42px;
    padding: 10px 15px;
    border: 1px solid rgba(76, 175, 80, .8);
    background: rgba(76, 175, 80, .9);
    opacity: .92;
    transform: translateY(0);
    box-shadow: 0 5px 14px rgba(76, 175, 80, .2);
    white-space: nowrap;
}

.empty-state-action:hover {
    background: rgba(69, 160, 73, .96);
    transform: translateY(-1px);
}

.empty-state-action i {
    display: inline-block;
    margin: 0;
    font-size: .95rem;
    line-height: 1;
    color: inherit;
    opacity: 1;
}

.account-empty-state > i {
    font-size: 5rem;
    color: #e0e0e0;
    margin-bottom: 25px;
    display: block;
    opacity: 0.6;
}

.account-empty-state h3,
.account-empty-state h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

/* 簡約空狀態：收藏與訂單共用相同結構 */
.compact-empty-state {
    max-width: 760px;
    min-height: 148px;
    margin: 0 auto;
    padding: 24px 28px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border: 1px solid #e1e8e4;
    border-radius: 12px;
    background: white;
    box-shadow: none;
    text-align: left;
}

.account-empty-state.compact-empty-state > i,
.compact-empty-state > i {
    width: 44px;
    height: 44px;
    margin: 0;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #edf5f1;
    color: #24795d;
    font-size: 1.3rem;
    opacity: 1;
}

.compact-empty-copy h2 {
    margin: 0 0 5px;
    color: #213d35;
    font-size: 1.05rem;
    font-weight: 650;
}

.account-empty-state.compact-empty-state .compact-empty-copy p,
.compact-empty-copy p {
    margin: 0;
    color: #64746e;
    font-size: .875rem;
    line-height: 1.55;
}

.compact-empty-action {
    min-height: 42px;
    padding: 10px 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #bdd2c8;
    border-radius: 8px;
    background: white;
    color: #17634b;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.compact-empty-action i {
    font-size: .875rem;
}

.compact-empty-action:hover {
    border-color: #18745b;
    background: #f2f7f4;
    color: #125d48;
}

.compact-empty-action:focus-visible {
    outline: 3px solid rgba(24, 116, 91, 0.25);
    outline-offset: 2px;
}

.account-empty-state p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* 統一狀態標籤 */
.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.confirmed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-badge.processing {
    background: #cce5ff;
    color: #004085;
}

.status-badge.shipped {
    background: #e2e3e5;
    color: #383d41;
}

.status-badge.delivered,
.status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.status-badge.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.refunded {
    background: #e2e3e5;
    color: #383d41;
}

.status-badge.paid {
    background: #d4edda;
    color: #155724;
}

.status-badge.unpaid {
    background: #fff3cd;
    color: #856404;
}

/* 統一價格顯示 */
.account-price {
    font-size: 18px;
    font-weight: 700;
    color: #4CAF50;
}

.account-price-large {
    font-size: 24px;
    font-weight: 700;
    color: #4CAF50;
}

.account-price-small {
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .account-page-section {
        padding: 20px 0;
    }
    
    .account-page-header {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .account-page-header h1 {
        font-size: 24px;
    }
    
    .account-empty-state {
        padding: 60px 20px;
    }
    
    .empty-state-visual {
        width: 100px;
        height: 92px;
    }

    .empty-state-visual > i {
        font-size: 4.2rem;
    }

    .empty-state-action {
        margin-top: -2px;
    }
    
    .account-empty-state h3,
    .account-empty-state h2 {
        font-size: 20px;
    }
    
    .account-btn-primary,
    .account-btn-secondary,
    .account-btn-outline {
        padding: 10px 18px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .account-page-header {
        padding: 15px;
    }
    
    .account-page-header h1 {
        font-size: 20px;
    }
    
    .account-empty-state {
        padding: 40px 15px;
    }
    
    .empty-state-visual {
        width: 92px;
        height: 86px;
    }

    .empty-state-visual > i {
        font-size: 3.8rem;
    }

    .empty-state-action {
        margin-top: -2px;
    }

    .empty-state-copy h3 { font-size: 1.15rem; }
    .empty-state-copy p { font-size: .85rem; }
    
    .account-empty-state h3,
    .account-empty-state h2 {
        font-size: 18px;
    }
    
    .account-empty-state p {
        font-size: 14px;
    }

    .compact-empty-state {
        min-height: 0;
        padding: 20px;
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 14px;
    }

    .account-empty-state.compact-empty-state > i,
    .compact-empty-state > i {
        width: 40px;
        height: 40px;
    }

    .compact-empty-action {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 44px;
    }
}
