/* Updated Product Card Styles to match featured products */

/* Product Grid */
.products-grid,
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 1.5rem;
}

/* Product Card */
.product-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.product-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    line-height: 1.3;
    /* Allow text to wrap properly */
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    min-height: 2.6rem;
}

.product-meta {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.product-category {
    color: #666;
    margin-bottom: 0.2rem;
}

.product-store {
    color: #888;
    font-style: italic;
}

.product-price {
    margin-top: auto;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-actions {
    display: flex;
    padding: 0.5rem 1rem 1rem;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-grid,
    .product-grid,
    .store-product-container {
        display: block !important;
        width: 100% !important;
    }
    
    .product-card,
    .store-product-item {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 20px 0 !important;
    }
    
    .product-image {
        height: 220px !important;
    }
    
    .product-name {
        font-size: 1rem !important;
    }
}

@media (max-width: 576px) {
    .products-grid,
    .product-grid,
    .store-product-container {
        display: block !important;
        padding: 0 10px !important;
    }
    
    .product-card,
    .store-product-item {
        width: 100% !important;
        margin: 0 0 15px 0 !important;
    }
    
    .product-image {
        height: 220px !important;
    }
    
    .product-name {
        font-size: 1.1rem !important;
    }
}
