﻿/* Reusable product card component. Scoped so it can sit in home, search, catalog and related-product grids. */
.catalog-card-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 20px;
    align-items: stretch;
}

.catalog-card-grid > .product-card-item {
    display: flex;
    min-width: 0;
}

.catalog-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e9e4da;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 22px #263b3408;
    transition: transform .22s,box-shadow .22s,border-color .22s;
}

    .catalog-card:hover {
        transform: translateY(-4px);
        border-color: #ded4c5;
        box-shadow: 0 14px 34px #263b3415;
    }

.catalog-card__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #eee9df;
}

.catalog-card__countdown {
    position: absolute;
    z-index: 2;
    left: 8px;
    bottom: 8px;
    display: none;
    max-width: calc(100% - 16px);
    padding: 5px 9px;
    border: 1px solid #ffffff90;
    border-radius: 20px;
    background: #fffF;
    box-shadow: 0 2px 8px #263b3420;
    color: #9b3d32;
    font-size: 10px;
    line-height: 1.4;
    direction: rtl;
    white-space: nowrap;
    pointer-events: none;
}

.catalog-card:hover .catalog-card__countdown,
.catalog-card:focus-within .catalog-card__countdown { display: block; }
.catalog-card__countdown[hidden] { display: none !important; }

@media (max-width: 760px) {
    .catalog-card__countdown { display: block; left: 6px; bottom: 6px; padding: 4px 7px; font-size: 9px; }
}

.catalog-card__image {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
}

    .catalog-card__image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: .8;
        mix-blend-mode: multiply;
        transition: all .4s ease-in-out;
    }

.catalog-card:hover .catalog-card__image img {
    opacity:1;
}

.artwork--copper {
    background: radial-gradient(ellipse at 50% 42%,#e9d4bd,#d5b895 70%,#c7aa89);
}

.artwork--patina {
    background: radial-gradient(ellipse at 50% 42%,#d8e2d7,#b8cbbd 72%,#a8beb0);
}

.artwork--wood {
    background: radial-gradient(ellipse at 50% 42%,#ead9bf,#d5b891 72%,#c2a277);
}

.artwork--tile {
    background: radial-gradient(ellipse at 50% 42%,#d6e4df,#a9c9c6 72%,#91b3af);
}

.artwork__title {
    position: absolute;
    display: grid;
    place-items: center;
    width: 58%;
    aspect-ratio: .82;
    border: 7px double #b18452;
    outline: 1px solid #f1dfbd;
    outline-offset: -13px;
    background: radial-gradient(ellipse,#174333,#0f3027 72%);
    color: #e4c38e;
    font: clamp(22px,2.1vw,34px)/1.5 var(--heading-font);
    box-shadow: 0 12px 24px #27372b40,inset 0 0 30px #e6bd7220;
    text-align: center;
}

.artwork--patina .artwork__title {
    background: radial-gradient(ellipse,#548879,#21493d 72%);
}

.artwork--wood .artwork__title {
    background: radial-gradient(ellipse,#bd9362,#79502f 72%);
    border-color: #785333;
    color: #f0d9b3;
}

.artwork--tile .artwork__title {
    background: radial-gradient(ellipse,#318895,#145568 72%);
    border-color: #cfbd91;
}

.catalog-card__favorite {
    position: absolute;
    z-index: 1;
    top: auto;
    right: 6px;
    bottom: 6px;
    left: auto;
    width: 36px;
    height: 36px;
    background: #fffE;
    box-shadow: 0 2px 10px #263b3416;
    color: #59665d;
}

    .catalog-card__favorite .icon {
        width: 17px;
        height: 17px;
    }

.catalog-card__badge {
    position: absolute;
    right: 0px;
    top: 0px;
    padding: 3px 12px;
    border-radius: 20px;
    background: #fffE;
    color: #845336;
    font-size: 10px;
    border-radius: 0 0 0 16px;
}

.catalog-card__badge--new {
    /*background: #23483f;*/
    background: #009b76d6;
    color: #fff;
}

.catalog-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 14px 15px 13px;
}

.catalog-card__heading {
    /*min-height: 69px;*/
}

    .catalog-card__heading h3 {
        overflow: hidden;
        margin: 0 0 4px;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.8;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

        .catalog-card__heading h3 a:hover {
            color: var(--copper-dark);
        }

.catalog-card__variant {
    display: block;
    min-height: 22px;
    color: #858276;
    font-size: 10px;
    line-height: 1.8;
}

.catalog-card__variation-options {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 23px;
    margin-top: 0;
    overflow: hidden;
    white-space: nowrap
}

.catalog-card__variation-option,
.catalog-card__variation-more {
    display: inline-block;
    max-width: 92px;
    overflow: hidden;
    padding: 2px 7px;
    border: 1px solid #e8e1d5;
    border-radius: 12px;
    color: #69786c;
    background: #faf8f3;
    font-size: 9px;
    line-height: 1.5;
    text-overflow: ellipsis
}

.catalog-card__variation-more {
    flex: 0 0 auto;
    color: var(--copper-dark)
}

.catalog-card__category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    overflow: hidden;
    padding: 6px 0;
    color: #69786c;
    font-size: 10px;
}

    .catalog-card__category span {
        color: var(--copper);
        font-size: 15px;
        transition: transform .2s;
    }

    .catalog-card__category:hover span {
        transform: translateX(-3px);
    }

.catalog-card__buy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 47px;
    border-top: 1px solid #eeeae2;
    padding-top: 9px;
}

.catalog-card__prices {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 1px 7px;
    font-size: 12px;
}

    .catalog-card__prices strong {
        font-weight: 600;
        white-space: nowrap;
    }

    .catalog-card__prices small {
        color: #7d7d70;
        font-size: 9px;
        font-weight: 400;
    }

    .catalog-card__prices del {
        width: 100%;
        color: #a09a8e;
        font-size: 10px;
    }

.catalog-card__discount {
    color: #ae5544;
    font-size: 9px;
}

.catalog-card__action {
    display: grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid #e7e2d8;
    border-radius: 50%;
    color: var(--forest);
    transition: background .2s,color .2s,border-color .2s;
}

    .catalog-card__action:hover {
        border-color: var(--forest);
        background: var(--forest);
        color: white;
    }

    .catalog-card__action .icon {
        width: 17px;
        height: 17px;
    }

@media(max-width:950px) {
    .catalog-card-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 15px;
    }
}

@media(max-width:480px) {
    .catalog-card-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 10px;
    }

    .catalog-card__body {
        padding: 10px 10px 11px;
    }

    .catalog-card__heading {
        /*min-height: 69px;*/
    }

        .catalog-card__heading h3 {
            font-size: 11px;
        }

    .catalog-card__variant, .catalog-card__category {
        font-size: 9px;
    }

    .catalog-card__prices {
        font-size: 10px;
    }

        .catalog-card__prices small {
            font-size: 8px;
        }

    .catalog-card__action {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
    }

    .catalog-card__badge {
        top: 0px;
        right: 0px;
        font-size: 8px;
    }

    .catalog-card__favorite {
        top: auto;
        right: 8px;
        bottom: 8px;
        left: auto;
        width: 32px;
        height: 32px;
    }

    .artwork__title {
        border-width: 5px;
        outline-offset: -10px;
        font-size: 20px;
    }
}

.catalog-card__favorite[aria-pressed=true] {
    color: var(--copper);
    background: #fff;
}

    .catalog-card__favorite[aria-pressed=true] .icon {
        fill: #f14c258a;
    }
.icon-button {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
    .icon-button:hover {
        background: var(--heart)
    }

.catalog-card__badge--discount {
    top: 0px;
    right: auto;
    bottom: auto;
    left: 0px;
    border-radius:0 0 16px 0;
    background: linear-gradient(135deg, #e4543d 0%, #bd2e2b 58%, #982423 100%);
    box-shadow: 0 4px 12px #8d241f45;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 1px 1px #611b1b55;
}

@media (max-width: 480px) {
    .catalog-card__countdown { left: 5px; bottom: 5px; padding: 4px 6px; }
    .catalog-card__badge--discount {
        top: 0px;
        right: auto;
        left: 0px;
    }
}

.home-product-section {
    padding-block: 38px 46px;
}

    .home-product-section .section-heading {
        margin-bottom: 22px;
    }

.home-regular-section {
    padding-block: 42px 56px;
}

.catalog-load-error {
    margin-top: 16px;
    color: #87534b;
    font-size: 12px;
}

.catalog-empty-state {
    padding: 18px 0;
    color: #858276;
    font-size: 12px;
}
