/* Anatomy Homepage Shop Products v1.2
 * Purposefully uses its own compact card markup instead of the theme archive
 * card template. This prevents theme-specific hover images from dropping into
 * normal document flow when the products are rendered inside Elementor.
 */

.anatomy-home-shop-products {
    --ahsp-gap: clamp(18px, 2.35vw, 38px);
    width: 100%;
    margin: 0;
    padding: clamp(28px, 4vw, 62px) clamp(12px, 2.3vw, 38px);
    box-sizing: border-box;
}

.anatomy-home-shop-products *,
.anatomy-home-shop-products *::before,
.anatomy-home-shop-products *::after {
    box-sizing: border-box;
}

.anatomy-home-shop-products__header {
    margin: 0 0 clamp(24px, 3vw, 44px);
}

.anatomy-home-shop-products__title {
    margin: 0;
    font-family: inherit;
    font-size: clamp(22px, 2.4vw, 36px);
    font-weight: 500;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: .01em;
}

.anatomy-home-shop-products__grid {
    display: grid;
    grid-template-columns: repeat(var(--ahsp-columns, 4), minmax(0, 1fr));
    gap: clamp(34px, 4vw, 70px) var(--ahsp-gap);
    width: 100%;
}

.ahsp-card {
    min-width: 0;
    margin: 0;
    padding: 0;
    background: transparent;
}

.ahsp-card__media {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #fff;
}

.ahsp-card__image-link {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 0.82 / 1;
    overflow: hidden;
    background: #fff;
    text-decoration: none;
}

.ahsp-card__image {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    border: 0 !important;
    box-shadow: none !important;
    transition: opacity .38s ease, transform .6s cubic-bezier(.2,.65,.25,1);
}

.ahsp-card__image--primary {
    z-index: 1;
    opacity: 1;
}

.ahsp-card__image--hover {
    z-index: 2;
    opacity: 0;
    pointer-events: none;
}

.ahsp-card--has-hover:hover .ahsp-card__image--primary,
.ahsp-card--has-hover:focus-within .ahsp-card__image--primary {
    opacity: 0;
}

.ahsp-card--has-hover:hover .ahsp-card__image--hover,
.ahsp-card--has-hover:focus-within .ahsp-card__image--hover {
    opacity: 1;
}

.ahsp-card:hover .ahsp-card__image,
.ahsp-card:focus-within .ahsp-card__image {
    transform: scale(1.012);
}

.ahsp-card__sale {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 5;
    padding: 7px 10px;
    background: #111;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* The Shop archive reveals SELECT OPTIONS as a clean outlined control around
 * the bottom of the product image. Recreate that behavior here. */
.ahsp-card__action {
    position: absolute;
    z-index: 6;
    left: 14px;
    right: 14px;
    bottom: 14px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}

.ahsp-card:hover .ahsp-card__action,
.ahsp-card:focus-within .ahsp-card__action {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.anatomy-home-shop-products .ahsp-card__action .button,
.anatomy-home-shop-products .ahsp-card__action a.button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 44px;
    margin: 0 !important;
    padding: 11px 16px !important;
    border: 1px solid #111 !important;
    border-radius: 0 !important;
    background: rgba(255,255,255,.96) !important;
    color: #111 !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    text-align: center;
    text-transform: uppercase !important;
    letter-spacing: .055em !important;
    text-decoration: none !important;
}

.anatomy-home-shop-products .ahsp-card__action .button:hover,
.anatomy-home-shop-products .ahsp-card__action a.button:hover {
    background: #111 !important;
    color: #fff !important;
}

.ahsp-card__details {
    padding-top: 14px;
}

.ahsp-card__title {
    margin: 0 0 4px !important;
    padding: 0 !important;
    font-family: inherit !important;
    font-size: clamp(13px, .95vw, 15px) !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.ahsp-card__title a {
    color: inherit !important;
    text-decoration: none !important;
}

.ahsp-card__price,
.ahsp-card__price .amount,
.ahsp-card__price bdi {
    margin: 0 !important;
    color: inherit !important;
    font-family: inherit !important;
    font-size: clamp(13px, .9vw, 15px) !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
}

.ahsp-card__price del {
    opacity: .55;
    margin-right: 6px;
}

.ahsp-card__price ins {
    text-decoration: none;
}

.anatomy-home-shop-products__footer {
    margin-top: clamp(30px, 4vw, 54px);
    text-align: center;
}

.anatomy-home-shop-products__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    min-height: 46px;
    padding: 12px 22px;
    border: 1px solid #111;
    background: transparent;
    color: #111;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    text-decoration: none !important;
    transition: background-color .2s ease, color .2s ease;
}

.anatomy-home-shop-products__button:hover {
    background: #111;
    color: #fff;
}

.anatomy-home-shop-empty {
    padding: 24px;
    text-align: center;
}

@media (max-width: 1024px) {
    .anatomy-home-shop-products__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .anatomy-home-shop-products {
        padding-left: 14px;
        padding-right: 14px;
    }

    .anatomy-home-shop-products__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 10px;
        row-gap: 30px;
    }

    .ahsp-card__image-link {
        aspect-ratio: .78 / 1;
    }

    .ahsp-card__details {
        padding-top: 10px;
    }

    .ahsp-card__title,
    .ahsp-card__price,
    .ahsp-card__price .amount,
    .ahsp-card__price bdi {
        font-size: 12px !important;
    }

    /* There is no hover on most touch devices, so keep the action accessible. */
    .ahsp-card__action {
        left: 8px;
        right: 8px;
        bottom: 8px;
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .anatomy-home-shop-products .ahsp-card__action .button,
    .anatomy-home-shop-products .ahsp-card__action a.button {
        min-height: 38px;
        padding: 8px 7px !important;
        font-size: 9px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ahsp-card__image,
    .ahsp-card__action,
    .anatomy-home-shop-products__button {
        transition: none !important;
    }
}
