/**
 * Shared Product Card Component
 * Used in: Widget (Slider) & Shop (Grid)
 *
 * @package NPX
 */

/* Container */
.npx-product-card {
    position: relative;
    text-align: center;
    transition: transform var(--npx-transition-slow), box-shadow var(--npx-transition-slow);
    height: 100%;
    width: 360px;
    /* Locked to design spec */
    max-width: 100%;
    /* Safety for narrow mobile screens */
    /* Prevent excessive stretching */
    margin-left: auto;
    margin-right: auto;
    flex-shrink: 0;
    /* Prevent shrinking in carousels */
}

/* Image Wrapper */
.npx-product-card__image {
    position: relative;
    border-radius: var(--npx-radius-sm);
    overflow: hidden;
    /* Ratio 0.8 (e.g. 400w x 500h) is ideal for vertical bottles */
    aspect-ratio: 0.8;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.npx-product-card__image a {
    display: block;
    width: 100%;
    height: 100%;
}

.npx-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--npx-transition-slow);
}

.npx-product-card:hover .npx-product-card__image img {
    transform: scale(1.05);
}

/* Typography */
.npx-product-card__title {
    font-family: var(--npx-font-primary);
    font-size: 18px;
    /* Optically balanced for cards */
    font-weight: 600;
    margin: 0 0 5px;
    line-height: 1.3;
    flex-grow: 1;
    /* Pushes button down */
}

.npx-product-card__title a {
    color: var(--npx-black);
    text-decoration: none;
    transition: color var(--npx-transition);
}

.npx-product-card__title a:hover {
    color: var(--npx-primary);
}

.npx-product-card__subtitle,
.npx-product-subtitle {
    font-size: 14px;
    color: var(--npx-gray-dark);
    margin: 0 0 15px;
    min-height: 20px;
    text-align: center;
    width: 100%;
    display: block;
}

/* Price */
.npx-product-card__price {
    font-family: var(--npx-font-primary);
    font-size: 16px;
    color: var(--npx-black);
    margin-bottom: 20px;
    font-weight: 500;
}

.npx-product-card__price del {
    color: var(--npx-gray-dark);
    font-weight: 400;
    margin-right: 8px;
    font-size: 14px;
}

.npx-product-card__price ins {
    text-decoration: none;
    color: var(--npx-error);
}

/* Footer / Button */
.npx-product-card__footer {
    margin-top: auto;
}

.npx-product-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 120px;
    background-color: var(--npx-primary);
    color: var(--npx-white) !important;
    border: 1px solid var(--npx-primary);
    border-radius: var(--npx-radius-button);
    padding: 10px 24px;
    font-size: 17px;
    font-weight: 400;
    text-decoration: none;
    transition: all var(--npx-transition);
    cursor: pointer;
}

.npx-product-card__button:hover {
    background-color: var(--npx-primary-hover);
    border-color: var(--npx-primary-hover);
    color: var(--npx-white) !important;
    transform: translateY(-1px);
    box-shadow: var(--npx-shadow-sm);
}

/* Responsive */
@media (max-width: 768px) {
    .npx-product-card__title {
        font-size: 16px;
    }

    .npx-product-card__button {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 100px;
    }
}