/* Reset default margin and padding, and set box-sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body and basic styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #8acff3;
}

/* Header styles */
header {
    background-color: #333;
    color: white;
    padding: 1rem;
    display: flex; /* Add this to make header a flex container */
    justify-content: flex-end; /* Align contents (h1) to the right */
    align-items: center; /* Vertically center the text */
}

header h1 {
    margin-right: auto; /* Push the h1 to the left side of the flex container */
}

/* Navigation bar styles */
nav {
    display: flex;
    justify-content: flex-end; /* Align buttons to the right of the header */
    gap: 20px;
    margin-bottom: 20px;
}

/* Main content area */
main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background-color: #555;
    border-radius: 5px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: #888;
}

/* Product grid layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

/* Style for each product box */
.product-box {
    background-color: white;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-align: center;
}

.product-box img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.product-box h3 {
    margin: 15px 0;
}

/* Info button style */
.info-btn {
    padding: 10px 20px;
    background-color: #555;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.info-btn:hover {
    background-color: #888;
}

/* New "full-width" style for the product box */
.product-box.full-width {
    grid-column: span 3; /* Span all 3 columns */
    text-align: center;
}

/* Make the textarea responsive */
textarea {
    width: 100%; /* Make the textarea take up the full width of its container */
    max-width: 600px; /* Optional: limit the max width */
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    resize: vertical; /* Allow vertical resizing */
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
    background: none;
    border: none;
}

/* Footer styling */
footer {
    font-size: 0.9rem;
    background-color: #222;
    color: white; /* Make text white */
    text-align: center; /* Center the text */
    padding: 1rem; /* Optional: Add some padding for spacing */
}

/* Responsive grid layout for smaller screens */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr 1fr; /* Two columns layout for medium screens */
    }

    /* Make product boxes responsive */
    .product-box {
        padding: 15px;
    }

    /* Adjust textarea width on smaller screens */
    .product-box.full-width textarea {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr; /* Single column layout for small screens */
    }

    /* Adjust product box padding and font sizes for small screens */
    .product-box {
        padding: 10px;
    }

    .product-box h3 {
        font-size: 1rem; /* Smaller text for headings */
    }

    /* Adjust button padding for smaller screens */
    .info-btn {
        padding: 8px 16px;
    }

    /* Adjust textarea width on small screens */
    .product-box.full-width textarea {
        width: 100%;
    }
}