:root {
    --primary: #8B5E3C;
    --accent: #6A9C95;
    --secondary: #F6F2EE;
    --background: #FBF9F6;
    --card-bg: #FFF8F4;
    --text-dark: #2b2b2b;
    --text-light: #6b6b6b;
    --radius: 1rem;
    --max-width: 1200px;
    --font-main: "Marimekko", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* FONTTIASENNUKSET */
@font-face {
    font-family: "Marimekko";
    src: url("fonts/Marimekko-Thin.woff2") format("woff2");
    font-weight: 100;
    font-display: swap;
}

@font-face {
    font-family: "Marimekko";
    src: url("fonts/Marimekko-Book.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Marimekko";
    src: url("fonts/Marimekko-Bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

/* YLEISET TYYLIT */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    margin: 0;
    color: var(--text-dark);
    background: var(--background);
    line-height: 1.7;
}

p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
}

/* HEADER & NAV */
header nav {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(251, 249, 246, 0.95);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    min-height: 4.5rem;
}

header nav h1 {
    font-size: 1.8rem;
    margin: 0;
    flex: 1;
}

.logo-link {
    text-decoration: none;
    color: var(--text-dark);
}

header ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

header ul li a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 0;
    transition: color 0.2s;
    position: relative;
}

header ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

header ul li a:hover::after,
header ul li a.active::after {
    width: 100%;
}

header ul li a:hover,
header ul li a.active {
    color: var(--primary);
}

/* Somet */
.social-links {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.instagram-link,
.facebook-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);

    /* PAKOTETTU LEVEYS PIENILLE NAPEILLE */
    min-width: 110px;
}

.instagram-link:hover,
.facebook-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.instagram-link {
    background: linear-gradient(90deg, #f58529 0%, #dd2a7b 45%, #515bd4 100%);
}

.facebook-link {
    background: #1877F2;
}

/* SECTIONS */
section {
    max-width: var(--max-width);
    margin: auto;
    padding: 2rem 1.5rem;
    text-align: center;
}

section h2 {
    font-size: 2.3rem;
    margin-bottom: 1.2rem;
    position: relative;
    display: block;
    letter-spacing: -0.02em;
}

section h2::after {
    content: '';
    display: block;
    height: 3px;
    background: var(--accent);
    width: 60px;
    margin: 0.8rem auto 0;
    border-radius: 4px;
    margin-top: 0.5rem;
}

#products+#products-astiat,
#products-astiat+#features,
#features+#contact-info {
    padding-top: 0;
}

/* HERO */
#hero {
    padding-top: 2rem;
    padding-bottom: 1.5rem;
}

.hero-media {
    width: 100%;
}

.hero-image {
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.hero-image img {
    display: block;
    width: 100%;
    height: 50vh;
    min-height: 320px;
    max-height: 620px;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius);
}


.hero-content {
    margin-top: 2.5rem;
    max-width: 850px;
    margin-inline: auto;
}

/* TUOTEKORTIT */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.product-card {
    overflow: hidden;
    border-radius: var(--radius);
    transition: transform .3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(0, 0, 0, .15);
}

.product-card figure {
    margin: 0;
}

.product-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform .4s ease;
    cursor: zoom-in;
    border-radius: inherit;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* VIDEOT */
.about-video video {
    width: 100%;
    max-width: 800px;
    border-radius: var(--radius);
    display: block;
    margin: 2rem auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.tuote-video {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 9/16;
    object-fit: cover;
    border-radius: 1rem;
    display: block;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* YHTEYSTIEDOT */
.opening-hours {
    margin: 2rem auto;
    background: var(--secondary);
    padding: 2.5rem;
    border-radius: var(--radius);
    max-width: 400px;
}

.contact-card-simple {
    background: var(--card-bg);
    padding: 3.5rem 2rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid rgba(139, 94, 60, 0.15);
}

.contact-card-simple {
    display: flex;
    flex-direction: column;
}

.contact-card-simple h3 {
    margin: 0 0 1rem;
}

.contact-card-simple p {
    flex: 1;
    margin-bottom: 1.2rem;
}

/* OTA YHTEYTTÄ -SIVUN KORTIT */
.contact-grid-simple {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 3rem auto;
    align-items: stretch;
}

.contact-grid-simple {
    align-items: stretch;
}

.contact-card-simple {
    height: 100%;
    box-sizing: border-box;
}

/* NÄYTÄ REITTI -PAINIKE */
#contact-info button.open-map {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    margin-left: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

#contact-info button.open-map:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 94, 60, 0.2);
}

/* FOOTER */
footer {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--secondary);
    color: var(--text-light);
}

footer ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 1.5rem;
}

/* KELLUVA NAPPI */
.scroll-to-top {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    background: var(--primary);
    color: white;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.8rem;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(139, 94, 60, 0.2);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    background: var(--accent);
}

/* MODALS & KARTTA */
.lightbox,
.map-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    z-index: 10000;
    transition: 0.3s;
}

.lightbox.show,
.map-modal.show {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.map-modal-content {
    background: white;
    width: 95%;
    max-width: 1000px;
    height: 80vh;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.map-wrapper,
.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.map-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* RESPONSIVE */
@media (max-width: 900px) {
    header nav {
        flex-direction: column;
        padding: 1.5rem;
        min-height: auto;
    }

    header ul {
        position: static;
        transform: none;
        margin: 1.5rem 0;
        flex-wrap: wrap;
        justify-content: center;
    }

    .social-links {
        margin-top: 1rem;
        justify-content: center;
    }

    section {
        padding: 1.8rem 1rem;
        /* Todella tiivis väli mobiilissa */
    }

    header ul li a {
        display: block;
        padding: 1rem 1.5rem;
    }

    .social-links {
        display: none;
    }

    header ul li:last-child {
        border-bottom: none;
    }
}

.contact-card-simple {
    padding: 2rem 1rem;
}



@media (max-width: 900px) {
    .about-grid {
        display: flex !important;
        flex-direction: column !important;
        /* Pakottaa tekstin ja kuvan allekkain */
        gap: 2rem !important;
    }

    .about-text {
        text-align: center !important;
        width: 100% !important;
    }

    .about-text h2::after {
        margin: 0.8rem auto 0 !important;
    }

    .about-text p {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .about-image {
        width: 100% !important;
        max-width: 100% !important;
        /* Poistaa tietokoneversion 420px rajoituksen */
        margin: 0 auto !important;
        order: 2 !important;
        /* Varmistaa että kuva on tekstin alla */
    }

    .about-image figure {
        margin: 0 !important;
        /* Poistaa selaimen oletusmarginaalit */
    }

    .about-image img {
        width: 100% !important;
        max-width: 500px !important;
        /* Kuva on nyt suuri, muttei suttuinen */
        height: auto !important;
        display: block !important;
        margin: 0 auto !important;
    }
}

/* AUKIOLOAIKOJEN JA SOMENAPPIEN KORJAUKSET */
.opening-hours ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.opening-hours li {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    list-style-type: none;
}

/* PAKOTETTU LEVEYS OTA YHTEYTTÄ -SIVUN ISOLLE NAPEILLE */
.social-buttons-large a {
    padding: 1rem 2rem;
    font-size: 1.05rem;
    min-width: 220px;
}

.social-buttons-large {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero-image img {
        aspect-ratio: 4 / 3;
    }

    .hero-content {
        margin-top: 2rem;
    }
}

.icon-circle {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text {
    text-align: left;
}

.about-text h2::after {
    margin: 0.8rem 0 0;
}

.about-text p {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
}

.about-image img {
    width: 100%;
    display: block;
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
}

.about-image {
    max-width: 420px;
    margin-left: auto;
}

/* ===========================
   MOBILE HAMBURGER MENU
=========================== */

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-dark);
}

@media (max-width: 900px) {

    header nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    .menu-toggle {
        display: block;
    }

    header ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;

        transform: translateY(-10px);

        display: flex;
        flex-direction: column;
        gap: 0;

        background: var(--background);

        max-height: 0;
        overflow: hidden;

        opacity: 0;

        transition:
            max-height .35s ease,
            opacity .25s ease,
            transform .25s ease;

        box-shadow: 0 10px 20px rgba(0, 0, 0, .08);
    }
}

.contact-grid-simple {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 900px;
    margin: 3rem auto;
}

@media (max-width: 360px) {
    .contact-grid-simple {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .contact-card-simple {
        padding: 1.5rem 0.75rem;
    }

    .icon-circle {
        width: 56px;
        height: 56px;
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }

    .contact-card-simple h3 {
        font-size: 1.15rem;
    }

    .contact-card-simple p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .contact-big-link {
        font-size: 1rem;
    }
}

header ul.open {
    max-height: 400px;
    opacity: 1;
    transform: translateY(0);
}

header ul li {
    border-bottom: 1px solid rgba(0, 0, 0, .05);
}

.lightbox-prev,
.lightbox-next {

    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    width: 54px;
    height: 54px;

    border: none;

    border-radius: 50%;

    background: rgba(255, 255, 255, .9);

    cursor: pointer;

    font-size: 2rem;

    transition: .25s;
}

.lightbox-prev:hover,
.lightbox-next:hover {

    background: white;

    transform: translateY(-50%) scale(1.08);

}

.lightbox-prev {

    left: 2rem;

}

.lightbox-next {

    right: 2rem;

}

.contact-big-link {
    display: block;
    margin-top: auto;
    font-size: 1.05rem;
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.lightbox .close {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);

    width: 48px;
    height: 48px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, .9);

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

    font-size: 1.8rem;
    cursor: pointer;
    transition: .25s;
}

.lightbox .close:hover {
    background: white;
    transform: translateX(-50%) scale(1.08);
}

/* ===========================
   EVÄSTEBANNERI
=========================== */

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;

    background: rgba(43, 43, 43, .96);
    color: white;

    padding: 1rem;

    z-index: 30000;

    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-content {
    max-width: 900px;
    margin: auto;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cookie-content p {
    margin: 0;
    max-width: none;
    color: white;
}

.cookie-buttons {
    display: flex;
    gap: .75rem;
}

.cookie-buttons button {
    border: none;
    cursor: pointer;

    padding: .7rem 1.3rem;

    border-radius: .6rem;

    font-weight: 600;

    transition: .25s;
}

#accept-cookies {
    background: var(--primary);
    color: white;
}

#accept-cookies:hover {
    opacity: .9;
}

#reject-cookies {
    background: white;
    color: var(--text-dark);
}

#reject-cookies:hover {
    background: #eee;
}

@media(max-width:700px) {

    .cookie-content {

        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {

        width: 100%;
    }

    .cookie-buttons button {

        flex: 1;
    }
}