.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 18px 18px 12px;
    border-radius: 18px;
    border: 1px solid #f0f0f0;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 104, 55, 0.12);
}

.product-img-wrapper {
    --product-image-scale: 1;
    --product-image-hover-scale: 1.03;
    --product-image-translate-y: 0px;
    position: relative;
    min-height: 250px;
    border-radius: 28px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 16px;
    padding: 8px;
}

.product-img-wrapper img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 22px;
    filter: drop-shadow(0 22px 32px rgba(30, 45, 36, 0.18));
    transition: transform 0.35s ease;
    transform: translateY(var(--product-image-translate-y)) scale(var(--product-image-scale));
}

.product-card:hover .product-img-wrapper img {
    transform: translateY(var(--product-image-translate-y)) scale(var(--product-image-hover-scale));
}

.product-img-wrapper--standard {
    --product-image-scale: 1;
    --product-image-hover-scale: 1.03;
}

.product-img-wrapper--tall {
    --product-image-scale: 0.86;
    --product-image-hover-scale: 0.89;
    --product-image-translate-y: 6px;
}

.product-img-wrapper--wide {
    --product-image-scale: 0.94;
    --product-image-hover-scale: 0.97;
}

.product-img-wrapper--compact {
    --product-image-scale: 1.08;
    --product-image-hover-scale: 1.11;
}

.discount-badge-card,
.out-of-stock-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    text-transform: uppercase;
    font-weight: 600;
    z-index: 2;
}

.discount-badge-card {
    background: linear-gradient(135deg, #c084fc, #9333ea);
    color: #fff;
    padding: 4px 9px;
    border-radius: 8px;
    font-size: 0.72rem;
}

.out-of-stock-overlay {
    inset: 0;
    background: rgba(255,255,255,0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc3545;
    font-weight: 900;
    font-size: 1.05rem;
}

.card-body {
    padding: 12px 12px 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
}

.benefit-pill {
    display: block;
    width: 100%;
    max-width: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 253, 231, 0.95),
        rgba(220, 237, 200, 0.90),
        rgba(255, 253, 231, 0.95)
    );
    border: 1px solid #c5e1a5;
    color: #33691e;
    font-size: 0.68rem;
    letter-spacing: 0;
    text-transform: uppercase;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 50px;
    margin: 0 auto 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-title {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.2px;
    color: #111827;
    text-decoration: none;
    display: block;
    line-height: 1.28;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.product-title:hover {
    color: #006837;
}

.product-card-rating-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 0 10px;
    text-align: center;
    min-height: 24px;
}

.product-card-rating {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fffaf0;
    border: 1px solid #f6df9b;
}

.product-card-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    color: #f4b400;
    font-size: 0.85rem;
}

.product-card-rating-value {
    font-size: 0.86rem;
    font-weight: 600;
    color: #1f2937;
}

.product-card-rating-count {
    font-size: 0.82rem;
    font-weight: 600;
    color: #667085;
}

.price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 7px;
    margin-bottom: 0;
    line-height: 1.2;
}

.old-price-text {
    text-decoration: line-through;
    color: #999;
    font-size: 0.92rem;
    font-weight: 600;
    opacity: 0.7;
}

.current-price-text {
    color: #155724;
    font-size: 1.12rem;
    font-weight: 900;
}

.savings-text {
    color: #155724;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0) 0%,
        #dcefe0 30%,
        #dcefe0 70%,
        rgba(255,255,255,0) 100%
    );
    font-size: 0.76rem;
    font-weight: 600;
    padding: 6px 14px;
    display: inline-block;
    margin: 0 auto 8px;
    line-height: 1.2;
    min-height: 1.2em;
}

.btn-group-custom {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    width: 100%;
}

.btn-action {
    border-radius: 999px;
    border: none;
    min-height: 48px;
    width: 100%;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: all 0.22s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-cart-home {
    background-color: #006837;
    color: #fff;
}

.btn-cart-home:hover {
    background-color: #004d29;
    color: #fff;
    transform: translateY(-2px);
}

.btn-buy-home {
    background-color: #fecb00;
    color: #000;
    animation: gridBuyAttention 3.2s ease-in-out 0.7s infinite;
    will-change: transform, box-shadow, filter;
}

.btn-buy-home:hover {
    background-color: #e5b700;
    color: #000;
    transform: translateY(-2px);
    animation-play-state: paused;
}

@keyframes gridBuyAttention {
    0%, 64%, 100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 10px 22px rgba(254, 203, 0, 0.18);
        filter: brightness(1);
    }
    72% {
        transform: translateY(-3px) scale(1.03);
        box-shadow: 0 16px 32px rgba(254, 203, 0, 0.26);
        filter: brightness(1.03);
    }
    80% {
        transform: translateY(-1px) scale(1.018);
        box-shadow: 0 20px 38px rgba(254, 203, 0, 0.32);
        filter: brightness(1.08);
    }
    88% {
        transform: translateY(-3px) scale(1.033);
        box-shadow: 0 18px 34px rgba(254, 203, 0, 0.28);
        filter: brightness(1.04);
    }
    94% {
        transform: translateY(0) scale(1.008);
        filter: brightness(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-buy-home {
        animation: none;
    }
}

@media (max-width: 767px) {
    .product-card {
        border-radius: 16px;
        padding: 14px 14px 10px;
    }

    .product-img-wrapper {
        min-height: 164px;
        padding: 4px;
        margin-bottom: 12px;
        border-radius: 20px;
    }

    .product-img-wrapper img {
        border-radius: 18px;
    }

    .benefit-pill {
        font-size: 0.6rem;
        padding: 5px 9px;
        margin-bottom: 8px;
    }

    .product-title {
        font-size: 0.88rem;
        margin-bottom: 5px;
        min-height: 36px;
    }

    .product-card-rating-wrap {
        margin-bottom: 8px;
    }

    .savings-text {
        font-size: 0.7rem;
        padding: 5px 12px;
    }

    .btn-group-custom {
        gap: 6px;
    }

    .btn-action {
        min-height: 44px;
        font-size: 0.74rem;
    }
}
