/* Use the catalog colors on the home carousel without changing its geometry. */
.elow-home-hits {
    --elow-hits-ink: #26354a;
    --elow-hits-accent: #344d86;
    --elow-hits-muted: #686d77;
    --elow-hits-line: #e8e4de;
    --elow-hits-shadow: rgba(28, 41, 62, .045);
    --elow-hits-action-fill: rgba(247, 246, 244, .62);
}

.dark-theme .elow-home-hits {
    --elow-hits-ink: #e4e8ef;
    --elow-hits-accent: #bdcff2;
    --elow-hits-muted: #abb4c2;
    --elow-hits-line: #3c3f47;
    --elow-hits-shadow: rgba(0, 0, 0, .16);
    --elow-hits-action-fill: rgba(38, 40, 48, .62);
}

.elow-home-hits .product-tile {
    box-shadow: 0 0 0 1px var(--elow-hits-line), 0 4px 14px var(--elow-hits-shadow);
}

.elow-home-hits .product-tile__name a {
    color: var(--elow-hits-ink);
}

.elow-home-hits :is(.product-tile__price, .product-tile__product-price) {
    color: var(--elow-hits-accent);
}

.elow-home-hits .product-tile .price-compare {
    color: var(--elow-hits-muted);
}

/* The actions sit over the image; they take no space in the card. */
.elow-home-hits--mobile .product-tile__actions {
    display: block;
    width: 36px;
}

.elow-home-hits--mobile .product-tile__actions :is(.product-tile__action, .product-tile__dialog) {
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 10px;
    background-color: var(--elow-hits-action-fill);
    color: var(--elow-hits-ink);
}

.elow-home-hits--mobile .product-tile__actions .selected {
    color: var(--elow-hits-accent);
}

/* Fit the image to the current tile width without the carousel's fixed slot. */
.elow-home-hits {
    --elow-hits-photo-limit: var(--product-tile-image-block-height, 500px);
}

.elow-home-hits.-carousel {
    --elow-hits-photo-limit: min(470px, var(--product-tile-image-block-height, 500px));
}

.elow-home-hits .product-tile .product-tile__image {
    display: block;
    flex: 0 0 auto;
    height: auto;
    margin: 0 0 12px;
    padding: 0;
    border-radius: 20px 20px 0 0;
}

.elow-home-hits .product-tile .product-tile__image-inner {
    display: block;
    height: auto;
    padding: 0;
    border-radius: inherit;
}

.elow-home-hits .product-tile__image-inner > img.js-img,
.elow-home-hits .product-tile__image .product-preview-gallery__item > img {
    display: block;
    width: 100%;
    height: auto;
    max-height: var(--elow-hits-photo-limit);
    object-fit: contain;
    object-position: center top;
    border-radius: 20px 20px 0 0;
}

.elow-home-hits .product-tile__image img[src$="/img/lazy-image.png"] {
    aspect-ratio: 3 / 4;
}

/* The theme freezes the slot while hovering across the desktop photo zones. */
.elow-home-hits .product-tile__image.fixed .product-tile__image-inner,
.elow-home-hits .product-tile__image.fixed .product-tile__image-inner > img.js-img {
    height: 100%;
}

.elow-home-hits .product-tile__meta:empty {
    display: none;
}

.elow-home-hits .product-tile__prices-cart {
    margin-top: 12px;
}
