/* 會員系統樣式 */

/* 會員卡片容器 */
.member-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
}

.member-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 500px;
    padding: 30px;
}

.member-header {
    text-align: center;
    margin-bottom: 30px;
}

.member-header h1 {
    font-size: 28px;
    color: var(--text-color);
    margin-bottom: 10px;
}

.member-header p {
    color: var(--light-text);
    font-size: 16px;
}

/* 表單樣式 */
.member-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
}

.input-with-icon input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-with-icon input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    padding: 0;
}

.form-hint {
    font-size: 14px;
    color: var(--light-text);
    margin-top: 5px;
}

/* 密碼強度指示器 */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    height: 5px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-level {
    height: 100%;
    width: 0;
    background-color: #ff4d4d;
    transition: width 0.3s, background-color 0.3s;
}

.strength-level.weak {
    width: 33%;
    background-color: #ff4d4d;
}

.strength-level.medium {
    width: 66%;
    background-color: #ffaa00;
}

.strength-level.strong {
    width: 100%;
    background-color: #00cc66;
}

#strength-text {
    font-size: 14px;
    color: var(--light-text);
}

/* 複選框樣式 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color);
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 3px;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary-color);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* 按鈕樣式 */
.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

/* 社交登入 */
.social-login {
    margin-top: 30px;
    text-align: center;
}

.social-login p {
    font-size: 14px;
    color: var(--light-text);
    margin-bottom: 15px;
    position: relative;
}

.social-login p:before,
.social-login p:after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background-color: var(--border-color);
}

.social-login p:before {
    left: 0;
}

.social-login p:after {
    right: 0;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.facebook {
    background-color: #3b5998;
}

.google {
    background-color: #db4437;
}

.line {
    background-color: #00c300;
}

.member-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-color);
}

.member-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.member-footer a:hover {
    text-decoration: underline;
}

/* 會員中心樣式 */
.member-dashboard {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

/* 側邊欄 */
.member-sidebar {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.member-profile {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.edit-avatar {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
}

.profile-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--text-color);
}

.profile-info p {
    font-size: 14px;
    color: var(--light-text);
}

.member-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.member-menu li {
    border-bottom: 1px solid var(--border-color);
}

.member-menu li:last-child {
    border-bottom: none;
}

.member-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.3s;
}

.member-menu a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.member-menu a:hover {
    background-color: #f9f9f9;
}

.member-menu li.active a {
    background-color: var(--primary-color);
    color: white;
}

/* 內容區域 */
.member-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 30px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.tab-header h2 {
    font-size: 24px;
    color: var(--text-color);
    margin: 0;
}

/* 會員總覽 */
.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h2 {
    font-size: 24px;
    color: var(--text-color);
    margin-bottom: 5px;
}

.dashboard-header p {
    font-size: 16px;
    color: var(--light-text);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 15px;
}

.stat-info h3 {
    font-size: 24px;
    color: var(--text-color);
    margin: 0 0 5px;
}

.stat-info p {
    font-size: 14px;
    color: var(--light-text);
    margin: 0;
}

.dashboard-section {
    margin-bottom: 30px;
}

.dashboard-section h3 {
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

/* 訂單表格 */
.order-table {
    width: 100%;
    border-collapse: collapse;
}

.order-table th {
    text-align: left;
    padding: 12px 15px;
    background-color: #f5f5f5;
    color: var(--text-color);
    font-weight: 500;
}

.order-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.pending {
    background-color: #fff8e1;
    color: #ffa000;
}

.status-badge.processing {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-badge.shipping {
    background-color: #e8f5e9;
    color: #388e3c;
}

.status-badge.completed {
    background-color: #e8f5e9;
    color: #388e3c;
}

.status-badge.cancelled {
    background-color: #ffebee;
    color: #d32f2f;
}

/* 優惠券 */
.coupons-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.coupon-card {
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
}

.coupon-amount {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin-right: 15px;
    text-align: center;
}

.currency {
    font-size: 14px;
}

.amount {
    font-size: 24px;
    font-weight: 700;
}

.coupon-info h4 {
    font-size: 16px;
    margin: 0 0 5px;
    color: var(--text-color);
}

.coupon-info p {
    font-size: 14px;
    color: var(--light-text);
    margin: 0 0 5px;
}

.coupon-expiry {
    font-size: 12px;
    color: #d32f2f;
}

/* 訂單查詢 */
.orders-filter {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 5px;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.search-group {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

/* 收藏清單 */
.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.wishlist-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.wishlist-item .remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: white;
    color: #d32f2f;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-info h3 {
    font-size: 16px;
    margin: 0 0 10px;
}

.product-info h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.product-info h3 a:hover {
    color: var(--primary-color);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    font-size: 14px;
    color: var(--light-text);
    text-decoration: line-through;
}

.wishlist-actions {
    padding: 0 15px 15px;
    display: flex;
    gap: 10px;
}

/* 個人資料 */
.profile-form {
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-actions {
    margin-top: 30px;
}

/* 開關按鈕 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + label {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + label:before {
    transform: translateX(26px);
}

/* 收件地址 */
.address-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.address-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    position: relative;
}

.address-card.default {
    border-color: var(--primary-color);
}

.address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.address-header h3 {
    font-size: 16px;
    color: var(--text-color);
    margin: 0;
}

.address-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: var(--text-color);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.edit-address:hover {
    background-color: #e3f2fd;
    color: #1976d2;
}

.delete-address:hover {
    background-color: #ffebee;
    color: #d32f2f;
}

.address-content p {
    margin: 5px 0;
    font-size: 14px;
    color: var(--text-color);
}

.recipient {
    font-weight: 500;
}

.set-default-btn {
    margin-top: 15px;
}

/* 響應式設計 */
@media (max-width: 992px) {
    .member-dashboard {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .coupons-list {
        grid-template-columns: 1fr;
    }
    
    .wishlist-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .address-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .orders-filter {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-group {
        width: 100%;
    }
    
    .search-group input {
        flex: 1;
    }
}

@media (max-width: 576px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .wishlist-grid {
        grid-template-columns: 1fr;
    }
    
    .member-card {
        padding: 20px;
    }
    
    .social-login p:before,
    .social-login p:after {
        width: 25%;
    }
} 