/*
=====================================================
PM UI Framework - Product Card
Component: Product Card
File: product-card.css
Version: 1.0.2
=====================================================
*/

/* --------------------------------------------------
Product Card Base
-------------------------------------------------- */

.pm-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 340px;
    margin: 0;
    padding: 0;
    overflow: hidden;

    background: var(--pm-bg, #ffffff);
    color: var(--pm-text, #333333);

    border: 1px solid var(--pm-border, #e0e0e0);
    border-radius: var(--pm-radius-md, 10px);

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

/* --------------------------------------------------
Hover
-------------------------------------------------- */

.pm-product-card:hover {
    transform: translateY(-3px);

    border-color: rgba(46, 125, 50, 0.25);

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
}

/* --------------------------------------------------
Product Image
-------------------------------------------------- */

.pm-product-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;

    background: #f8f8f8;
}

.pm-product-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;

    object-fit: cover;

    transition: transform 0.3s ease;
}

/* --------------------------------------------------
Product Badge
-------------------------------------------------- */

.pm-product-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 28px;
    padding: 0.35rem 0.65rem;

    background: var(--pm-primary, #2E7D32);
    color: #ffffff;

    border-radius: 999px;

    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

/* --------------------------------------------------
Product Content
-------------------------------------------------- */

.pm-product-card__content {
    display: flex;
    flex-direction: column;
    flex: 1;

    padding: 1.25rem;
}

/* --------------------------------------------------
Product Category
-------------------------------------------------- */

.pm-product-card__category {
    display: block;
    margin: 0 0 0.35rem;

    color: var(--pm-secondary, #1976D2);

    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;

    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* --------------------------------------------------
Product Title
-------------------------------------------------- */

.pm-product-card__title {
    margin: 0 0 0.65rem;

    color: var(--pm-text, #333333);

    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
}

.pm-product-card__title a {
    color: inherit;
    text-decoration: none;
}

.pm-product-card__title a:hover {
    color: var(--pm-primary, #2E7D32);
}

/* --------------------------------------------------
Product Description
-------------------------------------------------- */

.pm-product-card__description {
    margin: 0 0 1rem;

    color: var(--pm-text, #333333);

    font-size: 0.95rem;
    line-height: 1.6;
}

/* --------------------------------------------------
Product Rating
-------------------------------------------------- */

.pm-product-card__rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;

    margin: 0 0 0.85rem;
}

.pm-product-card__stars {
    color: var(--pm-accent, #FFC107);

    font-size: 1rem;
    line-height: 1;
    letter-spacing: 0.05em;
}

.pm-product-card__rating-score {
    color: var(--pm-text, #333333);

    font-size: 0.85rem;
    font-weight: 700;
}

.pm-product-card__rating-count {
    color: #777777;

    font-size: 0.8rem;
}

/* --------------------------------------------------
Product Price
-------------------------------------------------- */

.pm-product-card__price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;

    margin: 0 0 1rem;
}

.pm-product-card__price-current {
    color: var(--pm-primary, #2E7D32);

    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}

.pm-product-card__price-old {
    color: #888888;

    font-size: 0.9rem;
    text-decoration: line-through;
}

/* --------------------------------------------------
Product Footer
-------------------------------------------------- */

.pm-product-card__footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;

    margin-top: auto;
    padding-top: 0.25rem;
}

/* --------------------------------------------------
Product CTA
-------------------------------------------------- */

.pm-product-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 44px;
    padding: 0.7rem 1rem;

    background: var(--pm-primary, #2E7D32);
    color: #ffffff;

    border: 1px solid var(--pm-primary, #2E7D32);
    border-radius: var(--pm-radius-md, 10px);

    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.pm-product-card__cta:hover {
    background: var(--pm-primary-dark, #1B5E20);
    border-color: var(--pm-primary-dark, #1B5E20);
    color: #ffffff;

    text-decoration: none;
}

.pm-product-card__cta:focus-visible {
    outline: 3px solid rgba(25, 118, 210, 0.35);
    outline-offset: 2px;
}

.pm-product-card__cta:active {
    transform: translateY(1px);
}

/* --------------------------------------------------
Responsive
-------------------------------------------------- */

@media (max-width: 480px) {

    .pm-product-card {
        max-width: 100%;
    }

    .pm-product-card__content {
        padding: 1rem;
    }

    .pm-product-card__title {
        font-size: 1.05rem;
    }

    .pm-product-card__description {
        font-size: 0.9rem;
    }

    .pm-product-card__footer {
        width: 100%;
    }
}

/* --------------------------------------------------
Reduced Motion
-------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .pm-product-card,
    .pm-product-card__image img,
    .pm-product-card__cta {
        transition: none;
    }

    .pm-product-card:hover {
        transform: none;
    }

    .pm-product-card:hover .pm-product-card__image img {
        transform: none;
    }
}

/* --------------------------------------------------
Product Card Grid
-------------------------------------------------- */

.pm-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 340px));
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    align-items: stretch;
}

/* --------------------------------------------------
Product Card Grid - Responsive
-------------------------------------------------- */

@media (max-width: 700px) {

    .pm-product-grid {
        grid-template-columns: 1fr;
    }
}
