body {
    margin: 0;
    font-family: "Urbanist", sans-serif;
}

#pakehys {
    width: 1000px;
    margin: 0 auto;
    position: relative;
}

#logo {
    width: 100px;
    margin-bottom: 10px;
}

#logo img {
    width: 100%;
}

.banner {
    margin-bottom: 20px;
}

.banner img {
    width: 100%;
}

.plus {
    margin-right: 10px;
    margin-left: 30px;
}
.minus {
    margin-right: 10px;
}
.poista {
    #margin-left: 10px;
    background-color:red;
}


.tuote {
    width: 100%;
    border: 1px solid #ccc;
    padding-left: 20px;
    padding-right:20px;
    margin-bottom: 30px;
    background-color: #f9f9f9;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}


.tuote-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.tuote-kuvat {
    flex: 1;
}

.tuote-osto {
    flex: 0 0 200px;
}

.tuote-nimi {
    text-align: center;
    margin-bottom: 15px;
}

.tuote-selite {
    margin-bottom: 20px;
    line-height: 1.5;
}

.tuote-kuvat {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tuotekuva.klikkattava {
    cursor: pointer;
    transition: transform 0.2s ease;
    max-width: 300px;
    height: auto;
}

.hinta {
font-size:18px;
}

.tuotekuva.klikkattava:hover {
    transform: scale(1.05);
}

.tuote-osto {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-top: auto;
}

.tuote-osto input.kpl {
    width: 55px;
    text-align: right;
    margin-bottom: 5px;
    font-size: 22px;
    box-sizing: content-box;
}

.tuote-osto button.ostoskori-btn {
    padding: 8px;
    background-color: #007BFF;
    border: none;
    color: white;
    cursor: pointer;
    transition: 0.3s;
    font-size:16px;
}

.tuote-osto button.ostoskori-btn:hover {
    background-color: #0056b3;
}

input[type=number] {
    appearance: textfield;
    padding-right: 10px;
}


input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#ostoskori {
    border: 1px solid #aaa;
    padding: 15px;
    margin-top: 20px;
    background-color: #f0f0f0;
}
#ostoskori-rivit {
font-weight: bold;
}

#tilauslomake {
    border: 1px solid #aaa;
    padding: 20px;
    margin-top: 20px;
    background-color: #f9f9f9;
}

#tilaus-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#tilaus-form input {
    padding: 8px;
    border: 1px solid #ccc;
}

#kiitos {
    border: 1px solid #aaa;
    padding: 20px;
    margin-top: 20px;
    background-color: #e6ffe6;
    text-align: center;
}

button {
    padding: 8px;
    background-color: #007BFF;
    border: none;
    color: white;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}


#kuva-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 9999;

    opacity: 0;
    visibility: hidden;

    transition: opacity 0.35s ease, visibility 0.35s ease;
}

#kuva-modal.nakyvassa {
    opacity: 1;
    visibility: visible;
}

#kuva-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);

    transform: scale(0.85);
    opacity: 0;

    transition: transform 0.35s ease, opacity 0.35s ease;
}

#kuva-modal.nakyvassa img {
    transform: scale(1);
    opacity: 1;
}


#sulje-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2em;
    color: white;
    cursor: pointer;
    user-select: none;
}


#footer {
    width: 1000px;
    margin: 20px auto 0;
    text-align: center;
}

#footer img {
    width: 100%;
    height: auto;
    display: block;
}

#ostoskori-btn {
    position: absolute;
    top: 10px;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

#ostoskori-btn img {
    display: block;
}



@media (max-width: 1024px) {

    
    body {
        font-size: 18px;
    }

    #pakehys {
        width: 100%;
        padding: 12px;
        box-sizing: border-box;
    }

    #footer {
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }

    #logo {
        width: 90px;
        margin: 0 auto 15px;
    }

    .tuote {
        padding-left: 12px;
        padding-right: 12px;
    }

    .tuote-flex {
        flex-direction: column;
        gap: 15px;
    }

    .tuote-nimi {
        font-size: 24px;
    }

    .tuote-selite {
        font-size: 17px;
        line-height: 1.6;
    }

    .tuote-kuvat {
        justify-content: center;
    }

    .tuotekuva.klikkattava {
        max-width: 100%;
    }

    .tuote-osto {
        width: 100%;
        align-items: stretch;
        gap: 10px;
    }

    .tuote-osto input.kpl {
        width: 100%;
        font-size: 22px;
        padding: 16px;
        height: 60px;
        box-sizing: border-box;
    }

    .tuote-osto button.ostoskori-btn {
        width: 100%;
        font-size: 22px;
        padding: 18px;
        height: 65px;
    }

    button {
        font-size: 20px;
        padding: 16px;
        height: 60px;
    }

    .hinta {
        font-size: 22px;
        text-align: left;
    }

    input, select, textarea {
        font-size: 18px !important;
    }

    .ostosrivi {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        padding: 10px 0;
        border-bottom: 1px solid #ddd;
        font-size: 16px;
    }

    .ostosrivi > *:not(button) {
        flex: 1 1 100%;
    }

    .maara {
        font-weight: bold;
    }

    .ostosrivi button {
        flex: 0 0 auto;
        font-size: 18px;
        padding: 10px 14px;
        margin-top: 6px;
    }

    .ostosrivi button.poista {
        background-color: #d9534f;
    }

    #tilaus-form input {
        font-size: 20px;
        padding: 16px;
        height: 60px;
        box-sizing: border-box;
    }
}
