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

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

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

/* Header Styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: #f0f0f0;
}

.cart-icon {
    font-size: 20px;
}

/* Banner Styles */
.banner {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/banner.jpg');
    background-size: cover;
    background-position: center;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.banner-content p {
    font-size: 24px;
}

/* Products Styles */
.products {
    padding: 50px 0;
}

.products h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
}

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

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

.product-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
}

.product-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

.product-item h3 {
    margin-bottom: 10px;
    font-size: 18px;
    display:-webkit-box;
overflow:hidden;
text-overflow:ellipsis;
-webkit-line-clamp:2;
-webkit-box-orient:vertical;

}

.price {
    color: #e74c3c;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background-color: #e0e0e0;
}

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

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

/* Shop Styles */
.shop {
    padding: 50px 0;
}

.shop h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
}

/* Product Detail Styles */
.product-detail {
    padding: 50px 0;
}

.product-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.product-images .main-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 20px;
}

.image-upload {
    text-align: center;
}

.product-details h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

.seller-info {
    margin: 30px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.seller-info h3 {
    margin-bottom: 15px;
}

.product-description {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.product-description h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.description-upload {
    margin-top: 30px;
    text-align: center;
}

/* Join Styles */
.join {
    padding: 50px 0;
}

.join h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
}

.join-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.join-form {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.join-form h2 {
    text-align: left;
    margin-bottom: 30px;
    font-size: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.agreement {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    max-height: 600px;
}

.agreement h3 {
    margin-bottom: 20px;
    font-size: 24px;
}

.agreement-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* Login and Register Styles */
.login,
.register {
    padding: 50px 0;
}

.login-form,
.register-form {
    max-width: 500px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-form h2,
.register-form h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

.login-link,
.register-link {
    text-align: center;
    margin-top: 20px;
}

/* Footer Styles */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

.footer a{
    color: white;
    display: block;
    line-height: 30px;
    text-decoration: none;
    
}

/* Responsive Styles */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 20px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .product-info {
        grid-template-columns: 1fr;
    }

    .join-content {
        grid-template-columns: 1fr;
    }

    .banner-content h2 {
        font-size: 36px;
    }

    .banner-content p {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .banner-content h2 {
        font-size: 28px;
    }

    .banner-content p {
        font-size: 16px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }
}