/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

a {
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

a:hover {
    color: #6c63ff;
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #6c63ff;
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(108, 99, 255, 0.2);
}

.btn:hover {
    background-color: #5a52d5;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(108, 99, 255, 0.3);
}

/* Header Styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.announcement-bar {
    background-color: #6c63ff;
    color: #fff;
    padding: 8px 0;
    font-size: 14px;
    text-align: center;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: #222;
    letter-spacing: 2px;
}

.search-bar {
    flex: 1;
    margin: 0 30px;
}

.search-bar form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.search-bar input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #eee;
    border-radius: 30px;
    outline: none;
    font-size: 15px;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    border-color: #6c63ff;
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.1);
}

.search-bar button {
    position: absolute;
    right: 5px;
    top: 5px;
    padding: 8px 15px;
    background-color: #6c63ff;
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-bar button:hover {
    background-color: #5a52d5;
}

.user-actions {
    display: flex;
    align-items: center;
}

.user-actions a {
    margin-left: 20px;
    font-size: 20px;
    position: relative;
    color: #555;
    transition: all 0.3s ease;
}

.user-actions a:hover {
    color: #6c63ff;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #6c63ff;
    color: #fff;
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.main-nav li {
    position: relative;
    margin: 0 10px;
}

.main-nav a {
    padding: 10px 15px;
    font-weight: 500;
    font-size: 15px;
    position: relative;
}

.main-nav a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #6c63ff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.main-nav a:hover:after {
    width: 80%;
}

.main-nav a:hover {
    color: #6c63ff;
}

/* Main Content Area */
main {
    padding: 40px 0;
}

/* Homepage Styles */
.hero {
    background-color: #f0f2ff;
    padding: 80px 0;
    margin-bottom: 60px;
    text-align: center;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.hero:before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: rgba(108, 99, 255, 0.1);
    z-index: 0;
}

.hero:after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background-color: rgba(108, 99, 255, 0.05);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 42px;
    margin-bottom: 20px;
    font-weight: 700;
    color: #333;
}

.hero p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.featured-section {
    margin-bottom: 60px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    font-weight: 600;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #6c63ff;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(108, 99, 255, 0.1);
}

.product-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

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

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

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #6c63ff;
    color: #fff;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 4px 8px rgba(108, 99, 255, 0.2);
}

.product-actions {
    position: absolute;
    right: 15px;
    top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.action-btn:hover {
    background-color: #6c63ff;
    color: #fff;
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-weight: 700;
    font-size: 20px;
    color: #6c63ff;
}

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

.discount {
    color: #ff6b6b;
    font-size: 14px;
    font-weight: 600;
}

.product-rating {
    margin-top: 12px;
    display: flex;
    align-items: center;
}

.stars {
    color: #ffb100;
    margin-right: 5px;
}

.rating-count {
    font-size: 13px;
    color: #888;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
}

.category-card {
    position: relative;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
}

.category-card:hover .category-overlay {
    background: linear-gradient(to top, rgba(108, 99, 255, 0.7) 0%, rgba(108, 99, 255, 0.4) 100%);
}

.category-name {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.category-card:hover .category-name {
    transform: translateY(-5px);
}

/* Footer Styles */
footer {
    background-color: #1a1a2e;
    color: #fff;
    padding: 0 0 20px;
    position: relative;
}

.newsletter-banner {
    background-color: #6c63ff;
    padding: 40px 0;
    margin-bottom: 60px;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 600;
}

.newsletter-content p {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 30px 0 0 30px;
    outline: none;
    font-size: 15px;
}

.newsletter-form .btn {
    padding: 15px 25px;
    border-radius: 0 30px 30px 0;
    background-color: #1a1a2e;
    box-shadow: none;
}

.newsletter-form .btn:hover {
    background-color: #333;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
    font-weight: 600;
    color: #fff;
}

.footer-section h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: #6c63ff;
}

.footer-section p {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.contact p {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    color: rgba(255, 255, 255, 0.7);
}

.contact p i {
    margin-right: 15px;
    color: #6c63ff;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.socials {
    display: flex;
    margin-top: 25px;
}

.socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.socials a:hover {
    background-color: #6c63ff;
    transform: translateY(-3px);
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-section ul li a:hover {
    color: #fff;
    transform: translateX(5px);
}

.payment-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.payment-icons i {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.payment-icons i:hover {
    color: #6c63ff;
    transform: scale(1.1);
}

.payment-text {
    margin-top: 15px;
}

.payment-text p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    font-style: italic;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* Profile Page Styles */
.profile-container {
    margin-bottom: 60px;
}

.profile-header {
    background-color: #f0f2ff;
    padding: 40px 0;
    margin-bottom: 40px;
}

.profile-header h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

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

.breadcrumb a {
    color: #6c63ff;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background-color: #e3fcef;
    color: #0c6b58;
    border-left: 4px solid #0c6b58;
}

.alert-error {
    background-color: #fee2e2;
    color: #b91c1c;
    border-left: 4px solid #b91c1c;
}

.profile-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

.profile-sidebar {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden;
}

.user-info {
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 4px solid #f0f2ff;
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.2);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-since {
    font-size: 13px;
    color: #888;
}

.profile-nav ul {
    padding: 15px 0;
}

.profile-nav li {
    position: relative;
}

.profile-nav li.active {
    background-color: #f0f2ff;
}

.profile-nav li.active a {
    color: #6c63ff;
    font-weight: 500;
}

.profile-nav li.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: #6c63ff;
}

.profile-nav a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: #555;
    transition: all 0.3s ease;
}

.profile-nav a:hover {
    color: #6c63ff;
    background-color: #f8f9fa;
}

.profile-nav a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.profile-main {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 30px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.dashboard-welcome {
    margin-bottom: 30px;
}

.dashboard-welcome h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.dashboard-welcome p {
    color: #666;
    line-height: 1.6;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background-color: #6c63ff;
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 15px;
}

.stat-info h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;
}

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

.recent-orders h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

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

.orders-table th {
    background-color: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #eee;
}

.orders-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    color: #555;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
}

.status-delivered {
    background-color: #e3fcef;
    color: #0c6b58;
}

.status-processing {
    background-color: #e0f2fe;
    color: #0369a1;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #b91c1c;
}

.btn-sm {
    display: inline-block;
    padding: 6px 12px;
    background-color: #6c63ff;
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-sm:hover {
    background-color: #5a52d5;
    color: #fff;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #6c63ff;
    color: #6c63ff;
}

.btn-outline:hover {
    background-color: #6c63ff;
    color: #fff;
}

.view-all {
    display: inline-block;
    margin-top: 10px;
}

.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.wishlist-item {
    display: flex;
    background-color: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.wishlist-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.wishlist-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

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

.wishlist-info {
    padding: 15px;
    flex-grow: 1;
}

.wishlist-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.wishlist-info .category {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.wishlist-info .price {
    font-size: 16px;
    font-weight: 700;
    color: #6c63ff;
    margin-bottom: 10px;
}

.wishlist-actions {
    display: flex;
    gap: 10px;
}

.addresses-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.address-card {
    background-color: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.address-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.address-header {
    background-color: #6c63ff;
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.address-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.address-content {
    padding: 15px;
    color: #555;
}

.address-content p {
    margin-bottom: 8px;
}

.add-address {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 12px;
    min-height: 150px;
    border: 2px dashed #ddd;
    transition: all 0.3s ease;
}

.add-address:hover {
    border-color: #6c63ff;
}

.add-address-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-form {
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: #6c63ff;
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.1);
    outline: none;
}

.form-actions {
    margin-top: 30px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .search-bar {
        margin: 15px 0;
        width: 100%;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .profile-content {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
    }
    
    .search-bar {
        margin: 15px 0;
        width: 100%;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .wishlist-grid,
    .addresses-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: #6c63ff;
    border-color: #6c63ff;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(108, 99, 255, 0.2);
}

.page-link.active {
    background-color: #6c63ff;
    border-color: #6c63ff;
    color: #fff;
    font-weight: 600;
}

.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    color: #666;
    font-size: 14px;
    font-weight: bold;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination {
        gap: 4px;
    }
    
    .page-link {
        min-width: 35px;
        height: 35px;
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .page-ellipsis {
        min-width: 35px;
        height: 35px;
    }
}
