body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ecf0f1;
    overflow-x: hidden;
}

header {
    background-color: #024b20;
    color: #fff;
    padding: 5px;
    text-align: center;
}

.last {
    display: block;
    text-align: center;
}

#sorting-buttons {
    text-align: center;
    margin: 20px;
}

.dropdown {
    display: inline-block;
    margin-right: 20px;
}

.dropdown select {
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #2ecc71;
    background-color: #fff;
    color: #2ecc71;
}

#sorting-buttons button {
    background-color: #2ecc71;
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 5px;
    outline: none;
}

#sorting-buttons button:hover {
    background-color: #239b58;
}

section {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 20px;
}

.product-container {
    position: relative;
    max-width: 100%;
    margin: auto;
}

.product {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin: 15px;
    padding: 20px;
    width: calc(25% - 30px);
    text-align: center;
    display: block;
    transition: transform 0.3s ease-in-out;
    position: relative;
}

.product img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.product:hover {
    transform: scale(1.05);
}

button,
a.button {
    display: inline-block;
    background-color: #2ecc71;
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    outline: none;
}

button:hover,
a.button:hover {
    background-color: #239b58;
}

footer {
    background-color: #27ae60;
    color: white;
    text-align: center;
    padding: 10px;
    position: fixed;
    bottom: 0;
    width: 100%;
}

#communication-bar {
    background-color: #024b20;
    color: white;
    text-align: center;
    padding: 10px;
    position: fixed;
    bottom: 0;
    width: 100%;
}

#communication-bar p {
    margin: 0;
}

.bubble {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgb(255, 251, 0);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100%;
    color: red;
    text-align: center;
}

.bubble.bottom-left {
    bottom: 5px;
    left: 5px;
}

.bubble.bottom-right {
    width: 25%;
    height: 7%;
    font-size: 75%;
    bottom: 5px;
    right: 5px;
}

.info-text {
    margin: 0;
}

.akcio {
    color: red;
    font-size: large;
}

/* Dark mode styles */
body.dark-mode {
    background-color: #121212;
    color: #f1f1f1;
}


body.dark-mode .product {
    background-color: #1f1f1f;
    border: 1px solid #444;
}



body.dark-mode #sorting-buttons select {
    background-color: #1f1f1f; /* dark background */
    color: #f1f1f1;           /* light text */
    border: 1px solid #555;    /* optional border for visibility */
}
body.dark-mode #sorting-buttons select option {
    background-color: #1f1f1f;
    color: #f1f1f1;
}



/* Toggle switch */
        .switch {
            position: absolute;
            bottom: 12px;
            right: 40px;
            /* moved left from the edge */
            display: inline-block;
            width: 50px;
            height: 28px;
        }


        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider-round {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #bbb;
            border-radius: 34px;
            transition: 0.4s;
        }

        .slider-round:before {
            position: absolute;
            content: "";
            height: 22px;
            width: 22px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            border-radius: 50%;
            transition: 0.4s;
        }

        input:checked+.slider-round {
            background-color: #2ecc71;
        }

        input:checked+.slider-round:before {
            transform: translateX(22px);
        }
body,
header,
.product-container {
    transition: background-color 0.3s, color 0.3s;
}


@media only screen and (max-width: 600px) {
    .bubble {
        font-size: 12px;
        padding: 8px;
    }
}

@media only screen and (max-width: 1200px) {
    .product {
        width: calc(33.33% - 30px);
    }
}

@media only screen and (max-width: 900px) {
    .product {
        width: calc(50% - 30px);
    }
}

@media only screen and (max-width: 600px) {
    .product {
        width: calc(100% - 30px);
    }
}

@media only screen and (max-width: 480px) {

    #sorting-buttons select,
    #sorting-buttons button {
        width: 100%;
    }
}

@media only screen and (min-width: 600px) {
    header {
        font-size: 24px;
    }
}

@media only screen and (max-width: 600px) {
    header {
        font-size: 18px;
    }
}

@media only screen and (max-width: 480px) {
    header {
        font-size: 16px;
    }
}