/* Two rows at each viewport width. The first cards also work without JavaScript. */
.ep-home .ep-home-gallery .ep-gallery-grid {
    --ep-gallery-columns: 2;
    display: grid;
    --ep-gallery-grid-columns: var(--ep-gallery-visible-columns, var(--ep-gallery-columns));
    grid-template-columns: repeat(var(--ep-gallery-grid-columns), minmax(0, 1fr));
    gap: clamp(10px, 1.4vw, 20px);
    list-style: none;
    padding: 0;
    max-width: calc(var(--ep-gallery-grid-columns) * 280px);
    margin: 0 auto;
}
.ep-gallery-card {
    position: relative;
    min-width: 0;
    margin: 0;
    border: 1px solid #e4ded5;
    border-radius: 12px;
    background: #fffefa;
}
.ep-gallery-card[hidden] {
    display: none;
}
.ep-gallery-card > a {
    display: block;
    height: 100%;
    color: #292c27;
    text-decoration: none;
    border-radius: inherit;
}
.ep-gallery-card > a:hover .ep-gallery-name {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.ep-gallery-photo {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1.12;
    overflow: hidden;
    border-radius: 11px 11px 0 0;
    background: #f5f3ed;
}
.ep-gallery-card > .ep-wishlist-heart {
    position: absolute;
    inset-block-start: 1px;
    inset-inline-end: 1px;
    z-index: 25;
}
.ep-gallery-card > .elenpriv-badge {
    position: absolute;
    inset-block-start: -9px;
    inset-inline-start: -14px;
    z-index: 25;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}
.ep-gallery-card > .elenpriv-badge-new { background: #75cd9b; }
.ep-gallery-card > .elenpriv-badge-sale { background: #f18f7f; }
@media (max-width: 849px) {
    .ep-gallery-card > .elenpriv-badge { inset-inline-start: -5px; }
}
.ep-gallery-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.ep-gallery-stock {
    position: absolute;
    inset-inline-end: 7px;
    bottom: 7px;
    max-width: calc(100% - 14px);
    padding: 3px 6px;
    background: #fffefa;
    color: #435331;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.25;
}
.ep-gallery-stock.is-out {
    color: #68574d;
}
.ep-gallery-details {
    display: grid;
    align-content: start;
    gap: 5px;
    min-height: 63px;
    padding: 9px 10px;
}
.ep-gallery-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 2.7em;
    font-size: clamp(12px, 1.35vw, 15px);
    line-height: 1.35;
}
.ep-gallery-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    text-align: center;
    column-gap: 8px;
    row-gap: 2px;
    color: #777;
    font-size: clamp(20px, 5vw, 23px);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
}
.ep-gallery-price del {
    color: #ef6e69;
    font-size: .84em;
    font-weight: 400;
}
.ep-gallery-price ins {
    color: #686868;
    text-decoration: none;
}
.ep-gallery-price .amount {
    white-space: nowrap;
}
.ep-gallery-controls {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
}
.ep-gallery-controls[hidden] {
    display: none;
}
.ep-home .ep-gallery-controls button {
    display: grid;
    place-items: center;
    min-height: 38px;
    padding: 4px 10px;
    border: 1px solid #cbd5bd;
    border-radius: 20px;
    background: #fffefa;
    color: #435331;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.ep-home .ep-gallery-controls button:hover {
    background: #edf1e5;
}
.ep-home .ep-gallery-controls button[data-ep-gallery-next] {
    width: 38px;
    padding: 7px;
}
.ep-gallery-controls svg {
    width: 20px;
    height: 20px;
}
@media (max-width: 639px) {
    .ep-gallery-grid > .ep-gallery-card:nth-child(n + 5) { display: none; }
}
@media (min-width: 640px) and (max-width: 979px) {
    .ep-home .ep-home-gallery .ep-gallery-grid { --ep-gallery-columns: 3; }
    .ep-gallery-grid > .ep-gallery-card:nth-child(n + 7) { display: none; }
}
@media (min-width: 980px) and (max-width: 1279px) {
    .ep-home .ep-home-gallery .ep-gallery-grid { --ep-gallery-columns: 4; }
    .ep-gallery-grid > .ep-gallery-card:nth-child(n + 9) { display: none; }
}
@media (min-width: 1280px) {
    .ep-home .ep-home-gallery .ep-gallery-grid { --ep-gallery-columns: 5; }
}
.ep-home .ep-home-gallery .ep-gallery-grid:has(> .ep-gallery-card:nth-child(2):last-child) {
    grid-template-columns: minmax(0, 1fr);
    max-width: 245px;
    margin-inline: auto;
}
.ep-home .ep-home-gallery .ep-gallery-grid:has(> .ep-gallery-card:nth-child(3):last-child),
.ep-home .ep-home-gallery .ep-gallery-grid:has(> .ep-gallery-card:nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 510px;
    margin-inline: auto;
}
@media (prefers-reduced-motion: no-preference) {
    .ep-gallery-card { animation: ep-gallery-appear 220ms ease-out; }
    @keyframes ep-gallery-appear {
        from { opacity: 0.55; transform: translateY(3px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

