/* ==========================================================
   product-card — كارد المنتج (صورتان بتبديل عند الـ hover + شارة بيع/تأجير + زرّا واتساب)
   ========================================================== */

:root {
    --ebmnt1-product-card-background: var(--ebmnt1-color-white);
    --ebmnt1-product-card-shadow-color: var(--ebmnt1-color-shadow);
    --ebmnt1-product-card-media-border-color: var(--ebmnt1-color-helper-lavender);
    --ebmnt1-product-card-media-background: var(--ebmnt1-color-helper-pink-softer);
    --ebmnt1-product-card-title-color: var(--ebmnt1-color-helper-mint-strong);
    --ebmnt1-product-card-title-hover-color: var(--ebmnt1-color-primary);
    --ebmnt1-product-card-price-color: var(--ebmnt1-color-helper-purple);
    --ebmnt1-product-card-price-label-color: var(--ebmnt1-color-text-soft);
    --ebmnt1-product-card-note-color: var(--ebmnt1-color-text-soft);
    --ebmnt1-product-card-note-icon-color: var(--ebmnt1-color-secondary);
    --ebmnt1-product-card-badge-background: var(--ebmnt1-color-helper-magenta);
    --ebmnt1-product-card-badge-text-color: var(--ebmnt1-color-white);
    --ebmnt1-product-card-gallery-chip-background: rgba(255, 255, 255, 0.9);
    --ebmnt1-product-card-gallery-chip-text-color: var(--ebmnt1-color-helper-purple);
    --ebmnt1-product-card-gallery-chip-icon-color: var(--ebmnt1-color-primary);
    --ebmnt1-product-card-grid-gap: 1rem;
    --ebmnt1-product-card-grid-columns: 1;
    --ebmnt1-product-card-font-size-title: clamp(0.95rem, 0.88rem + 0.4vw, 1.15rem);
    --ebmnt1-product-card-font-size-price: clamp(1rem, 0.92rem + 0.45vw, 1.3rem);
    --ebmnt1-product-card-font-size-small: clamp(0.72rem, 0.68rem + 0.25vw, 0.86rem);
}

.ebmnt1-product-grid {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--ebmnt1-product-card-grid-gap);
}

.ebmnt1-product-card {
    position: relative;
    flex: 0 0 calc((100% - var(--ebmnt1-product-card-grid-gap) * (var(--ebmnt1-product-card-grid-columns) - 1)) / var(--ebmnt1-product-card-grid-columns));
    max-width: 22rem;
    display: flex;
    flex-direction: column;
    gap: 0.7em;
    text-align: start;
    transition: transform 0.35s ease;
}

.ebmnt1-product-card:hover {
    transform: translateY(-0.35rem);
}

/* صندوق الصورة: أبيض بإطار منقّط وظل خفيف مثل تصميم الخدمات */
.ebmnt1-product-card__media {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    padding: 0.5rem;
    border: 2px dashed var(--ebmnt1-product-card-media-border-color);
    background-color: var(--ebmnt1-product-card-background);
    background-clip: padding-box;
    box-shadow: 0 0 0 0.45rem var(--ebmnt1-product-card-background), 0 0.9rem 1.4rem -0.9rem var(--ebmnt1-product-card-shadow-color);
    margin: 0.45rem;
}

.ebmnt1-product-card__image {
    position: absolute;
    inset: 0.5rem;
    width: calc(100% - 1rem);
    height: calc(100% - 1rem);
    object-fit: cover;
    transition: opacity 0.5s ease, transform 0.6s ease;
}

.ebmnt1-product-card__image--hover {
    opacity: 0;
}

.ebmnt1-product-card:hover .ebmnt1-product-card__image--hover {
    opacity: 1;
}

.ebmnt1-product-card:hover .ebmnt1-product-card__media--has-hover .ebmnt1-product-card__image--main {
    opacity: 0;
}

.ebmnt1-product-card:hover .ebmnt1-product-card__image {
    transform: scale(1.04);
}

.ebmnt1-product-card__badge-wrap {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: 5.8rem;
    height: 5.8rem;
    overflow: hidden;
    pointer-events: none;
}

.ebmnt1-product-card__badge {
    position: absolute;
    top: 1.15rem;
    right: -2rem;
    width: 7.8rem;
    padding: 0.2em 0;
    background-color: var(--ebmnt1-product-card-badge-background);
    color: var(--ebmnt1-product-card-badge-text-color);
    font-size: var(--ebmnt1-product-card-font-size-small);
    font-weight: 700;
    text-align: center;
    transform: rotate(45deg);
    box-shadow: 0 0.2em 0.5em rgba(0, 0, 0, 0.25);
}

.ebmnt1-product-card__gallery-chip {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.2em 0.6em;
    border-radius: 999px;
    background-color: var(--ebmnt1-product-card-gallery-chip-background);
    color: var(--ebmnt1-product-card-gallery-chip-text-color);
    font-size: var(--ebmnt1-product-card-font-size-small);
    font-weight: 700;
}

.ebmnt1-product-card__gallery-chip i {
    color: var(--ebmnt1-product-card-gallery-chip-icon-color);
}

.ebmnt1-product-card__title {
    font-size: var(--ebmnt1-product-card-font-size-title);
    font-weight: 700;
}

.ebmnt1-product-card__title a {
    color: var(--ebmnt1-product-card-title-color);
    transition: color 0.25s ease;
}

.ebmnt1-product-card__title a:hover {
    color: var(--ebmnt1-product-card-title-hover-color);
}

.ebmnt1-product-card__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4em;
    font-size: var(--ebmnt1-product-card-font-size-price);
    font-weight: 700;
    color: var(--ebmnt1-product-card-price-color);
}

.ebmnt1-product-card__price-label {
    font-size: var(--ebmnt1-product-card-font-size-small);
    font-weight: 500;
    color: var(--ebmnt1-product-card-price-label-color);
}

.ebmnt1-product-card__note {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: var(--ebmnt1-product-card-font-size-small);
    color: var(--ebmnt1-product-card-note-color);
}

.ebmnt1-product-card__note i {
    color: var(--ebmnt1-product-card-note-icon-color);
}

.ebmnt1-product-card__actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.45em;
}

@media (min-width: 425px) {
    :root {
        --ebmnt1-product-card-grid-columns: 2;
    }
}

@media (min-width: 768px) {
    :root {
        --ebmnt1-product-card-grid-columns: 3;
        --ebmnt1-product-card-grid-gap: 1.4rem;
    }
}

@media (min-width: 1024px) {
    :root {
        --ebmnt1-product-card-grid-columns: 4;
    }
}
