/* =========================================================
   CWS-Suite — Soft Loop Card
   Drop-in replacement styles for the WooCommerce shop loop.
   Selectors mirror Woo defaults (.products, .product) so
   existing hooks/CSS continue to apply. The .cws-product-grid
   parent enables the same styles on custom grids that don't
   carry Woo's .products class.
   ========================================================= */

.products,
.cws-product-grid {
    --soft-bg:        #f6f3ec;
    --soft-surface:   #ffffff;
    --soft-ink:       #2a2218;
    --soft-muted:     #9a8c70;
    --soft-radius:    18px;
    --soft-radius-sm: 12px;
    --soft-shadow:
        0 1px 2px rgba(20, 20, 20, 0.04),
        0 8px 24px rgba(20, 20, 20, 0.06);
}

ul.products,
.products,
.cws-product-grid {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.products .product,
.cws-product-grid .product {
    background: var(--soft-surface);
    border-radius: var(--soft-radius);
    box-shadow: var(--soft-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
}
.products .product:hover,
.cws-product-grid .product:hover {
    transform: translateY(-2px);
    box-shadow:
        0 1px 2px rgba(20, 20, 20, 0.04),
        0 14px 32px rgba(20, 20, 20, 0.09);
}

.products .product__media,
.cws-product-grid .product__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f3ece1;
    overflow: hidden;
    display: block;
}
.products .product__media img,
.cws-product-grid .product__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.products .product__badge,
.cws-product-grid .product__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff;
    color: var(--soft-ink);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.products .product__fav,
.cws-product-grid .product__fav {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #fff;
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    color: #3a2e1e;
    transition: transform .15s ease;
    padding: 0;
}
.products .product__fav:hover,
.cws-product-grid .product__fav:hover { transform: scale(1.08); }
.products .product__fav.is-active,
.cws-product-grid .product__fav.is-active { color: #c0392b; }
.products .product__fav.is-active svg,
.cws-product-grid .product__fav.is-active svg { fill: currentColor; }

.products .product__body,
.cws-product-grid .product__body {
    padding: 14px 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.products .product__category,
.cws-product-grid .product__category {
    font-size: 11px;
    color: var(--soft-muted);
    letter-spacing: 0.04em;
}
.products .product__title,
.cws-product-grid .product__title {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--soft-ink);
    margin: 0;
}
.products .product__title a,
.cws-product-grid .product__title a {
    color: inherit;
    text-decoration: none;
}
.products .product__price,
.cws-product-grid .product__price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: auto;
}
.products .product__price ins,
.products .product__price .price__current,
.cws-product-grid .product__price ins,
.cws-product-grid .product__price .price__current {
    font-size: 16px;
    font-weight: 600;
    color: var(--soft-ink);
    text-decoration: none;
    background: transparent;
}
.products .product__price del,
.products .product__price .price__was,
.cws-product-grid .product__price del,
.cws-product-grid .product__price .price__was {
    font-size: 12px;
    color: var(--soft-muted);
    text-decoration: line-through;
}

.products .product__cta-wrap,
.cws-product-grid .product__cta-wrap { padding: 0 16px 16px; }
.products .product__cta a,
.cws-product-grid .product__cta a {
    color: #fff;
}
.products .product__cta,
.cws-product-grid .product__cta {
    width: 100%;
    padding: 12px 14px;
    background: var(--soft-ink);
    color: #fff;
    border: 0;
    border-radius: var(--soft-radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}
.products .product__cta:hover,
.cws-product-grid .product__cta:hover { background: #1a140d; color: #fff; }
