/*
 * Blotto Auto Gift 2.1.38
 * A single inventory-card language for paid products and free Tester gifts.
 * Presentation only: no price, quantity, coupon, shipping or entitlement logic.
 */

body.blotto-commerce-ui form.woocommerce-cart-form table.shop_table {
    --blotto-item-border: #eadde1;
    --blotto-item-shadow: 0 7px 22px rgba(75, 42, 53, .065);
    --blotto-item-label-bg: #fff0f4;
    --blotto-item-label-color: #a83c60;
    --blotto-gift-label-bg: #edf8f0;
    --blotto-gift-label-color: #176b32;
}

/* All inventory rows use the same surface, border, radius and depth. */
body.blotto-commerce-ui form.woocommerce-cart-form table.shop_table > tbody > tr.woocommerce-cart-form__cart-item,
body.blotto-commerce-ui form.woocommerce-cart-form table.shop_table > tbody > tr.blotto-free-gift-row {
    background: #fff !important;
    box-shadow: var(--blotto-item-shadow) !important;
}

body.blotto-commerce-ui form.woocommerce-cart-form table.shop_table > tbody > tr.woocommerce-cart-form__cart-item > td,
body.blotto-commerce-ui form.woocommerce-cart-form table.shop_table > tbody > tr.blotto-free-gift-row > td {
    border-color: var(--blotto-item-border) !important;
    background: transparent !important;
}

/* Type first, product name second: identical information hierarchy for every row. */
body.blotto-commerce-ui form.woocommerce-cart-form .cart_item .product-name {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;
}

body.blotto-commerce-ui form.woocommerce-cart-form .cart_item .product-name::before {
    display: inline-flex !important;
    position: static !important;
    align-items: center;
    justify-content: center;
    width: max-content !important;
    min-height: 24px;
    margin: 0 !important;
    padding: 4px 10px;
    border: 1px solid #efd8df;
    border-radius: 999px;
    background: var(--blotto-item-label-bg);
    color: var(--blotto-item-label-color);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    visibility: visible !important;
    opacity: 1 !important;
    box-sizing: border-box;
}

body.blotto-commerce-ui form.woocommerce-cart-form
    .cart_item:not(.blotto-free-gift-row) .product-name::before {
    content: "สินค้า" !important;
    display: inline-flex !important;
}

body.blotto-commerce-ui form.woocommerce-cart-form
    .blotto-free-gift-row .product-name::before {
    content: "ของแถมฟรี" !important;
    border-color: #cfe9d7;
    background: var(--blotto-gift-label-bg);
    color: var(--blotto-gift-label-color);
}

body.blotto-commerce-ui form.woocommerce-cart-form .cart_item .product-name > a,
body.blotto-commerce-ui form.woocommerce-cart-form .cart_item .blotto-gift-product-name {
    display: block;
    line-height: 1.45;
}

/* Gift state is communicated by its label/value, not a separate card treatment. */
body.blotto-commerce-ui form.woocommerce-cart-form .blotto-free-gift-row .blotto-gift-free-price {
    min-width: 34px;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--blotto-gift-label-bg);
    color: var(--blotto-gift-label-color) !important;
    line-height: 1.3;
}

@media (min-width: 768px) {
    body.blotto-commerce-ui form.woocommerce-cart-form table.shop_table > tbody > tr.woocommerce-cart-form__cart-item {
        min-height: 122px;
    }

    body.blotto-commerce-ui form.woocommerce-cart-form table.shop_table > tbody > tr.woocommerce-cart-form__cart-item > td {
        height: 122px;
    }
}

@media (max-width: 767px) {
    body.blotto-commerce-ui form.woocommerce-cart-form table.shop_table > tbody > tr.woocommerce-cart-form__cart-item,
    body.blotto-commerce-ui form.woocommerce-cart-form table.shop_table > tbody > tr.blotto-free-gift-row {
        min-height: 134px;
        background: #fff !important;
        box-shadow: var(--blotto-item-shadow) !important;
    }

    body.blotto-commerce-ui form.woocommerce-cart-form .cart_item .product-name::before {
        margin: 0 !important;
    }

    body.blotto-commerce-ui form.woocommerce-cart-form .product-thumbnail a,
    body.blotto-commerce-ui form.woocommerce-cart-form .product-thumbnail img {
        background: #faf7f8 !important;
    }
}
