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

    margin-top: 50px;

}

.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    /* margin-top: 30px; */


}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background-color: #faf8ff;

    width: 380px;


    /* display: flex;
    justify-content: center;
    align-items: center */
}

.product-card img {
    width: 100%;
    height: 300px;
}

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

/* .product-image {
    width: 300px;
    height: 250px;
    object-fit: cover;


} */


.product-image {
    width: 100%;
    /* max-width: 180px; */
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .product-image {
        max-width: 120px;
    }
}

.primg {
    width: 100%;
    height: 300px;
    background-color: white;
}

.product-info {
    padding: 20px;

}

.product-title {
    /* margin-top: 50px; */
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.product-description {
    color: #666;
    margin-bottom: 15px;
}

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

.product-rating {
    color: #f39c12;
    margin: 10px 0;
}

.btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 10px;
}

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

/* 二维码弹窗样式 */
.qr-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.qr-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.qr-modal-header {
    margin-bottom: 20px;
}

.qr-modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.qr-modal-subtitle {
    color: #666;
    font-size: 0.9rem;
}

.qr-code-container {
    margin: 20px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    background-color: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.qr-modal-close:hover {
    color: #333;
}

.qr-modal-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.qr-modal-footer p {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .qr-modal-content {
        padding: 20px;
        max-width: 350px;
    }

    .qr-code {
        width: 150px;
        height: 150px;
    }

    .qr-modal-title {
        font-size: 1.3rem;
    }
}