:root {
  --panel: #ffffff;
  --ink: #0f1c10;
  --muted: #5b6b5d;
  --brand: #1c7c54;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(10,20,10,.08);
}

/* See tagab ühtlase taustavärvi */
body {
    background-color: beige;
}

main {
    padding-top: 120px; /* Päise jaoks ruumi */
}

.container {
  width: min(1200px, 92vw);
  margin-inline: auto;
}

/* Hero (pealkirja ala) */
.hero {
  background: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.1)), url(https://images.unsplash.com/photo-1542223189-677d3fa3d942?q=80&w=2070&auto=format&fit=crop) center/cover no-repeat;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
  padding: 60px 0;
  position: relative;
  isolation: isolate;
  text-align: center;
}

.hero h1 {
  margin: 0 0 .3rem;
  font-size: clamp(28px, 4vw, 42px);
}
.hero__sub {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 500;
}

/* Paigutus (lihtsustatud Toodete valikust) */
.layout {
  padding: 2rem 0 3rem;
}

/* Retsepti ruudustik */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Automaatne veergude arv */
  gap: 1.4rem;
}

/* Kaardi stiilid (kopeeritud Toodete valikust) */
.card {
  background: var(--panel);
  border: 1px solid #e7ede9;
  border-radius: var(--radius);
  overflow: clip;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(10,20,10,.12);
}
/* Shared card image container */
.card__media {
  aspect-ratio: 16 / 10;
  background: white;
  overflow: hidden;
  display: block;
  width: 100%;
  line-height: 0;
}

.card__media img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Juhendid page — show entire product image */
.page-juhendid .card__media img {
  object-fit: contain;
  object-position: center;
}

/* Retseptinurk page — crop food photos nicely */
.page-retseptid .card__media img {
  object-fit: cover;
  object-position: center;
}

.card__body {
  padding: 1rem 1.2rem .5rem;
}
.card__title {
  margin: .1rem 0 .25rem;
  font-size: 1.15rem;
}
.card__title a {
  text-decoration: none;
  color: inherit;
}
.card__title a:hover {
  text-decoration: underline;
}
.card__desc {
  margin: .25rem 0 0;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.5;
}
.card__actions {
  padding: .8rem 1.2rem 1.2rem;
  margin-top: auto;
}
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  letter-spacing: .2px;
  padding: .7rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 8px 24px rgba(28,124,84,.25);
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(28,124,84,.28);
}