/**
 * WooCommerce Product Page Styles
 * 自定义产品页面样式（参考 gallery.html）
 */

/* ==========================================
   全局产品页面样式
   ========================================== */

.custom-product-page {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.custom-single-product {
    width: 100%;
}

/* ==========================================
   上半部分：产品信息区域（浅粉色背景）
   ========================================== */

.product-info-section {
    background-color: #fff5f8;
    padding: 150px 20px 60px 20px;
    min-height: 100vh;
}

.product-info-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* 左侧：产品相册 */
.product-gallery-wrapper {
    flex: 0 0 50%;
    max-width: 50%;
}

/* 右侧：产品摘要 */
.product-summary-wrapper {
    flex: 0 0 50%;
    max-width: 50%;
    background-color: #ffffff;
    border-radius: 15px;
    padding: 20px;
    height: 684px;
    display: flex;
    flex-direction: column;
}

/* 修复 WooCommerce 默认样式 */
.woocommerce #content div.product div.summary,
.woocommerce div.product div.summary,
.woocommerce-page #content div.product div.summary,
.woocommerce-page div.product div.summary {
    float: none !important;
    width: 100% !important;
    clear: none !important;
    margin: 0 !important;
}

/* ==========================================
   产品相册样式
   ========================================== */

.custom-product-gallery {
    width: 100%;
}

/* 桌面端相册 */
.desktop-gallery {
    display: none;
    gap: 16px;
}

.mobile-gallery {
    display: block;
}

@media (min-width: 1024px) {
    .desktop-gallery {
        display: flex;
    }
    
    .mobile-gallery {
        display: none;
    }
}

/* 缩略图区域 */
.thumbnail-section {
    position: relative;
    width: 93px;
    flex-shrink: 0;
}

.thumbnail-scroll-container {
    height: 684px;
    overflow-y: auto;
    overflow-x: hidden;
    cursor: grab;
    user-select: none;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.thumbnail-scroll-container::-webkit-scrollbar {
    display: none;
}

.thumbnail-scroll-container:active {
    cursor: grabbing;
}

.thumbnail-scroll-container.dragging {
    scroll-behavior: auto;
}

.thumbnail-track {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 93px;
}

.thumbnail-item {
    width: 93px;
    height: 124px;
    aspect-ratio: 3/4;
    cursor: pointer;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.thumbnail-item.opacity-50 {
    opacity: 0.5;
}

.thumbnail-item:hover {
    opacity: 1 !important;
}

.thumbnail-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* 导航控制 */
.gallery-navigation-controls {
    position: absolute;
    bottom: 25px;
    right: -80px;
    z-index: 20;
}

.navigation-controls-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #ffffff;
}

.nav-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    padding: 0;
}

.nav-button:hover:not(:disabled) {
    background-color: rgba(255, 144, 192, 0.1);
}

.nav-button:hover:not(:disabled) svg {
    stroke: #ff90c0;
}

.nav-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-button svg {
    stroke: #333;
    transition: stroke 0.3s ease;
}

.page-indicator {
    font-size: 14px;
    color: #666;
    font-weight: 600;
    user-select: none;
    line-height: 1;
}

/* 主图区域 */
.main-image-section {
    flex: 1;
    max-width: 513px;
    aspect-ratio: 3/4;
    height: 684px;
}

.main-image-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.main-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* 移动端Swiper样式 */
.mobile-swiper-container {
    width: 100%;
    overflow: hidden;
    padding: 0px 16px 40px 16px;
}

.mobile-swiper {
    width: 100%;
    padding: 10px 0 30px 0;
    overflow: visible;
}

.mobile-swiper .swiper-slide {
    width: auto;
    height: auto;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.mobile-swiper .swiper-slide:active {
    transform: scale(0.98);
}

.mobile-swiper .swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 3/4;
}

/* 分页器 */
.mobile-swiper .swiper-pagination {
    bottom: 0 !important;
    text-align: center;
}

.swiper-pagination-bullet {
    background: #ccc;
    opacity: 1;
    width: 8px;
    height: 8px;
    margin: 0 4px !important;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: #ff90c0;
    width: 24px;
    border-radius: 4px;
}

/* ==========================================
   产品摘要样式
   ========================================== */

   

/* 产品标题 */
.product_title {
    font-family: 'Air Up Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 48px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
}

/* 产品价格 */
.price {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #40001c!important;
    margin-bottom: 15px;
}

.price del {
    color: #999;
    font-size: 16px;
    margin-right: 10px;
}

/* 产品简短描述 */
.woocommerce-product-details__short-description {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 10px;
}

/* ==========================================
   变体选择器样式
   ========================================== */

/* 变体表单样式调整 */
.variations_form .variations {
    margin-bottom: 30px;
    border: none;
    width: 100%;
}

/* WooCommerce 默认变体表格样式优化 */
.variations_form .variations {
    width: 100%;
}

.variations_form .variations tbody {
    display: table-row-group;
}

.variations_form .variations tr {
    display: table-row;
    margin-bottom: 15px;
}

.variations_form .variations td {
    display: table-cell;
    padding: 10px 0;
    vertical-align: middle;
}

.variations_form .variations td.label {
    width: 30%;
    padding-right: 20px;
}

.variations_form .variations td.label label {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
    margin: 0;
}

.variations_form .variations td.value {
    width: 70%;
}

.variations_form .variations td.value select {
    width: 100%;
}

/* 响应式：小屏幕变体样式 */
@media (max-width: 768px) {
    .variations_form .variations tr {
        display: block;
        margin-bottom: 20px;
    }
    
    .variations_form .variations td {
        display: block;
        width: 100% !important;
        padding: 5px 0;
    }
    
    .variations_form .variations td.label {
        margin-bottom: 8px;
    }
}

/* 隐藏重置链接 */
.reset_variations {
    display: none !important;
}

/* 标准下拉菜单样式（未自定义的变体） */
.variation-value select:not([style*="display:none"]):not([style*="display: none"]) {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #ffffff;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.variation-value select:not([style*="display:none"]):not([style*="display: none"]):hover {
    border-color: #999;
}

.variation-value select:not([style*="display:none"]):not([style*="display: none"]):focus {
    outline: none;
    border-color: #40001c;
    box-shadow: 0 0 0 1px #40001c;
}


/* 变体价格和信息显示 */
.single_variation_wrap {
    margin-top: 20px;
}

.single_variation_wrap .woocommerce-variation {
    margin-bottom: 20px;
}

/* 隐藏变体价格显示区域（价格会更新到顶部） */
.single_variation_wrap .woocommerce-variation-price {
    display: none !important;
}

.single_variation_wrap .woocommerce-variation-availability {
    margin-bottom: 15px;
    font-size: 14px;
}

/* 产品特性列表 */
.product-features-list {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.product-features-list .product-feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-features-list .feature-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.product-features-list .feature-text {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
}

/* 添加到购物车表单 */
.cart {
    margin-bottom: 30px;
}

/* 隐藏数量框 */
.quantity {
    display: none !important;
}

/* 添加到购物车按钮 - 基础样式（颜色通过内联样式设置） */
.woocommerce #content div.product form.cart .button,
.woocommerce div.product form.cart .button,
.woocommerce-page #content div.product form.cart .button,
.woocommerce-page div.product form.cart .button,
.single_add_to_cart_button,
button.single_add_to_cart_button,
.woocommerce button.button.single_add_to_cart_button {
    /* 移除了 background-color 和 color，这些通过内联样式设置 */
    border: none !important;
    padding: 18px 40px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    width: 100% !important;
    display: block !important;
    box-shadow: none !important;
}

/* 悬停效果通过 JavaScript 处理，不再使用 CSS */

.woocommerce #content div.product form.cart .button:active,
.woocommerce div.product form.cart .button:active,
.single_add_to_cart_button:active,
button.single_add_to_cart_button:active {
    transform: scale(0.98) !important;
}

/* 禁用状态按钮样式 */
.woocommerce #content div.product form.cart .button:disabled,
.woocommerce div.product form.cart .button:disabled,
.woocommerce-page #content div.product form.cart .button:disabled,
.woocommerce-page div.product form.cart .button:disabled,
.single_add_to_cart_button:disabled,
button.single_add_to_cart_button:disabled,
.woocommerce button.button.single_add_to_cart_button:disabled,
.single_add_to_cart_button.disabled,
button.single_add_to_cart_button.disabled {
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    pointer-events: none !important;
}

.woocommerce #content div.product form.cart .button:disabled:hover,
.woocommerce div.product form.cart .button:disabled:hover,
.single_add_to_cart_button:disabled:hover,
button.single_add_to_cart_button:disabled:hover,
.single_add_to_cart_button.disabled:hover {
    transform: none !important;
}

/* 产品元信息 - 隐藏 */
.product_meta {
    display: none !important;
}

/* 配送信息 */
.product-shipping-info {
    margin-top: 0px;
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.shipping-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.shipping-info-item i {
    font-size: 16px;
    color: #40001c;
    flex-shrink: 0;
}

.shipping-info-item span {
    flex: 1;
}

/* ==========================================
   下半部分：产品详情区域
   ========================================== */

.product-details-section {
    background-color: #ffffff;
    padding: 80px 20px;
}

.product-details-container {
    max-width: 1200px;
    margin: 0 auto;
}

.custom-product-description {
    width: 100%;
}

.product-description-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.product-description-content h2,
.product-description-content h3 {
    font-weight: 700;
    color: #1a1a1a;
 
}

.product-description-content h2 {
    font-size: 28px;
}

.product-description-content h3 {
    font-size: 22px;
}

.product-description-content p {
    margin-bottom: 20px;
}

.product-description-content ul,
.product-description-content ol {
    margin: 20px 0 20px 30px;
}

.product-description-content li {
    margin-bottom: 10px;
}

.product-description-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* ==========================================
   响应式设计
   ========================================== */

@media (max-width: 1280px) {
    .gallery-navigation-controls {
        right: -70px;
    }
}

@media (max-width: 1023px) {
    .product-info-section {
        padding: 130px 15px 40px 15px;
        min-height: auto;
    }
    
    .product-info-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .product-gallery-wrapper,
    .product-summary-wrapper {
        max-width: 100%;
    }
    
    .product-summary-wrapper {
        padding: 20px;
        height: auto;
    }
    
    .product_title {
        font-size: 36px;
    }
    
    .price {
        font-size: 18px;
    }
    
    .product-details-section {
        padding: 60px 15px;
    }
}

@media (max-width: 768px) {
    .product-info-section {
        padding: 100px 0 0 0;
    }
    
    .product-summary-wrapper {
        padding: 20px;
        border-radius: 0;
        height: auto;
        max-width: 100%;
        width: 100%;
    }
    
    .product_title {
        font-size: 28px;
    }
    
    .price {
        font-size: 18px;
    }
    
    .single_add_to_cart_button {
        padding: 16px 30px;
        font-size: 16px;
    }
    
    .product-details-section {
        padding: 40px 10px;
    }
    
    .product-description-content {
        font-size: 15px;
    }
}

/* ==========================================
   底部快捷购买栏
   ========================================== */

.sticky-add-to-cart-bar {
    position: relative;
    left: 0;
    right: 0;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    margin-top: 0;
}

.sticky-add-to-cart-bar.visible {
    transform: translateY(0);
}

.sticky-add-to-cart-bar.fixed {
    position: fixed;
    bottom: 0;
}


.sticky-bar-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.sticky-bar-left {
    flex: 1;
    min-width: 0;
}

.sticky-product-title {
    font-family: 'Air Up Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sticky-product-meta {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-height: 18px;
    line-height: 18px;
}

.sticky-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.sticky-product-price {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #40001c;
}

.sticky-product-price .price {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
}

.sticky-add-to-cart-button {
    /* 移除了 background-color 和 color，这些通过内联样式设置 */
    border: none;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* 悬停效果通过 JavaScript 处理 */

.sticky-add-to-cart-button:active {
    transform: scale(0.98);
}

/* 响应式 - 移动端上下布局 */
@media (max-width: 768px) {
    .sticky-bar-container {
        padding: 15px;
        gap: 12px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .sticky-bar-left {
        width: 100%;
        flex: none;
    }
    
    .sticky-product-title {
        font-size: 16px;
        line-height: 1.4;
        margin-bottom: 6px;
    }
    
    .sticky-product-meta {
        font-size: 12px;
        line-height: 1.4;
        white-space: normal;
        overflow: visible;
    }
    
    .sticky-bar-right {
        width: 100%;
        flex: none;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    
    .sticky-product-price {
        font-size: 18px;
        font-weight: 700;
        flex: 0 0 auto;
    }
    
    .sticky-add-to-cart-button {
        flex: 1;
        padding: 12px 20px;
        font-size: 14px;
        min-width: 150px;
    }
}

/* ==========================================
   隐藏默认WooCommerce元素
   ========================================== */

/* 隐藏默认tabs */
.woocommerce-tabs {
    display: none;
}

/* 隐藏评论部分（如果不需要） */
#reviews {
    display: none;
}

/* 隐藏相关产品（可选） */
.related.products {
    margin-top: 60px;
}

