/* Base Card Styles */

.product-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--text-highlight);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}


/* Image Section */

.image-container {
    width: 100%;
    aspect-ratio: 1.2 / 1;
    position: relative;
    background: white;
}

.product-image {
    position: static;
    padding: 15px;
    cursor: pointer;
    background-color: white;
}


/* Content Section */

.card-body {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    flex-grow: 1;
}

.content-section {
    flex-grow: 1;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--theme-bg-dark);
}

.product-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    min-height: 2.6em;
    word-wrap: break-word;
    hyphens: auto;
}


/* Responsive improvements for product cards */

@media (max-width: 768px) {
    .product-name {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
        min-height: 3.9em;
    }
    .card-title {
        font-size: 0.9rem;
    }
    .product-card .card-body {
        padding: 0.75rem;
    }
    .actions {
        padding-top: 0.25rem;
    }
    .cart-btn,
    .fav-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .product-name {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
        min-height: 2.6em;
    }
    .card-title {
        font-size: 0.85rem;
    }
    .product-card .card-body {
        padding: 0.5rem;
    }
}

.card-text.text-muted {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: var(--theme-bg-dark);
}

.price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-highlight);
    margin-bottom: 1rem;
}


/* Promotion Badge */

.promo-badge .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
}


/* Buttons */

.actions {
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--text-highlight);
}

.cart-btn,
.fav-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.cart-btn:hover,
.fav-btn:hover {
    transform: scale(1.05);
}

.product-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.image-container {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    background-color: white;
}

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