/**
 * Product List V2 Styles
 * 产品列表 V2 样式
 */

.product-list-v2-wrapper {
    width: 100%;
    overflow: hidden;
}

.product-list-v2-container {
    display: grid;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 产品卡片 */
.product-list-v2-item {
    position: relative;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e5e5e5;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-list-v2-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* NEW 标签 */
.product-list-v2-badge {
    display: inline-block;
    background-color: #c64176;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    align-self: flex-start;
    order: 0;
}

/* 产品图片 */
.product-list-v2-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 300px;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 8px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-list-v2-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center center;
    transition: opacity 0.3s ease;
    display: block;
}

.product-list-v2-image-wrapper:hover .product-list-v2-image {
    opacity: 0.9;
}

/* 产品标题 */
.product-list-v2-title {
    font-size: 18px;
    font-weight: 700;
    color: #4d0020;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-height: auto;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    order: 1;
    text-align: left;
}

/* 图片 */
.product-list-v2-image-wrapper {
    order: 2;
}

/* 属性组包装器 */
.product-list-v2-attributes-wrapper {
    width: 100%;
    margin-bottom: 15px;
    order: 3;
}

.product-list-v2-attribute-group {
    margin-bottom: 10px;
}

.product-list-v2-attribute-group:last-child {
    margin-bottom: 0;
}

/* 变体选择器 */
.product-list-v2-variants {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* 颜色变体（圆形色块） */
.product-list-v2-variant-item.color-variant {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    position: relative;
    background-clip: padding-box;
}

.product-list-v2-variant-item.color-variant:hover {
    transform: scale(1.1);
}

.product-list-v2-variant-item.color-variant.active {
    border-color: #4d0020;
    border-width: 2px;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #4d0020;
}

/* 文本变体（按钮样式） */
.product-list-v2-variant-item.text-variant {
    min-width: auto;
    height: auto;
    padding: 8px 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.product-list-v2-variant-item.text-variant:hover {
    border-color: #4d0020;
    background-color: #fef2f8;
}

.product-list-v2-variant-item.text-variant.active {
    border-color: #4d0020;
    background-color: #4d0020;
    color: #ffffff;
}

.product-list-v2-variant-item .variant-text {
    display: inline-block;
    white-space: nowrap;
    line-height: 1;
}

/* +更多 提示 */
.product-list-v2-more-variants {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #f0f0f0;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    cursor: help;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
}

.product-list-v2-more-variants:hover {
    background-color: #e0e0e0;
    border-color: #999;
    color: #333;
    transform: scale(1.05);
}

/* 价格 */
.product-list-v2-price {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 15px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    order: 4;
}

.product-list-v2-price .woocommerce-Price-amount {
    font-size: 16px;
    font-weight: 600;
}

/* 按钮 */
.product-list-v2-button {
    display: block;
    width: 100%;
    max-width: 100%;
    background-color: #ff90c0;
    color: #4d0020;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    order: 5;
}

.product-list-v2-button:hover {
    background-color: #ff7ab8;
    color: #4d0020;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 144, 192, 0.3);
}

/* ===== 响应式设计 ===== */

/* 平板设备 */
@media (max-width: 1024px) {
    .product-list-v2-container {
        gap: 15px;
    }

    .product-list-v2-item {
        padding: 15px;
    }

    .product-list-v2-image-wrapper {
        height: 250px;
        margin-bottom: 15px;
    }

    .product-list-v2-title {
        font-size: 16px;
        min-height: auto;
    }

    .product-list-v2-variant-item.color-variant {
        width: 28px;
        height: 28px;
    }
    
    .product-list-v2-variant-item.text-variant {
        font-size: 12px;
        padding: 7px 12px;
        min-width: auto;
    }
    
    .product-list-v2-more-variants {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .product-list-v2-price {
        font-size: 15px;
    }

    .product-list-v2-button {
        font-size: 13px;
        padding: 10px 15px;
    }
}

/* 手机设备 */
@media (max-width: 768px) {
    .product-list-v2-container {
        gap: 20px;
    }

    .product-list-v2-item {
        padding: 20px;
    }

    .product-list-v2-image-wrapper {
        height: 300px;
        margin-bottom: 20px;
    }

    .product-list-v2-title {
        font-size: 18px;
        min-height: auto;
    }

    .product-list-v2-variant-item.color-variant {
        width: 32px;
        height: 32px;
    }
    
    .product-list-v2-variant-item.text-variant {
        font-size: 13px;
        padding: 8px 15px;
        min-width: auto;
    }
    
    .product-list-v2-more-variants {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .product-list-v2-price {
        font-size: 16px;
    }

    .product-list-v2-button {
        font-size: 14px;
        padding: 12px 20px;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .product-list-v2-container {
        gap: 15px;
    }

    .product-list-v2-item {
        padding: 15px;
    }

    .product-list-v2-image-wrapper {
        height: 250px;
    }

    .product-list-v2-badge {
        font-size: 10px;
        padding: 4px 10px;
        top: 10px;
        left: 10px;
    }
    
    .product-list-v2-variant-item.color-variant {
        width: 26px;
        height: 26px;
    }
    
    .product-list-v2-variant-item.text-variant {
        font-size: 11px;
        padding: 6px 10px;
        min-width: auto;
    }
    
    .product-list-v2-more-variants {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }
}

/* WooCommerce 样式覆盖 */
.product-list-v2-price del {
    opacity: 0.5;
    margin-right: 5px;
}

.product-list-v2-price ins {
    text-decoration: none;
    font-weight: 700;
}

