/* Product Card Layout Fixes */

/* Make plant cards use flexbox for consistent layout */
.plant-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    position: relative !important;
}

.plant-info {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    padding: 1rem !important;
}

/* Make plant image consistent height */
.plant-image {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
}

/* Plant name and price at top */
.plant-name {
    margin-bottom: 0.5rem !important;
}

.plant-price {
    margin-bottom: 0.75rem !important;
}

/* Description should take available space */
.plant-description {
    flex-grow: 1 !important;
    margin-bottom: 1rem !important;
    min-height: 60px !important; /* Ensure minimum height for alignment */
}

/* Meta information (category and stock) */
.plant-meta {
    margin-bottom: 1rem !important;
}

/* Push actions to bottom and ensure they're aligned */
.plant-actions {
    margin-top: auto !important; /* Push to bottom */
    display: flex !important;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 0.75rem !important;
    padding-top: 1rem !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* View Details button - full width */
.btn-view-details {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 0.95rem !important;
}

/* Add to Cart button - full width */
.add-to-cart {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 0.95rem !important;
}

/* Grid layout for consistent card heights */
.plants-grid,
.recommended-products {
    display: grid !important;
    align-items: stretch !important; /* Stretch all cards to same height */
}

/* Ensure recommended products cards stretch to full height */
.recommended-products .plant-card {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

/* List view adjustments */
.plants-grid.list-view .plant-card {
    display: flex !important;
    flex-direction: row !important;
}

.plants-grid.list-view .plant-info {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-grow: 1 !important;
}

.plants-grid.list-view .plant-actions {
    margin-top: 0 !important;
    margin-left: auto !important;
    border-top: none !important;
    padding-top: 0 !important;
    align-self: center !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Buttons are already in column layout */
    .btn-view-details,
    .add-to-cart {
        width: 100% !important;
        font-size: 0.9rem !important;
    }
}