/* =========================================================
   Metsaraja CMS template — savipunane & valge
   WooCommerce-laadne pood, reaalne shop integration (§21).
   Taust valge; savipunane on aktsendi- ja südamevärv.
   ========================================================= */

:root {
  --bg:        #ffffff;
  --bg-warm:   #ffffff;
  --clay:      #a23c28;
  --clay-deep: #7e2b1a;
  --clay-soft: #f6e4dd;
  --btn:       #b5651d;
  --btn-deep:  #97500f;
  --ink:       #221a16;
  --muted:     #6f5950;
  --line:      rgba(162, 60, 40, 0.16);
  --line-soft: rgba(162, 60, 40, 0.09);
  --field:     #efe6e0;

  --f-head: "Plus Jakarta Sans", system-ui, sans-serif;
  --f-body: "Be Vietnam Pro", system-ui, sans-serif;

  --gut: clamp(18px, 4.5vw, 56px);
  --maxw: 1300px;
  --radius: 14px;

  --shadow:    0 14px 44px -18px rgba(126, 43, 26, 0.20);
  --shadow-sm: 0 8px 26px -16px rgba(126, 43, 26, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--clay-soft); color: var(--clay-deep); }
h1, h2, h3 { font-family: var(--f-head); font-weight: 700; line-height: 1.12; margin: 0; }

.shell { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  line-height: 1; vertical-align: middle;
}

.mt-skip {
  position: absolute; left: -999px; top: auto; z-index: 999;
  background: var(--clay); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 0;
}
.mt-skip:focus { left: 0; top: 0; }

/* Every rendered block is wrapped by the CMS in <section class="cms-block cms-block--TYPE">
   — reset its own padding so our section-level rules (.section-pad etc) aren't double-applied. */
.cms-block { padding: 0; }

/* The navbar block's sticky/fixed header needs to size against #main's full height, not a
   section wrapper that's exactly as tall as the header itself (which breaks position:sticky —
   there's no room for it to "travel"). Unwrap it outside edit mode; keep the box in edit mode
   so the CMS editor can still select/highlight the block. */
body:not(.cms-edit-mode) .cms-block--navbar { display: contents; }

/* Sticky-footer scaffold: #main is a flex column, footer (its last child) pinned to bottom
   on short pages; each direct child gets an explicit width so flex-stretch isn't disabled by
   any auto-margin centering helper inside it. */
#main { flex: 1; display: flex; flex-direction: column; }
#main > *:last-child { margin-top: auto; }
#main > * { width: 100%; }

/* ---------- Nupud ---------- */
.mt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-body); font-weight: 600; font-size: 15px;
  padding: 13px 24px; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.mt-btn .material-symbols-outlined { font-size: 19px; }
.mt-btn-primary { background: var(--btn); color: #fff; }
.mt-btn-primary:hover { background: var(--btn-deep); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.mt-btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.mt-btn-ghost { background: #fff; color: var(--clay); border-color: var(--line); }
.mt-btn-ghost:hover { background: var(--clay-soft); border-color: transparent; transform: translateY(-2px); }
.mt-btn-light { background: #fff; color: var(--clay); }
.mt-btn-light:hover { background: var(--clay-soft); }
.mt-btn-lg { font-size: 16px; border-radius: 99px; padding: 14px 28px; }
.mt-btn-light-outline { background: rgba(255,255,255,.1); backdrop-filter: blur(8px); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.mt-btn-light-outline:hover { background: rgba(255,255,255,.25); border-color: #fff; }

.mt-linklike { display: inline-flex; align-items: center; gap: 6px; color: var(--clay); font-weight: 600; font-size: 15px; }
.mt-linklike .material-symbols-outlined { font-size: 18px; transition: transform .3s ease; }
.mt-linklike:hover .material-symbols-outlined { transform: translateX(5px); }

.mt-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--clay); display: inline-block; }

/* =========================================================
   Päis
   ========================================================= */
.mt-header {
  position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line-soft);
  transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .4s ease, visibility .4s ease, box-shadow .25s ease, background .2s ease;
}
.mt-header.scrolled { box-shadow: 0 6px 24px -16px rgba(126,43,26,.4); }
body.mt-homepage .mt-header { position: absolute; width: 100%; background: transparent; border-bottom: 0; }
body.mt-homepage .mt-header:not(.scrolled) { transform: translateY(-100%); opacity: 0; visibility: hidden; }
body.mt-homepage .mt-header.scrolled { position: fixed; background: #fff; border-bottom: 1px solid var(--line-soft); transform: translateY(0); opacity: 1; visibility: visible; }
.mt-header > .shell { height: 68px; display: flex; align-items: center; gap: 20px; }
.mt-brand { display: flex; align-items: center; gap: 12px; }
.mt-brand img { height: 48px; width: auto; transition: transform .3s ease; }
.mt-brand:hover img { transform: scale(1.05); }
.mt-brand-name {
  font-family: var(--f-head); font-weight: 700; font-size: 25px;
  letter-spacing: -.01em; color: #2f4a31; line-height: 1; white-space: nowrap;
}
.mt-nav { display: flex; align-items: center; gap: 28px; margin-left: 8px; }
.mt-nav a { font-weight: 600; font-size: 15px; color: var(--muted); position: relative; padding: 4px 0; transition: color .2s; }
.mt-nav a::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--clay); transition: width .3s ease; }
.mt-nav a:hover { color: var(--clay); }
.mt-nav a:hover::after, .mt-nav a.active::after { width: 100%; }
.mt-nav a.active { color: var(--clay); }

body.mt-homepage .mt-header:not(.scrolled) .mt-brand-name { color: #fff; }

.mt-header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.mt-icon-btn { background: none; border: 0; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 9px; border-radius: 10px; transition: background .2s, color .2s; position: relative; }
.mt-icon-btn:hover { background: var(--clay-soft); color: var(--clay); }
body.mt-homepage .mt-header:not(.scrolled) .mt-icon-btn { color: #fff; }
.mt-cart-btn .mt-cart-count {
  position: absolute; top: 1px; right: 1px; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--clay); color: #fff; font-size: 11px; font-weight: 700; font-family: var(--f-body);
  border-radius: 99px; display: flex; align-items: center; justify-content: center; line-height: 1;
  transform: scale(0); transition: transform .2s ease;
}
.mt-cart-btn .mt-cart-count.has { transform: scale(1); }
.mt-nav-toggle { display: none; }

/* =========================================================
   Hero
   ========================================================= */
.mt-hero { position: relative; display: flex; align-items: flex-end; min-height: 90vh; padding: 140px 0 80px; overflow: hidden; }
.mt-hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--clay-deep); }
.mt-hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.mt-hero-overlay-dark { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(34,26,22,.35) 0%, rgba(34,26,22,.75) 100%); }

.mt-hero .shell { position: relative; z-index: 1; width: 100%; }
.mt-hero-layout-split { display: flex; justify-content: flex-start; align-items: flex-end; gap: 40px; flex-wrap: wrap; }

.mt-hero-text-block { max-width: 800px; margin-bottom: 20px; }
.mt-hero-text-block h1 { font-size: clamp(52px, 8vw, 104px); letter-spacing: -.03em; margin: 0; font-weight: 800; color: #fff; line-height: 1.05; text-shadow: 0 16px 48px rgba(0,0,0,.4); }
.mt-hero-text-block .mt-hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* =========================================================
   Sektsioonid
   ========================================================= */
section { scroll-margin-top: 96px; }
.band-warm { background: var(--bg-warm); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section-pad { padding: clamp(56px, 8vw, 96px) 0; }
.mt-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.mt-section-head h2 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -.01em; }
.mt-section-head p { margin: 8px 0 0; color: var(--muted); }
.mt-center-head { text-align: center; margin-bottom: 48px; }
.mt-center-head h2 { font-size: clamp(26px, 4vw, 34px); }
.mt-rule { width: 84px; height: 4px; background: var(--clay); border-radius: 99px; margin: 16px auto 0; }

.mt-empty-note { color: var(--muted); padding: 20px 0; }

/* =========================================================
   Platsihoidja-pinnad
   ========================================================= */
.mt-media-fallback { display: flex; align-items: center; justify-content: center; background: var(--field); width: 100%; height: 100%; }
.mt-media-fallback .material-symbols-outlined { font-size: 52px; color: var(--muted); opacity: .3; transition: transform .5s ease; }

/* =========================================================
   WooCommerce tootekaardid + ruudustik
   ========================================================= */
.mt-wc-grid { display: grid; gap: 22px; }
.mt-wc-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.mt-wc-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.mt-wc-card { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.mt-wc-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.mt-wc-card.mt-is-out { opacity: .65; }
.mt-wc-card-media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; }
.mt-wc-card:hover .mt-wc-card-media .material-symbols-outlined { transform: scale(1.08); }
.mt-wc-card-media img { width: 100%; height: 100%; object-fit: cover; }
.mt-out-badge { position: absolute; top: 12px; left: 12px; z-index: 2; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; padding: 5px 11px; border-radius: 99px; color: #fff; background: var(--clay); }
.mt-wc-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mt-wc-cat { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mt-wc-title { font-family: var(--f-head); font-weight: 700; font-size: 17px; line-height: 1.3; }
.mt-wc-title a:hover { color: var(--clay); }
.mt-wc-blurb { font-size: 13.5px; color: var(--muted); margin: 2px 0 0; }
.mt-wc-price { font-weight: 700; color: var(--clay); font-size: 17px; margin-top: 6px; }
.mt-wc-price del { color: var(--muted); font-weight: 500; font-size: 14px; opacity: .8; }
.mt-wc-price ins { text-decoration: none; }
.mt-wc-add { margin-top: 12px; width: 100%; padding: 11px 16px; font-size: 14px; }

/* =========================================================
   Lugu
   ========================================================= */
.mt-story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 76px); align-items: center; }
.mt-story-photo { position: relative; }
.mt-story-photo .mt-frame { aspect-ratio: 1 / 1; border-radius: 20px; overflow: hidden; border: 8px solid #fff; box-shadow: var(--shadow); background: var(--field); }
.mt-story-photo .mt-frame img { width: 100%; height: 100%; object-fit: cover; }
.mt-story-photo .mt-accent { position: absolute; bottom: -18px; right: -18px; width: 124px; height: 124px; background: var(--clay); border-radius: 18px; opacity: .15; z-index: -1; }
.mt-story-copy h2 { font-size: clamp(26px, 4vw, 36px); color: var(--clay); margin: 10px 0 20px; }
.mt-story-copy h3 { font-size: 22px; color: var(--ink); margin: 28px 0 12px; }
.mt-story-copy p { color: var(--muted); font-size: 17px; margin: 0 0 18px; }

/* =========================================================
   Usaldusriba
   ========================================================= */
.mt-trust-strip { border-block: 1px solid var(--line-soft); }
.mt-trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 36px 0; }
.mt-trust-item { display: flex; align-items: center; gap: 14px; }
.mt-trust-item .material-symbols-outlined { font-size: 30px; color: var(--clay); }
.mt-trust-item strong { display: block; font-family: var(--f-head); font-size: 15px; }
.mt-trust-item span { font-size: 13.5px; color: var(--muted); }

/* =========================================================
   Päevik
   ========================================================= */
.mt-journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.mt-post { cursor: pointer; }
.mt-post .mt-thumb { aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; background: var(--field); }
.mt-post .mt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mt-post:hover .mt-thumb .material-symbols-outlined { transform: scale(1.06); }
.mt-post .mt-meta { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--clay); }
.mt-post h3 { font-size: 20px; margin: 10px 0 8px; transition: color .25s; }
.mt-post:hover h3 { color: var(--clay); }
.mt-post p { color: var(--muted); margin: 0; font-size: 15px; }

/* Single blog post */
.mt-post-single { padding: clamp(34px, 5vw, 56px) 0; max-width: 800px; }
.mt-post-single-head h1 { font-size: clamp(28px, 5vw, 44px); margin: 8px 0 12px; }
.mt-post-single-byline { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.mt-post-single-hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; aspect-ratio: 16/9; }
.mt-post-single-hero img { width: 100%; height: 100%; object-fit: cover; }
.mt-post-single-body { color: var(--ink); font-size: 17px; line-height: 1.8; }
.mt-post-single-body p { margin: 0 0 18px; }
.mt-post-single-body h2, .mt-post-single-body h3 { margin: 32px 0 14px; }

/* =========================================================
   Testimonials (Bento Box)
   ========================================================= */
.mt-bento-container { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-flow: dense; gap: 24px; }
.mt-bento-card {
  background: #fff; border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column;
  justify-content: flex-start; gap: 16px; border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.mt-bento-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.mt-bento-card.large { grid-column: span 2; background: linear-gradient(135deg, var(--ink), #2a2a2a); color: #fff; border: none; }
.mt-bento-card.wide { grid-column: span 2; }

.mt-bento-card .mt-stars { color: var(--clay); font-size: 20px; display: flex; gap: 2px; }
.mt-bento-card .mt-stars span { font-size: 18px; font-variation-settings: 'FILL' 1; }
.mt-bento-card.large .mt-stars { color: #f59e0b; }
.mt-bento-card .mt-text { font-size: 16px; line-height: 1.6; font-style: italic; color: var(--muted); margin: 0; }
.mt-bento-card.large .mt-text { font-size: 24px; font-weight: 300; line-height: 1.4; color: #fff; }

.mt-bento-author { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.mt-bento-author-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--clay-soft); display: flex; align-items: center; justify-content: center; color: var(--clay); font-weight: 700; font-family: var(--f-head); }
.mt-bento-card.large .mt-bento-author-avatar { background: rgba(255,255,255,.1); color: #fff; }
.mt-bento-author-info strong { display: block; font-family: var(--f-head); font-size: 16px; color: var(--ink); margin-bottom: 2px; }
.mt-bento-card.large .mt-bento-author-info strong { color: #fff; }
.mt-bento-author-info span { font-size: 14px; color: var(--muted); display: block; }
.mt-bento-card.large .mt-bento-author-info span { color: rgba(255,255,255,.6); }

/* =========================================================
   Töömeetod (tume sektsioon)
   ========================================================= */
.mt-bg-dark { background-color: var(--ink); color: #fff; }
.mt-bg-dark h2 { color: #fff; }
.mt-bg-dark .mt-eyebrow { color: var(--clay-soft); }
.mt-bg-dark .mt-process-step { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); color: #fff; }
.mt-bg-dark .mt-process-step p { color: rgba(255,255,255,.7); }
.mt-bg-dark .mt-process-step h3 { color: var(--clay-soft); }
.mt-process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 24px; }
.mt-process-step { position: relative; background: #fff; padding: 32px; border-radius: var(--radius); border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm); transition: transform .3s ease; }
.mt-process-step:hover { transform: translateY(-4px); }
.mt-process-step h3 { font-size: 20px; margin-bottom: 12px; color: var(--clay); }
.mt-process-step p { color: var(--muted); font-size: 16px; margin: 0; }

/* =========================================================
   Kontakt CTA
   ========================================================= */
.mt-newsletter { background: var(--bg); color: var(--ink); }
.mt-newsletter .shell { padding-block: clamp(52px, 8vw, 86px); text-align: center; }
.mt-newsletter h2 { font-size: clamp(26px, 4vw, 34px); margin-bottom: 14px; }
.mt-newsletter p { opacity: .92; max-width: 50ch; margin: 0 auto 28px; font-size: 18px; color: var(--muted); }

/* =========================================================
   Lehepäis + teerada (alalehed)
   ========================================================= */
.mt-page-head { background: var(--bg-warm); border-bottom: 1px solid var(--line-soft); padding: 30px 0 34px; }
.mt-page-head.slim { padding: 18px 0; }
.mt-page-head h1 { font-size: clamp(28px, 5vw, 42px); margin-top: 8px; }
.mt-page-head-inline { margin-bottom: 28px; }
.mt-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.mt-breadcrumb a:hover { color: var(--clay); }
.mt-breadcrumb span { opacity: .6; }
.mt-breadcrumb .current { color: var(--ink); opacity: 1; font-weight: 500; }

/* =========================================================
   Pood — paigutus
   ========================================================= */
.mt-shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: clamp(30px, 4vw, 48px); padding: clamp(36px, 6vw, 64px) 0; align-items: start; }
.mt-shop-sidebar { display: flex; flex-direction: column; gap: 30px; position: sticky; top: 96px; }
.mt-widget h3 { font-size: 16px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--clay-soft); }
.mt-cat-list { list-style: none; margin: 0; padding: 0; }
.mt-cat-list li { margin-bottom: 2px; }
.mt-cat-list a { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 8px; font-size: 15px; color: var(--muted); transition: background .2s, color .2s; }
.mt-cat-list a:hover, .mt-cat-list a.active { background: var(--clay-soft); color: var(--clay-deep); }
.mt-widget-help { background: var(--bg-warm); padding: 20px; border-radius: var(--radius); border: 1px solid var(--line-soft); }
.mt-widget-help h3 { border: 0; padding: 0; }
.mt-widget-help p { font-size: 14px; color: var(--muted); margin: 0 0 14px; }

.mt-shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.mt-result-count { margin: 0; color: var(--muted); font-size: 14.5px; }

.mt-pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 40px; }
.mt-pagination-pos { font-size: 14px; color: var(--muted); }

/* =========================================================
   Üksiktoode
   ========================================================= */
.mt-single-product { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 60px); padding: clamp(34px, 5vw, 56px) 0; align-items: start; }
.mt-sp-main { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: var(--field); }
.mt-sp-main img { width: 100%; height: 100%; object-fit: cover; }
.mt-sp-thumbs { display: flex; gap: 12px; margin-top: 12px; }
.mt-sp-thumb { width: 84px; height: 84px; border-radius: 10px; cursor: pointer; border: 2px solid transparent; transition: border-color .2s; overflow: hidden; padding: 0; }
.mt-sp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mt-sp-thumb.is-active { border-color: var(--clay); }

.mt-sp-cat { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mt-sp-summary h1 { font-size: clamp(28px, 4vw, 40px); margin: 8px 0 12px; letter-spacing: -.01em; }
.mt-sp-price { font-family: var(--f-head); font-weight: 700; font-size: 30px; color: var(--clay); margin-bottom: 16px; }
.mt-sp-price del { color: var(--muted); font-weight: 500; font-size: 20px; opacity: .8; margin-right: 6px; }
.mt-sp-price ins { text-decoration: none; }
.mt-sp-short { color: var(--muted); font-size: 17px; margin: 0 0 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line-soft); }

.mt-sp-variants { margin-bottom: 20px; }
.mt-sp-variants-label { font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.mt-sp-variant-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.mt-variant-btn { padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-family: var(--f-body); font-size: 14px; cursor: pointer; transition: border-color .2s, background .2s; }
.mt-variant-btn.is-active { border-color: var(--clay); background: var(--clay-soft); color: var(--clay-deep); }
.mt-variant-btn.is-out, .mt-variant-btn:disabled { opacity: .4; cursor: not-allowed; }

.mt-sp-buy { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.mt-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mt-qty.sm { transform: scale(.85); transform-origin: left; }
.mt-qty-btn { width: 42px; height: 48px; background: #fff; border: 0; font-size: 20px; color: var(--clay); cursor: pointer; transition: background .2s; }
.mt-qty-btn:hover { background: var(--clay-soft); }
.mt-qty span { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; font-size: 15px; }
.mt-qty-input { width: 50px; height: 48px; border: 0; border-inline: 1px solid var(--line); text-align: center; font-family: var(--f-body); font-size: 16px; color: var(--ink); -moz-appearance: textfield; }
.mt-qty-input::-webkit-outer-spin-button, .mt-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mt-sp-add { height: 50px; padding-inline: 26px; }

.mt-sp-assure { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; background: var(--bg-warm); border-radius: var(--radius); font-size: 14px; color: var(--muted); }
.mt-sp-assure .material-symbols-outlined { font-size: 20px; color: var(--clay); margin-right: 8px; }
.mt-sp-assure .mt-out .material-symbols-outlined { color: var(--muted); }
.mt-sp-assure .mt-low { color: var(--clay); }

.mt-sp-desc { padding-bottom: 20px; max-width: 760px; color: var(--muted); font-size: 16.5px; line-height: 1.75; }
.mt-sp-desc h2 { color: var(--ink); font-size: 22px; margin-bottom: 14px; }

/* =========================================================
   Ostukorvi sahtel (mini-cart)
   ========================================================= */
.mt-cart-overlay { position: fixed; inset: 0; background: rgba(34,16,11,.42); z-index: 60; opacity: 0; transition: opacity .3s ease; }
.mt-cart-overlay.on { opacity: 1; }
.mt-cart-drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(400px, 90vw); background: #fff; z-index: 61;
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .32s cubic-bezier(.22,.61,.36,1); box-shadow: -16px 0 50px -20px rgba(126,43,26,.5); }
.mt-cart-drawer.on { transform: none; }
.mt-cart-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line-soft); }
.mt-cart-drawer-head h2 { font-size: 20px; }
.mt-cart-drawer-items { flex: 1; overflow-y: auto; padding: 12px 22px; }
.mt-cart-drawer-empty { color: var(--muted); text-align: center; padding: 40px 0; }
.mt-dci { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.mt-dci strong { display: block; font-family: var(--f-head); font-size: 14.5px; }
.mt-dci-price { font-size: 13px; color: var(--muted); }
.mt-dci-qty { display: inline-flex; align-items: center; gap: 6px; }
.mt-dci-qty button { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--clay); }
.mt-cart-drawer-foot { padding: 18px 22px; border-top: 1px solid var(--line-soft); }
.mt-cart-drawer-sub { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 16px; }
.mt-cart-drawer-sub strong { font-family: var(--f-head); color: var(--clay); font-size: 19px; }
.mt-cart-foot-btn { width: 100%; margin-bottom: 8px; }

/* =========================================================
   Ostukorvi leht + kassa
   ========================================================= */
.mt-cart-table-wrap { overflow-x: auto; }
.mt-cart-table { width: 100%; border-collapse: collapse; }
.mt-cart-table thead th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 12px 14px; border-bottom: 1px solid var(--line); }
.mt-cart-table tbody td { padding: 16px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.mt-ci-prod { font-family: var(--f-head); font-size: 15px; }
.mt-ci-prod small { color: var(--muted); font-family: var(--f-body); font-size: 13px; }
.mt-ci-remove { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; }
.mt-ci-remove:hover { color: var(--clay); background: var(--clay-soft); }

.mt-cart-totals { background: var(--bg-warm); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 24px; position: sticky; top: 96px; margin-top: clamp(24px, 4vw, 0px); }
.mt-cart-totals h2 { font-size: 19px; margin-bottom: 16px; }
.mt-ct-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 15px; color: var(--muted); border-bottom: 1px solid var(--line-soft); gap: 12px; }
.mt-ct-row strong { color: var(--ink); font-family: var(--f-head); }
.mt-ct-row small { color: var(--muted); }
.mt-ct-total { font-size: 18px; color: var(--ink); border-bottom: 0; padding-top: 14px; }
.mt-ct-total strong { color: var(--clay); font-size: 22px; }
.mt-ct-checkout { width: 100%; margin-top: 14px; }

.mt-checkout-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 4vw, 48px); align-items: start; margin-top: 1.5rem; padding-bottom: 4rem; }
.mt-co-section { margin-bottom: 28px; }
.mt-co-section h2 { font-size: 18px; margin-bottom: 14px; }
.mt-co-row { display: flex; gap: 16px; flex-wrap: wrap; }
.mt-co-row > .mt-field { flex: 1; min-width: 200px; }
.mt-co-methods { display: flex; flex-direction: column; gap: 10px; }
.mt-co-address { margin-top: 14px; display: flex; flex-direction: column; gap: 14px; }
.mt-hp { position: absolute; left: -9999px; }
.mt-pay-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; text-align: center; }

.mt-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.mt-field input, .mt-field textarea { font-family: var(--f-body); font-size: 15px; font-weight: 400; padding: 11px 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; }
.mt-field input:focus, .mt-field textarea:focus { outline: 2px solid var(--clay-soft); border-color: var(--clay); }
.mt-field-err { font-size: 12.5px; color: var(--clay); font-weight: 500; min-height: 1em; }
.mt-field.has-err input, .mt-field.has-err textarea { border-color: var(--clay); }

.mt-radio-card { display: flex; gap: .9rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: border-color .2s, background .2s; }
.mt-radio-card:hover { border-color: var(--clay); }
.mt-radio-card:has(input:checked) { border-color: var(--clay); background: var(--clay-soft); }
.mt-radio-card input { margin-top: 3px; accent-color: var(--clay); flex-shrink: 0; }
.mt-radio-card b { display: block; font-size: 15px; font-weight: 600; }
.mt-radio-card small { color: var(--muted); font-size: 13px; }

.mt-cform-err, .mt-cform-ok { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; border-radius: 10px; padding: 14px 16px; font-weight: 600; margin-bottom: 20px; }
.mt-cform-err { background: rgba(162,60,40,.08); border: 1px solid rgba(162,60,40,.3); color: var(--clay-deep); }
.mt-cform-ok { background: rgba(73,102,64,.08); border: 1px solid rgba(73,102,64,.3); color: #2f4a31; }
.mt-cform-err a, .mt-cform-ok a { white-space: nowrap; color: inherit; text-decoration: underline; }

.mt-pay-methods { display: flex; flex-direction: column; gap: 10px; }
.mt-pay-method { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; }
.mt-pay-method:hover { border-color: var(--clay); }
.mt-pay-method img { height: 24px; width: auto; }

.mt-co-received-badge { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--clay-soft); margin-bottom: 20px; }
.mt-co-received-badge .material-symbols-outlined { font-size: 32px; color: var(--clay); }

/* =========================================================
   Mobiilimenüü
   ========================================================= */
.mt-mobile-menu { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: #fff; padding: 26px var(--gut); flex-direction: column; gap: 4px; border-top: 1px solid var(--line-soft); box-shadow: 0 16px 24px -10px rgba(0,0,0,.1); }
.mt-mobile-menu.open { display: flex; }
.mt-mobile-menu a { font-family: var(--f-head); font-weight: 600; font-size: 21px; color: var(--ink); padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.mt-mobile-menu a:hover { color: var(--clay); }

/* =========================================================
   Reveal
   ========================================================= */
.mt-reveal, .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.mt-reveal.in, .reveal.in { opacity: 1; transform: none; }

/* =========================================================
   Lainelõikega jalus
   ========================================================= */
.mt-wave-footer { position: relative; background: linear-gradient(90deg, var(--clay-deep), var(--clay)); margin-top: 70px; color: #fff; }
.mt-wave-svg { position: absolute; top: -69px; left: 0; width: 100%; height: 70px; overflow: hidden; line-height: 0; background: linear-gradient(90deg, var(--clay-deep), var(--clay)); }
.mt-wave-svg svg { position: relative; display: block; width: calc(100% + 1.3px); height: 70px; transform: scaleX(-1); }
.mt-shape-fill { fill: #ffffff; }

.mt-wave-container { max-width: var(--maxw); margin: 0 auto; padding: 3rem var(--gut) 4rem; }
.mt-wave-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 3rem; }
.mt-wave-col h3 { font-size: 15px; margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.9); }
.mt-wave-col ul { list-style: none; margin: 0; padding: 0; }
.mt-wave-col li { margin-bottom: 1rem; color: rgba(255,255,255,.85); font-size: 15px; line-height: 1.6; }
.mt-wave-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.mt-footer-logo { height: 42px; width: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.mt-wave-brand-name { font-family: var(--f-head); font-weight: 700; font-size: 22px; color: #fff; line-height: 1; }
.mt-wave-col a { color: rgba(255,255,255,.85); text-decoration: none; position: relative; transition: color .3s; }
.mt-wave-col a::after { content: ''; position: absolute; width: 100%; transform: scaleX(0); height: 2px; bottom: -4px; left: 0; background-color: #fff; transform-origin: bottom right; transition: transform .25s ease-out; }
.mt-wave-col a:hover { color: #fff; }
.mt-wave-col a:hover::after { transform: scaleX(1); transform-origin: bottom left; }
.mt-wave-support-text { color: rgba(255,255,255,.85); font-size: 15px; line-height: 1.6; margin: 0 0 1rem; }
.mt-wave-support-link { font-weight: 600; }

.mt-wave-bottom { margin-top: 4rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; font-size: 14px; color: rgba(255,255,255,.7); }
.mt-wave-socials { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.mt-wave-socials a { color: #fff; text-decoration: none; transition: opacity .3s; }
.mt-wave-socials a:hover { opacity: .7; }

.mt-footer-credit { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.15; text-decoration: none; text-align: right; margin-top: 1rem; }
@media (min-width: 620px) { .mt-footer-credit { margin-top: 0; margin-left: 2rem; } }
.mt-footer-credit-name {
  font-family: var(--f-head); font-weight: 800; font-size: 1.4rem;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.9) 50%, transparent 100%), linear-gradient(90deg, #ffffff, var(--clay-soft));
  background-size: 200% 100%, 100% 100%; background-position: 200% 0, 0 0;
  -webkit-background-clip: text; background-clip: text; color: transparent; transition: filter .3s ease;
}
.mt-footer-credit:hover .mt-footer-credit-name { animation: mtFooterGlimmer 1.2s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes mtFooterGlimmer { 0% { background-position: -100% 0, 0 0; } 100% { background-position: 200% 0, 0 0; } }
.mt-footer-credit-sub { font-size: .72rem; letter-spacing: .05em; color: rgba(255,255,255,.7); }

/* =========================================================
   Legal / rikastekst
   ========================================================= */
.mt-legal-updated { color: var(--muted); font-size: 14px; margin-top: 8px; }
.mt-legal-body { color: var(--muted); font-size: 16.5px; line-height: 1.8; }
.mt-legal-body h2, .mt-legal-body h3 { color: var(--ink); margin: 28px 0 12px; }
.mt-legal-body p { margin: 0 0 16px; }
.mt-legal-body ul { padding-left: 22px; }

/* =========================================================
   Responsiivsus
   ========================================================= */
@media (max-width: 1024px) {
  .mt-wc-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .mt-shop-layout { grid-template-columns: 1fr; }
  .mt-shop-sidebar { position: static; }
  .mt-checkout-grid { grid-template-columns: 1fr; }
  .mt-cart-totals { position: static; }
}
@media (max-width: 860px) {
  .mt-nav { display: none; }
  .mt-nav-toggle { display: inline-flex; }
  .mt-story-grid { grid-template-columns: 1fr; }
  .mt-story-photo { max-width: 440px; }
  .mt-single-product { grid-template-columns: 1fr; }
  .mt-trust-grid { grid-template-columns: repeat(2, 1fr); }
  .mt-wave-grid { grid-template-columns: 1fr 1fr; }
  .mt-bento-container { grid-template-columns: repeat(2, 1fr); }
  .mt-bento-card.large, .mt-bento-card.wide { grid-column: span 2; }
  .mt-journal-grid, .mt-process-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
}
@media (max-width: 620px) {
  .mt-wc-grid.cols-4, .mt-wc-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .mt-bento-container { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .mt-bento-card { grid-column: span 1 !important; grid-row: auto !important; }
  .mt-section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .mt-wave-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
  .mt-wave-brand { justify-content: center; }
  .mt-wave-bottom { flex-direction: column; align-items: center; text-align: center; gap: 1.5rem; }
  .mt-wave-socials { justify-content: center; }
  .mt-footer-credit { align-items: center; text-align: center; }
  .mt-cart-table thead { display: none; }
  .mt-cart-table, .mt-cart-table tbody, .mt-cart-table tr, .mt-cart-table td { display: block; width: 100%; }
  .mt-cart-table tr { border: 1px solid var(--line-soft); border-radius: var(--radius); margin-bottom: 14px; padding: 8px; }
  .mt-cart-table td { border: 0; padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; }
  .mt-cart-table td[data-label]::before { content: attr(data-label); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
}
@media (max-width: 420px) {
  .mt-wc-grid.cols-4, .mt-wc-grid.cols-3 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .mt-reveal, .reveal { opacity: 1; transform: none; }
  .mt-cart-drawer, .mt-cart-overlay { transition: none; }
}

/* Edit-mode: neutralise position:fixed/sticky headers so the CMS editor iframe can select
   blocks normally instead of the header pinning itself over the toolbar. */
body.cms-edit-mode .mt-header { position: relative !important; }
