@import 'variables.css';

/* Product Card */
.product-card {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
    background: var(--bg-color);
    border-radius: 16px;
    transition: var(--transition-default);
    height: 100%;
    width: 260px;
    flex-shrink: 0;
}

.product-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.product-card__image-wrapper {
    display: block;
    width: 100%;
    aspect-ratio: 1/1;
    margin-bottom: var(--spacing-md);
    border-radius: 8px;
    overflow: hidden;
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.product-card__rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
}

.product-card__title {
    margin-bottom: var(--spacing-sm);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
}

.product-card__title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-card__title a:hover {
    color: var(--primary-color);
}

.product-card__prices {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

@media (max-width: 768px) {
    .product-card__prices {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
}

.product-card__price {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
}

.product-card__old-price {
    color: #999;
    text-decoration: line-through;
}

.product-card__button {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--primary-color);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: auto;
}

.product-card__button:hover {
    background-color: #1d4d36;
}

/* Responsive */
@media (max-width: 768px) {
    .product-card {
        width: 220px;
        padding: var(--spacing-sm);
    }

    .product-card__price {
        font-size: var(--font-size-lg);
    }
}

@media (max-width: 480px) {
    .product-card {
        width: 180px;
    }
}
