/**
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 */

.heritage-product-card {
    container-type: inline-size;
    overflow: hidden;
    border: 1px solid var(--hd-border, #ebe4d8);
    border-radius: var(--hd-radius, 16px);
    background-color: var(--hd-surface, #fff);
    color: var(--hd-ink, #1f2a24);
    box-shadow: none;
}

.heritage-product-card:hover,
.heritage-product-card:focus-within {
    border-color: var(--hd-gold, #b08d4f);
    color: var(--hd-ink, #1f2a24);
    box-shadow: 0 6px 16px rgba(31, 42, 36, 0.08);
}

.heritage-product-card .heritage-product-cover,
.hd-page .hd-discover .heritage-product-card .heritage-product-cover {
    --heritage-cover-gutter: clamp(0.75rem, 5cqi, 1.5rem);
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    isolation: isolate;
    container-type: inline-size;
    /* Start at the artwork ratio and let wrapped translations increase the cover height. */
    min-block-size: 56.25cqi;
    aspect-ratio: auto;
    overflow: hidden;
    background-color: var(--hd-cream, #f5efe4);
}

.heritage-product-card .heritage-product-cover__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.heritage-product-card .heritage-product-cover__title {
    position: relative;
    z-index: 1;
    align-self: center;
    width: 46%;
    margin: var(--heritage-cover-title-top, 0.75rem) auto var(--heritage-cover-title-bottom, 0.75rem) var(--heritage-cover-gutter);
    color: var(--hd-forest, #213a2f);
    font-family: var(--hd-serif, "Cormorant Garamond", Georgia, serif);
    font-size: clamp(1.075rem, 7.5cqi, 2.25rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: normal;
    hyphens: auto;
    overflow-wrap: anywhere;
    text-align: start;
    text-shadow: 0 0 0.3rem #faf8f4;
}

.heritage-product-card .heritage-product-cover__title.heritage-product-cover__title--long {
    font-size: clamp(1rem, 5.9cqi, 1.625rem);
    line-height: 1.12;
}

.heritage-product-card .heritage-product-cover__title::before {
    position: absolute;
    z-index: -1;
    inset: -0.22em -0.35em;
    border-radius: 0.35em;
    background-color: rgba(250, 248, 244, 0.87);
    filter: blur(6px);
    pointer-events: none;
    content: "";
}

.heritage-product-card .heritage-product-cover__icon {
    position: absolute;
    z-index: 1;
    top: clamp(0.75rem, 5cqi, 1.5rem);
    left: var(--heritage-cover-gutter);
    display: grid;
    place-items: center;
    width: clamp(1.75rem, 10cqi, 2.75rem);
    aspect-ratio: 1;
    border-radius: 50%;
    background-color: var(--hd-sand, #efe6d6);
    color: var(--hd-forest, #213a2f);
}

.heritage-product-card .heritage-product-card__body {
    background-color: var(--hd-surface, #fff);
    color: var(--hd-ink, #1f2a24);
}

.heritage-product-card .heritage-product-card__body .heritage-product-card__action {
    border-color: var(--hd-primary, #213a2f);
    border-radius: 0.65rem;
    background-color: var(--hd-primary, #213a2f);
    color: #fff;
}

.heritage-product-card .heritage-product-card__body .heritage-product-card__action:hover,
.heritage-product-card .heritage-product-card__body .heritage-product-card__action:focus-visible,
.heritage-product-card:focus-visible .heritage-product-card__action {
    border-color: #172a21;
    background-color: #172a21;
    color: #fff;
}
