/* Resetting default margin and padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Set background color for the entire page */
html, body {
    height: 100%;
    background-color: #9e1711; /* Dark red background */
    font-family: Arial, sans-serif;
    color: #ffffff; /* White text */
}

/* Header Styles */
header {
    background-color: #9e1711; /* Dark red */
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

header h1 {
    font-size: 2em;
    margin: 0;
}

header p {
    font-size: 1.2em;
}

/* Main content styles */
main {
    padding: 20px;
}

/* Gallery Styles */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    background-color: #fff;
    color: #333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-name {
    font-size: 1.2em;
    margin: 10px;
    color: #9e1711; /* Complementary color for product name */
}

.product-description {
    font-size: 0.9em;
    margin: 10px;
    color: #777;
}

.product-price {
    font-size: 1.1em;
    font-weight: bold;
    color: #e74c3c; /* A bright red for price */
    margin: 10px;
}

.product-store {
    font-size: 0.9em;
    margin: 10px;
    color: #777;
}

.product-link {
    display: block;
    text-align: center;
    background-color: #f39c12; /* Bright complementary color for buttons */
    color: white;
    padding: 10px;
    text-decoration: none;
    border-radius: 5px;
    margin: 10px;
}

.product-link:hover {
    background-color: #e67e22; /* Darker shade of yellow for hover effect */
}

/* Pagination Styles */
.pagination {
    text-align: center;
    margin-top: 30px;
}

.pagination a {
    padding: 10px 20px;
    text-decoration: none;
    background-color: #f39c12; /* Button color for pagination */
    color: white;
    margin: 5px;
    border-radius: 5px;
}

.pagination a:hover {
    background-color: #e67e22; /* Hover color for pagination buttons */
}

.pagination .prev, .pagination .next {
    font-weight: bold;
}

.pagination .page-number {
    font-weight: normal;
}

/* Product Details Styles */
.product-details {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin: 0 auto;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex; /* Enable flexbox */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: space-between; /* Space out the content */
    align-items: center; /* Align items vertically */
}

/* Image Styling */
.product-details img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    flex: 1 1 300px; /* Allow the image to grow and shrink */
}

/* Product Info Section */
.product-info {
    flex: 1 1 200px; /* Allow the info section to take up space next to the image */
    margin-left: 20px; /* Space between image and text */
    text-align: left; /* Default text alignment */
}

/* Product Name, Price, Store, and Link Button */
.product-name,
.product-price,
.product-store,
.view-product-button {
    display: block;
    margin-bottom: 15px;
}

.product-name {
    font-size: 1.5em;
    color: #9e1711;
}

.product-price {
    font-size: 1.2em;
    font-weight: bold;
    color: #e74c3c;
}

.product-store {
    font-size: 1em;
    color: #777;
}

.view-product-button {
    display: inline-block;
    text-align: center;
    background-color: #f39c12;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
}

.view-product-button:hover {
    background-color: #e67e22;
}

/* Product Description */
.product-description {
    text-align: left; /* Align the description text to the left */
    font-size: 1.1em;
    color: #777;
    margin: 10px 0;
}

/* Responsive Styles for Small Screens */
@media (max-width: 768px) {
    .product-details {
        flex-direction: column; /* Stack the image and text vertically */
        text-align: center; /* Center align the text for smaller screens */
    }

    .product-info {
        margin-left: 0; /* Remove left margin when stacked */
        text-align: center; /* Center the text on small screens */
    }

    .product-details img {
        max-width: 300px; /* Limit the image size on small screens */
        margin: 0 auto; /* Center the image */
    }

    .view-product-button {
        margin-top: 20px; /* Ensure spacing between button and text */
    }
}

/* Footer Styles */
footer {
    background-color: #9e1711; /* Dark red */
    color: white;
    text-align: center;
    padding: 20px 0;
    width: 100%;
    position: relative;
    bottom: 0;
}
