/**
 * 商品显示网关样式
 * 版本: 1.0.0
 */

/* ==========================================
   Checkout 页面商品显示样式
   ========================================== */

/* 商品缩略图容器 */
.woocommerce-checkout-review-order-table .checkout-product-image-wrapper {
    float: left !important;
    margin-right: 12px !important;
    margin-bottom: 8px !important;
    width: 60px !important;
    height: 60px !important;
    overflow: hidden !important;
    border-radius: 6px !important;
    border: 1px solid #e0e0e0 !important;
}

/* 商品缩略图 */
.woocommerce-checkout-review-order-table .checkout-product-thumbnail {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* 产品名称单元格布局 */
.woocommerce-checkout-review-order-table td.product-name {
    padding: 12px 10px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* 清除浮动 */
.woocommerce-checkout-review-order-table td.product-name::after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}

/* 商品数量样式 */
.woocommerce-checkout-review-order-table td.product-name .product-quantity {
    display: inline !important;
    font-weight: 600 !important;
    color: #666 !important;
}

/* SKU 变体信息容器 */
.woocommerce-checkout-review-order-table td.product-name dl.variation {
    display: block !important;
    clear: both !important;
    margin: 8px 0 0 0 !important;
    padding: 8px !important;
    background: #f8f9fa !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
}

/* 变体属性名称 (Color:, Size: 等) */
.woocommerce-checkout-review-order-table td.product-name dl.variation dt {
    display: inline !important;
    font-weight: 600 !important;
    color: #1E3A8A !important;
    margin-right: 4px !important;
    float: none !important;
    clear: none !important;
}

/* 变体属性值 */
.woocommerce-checkout-review-order-table td.product-name dl.variation dd {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #333 !important;
}

.woocommerce-checkout-review-order-table td.product-name dl.variation dd p {
    display: inline !important;
    margin: 0 !important;
}

/* 每个属性另起一行 */
.woocommerce-checkout-review-order-table td.product-name dl.variation dt.variation-Color,
.woocommerce-checkout-review-order-table td.product-name dl.variation dt.variation-Size,
.woocommerce-checkout-review-order-table td.product-name dl.variation dt.variation-Specification {
    display: block !important;
    margin-top: 4px !important;
}

.woocommerce-checkout-review-order-table td.product-name dl.variation dt.variation-Color:first-child {
    margin-top: 0 !important;
}


/* ==========================================
   购物车页面商品显示样式
   ========================================== */

/* 购物车页面 SKU 颜色图片样式 */
.woocommerce-cart-form .product-thumbnail img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    border: 1px solid #e0e0e0 !important;
}

/* SKU 属性显示样式 */
.woocommerce-cart .product-name dl.variation,
.woocommerce-cart td.product-name dl.variation,
table.shop_table.cart dl.variation,
.woocommerce-checkout-review-order-table .product-name dl.variation {
    font-size: 13px;
    margin: 5px 0 0 0;
}

.woocommerce-cart .product-name dl.variation dt,
.woocommerce-checkout-review-order-table .product-name dl.variation dt {
    float: none;
    display: inline;
    font-weight: 700 !important;
    color: #e74c3c !important;
    margin: 0;
}

.woocommerce-cart .product-name dl.variation dd,
.woocommerce-checkout-review-order-table .product-name dl.variation dd {
    display: inline;
    margin: 0;
    color: #333;
    font-weight: 600;
}

.woocommerce-cart .product-name dl.variation dd::after,
.woocommerce-checkout-review-order-table .product-name dl.variation dd::after {
    content: '';
    display: block;
}
