.fpd-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    background: #ffffff;
}

.fpd-search {
    margin-bottom: 30px;
}

#fpd-search-input {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    font-size: 1em;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s ease;
}

#fpd-search-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.fpd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 300px));
    gap: 15px;
    padding-top: 10px;
    justify-content: center;
}

.fpd-card {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 300px; /* Strict max-width to prevent stretching */
}

.fpd-card.hidden {
    display: none;
}

.fpd-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.fpd-image {
    height: 180px;
    background-size: contain; /* Prevent image distortion */
    background-position: center;
    background-repeat: no-repeat;
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
}

.fpd-content {
    padding: 15px;
    color: #333;
}

.fpd-content h2 {
    font-size: 1.3em;
    margin: 0 0 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #222;
}

.fpd-price, .fpd-quantity {
    font-size: 1em;
    margin: 4px 0;
    color: #007bff;
}

.fpd-price::before {
    content: "Price: ";
    color: #555;
}

.fpd-quantity::before {
    content: "Qty: ";
    color: #555;
}

/* Mobile optimizations */
@media (max-width: 600px) {
    .fpd-container {
        padding: 10px;
    }

    #fpd-search-input {
        max-width: 100%;
        padding: 10px;
    }

    .fpd-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .fpd-card {
        border-radius: 10px;
        max-width: 100%; /* Full width on mobile */
    }

    .fpd-image {
        height: 150px;
    }

    .fpd-content h2 {
        font-size: 1.1em;
    }

    .fpd-price, .fpd-quantity {
        font-size: 0.9em;
    }
}