
:root{
  --bg:#fbf6ee;
  --card:#ffffff;
  --ink:#1f1a15;
  --muted:#6f6257;
  --line:#e6d8c8;
  --btn:#e9ddcf;
  --btn-ink:#4c3f36;
  --soft:#f6efe6;
  --shadow:0 10px 30px rgba(0,0,0,.06);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--ink);
  background:var(--bg);
  scroll-margin-top: 150px;
  line-height:1.5;
}

.wrap{max-width:1120px;margin:0 auto;padding:0 20px}

header{
  position:sticky; top:0; z-index:20;
  background:rgba(251,246,238,.92);
  backdrop-filter: blur(6px);
  border-bottom:1px solid var(--line);
}

.topbar{
  display:flex; align-items:center; gap:18px;
  padding:14px 0;
}

.brand{
  display:flex; align-items:center; gap:14px;
  min-width: 260px;
}

.brand-logo{
  width:76px; height:76px;
  border-radius:18px;
  background:#fff;
  border:1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
  overflow:hidden;
  flex:0 0 auto;
  display:flex; align-items:center; justify-content:center;
}
.brand-logo img{
  width:100%; height:100%;
  object-fit:cover;
  display:block;
}

.brand-title{
  font-family: Georgia, "Times New Roman", serif;
  font-weight:700;
  letter-spacing:.2px;
  font-size:28px;
  margin:0;
  line-height:1.1;
}

.nav{
  margin-left:auto;
  display:flex;
  gap:10px;
  flex-wrap:nowrap;
  justify-content:flex-end;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom:2px;
}
.nav::-webkit-scrollbar{height:8px}



.nav a{
  text-decoration:none;
  color:var(--btn-ink);
  background:var(--btn);
  border:1px solid var(--line);
  padding:8px 12px;
  border-radius:999px;
  font-weight:650;
  font-size:15px;
  box-shadow: 0 2px 0 rgba(0,0,0,.04) inset;
}


.nav a:hover{filter:brightness(.98)}
.nav a:active{transform:translateY(1px)}

main{padding:34px 0 50px}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:26px;
  padding:26px 26px;
  box-shadow: var(--shadow);
  margin:18px 0;
}

h2{
  font-family: Georgia, "Times New Roman", serif;
  font-size:42px;
  margin:0 0 14px;
  letter-spacing:.2px;
}
h3{margin:0 0 10px}

.muted{color:var(--muted)}

@media (max-width: 980px){
  .brand{min-width: unset}
  .nav{flex-wrap:wrap; justify-content:flex-start; margin-left:0}
}
@media (max-width: 640px){
  .topbar{align-items:flex-start; flex-wrap:wrap}
  .nav{width:100%; justify-content:flex-start}
  h2{font-size:34px}
  .brand-title{font-size:24px}
  .brand-logo{width:64px;height:64px}
}

/* Tuotteet */
.product-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:18px;
}
@media (max-width: 980px){
  .product-grid{grid-template-columns: repeat(2, 1fr)}
}
@media (max-width: 640px){
  .product-grid{grid-template-columns: 1fr}
}

/* Vaalea taustalaatikko tuotteille */
.products-wrap{
  background:var(--soft);
  border:1px solid var(--line);
  border-radius:22px;
  padding:18px;
}

.product{
  border:1px solid var(--line);
  border-radius:20px;
  overflow:hidden;
  background:#fff;
}
.product-image-wrap{position:relative;background:var(--soft)}
.product img{width:100%;height:210px;object-fit:cover;display:block}
.product.is-muted-product img{filter:grayscale(.35) opacity(.54)}
.badges{
  position:absolute;
  left:12px;
  right:12px;
  bottom:12px;
  z-index:2;
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  align-items:flex-end;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  width:max-content;
  max-width:100%;
  border:1px solid rgba(255,255,255,.66);
  border-radius:999px;
  padding:7px 11px;
  font-size:13px;
  font-weight:850;
  line-height:1.2;
  box-shadow:0 8px 18px rgba(31,26,21,.2);
  backdrop-filter:blur(2px);
  text-decoration:none;
}
.badge[href]::after{content:"›";font-size:17px;line-height:1;margin-top:-1px}
.badge[href]:hover{filter:brightness(1.05)}
.badge-seasonal{background:#c85d24;color:#fff}
.badge-order{background:#426b50;color:#fff}
.badge-unavailable{background:#2f2924;color:#fff}
.product h3{margin:12px 14px 6px;font-weight:800}
.product p{margin:0 14px 10px;color:var(--muted)}
.product .price{margin:0 14px 10px;font-weight:800}
.product-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin:0 14px 16px;
}
.product .meta-link{
  display:inline-block;
  color:var(--btn-ink);
  text-decoration:underline;
  text-underline-offset:3px;
}
/* Tilaukset: huomio */
.note{
  margin-top:16px;
  background:var(--soft);
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px 16px;
}
.note strong{font-weight:800}

/* Yhteystiedot */
.contact-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:18px;
  align-items:center;
}
@media (max-width: 760px){
  .contact-row{grid-template-columns:1fr}
}
.contact-card{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:20px;
  background:var(--soft);
}
.contact-card img{
  width:96px;height:96px;border-radius:18px;
  object-fit:cover;border:1px solid var(--line);
  background:#fff;
}
.contact-name{
  font-weight:900;
  font-size:18px;
  line-height:1.1;
}
.contact-role{
  color:var(--muted);
  margin-top:4px;
}
.contact-info{
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:20px;
  background:#fff;
}
.contact-info p{margin:0}
.contact-info a{color:var(--btn-ink);}

/* Tuotetiedot */
.tuotetiedot-grid{
  display:grid;
  grid-template-columns: repeat(2,1fr);
  gap:16px;
}
@media (max-width: 900px){
  .tuotetiedot-grid{grid-template-columns:1fr}
}
.detail-card{
  border:1px solid var(--line);
  border-radius:20px;
  padding:16px;
  background: var(--soft);
  display:flex;
  flex-direction:column;
  min-height:520px;
  scroll-margin-top: 100px;
}

.detail-card h3{
  font-family: Georgia, "Times New Roman", serif;
  font-size:24px;
}
.detail-card ul{margin:10px 0 0 18px}

/* Tee details/summary selkeästi klikattavaksi */

.details-aines{flex:1 1 auto;}
.details-sailytys{margin-top:auto;}
.detail-card details{
  margin-top:10px;
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  background:#fff;
}
.detail-card summary{
  list-style:none;
  cursor:pointer;
  padding:12px 14px;
  font-weight:800;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.detail-card summary::-webkit-details-marker{display:none;}
.detail-card summary::after{
  content:"▾";
  opacity:.75;
  font-size:14px;
}
.detail-card details[open] summary::after{content:"▴";}
.detail-card details > *:not(summary){
  background:#fff;
  border-top:1px solid var(--line);
  padding:10px 14px 14px;
}
.detail-card details > *:not(summary) ul{margin-top:8px}
.detail-card details > *:not(summary) p{margin:8px 0 0}

footer{
  border-top:1px solid var(--line);
  background:rgba(251,246,238,.92);
}
footer .wrap{padding:16px 20px;color:var(--muted);font-size:14px}
  
.detail-card{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.detail-card details.storage{
  margin-top:auto;
}
.detail-card details > summary{
  cursor:pointer;
}
.detail-card details > summary::marker{display:none}
.detail-card details > summary{
  list-style:none;
  position:relative;
  padding-right:28px;
}
.detail-card details > summary:after{
  content:"▾";
  position:absolute;
  right:8px; top:50%;
  transform:translateY(-50%);
  color:var(--muted);
  font-size:14px;
}
.detail-card details[open] > summary:after{
  content:"▴";
}

section[id]{scroll-margin-top: 120px;}


/* Popup ingredient details */
.modal-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  z-index:1000;
  padding:24px;
}
.modal-overlay.open{display:block}
.modal-box{
  max-width:720px;
  margin:6vh auto 0;
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:0 20px 50px rgba(0,0,0,.18);
  overflow:hidden;
}
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 18px;
  background:var(--soft);
  border-bottom:1px solid var(--line);
}
.modal-head h3{margin:0;font-family: Georgia, "Times New Roman", serif;font-size:26px}
.modal-close{
  appearance:none;
  border:1px solid var(--line);
  background:#fff;
  border-radius:999px;
  padding:8px 12px;
  cursor:pointer;
  font-weight:700;
}
.modal-body{
  padding:18px;
  max-height:70vh;
  overflow:auto;
}
.popup-link{
  color:var(--btn-ink);
  text-decoration:underline;
  text-underline-offset:3px;
  cursor:pointer;
}
.hidden-popup{display:none}
