@layer marielco-product-card {
    /* Shared catalog presentation for Shop and native PDP recommendations. */
    .marielco-shop, .marielco-pdp__recommendations {
        --marielco-card-info-top: 14px;
        --marielco-card-info-inline: 6px;
        --marielco-card-info-bottom: 2px;
        --marielco-card-info-align: center;
        --marielco-card-title-size: 12px;
        --marielco-card-title-line: 1.5;
        --marielco-card-title-case: none;
        --marielco-card-price-gap: 6px;
        --marielco-card-price-size: 12px;
        --marielco-card-price-line: 1.4;
    }
    :where(.marielco-shop, .marielco-pdp__recommendations) .marielco-product-card { color: var(--marielco-text); font: var(--marielco-weight-body) var(--marielco-text-body)/var(--marielco-line-body) var(--marielco-font-family); }
    :where(.marielco-shop, .marielco-pdp__recommendations) .marielco-product-card__price { color: var(--marielco-text-muted); }
    .marielco-product-card { display: flex; flex-direction: column; min-inline-size: 0; padding-block-end: 0; text-align: var(--marielco-card-info-align, inherit); list-style: none; }
    /* The info panel owns all spacing between images, including variable-length names. */
    .marielco-product-card__info { box-sizing: border-box; display: flex; flex: 1 0 auto; flex-direction: column; justify-content: center; min-block-size: 112px; padding-block: 24px; }
    .marielco-product-card__info .marielco-product-card__name { margin-block: 0; }
    .marielco-product-card__info .marielco-product-card__state { margin-block-end: 0; }
    .marielco-product-card__link { display: block; text-decoration: none; }
    /* One reserved viewport clips the image layer during scrolling and gallery motion. */
    .marielco-product-card__media { flex: 0 0 auto; position: relative; aspect-ratio: var(--marielco-product-thumbnail-ratio); --marielco-card-media-surface: var(--marielco-product-thumbnail-background); background: var(--marielco-card-media-surface); overflow: hidden; contain: layout paint; }
    .marielco-product-card__image-link { position: absolute; inset: 0; }
    .marielco-product-card__image-link:focus-visible { outline-offset: -3px; }
    .marielco-product-card__track { display: flex; inline-size: 100%; block-size: 100%; }
    .marielco-product-card__track > :is(img, picture) { flex: 0 0 100%; min-inline-size: 0; block-size: 100%; }
    .marielco-product-card__track > picture { display: block; }
    .marielco-product-card__actions { position: absolute; inset-block-start: var(--marielco-card-action-top, 6px); inset-inline-end: var(--marielco-card-action-end, 6px); z-index: 2; display: grid; justify-items: center; gap: 0; }
    .marielco-product-card__bag { --marielco-card-action-icon-size: 24px; display: grid; place-items: center; inline-size: 44px; block-size: 31px; padding: 0; border: 0; color: #555; background: none; text-decoration: none; cursor: pointer; transition: color .18s ease; }
    .marielco-product-card__wishlist { display: grid; place-items: center; inline-size: 44px; block-size: 31px; min-block-size: 0; padding: 0; border: 0; color: #555; background: transparent; }
    .marielco-product-card__wishlist svg { fill: none; stroke: currentColor; stroke-width: 1.25; }
    .marielco-product-card__wishlist[aria-pressed="true"] svg { fill: currentColor; }
    .marielco-product-card__wishlist:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
    .marielco-product-card__actions svg { position: relative; inset-inline-start: 6.5px; inline-size: var(--marielco-card-action-icon-size, 18px); block-size: var(--marielco-card-action-icon-size, 18px); transition: transform .18s ease; }
    .marielco-product-card__actions :where(a,button):where(:hover,:focus-visible) { color: #111; }
    .marielco-product-card__bag:hover svg { transform: scale(1.08); }
    .marielco-product-card__bag:active svg { transform: scale(.94); }
    .marielco-product-card__bag:active svg path:first-child { fill: currentColor; }
    .marielco-product-card__image { inline-size: 100%; block-size: 100%; object-fit: var(--marielco-product-thumbnail-fit); object-position: center; background: var(--marielco-card-media-surface); transition: opacity .18s ease; }
    .marielco-product-card__image--alternate { object-fit: cover; }
    .marielco-product-card__image[data-card-image-pending] { opacity: 0; }
    .marielco-product-card__media[data-card-image-slow] { animation: marielco-card-loading 2s ease-in-out infinite; }
    .marielco-product-card__image-status { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; color: var(--marielco-text-muted); font-size: 12px; pointer-events: none; }
    @keyframes marielco-card-loading { 50% { background-color: #e8e8e8; } }
    .marielco-product-card__name {
        margin-block-start: var(--marielco-card-info-top, 0.875rem);
        padding-inline: var(--marielco-card-info-inline, 0px);
        font-size: var(--marielco-card-title-size, var(--marielco-text-small));
        text-transform: var(--marielco-card-title-case, none);
        font-weight: var(--marielco-weight-body);
        line-height: var(--marielco-card-title-line, var(--marielco-line-body));
        overflow-wrap: anywhere;
    }
    /* Native per-line underlines keep one thickness without painting through glyphs. */
    .marielco-product-card__title-label {
        display: inline;
        font: inherit;
        color: inherit;
        text-decoration-line: underline;
        text-decoration-color: transparent;
        text-decoration-thickness: 1px;
        text-underline-offset: .25em;
        text-decoration-skip-ink: auto;
        transition: text-decoration-color .24s ease;
    }
    .marielco-product-card__link:where(:hover, :focus-visible) .marielco-product-card__title-label,
    .marielco-product-card__media:where(:hover, :focus-within) ~ .marielco-product-card__info .marielco-product-card__title-label { text-decoration-color: currentColor; }
    .marielco-product-card__price { margin-block-start: var(--marielco-card-price-gap, 0.375rem); padding-inline: var(--marielco-card-info-inline, 0px); font-size: var(--marielco-card-price-size, var(--marielco-text-small)); line-height: var(--marielco-card-price-line, inherit); }
    .marielco-product-card__price ins { text-decoration: none; }
    .marielco-product-card__price del { color: var(--marielco-text-muted); margin-inline-end: 0.375rem; }
    .marielco-product-card__state { margin-block-start: 0.5rem; color: var(--marielco-text-muted); font-size: var(--marielco-text-small); }
    .marielco-product-card [hidden] { display: none; }
    .marielco-product-card__gallery { position: absolute; inset: 0; pointer-events: none; }
    .marielco-product-card__gallery-feedback { position: absolute; z-index: 2; inset: auto 0 26px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; inline-size: max-content; max-inline-size: calc(100% - 20px); min-block-size: 28px; margin-inline: auto; padding: 0 8px; background: #fff; color: #222; font-size: 11px; line-height: 1.35; pointer-events: none; }
    .marielco-product-card__gallery-feedback button { min-block-size: 44px; padding: 0 6px; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; pointer-events: auto; }
    .marielco-product-card__gallery button { pointer-events: auto; color: #111; border: 0; border-radius: 0; background: transparent; cursor: pointer; }
    .marielco-product-card__gallery :where(button):focus-visible { outline: 2px solid #111; outline-offset: -3px; }
    .marielco-product-card__previous, .marielco-product-card__next { position: absolute; inset-block-start: calc(50% - 32px); display: grid; place-items: center; inline-size: 42px; block-size: 64px; padding: 0; opacity: 0; }
    .marielco-product-card__previous { inset-inline-start: 5px; }
    .marielco-product-card__next { inset-inline-end: 5px; }
    .marielco-product-card__gallery button svg { inline-size: 21px; block-size: 21px; }
    .marielco-product-card__image-count { position: absolute; inset-block-end: 10px; inset-inline-start: 11px; font-size: 8px; line-height: 1.5; opacity: 0; }
    .marielco-product-card__media:where(:hover, :focus-within) :where(.marielco-product-card__previous, .marielco-product-card__next, .marielco-product-card__image-count) { opacity: 1; }
    .marielco-product-card__progress { position: absolute; inset-inline: 8px; inset-block-end: 12px; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 5px; block-size: 4px; pointer-events: none; }
    .marielco-product-card__progress span { flex: 0 0 auto; inline-size: 4px; block-size: 4px; border-radius: 2px; background: #999; transition: inline-size .18s cubic-bezier(.22,.61,.36,1), background-color .18s ease; }
    .marielco-product-card__progress span.is-current { inline-size: 18px; background: #111; }
    @media (max-width: 767px) { .marielco-product-card__info { min-block-size: 96px; padding-block: 18px; } }
    @media (max-width: 768px) { .marielco-product-card__actions { inset-block-start: var(--marielco-card-action-top, 3.5px); inset-inline-end: var(--marielco-card-action-end, 3px); gap: 0; } }
    @media (prefers-reduced-motion: reduce) { .marielco-product-card__title-label, .marielco-product-card__progress span, .marielco-product-card__image, .marielco-product-card__actions :where(a,button,svg) { transition: none; } .marielco-product-card__media[data-card-image-slow] { animation: none; } }
    @media (forced-colors: active) { .marielco-product-card__link:where(:hover, :focus-visible) .marielco-product-card__title-label { text-decoration: underline; text-underline-offset: 2px; } }
    .marielco-product-card__media[data-gallery-ready] { touch-action: pan-y pinch-zoom; }
    @media (max-width: 834px), (hover: none) { .marielco-product-card__previous, .marielco-product-card__next, .marielco-product-card__image-count { display: none; } }
}
