/* 详情页区域 */
body {
    font-family: Arial, sans-serif;
}

/* 画廊项 */
.gallery-item {
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 5px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: scale(1.05);
}

/* 产品主图 */
.product-main-image {
    max-height: 70vh;
    border-radius: 10px; 
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    position: relative; 
    overflow: hidden; 
    margin-bottom: 10px;
}

.product-main-image img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

/* 放大效果区域 */
.zoom-result {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 600px;
    overflow: hidden;
    display: none; /* 可选，若不再使用可移除 */
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 1px solid #ddd;
}

.zoom-result img {
    position: absolute;
    transition: transform 0.1s;
}

/* 产品缩略图 */
.product-thumbnails {
    width: 10%;
    max-height: 70vh;
    overflow-y: auto;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.product-thumbnails::-webkit-scrollbar {
    display: none;
}

.product-thumbnails img {
    width: 100%;
    cursor: pointer;
    margin-bottom: 5px;
}
/* 移动端变体容器 */
@media (max-width: 991.98px) {
    #variationCarousel {
        display: none;
    }
}
.product-main-image img, #variationCarousel .carousel-inner .carousel-item img {
    transition: opacity 0.3s ease;
}

/* 侧边区域 */
.col-lg-5 {
    max-height: 1000px;
    padding: 10px; /* 移除 padding-top: 12px; 的冗余 */
    overflow-y: auto;  
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative; 
}

.col-lg-5::-webkit-scrollbar {
    width: 8px;
}

.col-lg-5::-webkit-scrollbar-thumb {
    background-color: rgba(197, 195, 195, 0.5);
    border-radius: 4px;
}

.col-lg-5::-webkit-scrollbar-track {
    background: transparent;
}
/* 变体缩略图区域 */
.variation-thumbnails {
    display: flex;
    flex-wrap: wrap; /* 允许换行 */
}
.variation-feature {
    flex: 0 0 calc(16.66% - 5px); /* 每行显示6个，包含一些间隙 */
    margin-bottom: 10px; /* 为每个缩略图添加底部间距 */
    cursor: pointer;
}  
.variation-thumb {
    width: 50px; 
    height: 50px; 
    object-fit: cover;
    border-radius: 5px; /* 添加圆角 */
    border: 2px solid transparent; 
    transition: border-color 0.3s; 
}

.variation-feature.active .variation-thumb {
    border-color: rgb(207, 23, 23); /* 选中时的红色边框 */
}
/* 新增 */
.return-to-carousel-btn {
    background-size: cover;
    background-position: center;
    border-radius: 50%; /* 圆形按钮 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* 添加阴影效果 */
}

/* 确保子元素可以使用绝对定位 */

/* 按钮容器 */
.button-container .d-flex {
    width: 100%;
}

.button-container .add-to-cart-button,
.button-container .buy-now-button {
    width: 48%; /* 按钮宽度设置为48% */
}

.button-container .add-to-cart-button {
    background-color: #343a40; /* “加入购物车”按钮背景颜色 */
    border-color: #343a40;
}

.button-container .add-to-cart-button:hover {
    background-color: #23272b; /* 悬停效果 */
    border-color: #1d2124;
}

.button-container .buy-now-button {
    background-color: #007bff; /* “立即购物”按钮背景颜色 */
    border-color: #007bff;
}

.button-container .buy-now-button:hover {
    background-color: #0056b3; /* 悬停效果 */
    border-color: #004085;
}

/* 短描述 */
.product-short-description {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(197, 195, 195, 0.5) transparent;
}

.product-short-description::-webkit-scrollbar {
    width: 8px;
}

.product-short-description::-webkit-scrollbar-thumb {
    background-color: rgba(197, 195, 195, 0.5);
    border-radius: 4px;
}

.product-short-description::-webkit-scrollbar-track {
    background: transparent;
}

/* 轮播指示器 */
.carousel-indicators li {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #888;
}

.carousel-indicators .active {
    background-color: #424040;
}

/* 数量选择器 */
.quantity-container {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-container button {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background-color: white;
    cursor: pointer;
}

.quantity-input {
    text-align: center;
    width: 60px;
    height: 40px;
    line-height: 40px;
    border: 1px solid #ddd;
    margin: 0 10px;
    border-radius: 5px;
    outline: none;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* 媒体查询 */
@media (max-width: 990px) {
    #carouselExampleIndicators {
        display: block;
    }
}

@media (max-width: 768px) {
    .col-lg-5 {
        max-height: none; /* 不限制高度 */
        overflow-y: visible; /* 允许可见 */
    }
}

.container {
    margin-top: 40px;
}

#shop-carousel {
    margin-bottom: 20px;
}

/* 卡片效果 */
.card {
    transition: transform 0.2s;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

/* 短描述效果 */
.short-description {
    overflow: hidden; 
    height: 50px;
    transition: height 0.3s;
}

.short-description:hover {
    height: auto;
    background: white;
    position: absolute;
    z-index: 1;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 按钮样式 */
.btn-primary {
    background-color: #007bff;
    border: none;
}

.btn-primary:hover {
    background-color: #0056b3;
}













