/**
 * Webteck - WooCommerce Shortcode Product Grid
 *
 * WooCommerce shortcodes such as [products], [sale_products],
 * [featured_products] and [best_selling_products] render each product card
 * ( woocommerce/content-product.php -> .product-wrapper > .th-product )
 * directly inside the ".row" wrapper the theme prints via the
 * "woocommerce_product_loop_start" / "woocommerce_product_loop_end" filters,
 * with no column class attached to each card. Left alone, the cards simply
 * stack one per row.
 *
 * This file turns that ".row" into a responsive grid so shortcode products
 * lay out the same way the built-in shop page does: 1 column on mobile,
 * 2 columns on small screens, 3 columns on desktop and 4 columns on large
 * screens, using the theme's existing ".th-product" card design.
 *
 * @Packge  Webteck
 */

.row > .product-wrapper {
    display: flex;
    width: 100%;
    padding-right: calc(var(--bs-gutter-x, 24px) * .5);
    padding-left: calc(var(--bs-gutter-x, 24px) * .5);
    margin-bottom: 40px;
}

.row > .product-wrapper > .th-product {
    width: 100%;
}

/**
 * Card styling for shortcode grids.
 *
 * The theme's ".th-product" is normally a bare image + text block (built for
 * dark/colored slider backgrounds). On a plain page background that reads as
 * unstyled, so cards dropped in via a WooCommerce shortcode get their own
 * white "card" chrome: border, rounded corners, soft shadow and a hover lift,
 * plus a bit more emphasis on the price. Scoped to ".row > .product-wrapper"
 * only, so the shop/archive page and any product sliders keep their current
 * look untouched.
 */
.row > .product-wrapper > .th-product {
    height: 100%;
    background-color: var(--white-color);
    border: 1px solid var(--th-border-color);
    border-radius: 12px;
    padding: 20px 20px 28px 20px;
    box-shadow: 0 4px 20px rgba(20, 29, 56, 0.06);
    transition: all ease 0.4s;
}

.row > .product-wrapper > .th-product:hover {
    border-color: transparent;
    box-shadow: 0 20px 40px rgba(20, 29, 56, 0.14);
    transform: translateY(-6px);
}

.row > .product-wrapper > .th-product .product-img {
    margin-bottom: 20px;
    border-radius: 8px;
}

.row > .product-wrapper > .th-product .product-title {
    font-size: 18px;
    line-height: 1.4;
    margin: 0 0 8px 0;
}

.row > .product-wrapper > .th-product .price {
    font-size: 19px;
    font-weight: 700;
    color: var(--theme-color);
    margin-bottom: 0;
}

.row > .product-wrapper > .th-product .price ins {
    text-decoration: none;
    color: var(--theme-color);
}

@media (min-width: 576px) {
    .row > .product-wrapper {
        width: 50%;
    }
}

@media (min-width: 992px) {
    .row > .product-wrapper {
        width: 33.3333%;
    }
}

@media (min-width: 1200px) {
    .row > .product-wrapper {
        width: 25%;
    }
}

/**
 * Fallback grid for the default WooCommerce markup ( ul.products > li.product ),
 * in case any widget or third-party integration renders products without
 * going through the theme's loop-start/loop-end filters above.
 */
ul.products {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0 -12px 0 -12px !important;
    padding: 0;
}

ul.products > li.product {
    width: 100%;
    padding: 0 12px;
    margin-bottom: 40px;
    float: none;
}

@media (min-width: 576px) {
    ul.products > li.product {
        width: 50%;
    }
}

@media (min-width: 992px) {
    ul.products > li.product {
        width: 33.3333%;
    }
}

@media (min-width: 1200px) {
    ul.products > li.product {
        width: 25%;
    }
}
