/* Mäsodvor — shared stylesheet */

:root {
  --bg: #faf5ec;
  --ink: #2a2725;
  --ink-soft: #4a433c;
  --muted: #6b6156;
  --placeholder: #9a8f7f;
  --red: #8f1d2c;
  --maroon: #46101c;
  --gold: #cfae82;
  --cream: #f2e8d9;
  --dark: #2a2725;
  --border: #e3d7c2;
  --border-soft: #ecdfc7;
  --green: #3f5c2e;
  --disabled: #c9bfae;
  --font-serif: Georgia, "Times New Roman", "Cormorant Garamond", serif;
  --font-sans: -apple-system, "Segoe UI", Roboto, "Mulish", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--maroon); text-decoration: underline; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: var(--font-sans); }
::placeholder { color: var(--placeholder); }
h1, h2, h3 { font-family: var(--font-serif); color: var(--maroon); margin: 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.wide { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.narrow { max-width: 820px; margin: 0 auto; padding: 0 32px; }

/* Top bar */
.topbar {
  background: var(--dark);
  color: var(--cream);
  font-size: 12px;
  padding: 6px 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar a { color: var(--cream); }

/* Header */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--gold);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.logo {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--maroon);
  letter-spacing: 0.3px;
}
nav.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.nav-item { position: relative; }
.nav-link {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  padding: 4px 0;
  background: none;
  border: none;
  font-family: var(--font-sans);
}
.nav-link.active { font-weight: 800; color: var(--red); }
.nav-dropdown {
  position: absolute;
  top: 36px;
  left: 0;
  background: var(--bg);
  border: 1px solid var(--gold);
  box-shadow: 0 12px 28px rgba(42,39,37,0.18);
  padding: 18px;
  display: none;
  gap: 32px;
  z-index: 50;
  min-width: 420px;
}
.nav-item.open .nav-dropdown { display: flex; }
.nav-dropdown-title {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--red);
  margin-bottom: 8px;
}
.nav-dropdown-link { padding: 6px 0; cursor: pointer; font-size: 14px; display: block; color: var(--ink); }
.nav-dropdown-link:hover { color: var(--red); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.account-link { cursor: pointer; font-size: 14px; font-weight: 600; background: none; border: none; font-family: var(--font-sans); color: var(--ink); }
.cart-btn {
  cursor: pointer; font-size: 14px; font-weight: 600;
  background: var(--maroon); color: var(--cream);
  padding: 8px 16px; border: none; position: relative;
  font-family: var(--font-sans);
}
.cart-count { margin-left: 6px; font-size: 12px; }

/* Buttons */
.btn { display: inline-block; border: none; padding: 14px 26px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: var(--font-sans); }
.btn-primary { background: var(--red); color: var(--bg); }
.btn-primary:hover { background: var(--maroon); text-decoration: none; }
.btn-outline { background: transparent; color: var(--maroon); border: 1px solid var(--maroon); }
.btn-outline:hover { background: rgba(70,16,28,0.06); text-decoration: none; }
.btn-outline-light { background: transparent; color: var(--bg); border: 1px solid var(--cream); }
.btn-outline-light:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.btn-dark { background: var(--maroon); color: var(--bg); }
.btn-dark:hover { background: #33090f; }
.btn:disabled { background: var(--disabled) !important; cursor: not-allowed; color: var(--bg) !important; }
.btn-sm { padding: 9px; font-size: 13px; }

/* Hero */
.hero {
  position: relative;
  min-height: 460px;
  background: #4a2e1a url('../img/hero-home.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(23,20,18,0.72), rgba(23,20,18,0.28));
}
.hero-inner { position: relative; max-width: 620px; padding: 48px; color: var(--bg); }
.hero-inner h1 { color: var(--bg); font-size: 48px; line-height: 1.1; margin: 0 0 18px; }
.hero-inner p { font-size: 17px; line-height: 1.6; margin: 0 0 28px; color: var(--cream); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.page-hero {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
}
.page-hero::before { content: ""; position: absolute; inset: 0; background: rgba(23,20,18,0.55); }
.page-hero .hero-inner { max-width: 760px; padding: 32px; }
.page-hero h1 { color: var(--bg); font-size: 38px; margin: 0 0 10px; }
.page-hero p { color: var(--cream); font-size: 15px; margin: 0; }

/* Sections */
.section { padding: 64px 32px; }
.section-tint { background: var(--cream); }
.section-title { font-size: 32px; text-align: center; margin: 0 0 40px; }

/* Grids */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.grid-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.grid-3col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 36px; }

/* Category card */
.cat-card { border: 1px solid var(--gold); background: #fff; cursor: pointer; display: block; }
.cat-card-photo { height: 150px; background-size: cover; background-position: center; }
.cat-card-body { padding: 18px; }
.cat-card-title { font-family: var(--font-serif); font-size: 22px; color: var(--maroon); margin-bottom: 4px; }
.cat-card-sub { font-size: 13px; color: var(--muted); }

/* Product card */
.product-card { border: 1px solid var(--border); background: #fff; display: flex; flex-direction: column; height: 100%; }
.product-card-photo { position: relative; height: 160px; background-size: cover; background-position: center; cursor: pointer; }
.badge { position: absolute; top: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; color: var(--bg); }
.badge-sale { left: 8px; background: var(--red); }
.badge-new { right: 8px; background: var(--dark); }
.product-card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-cat { font-size: 12px; color: var(--muted); }
.product-name { font-family: var(--font-serif); font-size: 19px; color: var(--maroon); cursor: pointer; }
.product-price { font-size: 16px; font-weight: 800; color: var(--red); }
.product-avail { font-size: 12px; font-weight: 700; }
.product-avail.ok { color: var(--green); }
.product-avail.no { color: var(--red); }
.product-card-actions { margin-top: auto; display: flex; gap: 8px; padding-top: 8px; }
.product-card-actions .btn { flex: 1; }

/* Footer */
footer.site-footer { background: var(--dark); color: var(--cream); margin-top: auto; }
.footer-grid { max-width: 1200px; margin: 0 auto; padding: 48px 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.footer-col h3 { font-family: var(--font-serif); font-size: 24px; margin: 0 0 10px; color: var(--gold); }
.footer-col p { font-size: 13px; line-height: 1.7; color: #c9c1b6; margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.footer-links a { color: #e8ddcb; }
.footer-bottom { border-top: 1px solid #4a433c; padding: 18px 32px; font-size: 12px; color: #a89f92; text-align: center; }

/* Cookie banner & modal */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; background: var(--bg);
  border-top: 2px solid var(--maroon); z-index: 90; padding: 20px 32px;
  display: flex; gap: 24px; flex-wrap: wrap; align-items: center; justify-content: space-between;
}
.cookie-banner p { font-size: 13px; max-width: 640px; line-height: 1.6; margin: 0; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.modal-overlay { position: fixed; inset: 0; background: rgba(23,20,18,0.5); z-index: 95; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--bg); padding: 28px; max-width: 480px; width: 100%; }
.modal-box.narrow { max-width: 360px; }
.modal-title { font-family: var(--font-serif); font-size: 22px; color: var(--maroon); margin-bottom: 16px; }
.cookie-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-soft); font-size: 14px; }

/* Cart drawer */
.cart-overlay { position: fixed; inset: 0; background: rgba(23,20,18,0.5); z-index: 60; display: none; }
.cart-overlay.open { display: block; }
.cart-drawer {
  position: fixed; right: -420px; top: 0; bottom: 0; width: 400px; max-width: 92vw;
  background: var(--bg); z-index: 61; box-shadow: -12px 0 30px rgba(0,0,0,0.2);
  display: flex; flex-direction: column; transition: right 0.25s ease;
}
.cart-drawer.open { right: 0; }
.cart-drawer-head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.cart-drawer-head .title { font-family: var(--font-serif); font-size: 24px; color: var(--maroon); }
.cart-close { cursor: pointer; font-size: 20px; background: none; border: none; }
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.cart-empty { text-align: center; color: var(--muted); padding: 40px 0; }
.cart-line { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border-soft); }
.cart-line-thumb { width: 64px; height: 64px; flex-shrink: 0; background-size: cover; background-position: center; }
.cart-line-info { flex: 1; }
.cart-line-name { font-size: 14px; font-weight: 700; }
.cart-line-amount { font-size: 13px; color: var(--muted); }
.cart-line-total { font-size: 13px; font-weight: 700; color: var(--red); }
.cart-line-remove { cursor: pointer; font-size: 13px; color: var(--muted); background: none; border: none; }
.cart-drawer-foot { padding: 20px 24px; border-top: 1px solid var(--border); }
.cart-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.cart-note { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.cart-foot-actions { display: flex; gap: 10px; }
.cart-foot-actions .btn { flex: 1; }

/* Toast */
.toast { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); background: var(--dark); color: var(--bg); padding: 14px 24px; font-size: 14px; z-index: 80; display: none; }
.toast.show { display: block; }

/* Forms */
.field { padding: 11px; border: 1px solid var(--gold); width: 100%; background: #fff; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.span-2 { grid-column: span 2; }
label.checkline { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.success-box { background: var(--cream); padding: 24px; font-size: 15px; }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

/* Shop layout */
.shop-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; }
.shop-filter-block { margin-bottom: 26px; }
.shop-filter-title { font-family: var(--font-serif); font-size: 19px; color: var(--maroon); margin-bottom: 10px; }
.filter-option { padding: 7px 0; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink); background: none; border: none; display: block; width: 100%; text-align: left; font-family: var(--font-sans); }
.filter-option.active { font-weight: 800; color: var(--red); }
.filter-check { display: block; font-size: 14px; margin-bottom: 8px; }
.filter-radio { display: block; font-size: 14px; margin-bottom: 6px; }
.no-results { padding: 60px 0; text-align: center; color: var(--muted); font-size: 15px; }

/* Product detail */
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.product-photo-lg { height: 340px; background-size: cover; background-position: center; }
.weight-btn { padding: 8px 14px; border: 1px solid var(--gold); cursor: pointer; font-size: 14px; font-weight: 500; background: #fff; }
.weight-btn.active { border: 2px solid var(--maroon); font-weight: 800; background: var(--cream); }
.qty-btn { width: 34px; height: 34px; border: 1px solid var(--gold); background: #fff; cursor: pointer; font-size: 16px; }
.allergen-chip { background: var(--red); color: var(--bg); font-size: 12px; font-weight: 700; padding: 4px 10px; }
.nutrition-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.nutrition-table td { padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.nutrition-table td:last-child { text-align: right; font-weight: 700; }

/* Checkout */
.checkout-steps { display: flex; gap: 0; margin-bottom: 32px; flex-wrap: wrap; }
.checkout-step { padding: 10px 20px; font-size: 13px; font-weight: 700; background: var(--cream); color: var(--ink-soft); }
.checkout-step.active { background: var(--maroon); color: var(--bg); }
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.pay-option { display: block; padding: 12px; border: 1px solid var(--gold); margin-bottom: 8px; cursor: pointer; }
.order-summary { background: #fff; border: 1px solid var(--border); padding: 20px; }
.order-line { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.order-total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 800; padding: 10px 0 0; border-top: 1px solid var(--gold); margin-top: 6px; }

/* Legal */
.legal-layout { display: grid; grid-template-columns: 260px 1fr; gap: 40px; }
.legal-nav a { padding: 8px 0; display: block; font-size: 14px; font-weight: 500; color: var(--ink); }
.legal-nav a.active { font-weight: 800; color: var(--red); }
.legal-doc p { font-size: 15px; line-height: 1.8; margin: 0 0 14px; color: var(--ink-soft); }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; cursor: pointer; }
.faq-question { font-size: 16px; font-weight: 700; }
.faq-icon { font-size: 20px; color: var(--red); }
.faq-answer { display: none; padding: 0 0 18px; font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.faq-item.open .faq-answer { display: block; }

/* Recipes */
.recipe-card { border: 1px solid var(--border); background: #fff; }
.recipe-photo { height: 150px; background-size: cover; background-position: center; }
.recipe-body { padding: 16px; }
.recipe-title { font-family: var(--font-serif); font-size: 19px; color: var(--maroon); margin-bottom: 6px; }
.recipe-desc { font-size: 13px; line-height: 1.6; color: var(--ink-soft); }

/* Storage */
.storage-section { margin-bottom: 26px; }
.storage-title { font-family: var(--font-serif); font-size: 20px; color: var(--red); margin-bottom: 6px; }
.storage-text { font-size: 15px; line-height: 1.7; color: var(--ink-soft); }

/* Map */
.map-frame { width: 100%; height: 260px; border: 1px solid var(--border); }

/* Misc */
.small-note { font-size: 13px; color: var(--muted); }
.mb-0 { margin-bottom: 0; }

@media (max-width: 900px) {
  .shop-layout, .product-detail-grid, .checkout-grid, .legal-layout { grid-template-columns: 1fr; }
  .hero-inner h1 { font-size: 34px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
}
