/* AWS Price Calculator – cart layout overrides (uploads path, safe from updates) */

/* 先把 product-name 从 flex 拉回 table-cell，提升 specificity */
body.woocommerce-cart table.shop_table.cart th.product-name,
body.woocommerce-cart table.shop_table.cart td.product-name {
    display: table-cell !important;
    vertical-align: top;
}

/* 商品单元格内使用 grid 排列标题+字段 */
body.woocommerce-cart table.shop_table.cart th.product-name .awspc-cart-item-block,
body.woocommerce-cart table.shop_table.cart td.product-name .awspc-cart-item-block {
    display: grid !important;
    gap: 6px !important;
    align-items: start !important;
}

body.woocommerce-cart table.shop_table.cart th.product-name dl.awspc-cart-variation,
body.woocommerce-cart table.shop_table.cart td.product-name dl.awspc-cart-variation {
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: 120px 1fr !important;
    column-gap: 8px !important;
    row-gap: 4px !important;
    font-size: 13px !important;
    color: #555 !important;
    padding: 0 !important;
}

body.woocommerce-cart table.shop_table.cart th.product-name dl.awspc-cart-variation dt,
body.woocommerce-cart table.shop_table.cart th.product-name dl.awspc-cart-variation dd,
body.woocommerce-cart table.shop_table.cart td.product-name dl.awspc-cart-variation dt,
body.woocommerce-cart table.shop_table.cart td.product-name dl.awspc-cart-variation dd {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    line-height: 1.4 !important;
}

body.woocommerce-cart table.shop_table.cart th.product-name dl.awspc-cart-variation dt,
body.woocommerce-cart table.shop_table.cart td.product-name dl.awspc-cart-variation dt {
    font-weight: 600 !important;
    color: #333 !important;
}

body.woocommerce-cart table.shop_table.cart th.product-name dl.awspc-cart-variation dd,
body.woocommerce-cart table.shop_table.cart td.product-name dl.awspc-cart-variation dd {
    color: #555 !important;
}

/* 价格列：对齐 Edit 按钮与价格 */
body.woocommerce-cart table.shop_table.cart td.product-price .wpc-cart-container {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

body.woocommerce-cart table.shop_table.cart td.product-price .wpc-edit-icon {
    display: inline-flex !important;
    align-items: center !important;
    background-color: #f8f8f8 !important;
    border: 1px solid #1a1a1a !important;
    border-radius: 4px !important;
    padding: 6px 10px 6px 30px !important;
    background-position: 10px 50% !important;
    line-height: 1.2 !important;
    font-size: 13px !important;
}

body.woocommerce-cart table.shop_table.cart td.product-price .wpc-cart-container .price {
    font-weight: 600 !important;
}

body.woocommerce-cart table.shop_table.cart tr.cart_item:hover td {
    background-color: #fafafa;
}

@media (max-width: 768px) {
    body.woocommerce-cart table.shop_table.cart th.product-name dl.awspc-cart-variation,
    body.woocommerce-cart table.shop_table.cart td.product-name dl.awspc-cart-variation {
        grid-template-columns: 110px 1fr !important;
    }

    body.woocommerce-cart table.shop_table.cart td.product-price .wpc-cart-container {
        justify-content: flex-start !important;
    }
}
