/* Product Detail Page Styles */

/* Product Detail Section */
.product-detail-section {
    background-color: #ffffff;
    padding-top: 30px;
    padding-bottom: 60px;
}

/* 拉宽详情页主体区域，减少左右留白 */
.product-detail-section .main-container {
    max-width: 1320px !important;
    padding-left: 20px;
    padding-right: 20px;
}

/* Product Main Info */
.product-main {
    margin-bottom: 70px;
}

/* Product Images - Horizontal Layout */
.product-images-horizontal {
    display: flex;
    gap: 24px;
    position: relative;
}

.main-image-wrapper-horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
}

.main-image-horizontal {
    width: 80%;
    height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    touch-action: pan-y; /* 允许纵向滚动，横向手势用于切图 */
}

.main-product-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    will-change: transform, opacity;
}

.product-ball-large {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(255,255,255,0.9) 0%, 
        rgba(100,200,255,0.7) 15%, 
        rgba(0,100,255,0.85) 35%, 
        rgba(0,50,200,0.95) 60%, 
        rgba(0,30,150,1) 100%);
    box-shadow: 
        0 0 40px rgba(0,150,255,0.6),
        0 0 80px rgba(0,100,255,0.4),
        0 0 120px rgba(0,50,255,0.2),
        inset 0 0 40px rgba(255,255,255,0.4);
    position: relative;
    animation: float-large 4s ease-in-out infinite;
}

.product-ball-large::before {
    content: '';
    position: absolute;
    top: 12%;
    left: 18%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 70%);
}

.product-ball-large::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 85%;
    border-radius: 50%;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 12px,
        rgba(0,200,255,0.4) 12px,
        rgba(0,200,255,0.4) 15px
    );
}

@keyframes float-large {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(3deg);
    }
}

.nav-btn {

    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-btn:hover {
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}



.nav-btn i {
    font-size: 20px;
    color: #ccc;
}

/* Thumbnail List - Vertical on right side */
.thumbnail-list-vertical-wrap {
    width: 112px;
    height: 560px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.thumbnail-list-vertical {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    width: 112px;
    height: 478px;
    flex-shrink: 0;
    overflow: hidden;
}

.thumbnail-item-vertical {
    width: 112px;
    height: 112px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden;
    flex-shrink: 0;
}

.thumb-scroll-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e3e8f1;
    border-radius: 50%;
    background: #fff;
    color: #6f7f96;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.thumb-scroll-btn:hover {
    color: #305DAD;
    border-color: #b5c7e6;
}

.thumb-scroll-btn.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.main-image-horizontal .main-product-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

.thumbnail-item-vertical:hover,
.thumbnail-item-vertical.active {
    border-color: #0066FF;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.thumbnail-video-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.thumbnail-video-badge i {
    font-size: 10px;
    margin-left: 1px;
}

.thumb-ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(255,255,255,0.8) 0%, 
        rgba(100,200,255,0.6) 20%, 
        rgba(0,100,255,0.8) 40%, 
        rgba(0,50,150,0.9) 70%, 
        rgba(0,20,80,1) 100%);
    box-shadow: 
        0 0 15px rgba(0,150,255,0.5),
        inset 0 0 15px rgba(255,255,255,0.3);
}

/* Product Info Detail */
.product-info-detail {
    padding-left: 30px;
}

.product-info-placeholder {
    display: none;
}

.product-info-detail.is-floating {
    position: fixed;
    top: 118px;
    right: 100px;
    z-index: 30;
    background: #fff;
    padding: 22px 20px;
    border: 1px solid #e9edf5;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.12);
    max-width: calc(100vw - 140px);
}

.product-title {
    font-size: 20px;
    font-weight: 600;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.4;
}

.product-price-wrap {
    margin-bottom: 30px;
}

.current-price {
    font-size: 30px;
    font-weight: 700;
    color: #305DAD;
    margin-right: 10px;
}

.original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

/* Option Group */
.option-group {
    margin-bottom: 20px;
    display: flex;
    align-items: baseline

}

.option-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 12px;
    margin-right: 20px;

}

/* Color Options */
.color-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.option-group.option-group-color {
    align-items: flex-start;
}

.option-group.option-group-color .color-options {
    flex: 1;
    min-width: 0;
    align-items: flex-start;
}

.color-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
    width: auto;
    max-width: 100%;
    min-height: 36px;
    align-self: flex-start;
}

.color-btn:hover,
.color-btn.active {
    border-color: #0066cc;
}

.color-card-thumb {
    height: 34px;
    width: 34px;
    aspect-ratio: 1;
    display: block;
    object-fit: cover;
    flex-shrink: 0;
}

.color-card-ball {
    width: 50%;
    height: 50%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        rgba(255,255,255,0.9) 0%,
        rgba(100,200,255,0.6) 20%,
        rgba(0,100,255,0.8) 40%,
        rgba(0,50,150,0.9) 70%,
        rgba(0,20,80,1) 100%);
    box-shadow: 0 0 15px rgba(0,150,255,0.5), inset 0 0 12px rgba(255,255,255,0.35);
}

.color-card-name {
    display: block;
    width: auto;
    max-width: 12em;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    width: fit-content;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background-color: #f8f9fa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    background-color: #e9ecef;
}

.qty-btn i {
    font-size: 12px;
    color: #666;
}

.qty-input {
    width: 60px;
    height: 40px;
    border: none;
    border-left: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
    text-align: center;
    font-size: 14px;
    color: #333;
}

.qty-input:focus {
    outline: none;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.btn-buy {
    flex: 1;
    height: 44px;
    font-size: 16px;
    background-color: #0066FF;
    border: none;
    border-radius: 4px;
}

.btn-buy:hover {
    background-color: #0052cc;
}

.btn-cart {
    flex: 1;
    height: 44px;
    font-size: 16px;
    border: 2px solid #0066FF;
    color: #0066FF;
    background-color: #fff;
    border-radius: 4px;
}

.btn-cart:hover {
    background-color: #0066FF;
    color: #fff;
}

/* 购物车飞入动画元素 */
.cart-fly-animation {
    position: fixed;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #0066FF;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 102, 255, 0.4);
}

.cart-fly-animation img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.cart-fly-animation .fly-quantity {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: #ff4d4f;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 购物袋图标抖动动画 */
@keyframes cartShake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    10% { transform: translateX(-3px) rotate(-5deg); }
    20% { transform: translateX(3px) rotate(5deg); }
    30% { transform: translateX(-3px) rotate(-5deg); }
    40% { transform: translateX(3px) rotate(5deg); }
    50% { transform: translateX(-2px) rotate(-3deg); }
    60% { transform: translateX(2px) rotate(3deg); }
    70% { transform: translateX(-1px) rotate(-2deg); }
    80% { transform: translateX(1px) rotate(2deg); }
    90% { transform: translateX(0) rotate(0deg); }
}

.cart-badge-bounce {
    animation: cartBadgeBounce 0.5s ease;
}

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

.btn-wishlist {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-wishlist:hover {
    border-color: #0066cc;
    color: #0066cc;
}

.btn-wishlist.active,
.btn-wishlist:hover {
    color: #0066cc;
}

.btn-wishlist i {
    font-size: 20px;
}

/* Product Details Section */
.product-details-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.details-content {
    color: #666;
    line-height: 1.8;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.details-content p {
    margin-bottom: 15px;
    font-size: 12px;
}

.details-content img,
.details-content video,
.details-content iframe,
.details-content table {
    max-width: 100%;
}

.details-content img,
.details-content video {
    height: auto;
    display: block;
}

.details-content iframe {
    width: 100%;
}

.details-content table {
    display: block;
    overflow-x: auto;
}

/* Product Packaging - sky, clouds, box labels */
.product-packaging {
    margin-bottom: 30px;
}

.packaging-image {
    width: 100%;
    height: 900px;
    overflow: hidden;
}




/* Similar Products */
.similar-products {
    margin-bottom: 40px;
}


.similar-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.similar-col {
    flex: 0 0 19%;
    max-width: 19%;
}

.similar-col:hover {
    transform: translateY(-5px);
    text-decoration: none;
    color: inherit;
    box-shadow:  0 4px 12px rgba(0, 0, 0, 0.12);
}
.similar-card {
    display: block;
    text-decoration: none;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.similar-card:hover {
    transform: translateY(-5px);
    text-decoration: none;
}

.similar-image {
    position: relative;
    background-color: #f1f1f1;
    overflow: hidden;
    aspect-ratio: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.similar-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.wishlist-btn-sm {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
}

.wishlist-btn-sm:hover,
.wishlist-btn-sm.active {
    background-color: #fff;
}

.wishlist-btn-sm i {
    font-size: 12px;
    color: #999;
    transition: color 0.2s ease;
}

.wishlist-btn-sm:hover i,
.wishlist-btn-sm.active i {
    color: #0066cc;
}

.similar-ball {
    width: 50%;
    height: 50%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(255,255,255,0.8) 0%, 
        rgba(100,200,255,0.6) 20%, 
        rgba(0,100,255,0.8) 40%, 
        rgba(0,50,150,0.9) 70%, 
        rgba(0,20,80,1) 100%);
    box-shadow: 
        0 0 20px rgba(0,150,255,0.5),
        inset 0 0 15px rgba(255,255,255,0.3);
}

.similar-info {
    text-align: center;
    padding: 12px 5px;
}

.similar-name {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    margin-bottom: 5px;
}

.similar-price {
    font-size: 13px;
    font-weight: 600;
    color: #305DAD;
    margin: 0;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .product-info-detail {
        padding-left: 0;
        margin-top: 30px;
    }
    
    .main-image-horizontal {
        height: 400px;
    }
    
    .product-ball-large {
        width: 250px;
        height: 250px;
    }
    
    .thumbnail-list-vertical {
        width: 80px;
        height: 350px;
    }
    
    .thumbnail-list-vertical-wrap {
        width: 80px;
        height: 400px;
    }
    
    .thumbnail-item-vertical {
        width: 80px;
        height: 90px;
    }
    
    .packaging-image {
        height: 500px;
    }
    
  
}

@media (max-width: 767px) {
    .product-title {
        font-size: 20px;
    }
    
    .current-price {
        font-size: 28px;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
    
    .btn-buy,
    .btn-cart {
        flex: 1 1 calc(50% - 10px);
    }
    
    .thumbnail-list-vertical {
        flex-direction: row;
        width: 100%;
        height: auto;
        justify-content: center;
        margin-top: 15px;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
    }
    
    .thumbnail-list-vertical-wrap {
        width: 100%;
        height: auto;
        flex-direction: row;
        gap: 10px;
    }
    
    .thumb-scroll-btn {
        display: none;
    }
    
    .thumbnail-item-vertical {
        width: 60px;
        height: 60px;
    }

    .option-group.option-group-color {
        flex-direction: column;
        align-items: flex-start;
    }

    .option-group.option-group-color .option-label {
        margin-right: 0;
        margin-bottom: 8px;
    }

    .option-group.option-group-color .color-options {
        width: 100%;
    }

    .option-group.option-group-color .color-btn {
        width: auto;
        max-width: 100%;
        min-height: 34px;
        align-self: flex-start;
    }

    .option-group.option-group-color .color-card-name {
        white-space: nowrap;
    }
    
    .package-boxes {
        gap: 15px;
    }
    
    .package-box {
        width: 100px;
        height: 130px;
    }
    
    .package-box.box-center {
        width: 130px;
        height: 160px;
    }
    
    .box-ball {
        width: 60px;
        height: 60px;
    }
    
    .box-ball.main {
        width: 80px;
        height: 80px;
    }
    
    .similar-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }

    .similar-row::-webkit-scrollbar {
        height: 4px;
    }

    .similar-row::-webkit-scrollbar-thumb {
        background: #d9d9d9;
        border-radius: 3px;
    }

    .similar-col {
        flex: 0 0 calc((100% - 24px) / 4);
        max-width: calc((100% - 24px) / 4);
    }
}

@media (max-width: 575px) {
    .product-images-horizontal {
        flex-direction: column;
    }
    
    .main-image-horizontal {
        height: 300px;
    }
    
    .product-ball-large {
        width: 180px;
        height: 180px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .nav-btn.prev-btn {
        left: 10px;
    }
    
    .nav-btn.next-btn {
        right: 10px;
    }
    
    .thumbnail-list-vertical {
        flex-direction: row;
        width: 100%;
        height: auto;
        justify-content: center;
        margin-top: 15px;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
    }
    
    .thumbnail-list-vertical-wrap {
        width: 100%;
        height: auto;
        flex-direction: row;
        gap: 8px;
    }
    
    .thumbnail-item-vertical {
        width: 50px;
        height: 50px;
    }
    
    .option-group.option-group-color .color-options {
        gap: 8px;
        max-width: 100%;
        flex-wrap: nowrap;
        overflow-x: visible;
    }
    
    .option-group.option-group-color .color-btn {
        width: auto;
        max-width: 100%;
        min-height: 32px;
        align-self: flex-start;
    }
    
    .option-group.option-group-color .color-card-name {
        padding: 6px 8px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    .btn-buy,
    .btn-cart {
        height: 40px;
        font-size: 14px;
    }
    
    .similar-col {
        flex: 0 0 calc((100% - 24px) / 4);
        max-width: calc((100% - 24px) / 4);
    }
}
