body {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    color: #444;
    background-color: #f5f7fa;
    margin: 0;
    padding: 0;
}

header {
    position: fixed;
    width: 100%;
    z-index: 1000;
    background: #ffffff;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: start;
    padding: 0.5rem 2rem;
    top: 0;
    border-bottom: 1px solid #ccc; /* Adds a thin gray line to the bottom border */
}


header h1 {
    margin: 0;
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
}

main {
    margin: 8rem auto 4rem;
    max-width: 900px;
    padding: 1rem;
}

section {
    margin-bottom: 2rem;
    background-color: white;
    border-radius: 5px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #2575fc;
    margin-bottom: 1rem;
    font-weight: 500;
}

.compound, .cart-item, .cart-total-checkout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

label {
    flex: 2;
}

input[type="range"] {
    flex: 4;
    margin: 0 1rem;
    appearance: none;
    background: #ddd;
    height: 6px;
}

.value, .price {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 100px;
    justify-content: flex-start;
    gap: 0.25rem;
}

button {
    background: #007bff;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

button:hover {
    background: #0056b3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

button.delete {
    background: #ffffff;
    color: #333;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s;
}

button.delete:hover {
    transform: scale(1.1);
    background: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#close-sidebar {
    background: transparent;
    color: #444;
    padding: 0.5rem;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 1.4rem;
    width: auto;
    height: auto;
}

#close-sidebar:hover {
    background: transparent; /* No hover effect */
    box-shadow: none; /* Remove hover box shadow */
    transform: none; /* Remove scaling */
}


#total-cost, #cart {
    text-align: center;
}

#cart {
    margin-top: 3rem;
}

.flavor-container {
    text-align: left;
    margin-bottom: 2rem;
}

.flavor-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); /* Reduce minmax to make more items fit */
    gap: 0; /* Keep this at 0 to have no spacing between selectors */
}

.flavor-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Aligns items to the top */
    gap: 0;
    height: 95px;
    width: 85px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.flavor-option img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s ease, border 0.1s ease;
    border: 2px solid transparent;
}

.flavor-option img:hover {
    transform: scale(1.05);
}

.flavor-option.active img {
    border-color: black;
}

.flavor-option input[type="radio"] {
    display: none;
}

.flavor-name {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem; /* Smaller text size */
    color: #333;
    text-align: center;
    max-width: 90px; /* Restrict width to encourage wrapping */
    word-wrap: normal; /* Wrap by words, not breaking in the middle */
    overflow-wrap: break-word;
}

.cart-total-checkout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

/* Add styles for the sidebar */
.cart-sidebar {
    position: fixed;
    right: -440px;
    top: 0;
    height: 100%;
    width: 400px;
    background: #f9f9f9;
    border-left: 1px solid #ddd;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease-in-out;
    z-index: 1600;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Add this to make the sidebar scrollable */
}


/* Styles for the cart sidebar header */
.cart-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

/* Styles for the cart sidebar footer */
.cart-sidebar-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.cart-sidebar.open {
    right: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;  /* Update this value to ensure it's above the header */
    display: none;
}


.cart-sidebar.open + .overlay {
    display: block;
}

#toggle-sidebar {
    margin-left: auto;
    margin-right: 80px;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #333;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

#toggle-sidebar img {
    width: 40px;
    height: 40px;
}

.compound-group {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid black;
}

.compound-group:first-of-type {
    margin-bottom: 1.5rem; /* Increase the spacing between the first section and the next */
    padding-bottom: 3rem; /* Optional: Adds more space before the next section */
}

.compound-group:last-child {
    border-bottom: none;
}

.help-icon {
    position: relative;
    left: -9px;
}

.styled-dropdown {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem;
    transition: box-shadow 0.3s ease;
    position: relative;
    left: -5px;
    top: -12px;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.popup-content {
    background: #ffffff;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 80%;
    text-align: center;
}

#popup-close {
    margin-top: 1rem;
}

.cart-flavor-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
    display: inline-block;
    object-fit: cover;
}

.cart-item {
    display: flex;
    align-items: center; /* Centers the items vertically */
    justify-content: space-between; /* Creates space between the children */
    margin-bottom: 1rem;
    gap: 1rem; /* Adds spacing between children */
}

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

.compound-list li {
    font-size: 0.875rem;
    color: #444;
}

.price {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center; /* Centers the price */
    font-weight: bold;
}

#about-us {
    margin-top: -1rem; /* Adjust as needed to minimize spacing */
    padding: 2rem;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 900px;  /* Ensure it follows the same width as other sections */
    margin-left: auto; /* Center the section within the main container */
    margin-right: auto;
}

#custom-preworkout {
    margin-top: -3rem; /* Creates space below the header */
    padding: 2rem;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 900px; /* Ensure it follows the same width as other sections */
    margin-left: auto; /* Center the section within the page */
    margin-right: auto;
}

#footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    font-size: 0.875rem;
}

