/* Basic styling for the page */
body {
    font-family: 'Cairo', sans-serif; /* Using a good Arabic font */
    background-color: #f4f7f9;
    color: #333;
    margin: 0;
    padding: 20px;
    direction: rtl; /* Set direction to Right-to-Left */
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #2c3e50;
}

/* Container for all the product cards */
#products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Individual product card styling */
.product-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0; /* Remove padding to allow image to be flush */
    overflow: hidden; /* Keeps the image corners rounded */
    display: flex;
    flex-direction: column;
}

.product-content {
    padding: 20px;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover; /* Ensures the image covers the area without distortion */
}

.product-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #34495e;
}

.product-description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.product-tags {
    margin-bottom: 15px;
}

.product-tag {
    background-color: #e0eaf1;
    color: #34495e;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-left: 5px; /* Margin is on the left in RTL */
    display: inline-block;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 600;
    color: #007bff;
    margin-top: auto; /* Pushes the price to the bottom */
}

#loading-message {
    text-align: center;
    font-size: 1.2rem;
    color: #555;
}