/* General styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    text-align: center;
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    gap: 1rem;
}

.logo img {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

.logo h1 {
    margin: 0;
    font-size: 24px;
}

.menu {

    text-align: center; /* Center the menu items */
}

.menu ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.menu ul li {
    display: inline-block;
    margin-right: 20px;
}

.menu ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
}

.menu ul li a:hover {
    text-decoration: underline;
}

.header-icons {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}


.login a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
}

.login:hover {
    a {
        text-decoration: underline;
    }
}

.basket {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

#basketIcon {
    font-size: 24px;
    margin-right: 5px;
}

#basketCount {
    background: #ff0000;
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    position: absolute;
    top: -5px;
    right: -5px;
}

main {
    background-color: #fff;
    padding: 20px;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.product {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product:hover {
    transform: translateY(-5px);
}

.product-image {
    text-align: center;
    padding: 10px;
    height: 40%; /* Fixed height for product image */
    flex: 1; /* Take up remaining space */
}

.product-image img {
    max-width: 80%;
    max-height: 40vh;
    object-fit: contain; /* Adjust as needed */
    border-radius: 8px;
}

.product-details {
    padding: 10px;
    flex: 1; /* Take up remaining space */
}

.product-details h2 {
    color: #333;
    font-size: 18px;
    margin-bottom: 10px;
    height: 36px;
}

.product-details p {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.product-details .price {
    color: #007bff;
    font-size: 16px;
}

.product-details .description {
    height: 28px;
    overflow: hidden;
}

button {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

.pagination {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.pagination a {
    color: #007bff;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    margin: 0 5px;
}

.pagination a.active {
    background-color: #007bff;
    color: #fff;
}

footer {
    text-align: center;
    margin-top: 20px;
    padding: 10px 0;
    background-color: #333;
    color: #fff;
    position: relative;
    clear: both;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.account {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-direction: column;
}

.account section {
    border-bottom: 1px solid #ccc;
    padding: 10px;
    width: 100%;
}

.success-error {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.success-error .success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.success-error .error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}