* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Georgia", "Times New Roman", serif;
}

body {
    background-color: #ffffff;
    overflow-x: hidden;

}

/*----alla olika CDPs ska ha olika header färger för det är kul--*/

nav {
    border: 1px solid rgb(0, 0, 0);
}

.hardluxnavigation {
    background-color: #13371d;
    position: sticky;
    top: 0;
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    z-index: 20;
}

.jabjabnavigation {
    background-color: #6e0000;
    position: sticky;
    top: 0;
    padding: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    z-index: 20;
}

.haroldnavigation {
    background-color: #000000;
    position: sticky;
    top: 0;
    padding: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    z-index: 20;
}

.matouknavigation {
    background-color: #bdd9ff;
    position: sticky;
    top: 0;
    padding: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    z-index: 20;
}

.catdudenavigation {
    background-color: #691f73;
    position: sticky;
    top: 0;
    padding: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    z-index: 20;
}

.hardluxnavigation a {
    font-family: "Impact", sans-serif;
    color: #ffffff;
    text-decoration: none;
    margin: 0 0.9375rem; /* converted margin to rem */
    font-size: 2.5rem; /* typographic sizing in rem */
    text-transform: uppercase;
    transition: color 0.3s;
    padding: 0.375rem 0.9375rem; /* spacing in rem */
    z-index: 100;
}

.jabjabnavigation a, .haroldnavigation a, .catdudenavigation a {
    font-family: "Impact", sans-serif;
    color: #fffefe;
    text-decoration: none;
    margin: 0 0.9375rem; /* converted margin to rem */
    font-size: 2.5rem; /* typographic sizing in rem */
    text-transform: uppercase;
    transition: color 0.3s;
    padding: 0.375rem 0.9375rem; /* spacing in rem */
    z-index: 100;
}

.matouknavigation a { 
    font-family: "Impact", sans-serif;
    color: #000000;
    text-decoration: none;
    margin: 0 0.9375rem; /* converted margin to rem */
    font-size: 2.5rem; /* typographic sizing in rem */
    text-transform: uppercase;
    transition: color 0.3s;
    padding: 0.375rem 0.9375rem; /* spacing in rem */
    z-index: 100;
}

.hardluxnavigation a:hover, .jabjabnavigation a:hover, .haroldnavigation a:hover, .matouknavigation a:hover, .catdudenavigation a:hover {
    color: #ca0000;
}

/* ---------- CDP CARD ---------- */

.hela-CDP {
    background-image: url(webdetails/comic-sidescribble.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.CDPcard {
    display: grid;
    grid-template-columns: minmax(20rem, 40.625rem) 1fr; /* flexible column with rem sizing */
    grid-template-areas: "image text";
    gap: 0rem;
    align-items: start;
    padding: clamp(3rem, 6vw, 20rem); /* fluid padding */
    padding-top: clamp(1.5rem, 4vw, 10rem);
    padding-bottom: clamp(3rem, 6vw, 20rem);
    min-height: clamp(25rem, 60vh, 37.5rem); /* flexible height */
    overflow: visible;
}

.CDPcard-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: center 20%;
    transform: translateY(clamp(-3rem, -8vh, -11.25rem)); /* responsive transform */
}

.CDPcard-text {
    grid-area: text;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.CDPcard-text h3 {
    font-family: "Impact", sans-serif;
    font-size: 4.5rem; /* heading sized in rem */
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.CDPcard-text p {
    font-family: "Helvetica", sans-serif;
    font-size: 1.125rem; /* body copy in rem */
    line-height: 1.5;
}

/* ---------- hardlux produkter ---------- */

.produkt-rad-CDP {
    margin: 2rem 0;
    padding: clamp(1rem, 4vw, 15rem) 2rem; /* responsive section padding */
}

.produkt-rad-CDP h2 {
    font-family: 'Impact', sans-serif;
    font-size: 3rem; /* heading sized in rem */
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-left: clamp(0.5rem, 2vw, 4rem);
}

.container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem clamp(1rem, 6vw, 4rem); /* responsive horizontal padding */
    cursor: grab;
    user-select: none;
}

.container:active {
    cursor: grabbing;
}

.container::-webkit-scrollbar {  /* youtube videon sa att det här va bra och att det gömmer scrollern från CHrome och Safari?*/
    display: none;
}

.produkt {
    position: relative;
    flex: 0 0 auto;
    width: 13.75rem; /* converted width to rem */
    text-align: center;
    background-color: #f5f5f5;
    border: 3px solid #000000; /* kept px for border precision */
    padding: 0.5rem;
    user-select: none;
    cursor: pointer;
    pointer-events: auto;
}

.produkt::after {
    content: "";
    position: absolute;
    inset: 0.25rem; /* converted inset to rem */
    border: 2px solid #000; /* kept px for border precision */
    pointer-events: none;
}

.produkt img {
    width: 100%;
    height: clamp(10rem, 25vh, 18.75rem); /* responsive image height */
    object-fit: cover;
    margin-bottom: 0.5rem;
    -webkit-user-drag: none;
    user-select: none;
}

.produkt p {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 1.125rem; /* typographic sizing in rem */
    color: #333333;
}

.produkt:hover {
    transform: translateY(-0.3125rem) rotate(-0.5deg); /* transform converted to rem */
    box-shadow: 0.375rem 0.375rem 0 #000; /* shadow offsets in rem */
}

@media (max-width: 600px) {

    .hardluxnavigation, .jabjabnavigation, .haroldnavigation, .matouknavigation, .catdudenavigation {
        padding: 1rem;
        gap: 1rem;
    }

    .hardluxnavigation a, .jabjabnavigation a, .haroldnavigation a, .matouknavigation a, .catdudenavigation a {
        font-size: 1.25rem; /* responsive nav on mobile */
        margin: 0 0.3125rem; /* responsive margin in rem */
        padding: 0.25rem 0.5rem; /* responsive padding in rem */
    }

    .CDPcard { /* en kolumn istället */
        grid-template-columns: 1fr;
        grid-template-areas: "image" "text";
        padding: 5rem 1rem;
        min-height: auto;
        text-align: center;
    }

    .CDPcard-image img { /* ta bort transform och auto height */
        transform: translateY(-2rem);
        height: auto;
    }

    .CDPcard-text {
        padding: 1rem 0;
    }

    .CDPcard-text h3 {
        font-size: 2.25rem; /* responsive heading on mobile */
        margin-bottom: 0.5rem;
    }

    .CDPcard-text p {
        font-size: 1rem; /* responsive body text on mobile */
    }

    .produkt-rad-CDP {
        padding: 3rem 1rem;
    }

    .produkt-rad-CDP h2 {
        font-size: 2rem; /* responsive mobile heading */
        padding-left: 1rem;
        margin-bottom: 0.5rem;
    }

    .container {
        padding: 1rem;
        gap: 0.5rem;
    }

    .produkt { /* mindre produkt kort*/
        width: 11.25rem; /* responsive width on mobile */
        padding: 0.25rem;
    }

    .produkt img {
        height: 15.625rem; /* responsive image height on mobile */
    }

    .produkt p {
        font-size: 1rem; /* responsive text on mobile */
    }

    .produkt:hover { /* ändrat hover */
        transform: translateY(-0.1875rem) rotate(-0.25deg); /* responsive transform in rem */
        box-shadow: 0.25rem 0.25rem 0 #000; /* responsive shadow in rem */
    }
}
