/**
 * WooCommerce 产品详情页样式
 * 简洁大气的设计风格
 */

/* ==========================================================================
   产品详情页容器
   ========================================================================== */
.single-product-page {
    background: #f8f9fa;
}

.product-container {
    padding: 40px 20px 80px;
}

/* ==========================================================================
   面包屑导航
   ========================================================================== */
.breadcrumb-wrapper {
    margin-bottom: 30px;
}

.woocommerce-breadcrumb {
    font-size: 14px;
    color: #666;
}

.woocommerce-breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.woocommerce-breadcrumb a:hover {
    color: #00247D;
}

.woocommerce-breadcrumb .separator {
    margin: 0 10px;
    color: #ccc;
}

/* ==========================================================================
   产品主区域（两栏布局）
   ========================================================================== */
.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 40px;
}

/* ==========================================================================
   产品图片区域
   ========================================================================== */
.product-gallery-section {
    position: relative;
}

.woocommerce-product-gallery {
    position: relative;
}

.woocommerce-product-gallery__wrapper {
    margin: 0;
    padding: 0;
}

.woocommerce-product-gallery__image {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}

.woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
    display: block;
}

.woocommerce-product-gallery__trigger {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    border: 1px solid #E8EBED;
}

.woocommerce-product-gallery__trigger:hover {
    background: #00247D;
    color: white;
}

/* 图片缩略图 */
.flex-control-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding: 0;
    list-style: none;
}

.flex-control-thumbs li {
    flex: 1;
    max-width: 100px;
}

.flex-control-thumbs li img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.flex-control-thumbs li img:hover,
.flex-control-thumbs li img.flex-active {
    opacity: 1;
    border-color: #00247D;
}

/* ==========================================================================
   产品信息区域
   ========================================================================== */
.product-summary-section {
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
    line-height: 1.3;
}

/* 产品评分 */
.product-rating {
    margin-bottom: 20px;
}

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

.star-rating {
    color: #FFB800;
}

.woocommerce-review-link {
    color: #666;
    font-size: 14px;
    text-decoration: none;
}

.woocommerce-review-link:hover {
    color: #00247D;
}

/* 产品价格 */
.product-price-wrapper {
    margin-bottom: 25px;
}

.price {
    font-size: 2.25rem;
    font-weight: 700;
    color: #00247D;
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.price del {
    font-size: 1.5rem;
    color: #999;
    font-weight: 400;
}

.price ins {
    text-decoration: none;
}

/* 产品简短描述 */
.product-short-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #00247D;
}

/* 产品标签 */
.product-meta-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
    white-space: nowrap;
}

.badge-sale {
    background: rgba(200, 16, 46, 0.1);
    color: #C8102E;
}

.badge-stock {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge-outstock {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* 添加到购物车区域 */
.cart {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
}

.quantity {
    display: flex;
    align-items: center;
    border: 2px solid #E8EBED;
    border-radius: 4px;
    background: white;
}

.quantity input[type="number"] {
    width: 70px;
    height: 48px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    -moz-appearance: textfield;
}

.quantity input[type="number"]::-webkit-outer-spin-button,
.quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.single_add_to_cart_button {
    flex: 1;
    height: 52px;
    padding: 0 40px;
    background: #00247D;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.single_add_to_cart_button:hover {
    background: #C8102E;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(200, 16, 46, 0.35);
}

.single_add_to_cart_button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 产品元信息 */
.product-meta-info {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.product-meta-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #E8EBED;
}

.product-meta-item:last-child {
    border-bottom: none;
}

.meta-label {
    font-weight: 600;
    color: #333;
    min-width: 100px;
}

.meta-value {
    color: #666;
}

.meta-value a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.meta-value a:hover {
    color: #00247D;
}

/* 分享按钮 */
.product-share {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.share-label {
    font-weight: 600;
    color: #333;
}

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

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

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

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

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

/* ==========================================================================
   产品详细信息标签
   ========================================================================== */
.product-details-tabs {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 40px;
}

.woocommerce-tabs {
    margin: 0;
}

.woocommerce-tabs .tabs {
    display: flex;
    gap: 5px;
    margin: 0 0 30px;
    padding: 0;
    list-style: none;
    border-bottom: 2px solid #E8EBED;
}

.woocommerce-tabs .tabs li {
    margin: 0;
}

.woocommerce-tabs .tabs li a {
    display: block;
    padding: 15px 30px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.woocommerce-tabs .tabs li a:hover {
    color: #00247D;
}

.woocommerce-tabs .tabs li.active a {
    color: #00247D;
    border-bottom-color: #00247D;
}

.woocommerce-tabs .panel {
    padding: 20px 0;
    line-height: 1.8;
    color: #666;
}

.woocommerce-tabs .panel h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    display: none;
}

/* ==========================================================================
   相关产品区域
   ========================================================================== */
.related-products-section {
    background: #f8f9fa;
    padding: 60px 0;
}

.related-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    text-align: center;
}

/* 使用与商店页面完全一致的网格布局 */
.products-grid-related {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

/* 复用商店页面的产品卡片样式 - 已在 shop.css 中定义 */
/* .product-card-shop 样式会自动应用 */

/* ==========================================================================
   响应式布局
   ========================================================================== */
@media (max-width: 1024px) {
    .product-main {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 30px;
    }
    
    .products-grid-related {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
  
    .product-details-tabs{
        padding: 0 !important;
        box-shadow:none !important;
    }
    .single-product-page{
        background: white;!important;
    }
    .product-container {
        padding: 20px 15px 60px;
    }
    
    .product-main {
        padding: 0px;
        box-shadow:none !important;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    .price {
        font-size: 1.75rem;
    }
    
    .cart {
        flex-direction: row;
        padding: 20px;
        gap: 12px;
    }
    
    .quantity {
        flex: 0 0 auto;
    }
    
    .quantity input[type="number"] {
        width: 60px;
    }
    
    .single_add_to_cart_button {
        flex: 1;
        padding: 0 20px;
        font-size: 15px;
    }
    
    .woocommerce-tabs .tabs {
        flex-wrap: wrap;
    }
    
    .woocommerce-tabs .tabs li a {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .products-grid-related {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 640px) {
    .flex-control-thumbs {
        gap: 8px;
    }
    
    .flex-control-thumbs li {
        max-width: 70px;
    }
    
    /* 小屏幕保持购物车按钮在同一行 */
    .cart {
        padding: 15px;
        gap: 10px;
    }
    
    .quantity input[type="number"] {
        width: 50px;
        padding: 10px 5px;
    }
    
    .single_add_to_cart_button {
        height: 48px;
        padding: 0 16px;
        font-size: 14px;
    }
    
    .product-share {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .products-grid-related {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
