html,
body {
    height: 100%;
    margin: 0;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

.product-page {
    flex: 1;
    /* this will grow to fill remaining space */
}

.produkter {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 80px;
    column-gap: 150px;
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 50px;
    padding-bottom: 50px;
    font-family: sans-serif;
}

.bluse img {
    width: 100%;
    /* Make image take full width of container */
    height: auto;
    /* Maintain aspect ratio */
    display: block;
    object-fit: cover;
    /* Optional: cover the container nicely */
}

.bluse {
    background-color: #ffffff;
    padding: 0px;
    border: 1px solid #ffffff;
}

.stBluse img {
    width: 100%;
    /* Make image take full width of container */
    height: auto;
    /* Maintain aspect ratio */
    display: block;
    object-fit: cover;
    /* Optional: cover the container nicely */
}

.stBluse {
    background-color: #ffffff;
    padding: 0px;
    border: 1px solid #ffffff;
}

.bildetekst {
    font-size: small;
}

/* øverst, hvilket produkt
    */

.typeProdukt {
    display: flex;
    /* gjør boksen til flex-container */
    flex-direction: column;
    /* stakk elementene vertikalt */
    justify-content: center;
    /* midtstill vertikalt */
    align-items: center;
    /* midtstill horisontalt */
    padding: 60px 20px 20px;
    /* top/bottom, left/right */
    width: 100%;
    /* fyller hele skjermen */
    min-height: 200px;
    /* eller ønsket høyde */
    background-color: #627D98;
    color: white;
    font-family: sans-serif;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    /* padding teller med i bredden */
    text-align: center;
}

.typeProdukt p,
.typeProdukt h1 {
    max-width: 1200px;
    /* begrenser tekstbredde */
    word-wrap: break-word;
    /* lange ord wraps */
    margin: 0 0 0.5em 0;
    /* litt mellomrom mellom elementer */
}




#footerProdukter {
    background-color: #627D98;
    font-family: sans-serif;
    margin-top: auto;   /* pushes footer to bottom */
    width: 100%;
    text-align: center;
}

#footerProdukter p {
    color: white;
    font-family: sans-serif;
    padding: 20px;
    margin: 0;
}

#footerComingSoon {
    background-color: white;
    font-family: sans-serif;
}

.comingSoon {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: sans-serif;
    font-size: 4.5em;
    /* endre */
    color: white;
    text-shadow: 1px 1px 2px #949494;
    padding-top: 215px;
    padding-bottom: 215px;
    text-align: center;
    background-color: #627D98;
}

.omOssContainer {
    padding-top: 50px;
    padding-bottom: 50px;
}

.omOssImage {
    position: relative;
    display: inline-block;
    width: 100%;
}

.omOssImage img {
    width: 100%;
    height: auto;
    display: block;
}

.omOssImage h1 {
    position: absolute;
    top: 50%;
    /* Midt på bildet */
    left: 50%;
}

.imageTitle {
    position: absolute;
    top: 50%;
    /* Midt på bildet */
    left: 50%;
    transform: translate(-50%, -50%);
    /* Sentraliserer */
    color: white;
    font-size: 3rem;
    font-family: sans-serif;
    padding: 20px 40px;
    border-radius: 8px;
}

.omOssText {
    padding-top: 20px;
    padding-bottom: 20px;
    padding: 0 25%;
    font-family: sans-serif;
}

.mellomrom {
    margin-top: 60px;
    /* Just an example height */
}

.product-flex {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    padding-left: 30px;
    padding-right: 30px;
    align-items: center;
    /* centers content vertically */
    justify-content: space-between;
    /* keeps image left, text right */
    height: 80vh;
    /* makes the flex container almost full height */
}

.product-image img {
    width: auto;
    height: 80vh;
    padding-left: 65px;
    padding-right: 65px;
    /* almost full viewport height */
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;

}

.product-info h1 {
    font-size: 2rem;
}

#productDescription {
    line-height: 1.5;

}

.product-info p {
    font-size: 1rem;
    line-height: 0.2;
}


/* Tablet */
@media (max-width: 1023px) {

    .produkter {
        grid-template-columns: repeat(1, 1fr);
        column-gap: 50px;
        row-gap: 40px;
        padding-left: 10px;
        padding-right: 10px;
        justify-items: center;
        /* ⬅️ center grid items */
    }

    .omOssText {
        padding-left: 40px;
        padding-right: 40px;
    }

    .product-flex {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* allow natural height */
    gap: 20px;
    height: auto; /* <- remove 80vh */
  }

    .product-image {
    padding-top: 0; /* remove 300px padding */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80%;
  }

    .product-image img {
        max-width: 540px;
        width: 80%;
        height: auto;
        object-fit: contain;
    }

    .product-info h1 {
        text-align: center;
        padding-top: 0;
    }

    /* Optional: center the text block and match width with image */
    .product-info {
    width: 90%;
    max-width: 600px;         /* gjør teksten smalere og mer lesbar */
    text-align: left;         /* behold venstrejustert tekst inni boksen */
  }

    .price {
        text-align: center;
    }

    /* Hver bluse */
    .bluse {
        width: 80%;
        /* ⬅️ keep product narrower than screen */
        max-width: 600px;
        /* optional: set a max size */
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    /* Bilder fyller bredde */
    .bluse img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* Container for produkter */
    .ProdukterBilder {
        display: flex;
        flex-direction: row;
        /* stack vertically */
        align-items: center;
        width: 100%;
        height: auto;
        /* let container grow */
        margin: 0;
        padding: 0;
    }

    .produkt {
        width: 100%;
        /* almost full width */
        height: auto;
        /* adjust height to image */
        margin-bottom: 1em;
        /* spacing between products */
        position: relative;
    }

    .produkt img {
        width: 100%;
        /* fill container */
        height: auto;
        /* maintain aspect ratio */
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .produkt:hover .bildeTekst {
        transform: none;
        /* remove hover transform */
    }

    .produkt:hover img {
        transform: none;
        /* remove hover scale on mobile */
        box-shadow: none;
        /* remove shadow on mobile */
    }

    /* TypeProdukt tekst større */
    .typeProdukt h1 {
        font-size: 4em;
        text-align: center;
        margin-bottom: 0.5em;
    }

    .typeProdukt p {
        font-size: 2em;
        text-align: center;
    }

    .bildetekst h2 {
        font-size: 4em;
        /* større navn */
        margin: 0.2em 0;
    }

    /* Tekst under bildet */
    .bildetekst {
        text-align: center;
        margin-top: 0.5em;
    }

    .bildetekst p {
        font-size: 2em;
        /* større pris */
        margin: 0;
    }

    .stBluse img {
        width: 100%;
        height: auto;
        display: block;
    }

    .stBluse {
        width: 80%;
        /* ⬅️ keep product narrower than screen */
        max-width: 600px;
        /* optional: set a max size */
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    /* TypeProdukt tekst større */
    .typeProdukt h1 {
        padding-top: 10px;
        font-size: 2em;
        text-align: center;
        margin-bottom: 0.5em;
    }

    .typeProdukt p {
        font-size: 1em;
        text-align: center;
    }

    .bildetekst h2 {
        font-size: 1.5em;
        /* større navn */
        margin: 0.2em 0;
    }

    .bildetekst p {
        font-size: 1em;
        /* større pris */
        margin: 0;
    }
}


/* Mobile */
@media (max-width: 768px) {

    /* Container for produkter */
    #produkterContainer {
        display: flex;
        flex-direction: column;
        /* én og én vertikalt */
        gap: 2em;
        padding: 1em;
        width: 90%;
    }

    .produkter {
        grid-template-columns: repeat(1, 1fr);
        column-gap: 50px;
        row-gap: 40px;
        padding-left: 10px;
        padding-right: 10px;
        justify-items: center;
        /* ⬅️ center grid items */
    }

    /* Hver bluse */
    .bluse {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        border: none;
        /* valgfritt */
        background-color: #fff;
    }

    /* Bilder fyller bredde */
    .bluse img {
        width: 100%;
        height: auto;
        align-items: center;
    }

    /* Hver bluse */
    .stBluse {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        border: none;
        /* valgfritt */
        background-color: #fff;
    }

    /* Bilder fyller bredde */
    .stBluse img {
        width: 100%;
        height: auto;
        align-items: center;
    }

    /* Container for produkter */
    .ProdukterBilder {
        display: flex;
        flex-direction: row;
        /* stack vertically */
        align-items: center;
        width: 100%;
        height: auto;
        /* let container grow */
        margin: 0;
        padding: 0;
    }

    .produkt {
        display: flex;
        flex-direction: column;
        /* stack image above text */
        align-items: center;
        /* center horizontally */
        text-align: center;
        /* center text */
        width: 100%;
        /* full width on mobile */
        max-width: 200px;
        /* optional: limit width to force wrap */
        margin-bottom: 1em;
    }

    .produkt img {
        width: 100%;
        /* fill container */
        height: auto;
        /* maintain aspect ratio */
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .produkt:hover .bildeTekst {
        transform: none;
        /* remove hover transform */
    }

    .produkt:hover img {
        transform: none;
        /* remove hover scale on mobile */
        box-shadow: none;
        /* remove shadow on mobile */
    }

    /* TypeProdukt tekst større */
    .typeProdukt h1 {
        padding-top: 10px;
        font-size: 2em;
        text-align: center;
        margin-bottom: 0.5em;
    }

    .typeProdukt p {
        font-size: 1em;
        text-align: center;
    }

    .bildetekst h2 {
        font-size: 1.5em;
        /* større navn */
        margin: 0.2em 0;
    }

    #txtSecondThread {
        white-space: normal;
        /* allow wrapping */
        word-break: break-word;
        /* break long words if needed */
        overflow-wrap: break-word;
        text-align: center;
        /* center the text */
        max-width: 100%;
        /* ensure it fits inside container */
        display: block;
        /* remove flex interfering wrap */
    }

    /* Tekst under bildet */
    .bildeTekst {
        white-space: normal;
        /* allow wrapping */
        word-break: break-word;
        /* break long words if necessary */
        overflow-wrap: break-word;
        margin-top: 0.5em;
        font-size: 1em;
    }

    .bildeTekst p {
        margin: 0;
        font-size: 1em;
        line-height: 1.2;
        word-break: break-word;
        /* safe wrap for long words */
    }

    .bildetekst p {
        font-size: 1em;
        /* større pris */
        margin: 0;
    }

    .omOssText {
        padding-left: 20px;
        padding-right: 20px;
    }

    .omOssImage {
        height: auto;
        /* set a fixed height for mobile */
    }

    #imageTitle {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 2rem;
        /* smaller on mobile */
        padding: 10px 20px;
        color: white;
        text-align: center;
    }

    .comingSoon {
        font-size: 2.5em;
    }

    .product-flex {
    flex-direction: column;
    align-items: center;
    justify-content: center; /* center content vertically */
    gap: 1rem;
    width: 100%;
    height: auto; /* let content determine height */
    padding: 1rem 0;
  }

    .product-image {
    width: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
  }

    .product-image img {
    width: 90%;
    max-width: 400px; /* optional, keeps image manageable */
    height: auto;
    object-fit: contain; /* prevent cutting off */
    display: block;
    margin: 0 auto;
  }

  .product-info {
    width: 90%;
    max-width: 400px; /* optional, match image */
    text-align: left; /* align text to the left */
  }

}