/* 基础样式 */
.shop-details {
    padding: 20px;
}

.product-details-content {
    margin-bottom: 30px;
}

.slider-content {
    position: relative;
}

.image-inner {
    display: flex;
    gap: 20px;
}

.slider-pager {
   width: auto;
    position: relative;
}

.thumb-box {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.thumb-box li {
    margin-bottom: 10px;
}

.thumb-box img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumb-box a.active img {
    border-color: #ffc107;
}

.image-box {
    flex: 1;
}

.image-box img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.scroll-btn {
    position: absolute;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 5px;
    cursor: pointer;
    z-index: 10;
}

.scroll-up {
    top: 0;
}

.scroll-down {
    bottom: 0;
}

.scroll-btn .mobile-icon {
    display: none;
}

.content-box {
    padding: 20px;
}

.upper-text {
    color: #666;
    margin-bottom: 10px;
}

.content-box h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.content-box h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
}

.attribute-box {
    margin-bottom: 20px;
}

.attribute-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.attribute-list li {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
}

.addto-cart-box {
    margin-top: 30px;
}

.quantity-row {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.quantity-row span:first-child {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-right: 0;
}

.bootstrap-touchspin {
    display: inline-flex;
    align-items: center;
}

.stock-info {
    font-size: 14px;
    color: #666;
    margin-left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.stock-info span:first-child {
    font-weight: 600;
    margin-right: 0;
}

.theme-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-one {
    background-color: #ffc107;
    color: #fff;
}

.btn-two {
    background-color: #333;
    color: #fff;
    margin-left: 10px;
}

.product-discription {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.tab-btns {
    margin-bottom: 20px;
}

.nav-tabs {
    border-bottom: 1px solid #ddd;
}

.nav-tabs .nav-link {
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link.active {
    border-color: #ddd #ddd #fff;
    font-weight: 600;
}

.tab-content {
    padding: 20px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
}

.specification-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.specification-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.specification-list li strong {
    margin-right: 20px;
}

.quantity-row .bootstrap-touchspin {
    width: 150px;
}

.quantity-row .bootstrap-touchspin .input-group-btn-vertical {
    display: flex;
    flex-direction: column;
}

.quantity-row .bootstrap-touchspin .input-group-btn-vertical button {
    width: 30px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-row .bootstrap-touchspin input {
    width: 90px;
    height: 34px;
    text-align: center;
    border-left: none;
    border-right: none;
}

/* 属性选项样式 */
.attribute-option-wrapper {
    position: relative;
    display: inline-block;
}

.attribute-option-wrapper input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.attribute-option-wrapper label {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.attribute-option-wrapper input[type="radio"]:checked + label {
    background-color: #ffc107;
    color: #fff;
    border-color: #ffc107;
    box-shadow: 0 2px 4px rgba(255, 172, 0, 0.3);
}

.attribute-option-wrapper label:hover {
    border-color: #ffc107;
    box-shadow: 0 1px 3px rgba(255, 172, 0, 0.2);
}

/* 库存预警样式 */
.stock-low {
    color: #dc3545 !important;
    font-weight: 600;
}

/* 加入购物车提示样式 */
.add-to-cart-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.add-to-cart-toast.success {
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
}

.add-to-cart-toast.error {
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
}

.add-to-cart-toast .toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.add-to-cart-toast i {
    font-size: 18px;
}

.add-to-cart-toast.success i {
    color: #52c41a;
}

.add-to-cart-toast.error i {
    color: #ff4d4f;
}

/* 按钮加载状态 */
button.add-to-cart.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

button.add-to-cart.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 按钮成功状态 */
button.add-to-cart.success {
    background-color: #52c41a !important;
    border-color: #52c41a !important;
    animation: pulse 1s ease;
}

/* 按钮错误状态 */
button.add-to-cart.error {
    background-color: #ff4d4f !important;
    border-color: #ff4d4f !important;
    animation: shake 0.5s ease;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* 图片放大预览样式 */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
}

.image-preview-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    cursor: default;
}

.preview-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    max-width: 100%;
    max-height: 80vh;
}

.preview-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    transition: transform 0.1s ease-out;
    cursor: zoom-in;
}

.preview-controls {
    position: absolute;
    top: 10px;
    right: 60px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.preview-controls button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.preview-controls button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.preview-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

.preview-nav button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 20px;
}

.preview-nav button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.preview-nav button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.preview-counter {
    color: white;
    font-size: 16px;
    min-width: 60px;
    text-align: center;
}

.close-preview {
    position: absolute;
    top: -40px;
    right: -40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 30px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-preview:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* 主图悬停效果 */
#main-product-image {
    cursor: zoom-in;
    transition: all 0.3s ease;
}

#main-product-image:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .shop-details {
        padding: 10px;
    }
    
    .image-inner {
        flex-direction: column;
        gap: 10px;
    }
    
    .slider-pager {
        width: 100%;
        order: 2;
    }
    
    .thumb-box {
        display: flex;
        overflow-x: auto;
        max-height: 100px;
        padding-bottom: 10px;
        padding-left: 40px;
        padding-right: 40px;
    }
    
    .thumb-box li {
        margin-right: 10px;
        margin-bottom: 0;
    }
    
    .scroll-btn {
        left: auto;
        right: auto;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .scroll-up {
        left: 5px;
        top: 50%;
        bottom: auto;
    }
    
    .scroll-down {
        right: 5px;
        bottom: auto;
        top: 50%;
    }
    
    .scroll-btn .desktop-icon {
        display: none;
    }
    
    .scroll-btn .mobile-icon {
        display: inline-flex;
    }
    
    .image-box {
        order: 1;
    }
    
    .content-box {
        padding: 15px;
    }
    
    .content-box h2 {
        font-size: 20px;
    }
    
    .content-box h3 {
        font-size: 18px;
    }
    
    .attribute-list li {
        margin-right: 8px;
        margin-bottom: 8px;
    }
    
    .attribute-option-wrapper label {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .quantity-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .stock-info {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .addto-cart-box ul {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .addto-cart-box li {
        width: 100%;
    }
    
    .theme-btn {
        width: 100%;
        text-align: center;
    }
    
    .btn-two {
        margin-left: 0;
    }
    
    .tab-btns {
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .nav-tabs {
        border-bottom: none;
    }
    
    .nav-tabs .nav-link {
        display: inline-block;
        margin-right: 10px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }
    
    .image-preview-content {
        max-width: 95%;
    }
    
    .close-preview {
        top: -30px;
        right: -30px;
        font-size: 24px;
        width: 30px;
        height: 30px;
    }
    
    .preview-controls {
        top: 5px;
        right: 50px;
    }
    
    .preview-controls button {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .preview-nav {
        bottom: 10px;
        gap: 15px;
    }
    
    .preview-nav button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .preview-counter {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .content-box h2 {
        font-size: 18px;
    }
    
    .content-box h3 {
        font-size: 16px;
    }
    
    .attribute-option-wrapper label {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .bootstrap-touchspin {
        width: 120px;
    }
    
    .bootstrap-touchspin input {
        width: 70px;
    }
    
    .theme-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* 相关商品推荐样式 */
.related-products {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.related-products h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.related-product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
}

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

.related-product-card .product-image {
    display: block;
    position: relative;
    overflow: hidden;
    height: 200px;
}

.related-product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.related-product-card:hover .product-image img {
    transform: scale(1.05);
}

.related-product-card .product-info {
    padding: 15px;
}

.related-product-card h4 {
    font-size: 14px;
    margin: 0 0 10px 0;
    line-height: 1.4;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-product-card h4 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-product-card h4 a:hover {
    color: #007bff;
}

.related-product-card .product-price {
    font-size: 16px;
    font-weight: 600;
}

.related-product-card .sale-price {
    color: #dc3545;
    margin-right: 8px;
}

.related-product-card .base-price {
    color: #666;
    text-decoration: line-through;
    font-size: 14px;
    font-weight: normal;
}

.no-related-products {
    text-align: center;
    color: #666;
    padding: 30px 0;
    font-style: italic;
}

/* 响应式相关商品 */
@media (max-width: 768px) {
    .related-products {
        margin-top: 30px;
        padding-top: 20px;
    }
    
    .related-products h3 {
        font-size: 18px;
    }
    
    .related-product-card .product-image {
        height: 150px;
    }
    
    .related-product-card h4 {
        font-size: 13px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .related-product-card .product-image {
        height: 120px;
    }
    
    .related-product-card .product-info {
        padding: 10px;
    }
    
    .related-product-card h4 {
        font-size: 12px;
    }
    
    .related-product-card .product-price {
    font-size: 14px;
}
}

/* 商品分享样式 */
.product-share {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.product-share h4 {
    font-size: 14px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    gap: 15px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

.share-btn.wechat {
    background-color: #07C160;
}

.share-btn.weibo {
    background-color: #E6162D;
}

.share-btn.qq {
    background-color: #12B7F5;
}

.share-btn.qqzone {
    background-color: #FF9900;
}

.share-btn.twitter {
    background-color: #1DA1F2;
}

.share-btn.facebook {
    background-color: #4267B2;
}

.share-btn.linkedin {
    background-color: #0077B5;
}

.share-btn.pinterest {
    background-color: #E60023;
}

.share-btn.copy {
    background-color: #666;
}

/* 响应式分享按钮 */
@media (max-width: 768px) {
    .product-share {
        margin-top: 20px;
        padding-top: 15px;
    }
    
    .share-buttons {
        gap: 10px;
    }
    
    .share-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* 商品评价系统样式 */
.reviews-content {
    padding: 20px 0;
}

/* 评价统计 */
.review-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.overall-rating {
    flex: 1;
    min-width: 200px;
}

.overall-rating h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.rating-stars {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.rating-stars i {
    color: #FFD700;
    font-size: 20px;
}

.rating-stars span {
    font-size: 24px;
    font-weight: 600;
    margin-left: 10px;
    color: #333;
}

.overall-rating p {
    color: #666;
    font-size: 14px;
}

.rating-distribution {
    flex: 2;
    min-width: 300px;
}

.rating-distribution h5 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.rating-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-item span:first-child {
    width: 40px;
    font-size: 14px;
    color: #666;
}

.bar-container {
    flex: 1;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.bar {
    height: 100%;
    background-color: #FFD700;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.rating-item span:last-child {
    width: 40px;
    font-size: 14px;
    color: #666;
    text-align: right;
}

/* 评价列表 */
.review-list {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.review-list h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.review-item {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.review-item:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.review-header {
    margin-bottom: 15px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

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

.reviewer-info .info h5 {
    font-size: 16px;
    margin: 0 0 5px 0;
    color: #333;
}

.reviewer-info .rating {
    display: flex;
    gap: 2px;
    margin-bottom: 5px;
}

.reviewer-info .rating i {
    color: #FFD700;
    font-size: 14px;
}

.review-date {
    font-size: 12px;
    color: #999;
}

.review-content p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* 评价表单 */
.review-form {
    margin-top: 30px;
}

.review-form h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

#review-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.rating-input {
    display: flex;
    gap: 10px;
}

.rating-input i {
    color: #ddd;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rating-input i:hover,
.rating-input i.active {
    color: #FFD700;
}

textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-size: 14px;
    font-family: inherit;
}

input[type="text"],
input[type="email"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 响应式评价系统 */
@media (max-width: 768px) {
    .review-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .overall-rating,
    .rating-distribution {
        min-width: 100%;
    }
    
    .rating-stars i {
        font-size: 18px;
    }
    
    .rating-stars span {
        font-size: 20px;
    }
    
    .review-item {
        padding: 15px;
    }
    
    .reviewer-info {
        gap: 10px;
    }
    
    .avatar {
        width: 40px;
        height: 40px;
    }
    
    .rating-input i {
        font-size: 20px;
    }
}