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

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

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

.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo h1 {
    color: #e74c3c;
    font-size: 1.8rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #e74c3c;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-icon {
    position: relative;
    color: #333;
    text-decoration: none;
    font-size: 1.2rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner {
    position: relative;
    height: 400px;
    overflow: hidden;
}

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

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

.banner-content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.banner-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.banner-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin: 3rem 0;
    color: #333;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

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

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.product-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
    display:-webkit-box;
overflow:hidden;
text-overflow:ellipsis;
-webkit-line-clamp:2;
-webkit-box-orient:vertical;
}

.price {
    font-size: 1.5rem;
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 1rem;
}

.btn-primary,
.btn-buy,
.btn-buy-now,
.btn-add-cart,
.btn-upload,
.btn-save,
.btn-submit,
.btn-checkout {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover,
.btn-buy:hover,
.btn-buy-now:hover,
.btn-add-cart:hover,
.btn-upload:hover,
.btn-save:hover,
.btn-submit:hover,
.btn-checkout:hover {
    background-color: #c0392b;
}

.btn-add-cart {
    background-color: #3498db;
    margin-left: 0.5rem;
}

.btn-add-cart:hover {
    background-color: #2980b9;
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-images {
    text-align: center;
}

.main-image img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 10px;
}

.image-upload-section {
    margin-top: 2rem;
    padding: 1rem;
    border: 2px dashed #ddd;
    border-radius: 8px;
}

.file-input {
    margin: 1rem 0;
    width: 100%;
}

.product-info h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.product-price {
    font-size: 2rem;
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 2rem;
}

.merchant-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: end;
}

.merchant-info h3 {
    margin-bottom: 1rem;
    color: #333;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 30px;
}

.product-description {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.description-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.description-upload textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
}

.description-display {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
    min-height: 150px;
}

.merchant-join {
    max-width: 800px;
    margin: 0 auto;
}

.agreement-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.agreement-content {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 5px;
}

.agreement-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.merchant-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.auth-form-container {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.forgot-password {
    color: #e74c3c;
    text-decoration: none;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-switch a {
    color: #e74c3c;
    text-decoration: none;
}

.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.cart-items {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.empty-cart {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-cart i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ddd;
}

.cart-summary {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: fit-content;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.summary-item.total {
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: none;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer a{
	color: #FFFFFF;
	display: block;
	line-height: 40px;
	text-decoration: none;
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .product-detail-content {
        grid-template-columns: 1fr;
    }
    
    .description-content {
        grid-template-columns: 1fr;
    }
    
    .cart-container {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .banner-content {
        left: 5%;
    }
    
    .banner-content h2 {
        font-size: 2rem;
    }
}