body, html {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #e9eaed;
    padding-top: 50px;
}

h1 {
    text-align: center;
    color: #000000;
}

label {
    margin-right: 5px;
    flex: 1;
}

a {
    margin-right: 5px;
}

button {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #00c542;
    color: #121212;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
button:hover {
    background-color: #000000;
}

input[type="number"] {
    background-color: #ebebeb;
    color: #272727;
    border: 1px solid #dddddd;
    padding: 5px;
    border-radius: 5px;
    width: 50px;
}

ul {
    list-style-type: none;
    padding: 0;
}

ul li {
    padding: 5px 0;
}

.transparent {
    opacity: 0;                  /* Fully transparent */
}

.left-section {
    display: flex;               /* Flexbox for aligning items horizontally */
    align-items: center;         /* Center items vertically */
    margin-left: 7px;
    gap: 7px;
}
.right-section {
    display: flex;               /* Flexbox for aligning items horizontally */
    align-items: center;         /* Center items vertically */
    margin-right: 7px;
    gap: 7px;
}

/*page-header*/
#page-header {
    display: flex;               /* Flexbox layout */
    justify-content: space-between; /* Space out left and right sections */
    align-items: center;         /* Centers items vertically */
    max-width: 100%;             /* Takes up 100% of the available width */
    max-height: 56px;            /* Maximum height of 56px */
    height: 56px;            /* Maximum height of 56px */
    width: 100%;                 /* Ensure it always takes full width */
    overflow: hidden;            /* Ensures content doesn't overflow outside the div */
    position: fixed;             /* Fix the header at the top */
    top: 0;                      /* Align it to the top of the viewport */
    left: 0;                     /* Align it to the left of the viewport */
    z-index: 1000;               /* Ensure it's above other content */
    background-color: #35373B;
    margin-bottom: 7px;
    transition: opacity 0.25s ease;
}
#page-header img {
    max-height: 45px;            /* Limits the image height to 50px */
    height: 100%;                /* Scales the image to fill the height of the container */
    width: auto;                 /* Maintains the aspect ratio of the image */
}
#page-header h1 {
    color: #ffffff;
}
@media (max-width: 930px) { /* 80% */
    #page-header h1 {
        font-size: 25.6px; /* original 32px */
    }
} 
@media (max-width: 700px) { /* 60% */
    #page-header h1 { /* removed */
        font-size: 19.2px; /* original 32px */
    }
}
@media (max-width: 400px) { 
    #page-header h1 { /* removed */
        font-size: 0px; 
        display: none;
        margin: 0;
        padding: 0;
    }
}
@media (max-width: 350px) { 
}

#products-form {
    display: flex;
    flex-direction: column; /* Column to ensure items are stacked vertically */
    justify-content: center; /* Center items horizontally */
    gap: 7px;
    margin-top: 5px;
    margin-bottom: 5px;
    margin: 20px;
}

.item {
    /*flex: 1 1 200px; /*This would enhance the items with the ability to stack several 200px max in the same row*/
    display: flex;
    flex-direction: row;
    min-height: 130px;
    background-color: #ffffff;
    padding: 1em;
    border-radius: 10px;
    cursor: pointer
}
.item:hover .featured-image {
    transform: scale(1.05); /* Zoom in by 5% */
}

/*Labels*/
.name-label {
    color: #35373B;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease;
}
.name-label:hover {
    color: #00e842;
}

.expired-name-label {
    color: #8e939a;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer
}

.base-price-label {
    color: #8f949b;
    font-size: 20px;
    vertical-align: middle;
    text-decoration: line-through;
    cursor: pointer
}

.sale-price-label {
    color: #00e842;
    font-size: 20px;
    vertical-align: middle;
    font-weight: bold;
    cursor: pointer
}

.delivery-price-label {
    color: #8f949b;
    font-size: 14px;
    vertical-align: middle;
    cursor: pointer
}

.expired-sale-price-label {
    color: #5a5d62;
    font-weight: bold;
    cursor: pointer
}

.description-label {
    color: #35373B;
    font-size: 14px;
    cursor: pointer
}

/*div*/
.item-info-div {
    margin-left: 10px;
}

/*img*/
.featured-image {
    width: 160px;
    height: auto;
    margin: 0 auto; 
    transition: transform 0.25s ease;
}
.expired-image {
    filter: grayscale(100%);
}
.delivery-image {
    margin-left: 15px;
    margin-right: 5px;
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

/* spinner */
.spinner-container {
    margin-top: -136px; /* 60+8+8 + 60 (this 60 excess will be compensated with margin-bottom)*/
    margin-bottom: 60px; /* 60px compensation */
    display: flex;
    justify-content: center; /* Horizontally centered */
    align-items: center;     /* Vertically centered */
}
.spinner {
    border: 8px solid #009dff;
    border-top: 8px solid #80ceff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
    transition: opacity 0.15s ease;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/*media queries*/
@media (max-width: 770px) {
    .featured-image {
        width: 128px; /* 80% of the original 160px size */
    }
    .name-label {
        font-size: 14.4px; /* 80% of the original 18px size */
    }
    .expired-name-label,
    .base-price-label,
    .sale-price-label,
    .expired-sale-price-label{
        font-size: 16px; /* 80% of the original 20px size */
    }
    .delivery-price-label,
    .description-label {
        font-size: 11.2px; /* 80% of the original 14px size */
    }
    .delivery-image {
        margin-left: 12px; /* 80% of the original 15px size */
        margin-right: 4px; /* 80% of the original 5px size */
        width: 16px; /* 80% of the original 20px size */
        height: 16px; /* 80% of the original 20px size */
        vertical-align: middle;
    }
}
@media (max-width: 400px) { /*We cannot further shrink letters. Only featured-image and borders*/
    .featured-image {
        width: 96px; /* 60% of the original 160px size */
    }
    #products-form {
        gap: 5px;
        padding-top: 5px;
        margin-top: 3px;
        margin-bottom: 3px;
        margin: 5px;
    }
    .item {
        padding: 0.8em;
    }
}
@media (max-width: 330px) {
    .featured-image {
        width: 50px;
    }
    #products-form {
        gap: 3px;
        margin-top: 1px;
        margin-bottom: 1px;
        margin: 3px;
    }
    .item {
        padding: 0.5em;
    }
}

/* footer */
footer {
    background-color: #35373B;
    color: #ffffff;
}
footer a {
    color: #1fadff;
    text-decoration: none; /* Remove underline */
    font-weight: bold;
    transition: transform 0.25s ease, color 0.15s ease;
}
footer a:hover {
    color: #92d7ff;
    transform: scale(1.5); /* Zoom in by 5% */
}
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}
.footer-info {
    align-items: center;
    flex: 1; /* Allows equal distribution of space between each div */
    padding: 2px;
}
.footer-info h2 {
    text-align: center;
}
.footer-info li {
    text-align: center;
}
.footer-info .footer-li-images {
    align-items: center;
}
#copyright-info {
    text-align: center;
    margin-top: 0px;
}
#copyright-info p {
    margin-top: -10px;
    margin-bottom: 0px;
}
#copyright-branding-name {
    margin: 0 0 0 0; /* original 0px 5px 0px 0px -> removed */
}
@media (max-width: 930px) { /* 80% */
    .footer-info {
        padding: 1.5px; /* original 2px */
        flex: 0 1 auto; /* Disable flex: 1 and let items shrink to fit content */
    }
    .footer-info h2{
        font-size: 19.2px; /* original 24px */
        margin: 12.7488px 0px; /* original 15.936px 0px -> 70% */
    }
    #copyright-info,
    .footer-info a {
        font-size: 12.8px; /* original 16px */
        margin: 0 3.5px 0 0; /* original 0px 5px 0px 0px -> 70% */
    }
    .footer-info ul {
        margin-block-start: 0; /* Remove top margin */
        margin-block-end: 0; /* Remove bottom margin */
        padding-inline-start: 0; /* Remove left padding */
    }
    .footer-info li {
        padding: 3.5px 0px; /* original 5px 0px -> 70% */
    }
    img {
        width: 25.6px; /* original 32px */
        height: 25.6px; /* original 32px */
    }
} 
@media (max-width: 400px) { /* 70% */
    .footer-info {
        padding: 0px; /* removed */
    }
    .footer-info h2 { /* removed */
        font-size: 0px; 
        display: none;
        margin: 0;
        padding: 0;
    }
    .footer-info a {
        font-size: 12px; /* original 16px -> min legible text is 12px according to google (totest) */
        margin: 0 0 0 0; /* removed */
    }
    #copyright-info {
        font-size: 9px; /* original 16px */
        margin: 0 0 0 0; /* removed */
    }
    .footer-info li {
        padding: 0px 0px; /* original 5px 0px -> removed */
        margin: 0px; /* removed */
    }
    img {
        width: 22.4px; /* original 32px */
        height: 22.4px; /* original 32px */
    }
}
@media (max-width: 350px) { 
    #copyright-info p {
        margin-top: 0px; /* original -10px -> evade elements overlapping*/
    }
}

/* sponsored */
/*
.sponsored {
    max-width: 600px;
}
@media (max-width: 770px) {
    .sponsored {
        max-width: 300px;
        max-height: 200px;
    }
} 
@media (max-width: 350px) {
    .sponsored {
        max-width: 150px;
    }
} */