/*
 * Ecko Green product card — WC loop card override.
 *
 * Used in every WC loop: shop, category, search, Featured Products
 * on the home page. Quote-only flow: no price column unless set,
 * Add-to-Quote CTA instead of Add-to-Cart.
 */

.ecko-product-card,
li.product.ecko-product-card {
    background-color: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
    transition: border-color 150ms cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ecko-product-card:hover,
.ecko-product-card:focus-within {
    border-color: var(--kelly);
    box-shadow: 0 2px 12px color-mix(in oklch, var(--ink) 8%, transparent);
}

.ecko-product-card__link {
    display: flex;
    flex-direction: column;
    color: var(--ink);
    text-decoration: none;
    flex: 1;
}

.ecko-product-card__image {
    background-color: var(--section);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ecko-product-card__img,
.ecko-product-card .ecko-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    box-sizing: border-box;
}

.ecko-product-card__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.ecko-product-card__brand {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--kelly-hover);
    margin: 0;
}

.ecko-product-card__title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
    margin: 0;
}

.ecko-product-card__price {
    font-size: 16px;
    font-weight: 700;
    color: var(--forest-deep);
    margin: 4px 0 0;
}

.ecko-product-card__action {
    padding: 0 16px 16px;
}

/*
 * Style YITH RAQ's injected button to match the home-page primary CTA
 * (--kelly fill, paper text). Selector is intentionally over-specific —
 * we need to outrank Kadence's `.woocommerce a.button` rule which also
 * matches this anchor.
 */
.woocommerce .ecko-product-card__action .add-request-quote-button,
.woocommerce .ecko-product-card__action a.add-request-quote-button,
.ecko-product-card__action .add-request-quote-button,
.ecko-product-card__action button.add-request-quote-button,
.ecko-product-card__action a.add-request-quote-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    width: 100%;
    padding: 10px 18px;
    background-color: var(--kelly);
    color: var(--paper);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    border: 0;
    box-shadow: none;
    cursor: pointer;
    transition: background-color 150ms cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 44px;
}

.woocommerce .ecko-product-card__action .add-request-quote-button:hover,
.woocommerce .ecko-product-card__action a.add-request-quote-button:hover,
.ecko-product-card__action .add-request-quote-button:hover,
.ecko-product-card__action .add-request-quote-button:focus-visible {
    background-color: var(--kelly-hover);
    color: var(--paper);
}

.ecko-product-card__action .add-request-quote-button:focus-visible {
    outline: 2px solid var(--kelly);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .ecko-product-card,
    .ecko-product-card__action .add-request-quote-button {
        transition: none;
    }
}
