/* =========================================================
   Product Card
   ========================================================= */

.product-grid .product-card {
    position: relative;

    width: 100%;
    min-width: 0;
    height: 100%;

    overflow: hidden;

    border: 1px solid #ebe8e1;
    border-radius: 9px;

    background: #ffffff;

    box-shadow:
        inset 0 0 0 1px rgba(40, 62, 76, 0.08),
        inset 0 -14px 28px rgba(40, 62, 76, 0.055),
        0 5px 16px rgba(32, 32, 30, 0.08);

    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.product-grid .product-card:hover {
    border-color: rgba(41, 77, 59, 0.28);

    box-shadow:
        inset 0 0 0 1px rgba(41, 77, 59, 0.14),
        inset 0 -16px 32px rgba(41, 77, 59, 0.075),
        0 14px 30px rgba(32, 45, 39, 0.16);

    transform: translateY(-4px);
}

.product-grid .product-card:active {
    border-color: rgba(41, 77, 59, 0.34);
    box-shadow:
        inset 0 0 0 1px rgba(41, 77, 59, 0.16),
        inset 0 10px 24px rgba(41, 77, 59, 0.08),
        0 4px 12px rgba(32, 45, 39, 0.11);
    transform: translateY(-1px) scale(0.99);
}


/* =========================================================
   Media
   ========================================================= */

.product-card__media {
    position: relative;

    display: block;

    width: 100%;

    aspect-ratio: 4 / 3;

    overflow: hidden;

    background: #f7f6f2;

    text-decoration: none;
}


/* =========================================================
   Image
   ========================================================= */

.product-card__image {
    position: absolute;

    inset: 0;

    display: block;

    width: 100%;
    height: 100%;

    padding: 0;

    object-fit: contain;
    object-position: center;

    transition:
        transform 240ms ease;
}

/* =========================================================
   Placeholder
   ========================================================= */

.product-card__placeholder {
    position: absolute;

    inset: 0;

    display: grid;
    place-items: center;

    color: #9b9891;

    font-size: 0.68rem;
    font-weight: 700;

    letter-spacing: 0.14em;
}


/* =========================================================
   Body
   ========================================================= */

.product-card .product-card__body {
    display: flex;
    flex-direction: column;

    min-width: 0;

    padding: 10px 10px 11px;
}


/* =========================================================
   Product Title
   ========================================================= */

.product-card__title {
    min-height: 2.6em;

    margin: 0;

    font-family:
        "Inter",
        "Hind Siliguri",
        sans-serif;

    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.3;

    letter-spacing: -0.01em;
}

.product-card__title a {
    display: -webkit-box;

    overflow: hidden;

    color: #302f2b;

    text-decoration: none;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-card__title a:hover {
    color: #294d3b;
}


/* =========================================================
   Pricing
   ========================================================= */

.product-card__pricing {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;

    gap: 5px;

    margin-top: 6px;

    min-width: 0;
    white-space: nowrap;
}

.product-card__price {
    color: #20201e;

    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.15;
}

.product-card__compare-price {
    color: #99958d;

    font-size: 0.68rem;
    font-weight: 400;
    line-height: 1.15;
}

.product-card__meta--empty {
    visibility: hidden;
}


/* =========================================================
   Meta
   ========================================================= */

.product-card__meta {
    min-height: 1rem;

    display: flex;
    align-items: center;
    flex-wrap: nowrap;

    gap: 4px;

    margin-top: 6px;

    overflow: hidden;

    color: #77736d;

    font-size: 0.65rem;
    line-height: 1.2;
}


/* =========================================================
   Rating
   ========================================================= */

.product-card__rating {
    display: inline-flex;
    align-items: center;

    gap: 2px;

    flex: 0 0 auto;

    white-space: nowrap;
}

.product-card__star {
    color: #d89a33;

    font-size: 0.74rem;
    line-height: 1;
}

.product-card__meta--empty {
    gap: 3px;
    color: #bbb5ac;
}

.product-card__empty-star {
    color: #c58d2d;
    font-size: .86rem;
    line-height: 1;
}

.product-card__empty-review {
    color: #99948c;
    font-size: .61rem;
    white-space: nowrap;
}

.product-card__rating-value {
    color: #484640;

    font-weight: 600;
}

.product-card__review-count {
    color: #8a867f;
}


/* =========================================================
   Key Attribute
   ========================================================= */

.product-card__attribute {
    min-width: 0;

    overflow: hidden;

    color: #747069;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   Separator
   ========================================================= */

.product-card__separator {
    flex: 0 0 auto;

    color: #b9b5ad;
}


/* =========================================================
   Sold Count
   ========================================================= */

.product-card__sold {
    flex: 0 0 auto;

    color: #77736d;

    white-space: nowrap;
}


/* =========================================================
   Focus
   ========================================================= */

.product-card a:focus-visible {
    outline: 3px solid rgba(41, 77, 59, 0.18);
    outline-offset: -3px;
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 640px) {

    .product-grid .product-card {
        border-radius: 8px;
    }

    .product-card .product-card__body {
        padding: 8px 7px 9px;
    }

    .product-card__title {
        min-height: 2.55em;

        font-size: 0.8rem;
        line-height: 1.28;
    }

    .product-card__pricing {
        gap: 4px;

        margin-top: 5px;
    }

    .product-card__price {
        font-size: 0.82rem;
    }

    .product-card__compare-price {
        font-size: 0.56rem;
    }

    .product-card__meta {
        gap: 3px;

        margin-top: 5px;

        font-size: 0.56rem;
    }

    .product-card__star {
        font-size: 0.64rem;
    }
}


/* =========================================================
   Touch Devices
   ========================================================= */

@media (hover: none) and (pointer: coarse) {

    .product-grid .product-card {
        border-color: rgba(40, 62, 76, 0.16);
        box-shadow:
            inset 0 0 0 1px rgba(40, 62, 76, 0.1),
            inset 0 -16px 28px rgba(40, 62, 76, 0.07),
            0 7px 18px rgba(32, 45, 39, 0.12);
    }

    .product-grid .product-card:active {
        border-color: rgba(41, 77, 59, 0.42);
        box-shadow:
            inset 0 0 0 1px rgba(41, 77, 59, 0.2),
            inset 0 12px 28px rgba(41, 77, 59, 0.13),
            0 2px 7px rgba(32, 45, 39, 0.12);
        transform: scale(0.975);
    }
}


/* =========================================================
   Very Small Mobile
   ========================================================= */

@media (max-width: 380px) {

    .product-card .product-card__body {
        padding-inline: 6px;
    }

    .product-card__title {
        font-size: 0.76rem;
    }

    .product-card__price {
        font-size: 0.76rem;
    }

    .product-card__compare-price {
        font-size: 0.52rem;
    }

    .product-card__meta {
        font-size: 0.52rem;
    }
}


/* =========================================================
   Reduced Motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .product-card,
    .product-card__image {
        transition: none;
    }

    .product-grid .product-card:hover,
    .product-grid .product-card:active,
    .product-card:hover .product-card__image {
        transform: none;
    }
}
