.details-row{
    margin-top: 20px;
}

.slider {
    margin: 0 auto;

}

.slides video {
    height:400px;
    display: none;
    margin:0 auto;
}

.slides img {
    height:400px;

    display: none;
    margin:0 auto;
}
.slides video.active {
    display: block;
}

.slides img.active {
    display: block;
}

.thumbnails {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.thumbnails img {
    width: 80px;
    margin: 0 5px;
    cursor: pointer;
    opacity: 0.6;
}

.thumbnails img.active {
    opacity: 1;
    border: 2px solid #333;
}



 .carousel-container {
     max-width: 500px;
     margin: 0 auto;
 }
.main-carousel {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    cursor: zoom-in;
    aspect-ratio: 1/1; /* 确保容器也是正方形 */
    max-height: 500px; /* 限制最大高度 */
}
.carousel-item {
    height: 0;
    padding-bottom: 100%; /* 1:1 比例的正方形 */
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}
.carousel-item img,
.carousel-item .video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* 保持图片比例，完整显示 */
    background-color: #fff;
}

/* 视频容器也需要调整为正方形 */
.video-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
}
/* 确保模态框中的图片也是正方形 */
#imageViewerModal .modal-body img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.video-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* 保持视频比例 */
}

/* 响应式调整 - 让正方形在不同屏幕下都合适 */
@media (min-width: 1200px) {
    .carousel-container {
        max-width: 450px;
    }
    .main-carousel {
        max-height: 450px;
    }
}

@media (max-width: 1199px) and (min-width: 992px) {
    .carousel-container {
        max-width: 400px;
    }
    .main-carousel {
        max-height: 400px;
    }
}

@media (max-width: 991px) and (min-width: 768px) {
    .carousel-container {
        max-width: 350px;
    }
    .main-carousel {
        max-height: 350px;
    }
}

@media (max-width: 767px) {
    .carousel-container {
        max-width: 100%;
        padding: 0 15px;
    }
    .main-carousel {
        max-height: 350px;
    }
}

@media (max-width: 576px) {
    .main-carousel {
        max-height: 300px;
    }
}

.thumbnail-carousel {
    padding: 0 40px;
}
.thumbnail-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0;
}
.thumbnail-item {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    margin-right: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.3s ease;
}
.thumbnail-item.active {
    border-color: #0d6efd;
    opacity: 1;
}
.thumbnail-item:hover {
    opacity: 1;
}
.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.thumbnail-item.video-thumbnail {
    position: relative;
}
.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 20px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.thumbnail-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 30px;
    height: 60px;
    z-index: 1;
    cursor: pointer;
}
.thumbnail-prev {
    left: 0;
}
.thumbnail-next {
    right: 0;
}
/* �Ŵ���ʽ */
.img-magnifier-glass {
    position: absolute;
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: none;
    width: 150px;
    height: 150px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    background-repeat: no-repeat;
    display: none;
    z-index: 100;
    pointer-events: none;
}

.product-name{
    padding: 10px;
}
.product-money{
    padding: 20px 10px;
}
.product-brief{
    padding: 10px;
}





.view-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.view-icon svg {
    color: white;
    width: 16px;
    height: 16px;
}


@media (max-width: 768px) {
    .variant-option {
        position: relative;
    }

    .variant-option:hover .view-icon,
    .variant-option:active .view-icon,
    .view-icon {
        opacity: 1;
    }
}


@media (min-width: 769px) {
    .variant-option {
        position: relative;
    }

    .variant-option:hover .view-icon {
        opacity: 1;
    }
}


#imagePreviewModal .modal-content {
    background-color: transparent;
    border: none;
}

#imagePreviewModal .modal-header {
    border: none;
    justify-content: flex-end;
}

#imagePreviewModal .btn-close {
    filter: invert(1);
    opacity: 0.8;
}



.product-variants {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
    font-family: Arial, sans-serif;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    margin: 15px 0 10px;
    color: #333;
}


.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}


.variant-option {
    position: relative;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.variant-option:hover {
    border-color: #bbb;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.variant-option.active {
    border-color: #1a73e8;
    background-color: #e8f0fe;
}


.variant-img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    border-radius: 3px;
    object-fit: cover;
}


.variant-text {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}


.preview-icon {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.preview-icon svg {
    color: white;
}

.variant-option:hover .preview-icon {
    opacity: 1;
}


.image-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
}

.modal-content {
    position: relative;
    z-index: 2;
    max-width: 90%;
    max-height: 90%;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
}


@media (min-width:600px) {
    .goods-container{
        margin-top:48px;
    }
}

@media (max-width: 600px) {
    .image-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform:none;
    }
    .variant-options {
        gap: 8px;
    }

    .variant-option {
        padding: 6px 10px;
    }

    .variant-img {
        width: 40px;
        height: 40px;
        margin-right: 8px;
    }

    .variant-text {
        font-size: 13px;
    }

    .preview-icon {
        opacity: 1;
        width: 18px;
        height: 18px;
    }
}



/* 确保购物车按钮与其他元素高度一致 */
.add-cart {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-top-left-radius: 5px !important;
    border-bottom-left-radius: 5px !important;
    margin-left:10px !important;
}





.payment-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /*max-width: 300px;*/
    margin: 20px 0 20px 10px;
}


.payment-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


.payment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}


.payment-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}


.payment-icon {
    display: flex;
    align-items: center;
    margin-right: 10px;
}


/* NowPay 按钮 */
.nowpay-btn {
    background-color: #3d4d9e;
    color: white;
}

.nowpay-btn:hover {
    background-color: #25358e;
}


@media (max-width: 480px) {
    .payment-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .payment-icon svg {
        width: 20px;
        height: 20px;
    }
}



.comment-section {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
}
.comment {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}
.comment:last-child {
    border-bottom: none;
}
.comment-author {
    margin-bottom: 5px;
}

.comment-content {
    margin-top: 5px;
}
#commentForm {
    margin-top: 20px;
}
.ql-editor {
    min-height: 200px;
}


