/* General Reset and Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

/* Header Styles */
header {
    background-color: lightblue;
    padding: 15px 0;
    color: white;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

header a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
    margin-top: 15px;
    display: inline-block;
    border: 1px solid #fff;
    padding: 10px 20px;
    border-radius: 5px;
}

header a:hover {
    background-color: lightcoral;
    border-color: lightcoral;
}

.logo-img {
    height: 120px; 
    width: auto;
    margin-right: 15px; 
}
/* Navbar Styling */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    background-color: white; /* Dark background for contrast */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow to give depth */
}

/* Navbar Links List */
.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
}

.nav-links li {
    margin-left: 30px; /* More spacing between links */
}

.nav-links a {
    color: black; /* Light gray text for readability */
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem; /* Slightly larger text for visibility */
    transition: color 0.3s, transform 0.3s; /* Smooth transition for hover effects */
}

/* Hover Effects for Links */
.nav-links a:hover {
    color: black; /* Accent color on hover */
    transform: scale(1.1); /* Slight zoom effect */
}

/* Navbar Logo */
.logo img {
    width: 130px; /* Adjust logo and right image size */
    height: 120px;
}

/* Navbar Right (auth links or other items) */
.auth-links a {
    color: black;
    text-decoration: none;
    margin-left: 20px;
    font-weight: bold;
    transition: color 0.3s;
}

.auth-links a:hover {
    color: black; /* Accent color on hover */
}


.auth-links a {
    margin-left: 15px;
    color: black;
    text-decoration: none;
}

/* General body and font styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

/* Header Styles */
header {
    background-color: lightblue;
    color: white;
    padding: 20px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

header a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
    margin-top: 15px;
    display: inline-block;
    border: 1px solid #fff;
    padding: 10px 20px;
    border-radius: 5px;
}

header a:hover {
    background-color: lightcoral;
    border-color: lightcoral;
}

/* Navbar Logo */
.logo-img {
    height: 120px;
    width: auto;
    margin-right: 15px;
}

/* Auth Links */
.auth-links a {
    color: black;
    text-decoration: none;
    margin-left: 20px;
    font-weight: bold;
    transition: color 0.3s;
}

.auth-links a:hover {
    color: #ff4081;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 50%;
    max-width: 400px;
}

/* Close Button Styling */
.close-btn {
    color: #aaa; /* Light gray color */
    font-size: 28px; /* Font size for the "×" */
    font-weight: bold;
    cursor: pointer; /* Shows pointer cursor when hovering */
    position: absolute;
    top: 10px; /* Position from the top */
    right: 10px; /* Position from the right */
}

.close-btn:hover,
.close-btn:focus {
    color: black; /* Changes color when hovered or focused */
    text-decoration: none;
}


/* Form Styling */
#login-form input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#login-form button {
    width: 100%;
    padding: 10px;
    background-color: lightcoral;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#login-form button:hover {
    background-color: #ff3366;
}

#login-message {
    color: red;
    margin-top: 10px;
}

/* Basket Section */
#basket {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

#basket h2 {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
}

#basket-items {
    list-style: none;
    margin-bottom: 20px;
}

/* Styling each basket item */
#basket-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    margin: 15px 0;
    padding: 15px;
    background-color: #fafafa;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

/* Image styling */
.basket-item-image {
    width: 200px;  /* Increase width */
    height: 200px; /* Increase height */
    object-fit: cover;
    border-radius: 5px;
}


/* Product Info Container */
.basket-item-info {
    flex-grow: 1;
    margin-left: 20px;
}

/* Text inside each item block */
.basket-item-info p {
    margin: 5px 0;
    font-size: 1.1rem;
}

/* Price styling */
.basket-item-price {
    font-weight: bold;
    font-size: 1.2rem;
    color: #27ae60;
}

/* Basket Container */
.basket-container {
    width: 80%;
    margin: 50px auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.basket-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.basket-items {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.basket-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    align-items: center;
}

.basket-item img {
    width: 100px;
    height: auto;
    margin-right: 20px;
}

.basket-item .product-info {
    flex-grow: 1;
}

.basket-item .product-name {
    font-size: 18px;
    font-weight: bold;
}

.basket-item .product-quantity, .basket-item .product-price {
    margin-top: 5px;
}

/* Remove button */
.remove-btn {
    padding: 8px 15px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.remove-btn:hover {
    background-color: #c0392b;
}

/* Total Price Section */
#total-price {
    font-size: 20px;
    font-weight: bold;
    text-align: right;
    margin-bottom: 30px;
    padding: 10px 20px;
    background-color: #ecf0f1;
    border-radius: 8px;
}

/* Checkout Button */
#checkout-btn {
    display: block;
    width: 200px;
    margin: 0 auto;
    padding: 15px;
    background-color: #27ae60;
    color: white;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#checkout-btn:hover {
    background-color: #2ecc71;
}

/* Clear Basket Button */
#clear-basket-btn {
    display: block;
    width: 200px;
    margin: 10px auto;
    padding: 15px;
    background-color: #f39c12;
    color: white;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#clear-basket-btn:hover {
    background-color: #f1c40f;
}

/* Responsive Design */
@media (max-width: 768px) {
    #basket {
        padding: 20px;
    }

    #basket-items li {
        flex-direction: column;
        align-items: flex-start;
    }

    .basket-item-info {
        margin-left: 0;
    }

    #checkout-btn, #clear-basket-btn {
        width: 100%;
    }

    #total-price {
        margin-top: 20px;
        font-size: 18px;
    }
}


/* Responsive Design */
@media screen and (max-width: 768px) {
    
    /* Logo adjustments */
    .navbar .logo {
        margin-top: 10px; /* Add small top margin for better spacing */
        margin-bottom: 0; /* Remove space below logo */
        text-align: center; /* Center the logo */
        padding-left: 15px; /* Add space to the left of the logo */
        padding-right: 15px; /* Add space to the right of the logo */
    }

    /* Navbar layout */
    .navbar {
        display: flex;
        flex-direction: column;  /* Stack elements vertically */
        justify-content: flex-start;  /* Align items at the top */
        align-items: left; /* Center items horizontally */
        min-height: 150px; /* Increase height for better spacing */
        padding: 2px 6px;  /* Add padding around navbar for even spacing on all sides */
        overflow-x: hidden; /* Prevent horizontal scrolling */
    }

    /* Links section layout */
    .navbar .nav-links,
    .auth-links {
        display: flex;
        flex-wrap: wrap; /* Allow items to wrap if necessary */
        justify-content: center; /* Center links horizontally */
        gap: 8px; /* Space between items */
        margin: 0; /* Remove any default margin */
        width: 100%; /* Ensure the links section takes up full width */
    }

    /* Style for individual links */
    .nav-links a,
    .auth-links a {
        font-size: 12px;  /* Smaller font size */
        padding: 2px 6px; /* Adjust padding for spacing */
        white-space: nowrap;  /* Prevent text wrapping */
        margin: 0 5px;  /* Small margin between links */
    }

    /* Auth links section */
    .auth-links {
        margin-top: 10px; /* Small gap between nav links and auth links */
    }

    /* Ensure nav links span the full width */
    .nav-links {
        text-align: center; /* Center text inside nav-links */
    }
}

/* Responsive Design for iPad */
@media screen and (min-width: 768px) and (max-width: 1024px) {

    /* Logo adjustments */
    .navbar .logo {
        margin-top: 10px; /* Add small top margin for better spacing */
        margin-bottom: 0; /* Remove space below logo */
        text-align: center; /* Center the logo */
        padding-left: 15px; /* Add space to the left of the logo */
        padding-right: 15px; /* Add space to the right of the logo */
        width: 100%; /* Ensure the logo takes up full width */
    }

    /* Navbar layout */
    .navbar {
        display: flex;
        flex-direction: ro;  /* Keep elements in a horizontal line */
        justify-content: space-between;  /* Space out elements with equal margins */
        align-items: center; /* Vertically align items */
        min-height: 100px; /* Ensure enough space for the navbar */
        padding: 10px 20px;  /* Add padding to the left and right of the navbar */
        overflow-x: hidden; /* Prevent horizontal scrolling */
        width: 100%; /* Ensure navbar takes up full width */
    }

    /* Links section layout */
    .navbar .nav-links,
    .auth-links {
        display: flex;
        flex-wrap: nowrap; /* Prevent wrapping of links */
        justify-content: flex-start; /* Align items to the left */
        gap: 15px; /* Increase space between items */
        margin: 0; /* Remove any default margin */
        width: auto; /* Let links take their natural width */
        flex-grow: 1; /* Allow links section to grow and take available space */
    }

    /* Style for individual links */
    .nav-links a,
    .auth-links a {
        font-size: 14px;  /* Slightly larger font size for readability */
        padding: 5px 10px; /* Adjust padding for better spacing */
        white-space: nowrap;  /* Prevent text wrapping */
        margin: 0;  /* Remove additional margins */
        text-align: center; /* Ensure links are centered */
    }

    /* Auth links section */
    .auth-links {
        margin-left: 20px; /* Add space between nav and auth links */
    }

    /* Ensure nav links stay aligned */
    .nav-links {
        text-align: left; /* Align links to the left */
        width: auto; /* Allow nav links to adjust their width */
    }
}

/* Responsive Design for iPad Mini (portrait/landscape, min-width: 768px and max-width: 1024px) */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    
    /* Logo adjustments */
    .navbar .logo {
        margin-top: 10px;
        margin-bottom: 0;
        text-align: center;
        padding-left: 15px;
        padding-right: 15px;
        width: 100%;  /* Ensure logo takes up full width */
    }

    /* Navbar layout */
    .navbar {
        display: flex;
        flex-direction: column;  /* Stack elements vertically */
        justify-content: space-between;
        align-items: center;
        min-height: 100px;  /* Ensure enough height for the navbar */
        padding: 5px 10px;
        overflow-x: hidden;
        width: 100%;
    }

    /* Links section layout */
    .navbar .nav-links,
    .auth-links {
        display: flex;
        flex-wrap: nowrap;  /* Prevent wrapping of links */
        justify-content: flex-start;  /* Align items to the left */
        gap: 15px;  /* Increase space between items */
        margin: 0;
        width: auto;
        flex-grow: 1;  /* Allow links section to grow */
    }

    /* Style for individual links */
    .nav-links a,
    .auth-links a {
        font-size: 16px;  /* Slightly larger font size for readability */
        padding: 8px 12px;
        white-space: nowrap;
        margin: 0;
        text-align: center;  /* Ensure links are centered */
    }

    /* Auth links section */
    .auth-links {
        margin-left: 10px;  /* Space between nav and auth links */
    }

    /* Ensure nav links stay aligned */
    .nav-links {
        text-align: left;  /* Align links to the left */
        width: auto;
    }
}
