* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Verdana, sans-serif;
}

body {
    background: #010101;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 10px;
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: transparent;
}

body.light-mode {
    background-color: #f9f9f9;
    color: #333;
}

body.light-mode .header {
    background-color: #ffffff;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.light-mode .header h1:hover {
    color: #666;
}

body.light-mode .navbar ul li a {
    color: #333;
}

body.light-mode .header .icons .toggler {
    background: #ccc;
}

body.light-mode .header .icons .toggler .slider-round {
    background: #333;
}

body.light-mode .search {
    background-color: #ffffff;
    color: #333;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

body.light-mode .search-input input {
    background-color: #eeeeee;
    color: #333;
}

body.light-mode .product-box {
    background-color: #ffffff;
    color: #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.light-mode .product-box h1 {
    color: #333;
}

body.light-mode .product-box p {
    color: #666;
}

body.light-mode .product-box strong {
    background-color: #007acc;
    color: #fff;
}

body.light-mode .product-box .buttons a {
    background-color: #eee;
    color: #333;
}

body.light-mode .product-box .buttons a:hover {
    background-color: #007acc;
    color: #fff;
}

body.light-mode footer {
    background-color: #ffffff;
    color: #333;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

body.light-mode .footer .social-icons a {
    color: #333;
}

body.light-mode .footer .social-icons a:hover {
    color: #007acc;
}

body.light-mode .back-to-top {
    background-color: #eee;
    color: #333;
}

body.light-mode .back-to-top:hover {
    background-color: #ccc;
}

body,
.header,
.navbar ul li a,
.header .icons .toggler,
.search,
.search-input input,
.product-box,
.product-box .buttons a,
footer,
.footer .social-icons a,
.back-to-top {
    transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #171717;
    padding: 20px;
    color: #fff;
    flex-direction: row;
    flex-wrap: wrap;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header h1 a {
    font-size: 2vw;
    margin: 0;
    cursor: pointer;
    text-align: center;
    transition: color 0.3s ease;
    text-decoration: none;
    color: #fff;
}

.header h1 a:hover {
    color: #c5c5c5;
}

.header .icons {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.header .icons:hover {
    color: #c5c5c5;
}

.header .navbar {
    display: flex;
    gap: 1rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.header .navbar:hover {
    color: #c5c5c5;
}

.header .navbar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

.header .navbar ul li {
    cursor: pointer;
    transition: color 0.3s ease;
}

.header .navbar ul li:hover {
    color: #c5c5c5;
}

.header .navbar ul li a {
    text-decoration: none;
    color: #fff;
}

.header .icons .toggler {
    width: 45px;
    height: 24px;
    border-radius: 20px;
    background: #444;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
    padding: 3px;
}

.header .icons .toggler .slider-round {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 50%;
    left: 3px;
    transform: translateY(-50%);
    transition: left 0.3s ease;
}


.header .icons .toggler.active .slider-round {
    left: calc(100% - 21px);
}


#shopping-cart {
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease;
}

#shopping-cart:hover {
    color: #c5c5c5;
    scale: 1.025;
}

.cart-icon {
    position: relative;
    display: inline-block;
}

.cart-icon .cart-quantity {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: rgba(138, 138, 138, 0.7);
    border: 1px solid #707070;
    color: white;
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
}

.search {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: #171717;
    margin: 15px;
    min-width: 450px;
    max-width: 850px;
    text-align: center;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    height: auto;
    border-radius: 16px;
    box-shadow: 0 0 40px #232323;
}

.search .search-input input {
    padding: 12px;
    width: 580px;
    border-radius: 8px;
    background: #4b4b4b;
    border: none;
    outline: none;
    font-weight: bold;
    color: #fff;
}

.resultBox {
    display: flex;
    flex-direction: column;
    background: #3f3f3f;
    max-width: 350px;
    margin: 15px;
    border-radius: 8px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    list-style: none;
    padding: 12px;
    overflow-x: auto;
    overflow-y: none;
}

.resultBox .result {
    text-align: left;
    padding: 12px;
}

.resultBox .result:hover {
    background: #333;
    margin: 15px;
    border-radius: 8px;
    font-weight: bold;
    transition: 0.3s ease;
}

/* Product Section */

.product-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    /* Flexibla kolumner */
    gap: 20px;
    margin: 0 auto;
    padding: 20px;
    max-width: 1200px;
    text-align: center;
}


.product-box {
    position: relative;
    /* Viktigt för absolut positionering av child elements */
    padding: 16px;
    background: #2c2c2c;
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
    max-width: 700px;
    margin: 0 auto;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    cursor: default;
    overflow: hidden;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    user-select: none;
    z-index: 1;
}

.product-box .product-source a {
    text-decoration: none;
    position: absolute;
    /* Placera relativt till .product-box */
    top: 12px;
    /* Överst */
    right: 12px;
    /* Justerat från vänster */
    color: #fff;
    /* Vit text */
    font-size: 1.5rem;
    text-align: left;
    /* Vänsterjusterad text */
}

.product-box .product-source a:hover {
    color: #c5c5c5;
    scale: 1.1;
    transition: all 0.3s ease;
}

.product-description {
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
}

.recommended {
    color: white;
    width: 100%;
    padding: 5px;
    background: linear-gradient(45deg, #1a1a1a, #666b67);
    font-weight: bold;
    position: absolute;
    top: 37px;
    left: -75px;
    rotate: -45deg;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: none;
    z-index: 2;
}

.product-box:hover {
    scale: 1.005;
    box-shadow: 0 0 10px #222;
    background-color: #4b4b4b;
    cursor: default;
    transition: all 3s ease;
}

.product-box img {
    border-radius: 12px;
    width: 200px;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: none;
    margin: 0 auto;
}

.product-box img:hover {
    transform: scale(1.05);
    cursor: pointer;
}

.product-box h1 {
    font-size: 1.4rem;
    color: #ffffff;
    margin-top: 12px;
}

.product-box p {
    color: #c5c5c5;
    font-size: 1rem;
    margin-top: 8px;
}

.product-box strong {
    display: inline-block;
    background: #ffffff;
    color: #222;
    font-size: 1.1rem;
    padding: 4px 8px;
    min-width: 150px;
    max-width: 350px;
    display: flex;
    justify-content: center;
    border-radius: 8px;
    margin-top: 12px;
}

.product-box .buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 16px;
}

.product-box .buttons button {
    width: 25px;
    height: 25px;
    border: none;
    outline: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-weight: 700;
    color: #333;
    background: #ccc;
}

.add-to-cart,
.recomendation {
    padding: 10px;
    margin: 10px;
    background: #4b9e4b;
    color: #ffffff;
    border-radius: 8px;
    border: none;
    outline: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    margin-top: auto;
    /* Flyttar knappen längst ner */
}

.add-to-cart {
    margin: 16px;
}

.add-to-cart:hover {
    scale: 1.05;
    transition: 0.3s ease;
}

@media (max-width: 992px) {
    .product-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .product-container {
        grid-template-columns: 1fr;
    }
}

/* Footer */

.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #171717;
    color: white;
    padding: 20px 50px;
    text-align: center;
    z-index: 11;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translate(-50%, -50%);
}

.contact-info a {
    font-size: 18px;
    color: #fff;
}

.contact-info a:hover {
    color: #c5c5c5;
    transition: 0.3s ease;
    scale: 1.05;
}

/* Sliding Overlay */

.slidingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
}

.slidingOverlay.active {
    display: block;
}

.slidingContainer {
    width: 80%;
    max-width: 1200px;
    height: auto;
    background: #171717;
    color: #fff;
    margin: 15px auto;
    border-radius: 16px;
    box-shadow: 0 0 16px #242424;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    display: none;
}

.slidingContainer.active {
    display: flex;
    opacity: 1;
}

.slidingFooter {
    background: #242424;
    padding: 20px;
    border-top: 1px solid #333;
    width: 100%;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    text-align: center;
    margin-top: auto;
}

.img-slider {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.slides img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.slides>div {
    flex: 0 0 100%;
    display: none;
}

.slides>div.active {
    display: block;
}

.img-slider button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    padding: 10px 15px;
    background-color: #242424;
    color: white;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.img-slider button:hover {
    background-color: #3f3f3f;
    transition: 0.3s ease;
}

.prev {
    left: 0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.next {
    right: 0;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.slidingHeader {
    background: #242424;
    padding: 20px;
    border-bottom: 1px solid #333;
    width: 100%;
    text-align: center;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    position: relative;
}

.slidingHeader .close {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-size: 1.5rem;
    padding: 10px 15px;
    color: #fff;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 10;
}

.slidingHeader .close:hover {
    background-color: #2e2e2e;
    border-radius: 50%;
    color: #c5c5c5c5;
}

@keyframes fade {
    from {
        opacity: .5;
    }

    to {
        opacity: 1;
    }
}

.contact{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 18px;
}

.contact .contact-card{
    background: #171717;
    padding: 12px;
    border-radius: 16px;
    max-width: 600px;
}

.contact-card a{
    text-decoration: none;
    font-weight: bold;
    color: #ffeeeecc;
}

.contact iframe{
    position: relative;
    right: -800px;
}

/* Optional responsiveness for small screens */
@media (max-width: 768px) {
    .slidingContainer {
        width: 95%;
    }
}

@media (min-width: 576px) {
    .product-box .buttons button {
        width: auto;
        /* Återställ knapparna till normal storlek på större skärmar */
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 10px 20px;
        margin-top: 15px;
    }
}

@media (max-width: 576px) {
    .footer {
        padding: 5px 10px;
        margin-top: 15px;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 10px 20px;
        flex-direction: column;
        /* Stack footer elements vertically on smaller screens */
        text-align: center;
        margin-top: 15px;
    }

    .contact-info {
        flex-direction: column;
        /* Stack contact links vertically */
        margin-bottom: 10px;
    }

    .contact-info a {
        font-size: 16px;
        /* Adjust font size for smaller screens */
    }
}

/* For very small screens */
@media (max-width: 576px) {
    .footer {
        padding: 5px 10px;
        /* Reduce padding for small screens */
        margin-top: 15px;
    }

    .contact-info a {
        font-size: 14px;
        /* Even smaller text for very small screens */
    }
}

img {
    margin: 15px 15px;
    border-radius: 3.18mm;
}