@charset "UTF-8";

/* Grundstil för produktsidan */

/*product page header */
.product-page-header {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    margin: 2em;


}

.product-page-header div {
    max-width: 50%;
}

/* product page header end */

/* ----------------------------------------------------------- */

/* ------------------------------------------------------- */

/* product page */
.product-page {
    display: grid;
    grid-template-columns: 1fr 3fr;
    grid-gap: 30px;
    margin: 2rem;
    margin-left: 0;
    border-top: 1px solid #ccc;
}

/* product page end */

/* ----------------------------------------------------------- */

/* ------------------------------------------------------- */

/* product categories */

.product-categories h2 {
    margin-left: 1em;
}

.product-categories ul {
    list-style-type: none;
    background-color: #f9f9f9;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    box-shadow: 0px 10px 15px rgba(25, 25, 25, 0.05);
    padding: 0;
    margin: 0;
}

.product-categories ul li {
    font-size: 1.4em;
    padding: 1em;
    padding-left: 25%;
    text-align: left;

}

.product-categories a {
    text-decoration: none;
    color: black;
}

.product-categories ul li:hover {
    background-color: #3a499e;
    color: #f2f2f2;
    transform: scale(1.05) translateX(5px) translateY(-4px);
    transition: all 0.2s ease-in-out;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    box-shadow: 0 6px 6px rgba(25, 25, 25, 0.23);
}

/* product categories end */

/* ----------------------------------------------------------- */

/* ------------------------------------------------------- */


/* product container */
.product-container {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
    background-color: #f9f9f9;
    justify-content: space-around;
    border-radius: 15px;
    box-shadow: 0px 10px 15px rgba(25, 25, 25, 0.1);
}


.product {
    margin: 0.9em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 25%;
    background-color: #f9f9f9;
    border-bottom: 1px solid #ccc;
    margin-bottom: 1em;
    padding: 0.8em;
}

.product p {
    font-size: 0.9em;
}

.product img {
    width: 200px;
    height: 200px;
    object-fit: cover;
}



.product-info {
    width: 100%;
    padding: 5px;
    text-align: center;
}

.product-info h2 {
    margin-bottom: 10px;
}

.product-info p {
    margin-bottom: 20px;
    color: #555
}


/* Popover content*/
.popover-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: zoom-out;

}


.product button:focus+.popover-content {
    display: flex;
}

/* bild storlek och placering */
.popover-content img {
    width: 250px;
    height: 250px;
    max-width: 100vw;
    max-height: 100vh;
    box-shadow: 0 0 10px 0 rgba(255, 255, 255, 0.5);
    animation: scaleUp 1s ease;
    cursor: zoom-out;

}

/* Animation för att ge mer liv när den klickas upp*/
@keyframes scaleUp {
    0% {
        transform: scale(0.1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Style för "button" img som används för popover. Reset orginal button stil som används på alla andra knappar på sidan. */
.img-btn {
    width: auto;
    padding: 0;
    border-radius: 0;
    background-color: transparent;
    border: none;
    transition: none;
    position: static;
    overflow: visible;
}

.img-btn img {
    border: none;
    width: 200px;
    height: 200px;
    background: none;
    cursor: zoom-in;
}

.img-btn:hover,
.img-btn a:hover {
    background-color: transparent;
    box-shadow: none;
    color: inherit;
    transform: none;
}

.img-btn:hover::before {
    animation: none;
}

.img-btn::before {
    content: none;
}

/* product container end */

/* ----------------------------------------------------------- */

/* ------------------------------------------------------- */


/* media queries */

/* 1024px  */
@media screen and (max-width: 1024px) {
    .product {
        width: 30%;
    }
}

/* 900px */
@media screen and (max-width: 900px) {
    .product {
        width: 35%;
    }

    .product-page {
        grid-template-columns: 1fr;
        margin: 0;
    }

    .product-categories ul {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        padding-left: 0;
    }

    .product-categories ul li {
        padding-left: 1em;
        border-right: 1px solid #ccc;
        font-size: 1em;
        background-color: #f9f9f9;
    }

    .product-categories ul {
        background-color: #f2f2f2;
    }
}


/* 660px */
@media screen and (max-width:660px) {

    .product {
        width: 80%;
    }


}

/* 520px */
@media screen and (max-width:520px) {

    .product-page-header {
        flex-direction: column;
        align-items: center;
    }

    .product-page-header div {
        max-width: 90%;
    }

    .product-page-header img {
        width: 40%;
    }
}