/* ============================================
   Product Card - Luxury E-Commerce Design
   ============================================ */

.product-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    border-color: #e0e0e0;
}

/* Inner wrapper */
.product-card__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Image area */
.product-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fafafa;
}
.product-card__image-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.product-card__image {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
}
.product-card:hover .product-card__image {
    transform: scale(1.08);
}

/* Quick-add overlay on hover */
.product-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.product-card:hover .product-card__overlay {
    opacity: 1;
}
.product-card__view-text {
    background: #fff;
    color: #111;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    letter-spacing: 0.5px;
}

/* Badges container - stacked on the side (moved to the other side) */
.product-card__badges {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.product-card__badge {
    padding: 0.25rem 0.7rem;
    border-radius: 6px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    line-height: 1.4;
}
.product-card__badge--discount {
    background: #e53e3e;
    color: #fff;
}
.product-card__badge--bestseller {
    background: linear-gradient(135deg, #d4af37, #c5a059);
    color: #000;
}

/* Wishlist button - top corner (mirrors badges) */
.product-card__wishlist {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    z-index: 3;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 0;
}
.product-card__wishlist:hover {
    border-color: #e53e3e;
    transform: scale(1.1);
}
.product-card__wishlist.is-active {
    background: #e53e3e;
    border-color: #e53e3e;
}
.product-card__wishlist.is-active svg {
    fill: #fff;
    stroke: #fff;
}

/* Content area */
.product-card__content {
    padding: 0.8rem 1rem 0.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Brand/Category label */
.product-card__brand {
    font-size: 0.7rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
}

/* Product name */
.product-card__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111;
    margin: 0 0 0.3rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Rating */
.product-card__rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
}
.product-card__stars {
    color: #d4af37;
    font-size: 0.8rem;
    letter-spacing: 1px;
}
.product-card__rating-count {
    color: #999;
    font-size: 0.7rem;
}

/* Variant hint */
.product-card__variant-hint {
    font-size: 0.72rem;
    color: #888;
    margin-bottom: 0.3rem;
}
.product-card__more-hint {
    display: inline-block;
    background: #f5f5f5;
    color: #666;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    margin-inline-start: 0.3rem;
}

/* Size pills */
.product-card__sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 0.4rem;
}
.product-card__size-pill {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: #f5f5f5;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 0.65rem;
    color: #666;
    font-weight: 500;
}
.product-card__size-pill--more {
    background: #fff;
    color: #999;
    font-weight: 600;
}

/* Price */
.product-card__price-row {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.product-card__price {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
}
.product-card__from {
    font-size: 0.7rem;
    font-weight: 400;
    color: #999;
    margin-inline-end: 0.2rem;
}
.product-card__compare {
    font-size: 0.8rem;
    color: #bbb;
    text-decoration: line-through;
    font-weight: 400;
}

/* Footer / Add to cart */
.product-card__footer {
    padding: 0 1rem 1rem;
}
.btn-quick-add {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-quick-add:hover {
    background: #d4af37;
    color: #000;
}
.btn-quick-add svg {
    flex-shrink: 0;
}

/* Skeleton loading */
.product-card__media--loading {
    position: relative;
}
.product-card__media--loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #f5f5f5 25%, #eee 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    z-index: 1;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* RTL adjustments */
.lang-ar .product-card__badges {
    /* in RTL, badges should appear on the left */
    inset-inline-start: 10px;
    inset-inline-end: auto;
}
.lang-ar .product-card__wishlist {
    /* in RTL, wishlist moves to the right */
    inset-inline-start: auto;
    inset-inline-end: 10px;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .product-card {
        border-radius: 10px;
    }
    .product-card__image-wrap {
        padding: 0.8rem;
    }
    .product-card__badges {
        top: 6px;
        inset-inline-end: 6px;
        max-width: calc(100% - 48px);
    }
    .product-card__badge {
        padding: 0.18rem 0.45rem;
        font-size: 0.56rem;
        letter-spacing: 0.25px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .product-card__wishlist {
        top: 6px;
        inset-inline-start: 6px;
        width: 30px;
        height: 30px;
    }
    .product-card__content {
        padding: 0.6rem 0.8rem 0.4rem;
    }
    .product-card__footer {
        padding: 0 0.8rem 0.8rem;
    }
    .product-card__title {
        font-size: 0.82rem;
    }
    .product-card__brand,
    .product-card__rating,
    .product-card__variant-hint {
        font-size: 0.66rem;
    }
    .product-card__sizes {
        gap: 3px;
    }
    .product-card__size-pill {
        padding: 0.1rem 0.35rem;
        font-size: 0.58rem;
    }
    .product-card__price-row {
        gap: 0.25rem 0.4rem;
    }
    .product-card__price {
        font-size: 0.9rem;
    }
    .product-card__compare {
        font-size: 0.7rem;
    }
    .btn-quick-add {
        min-height: 42px;
        padding: 0.55rem 0.4rem;
        font-size: 0.78rem;
    }
}

@media (max-width: 360px) {
    .product-card__footer {
        padding-inline: 0.6rem;
    }
    .btn-quick-add svg {
        display: none;
    }
}
