/* Honkovy ozdoby – vizovickepecivo.cz
   Barvy převzaté z původního webu. */
:root {
  --bg: #e6cfa5;        /* světlé pozadí */
  --panel: #ceb273;     /* hlavička a menu */
  --panel-dark: #b89a5a;
  --text: #5f382c;      /* hnědá */
  --accent: #b3261e;    /* upozornění */
  --radius: 24px;
  --font: Georgia, "Times New Roman", Times, serif;
}

/* Písmo loga: Pinyon Script (SIL Open Font License, viz assets/fonts/OFL-PinyonScript.txt) */
@font-face {
  font-family: "Pinyon Script";
  src: url("../fonts/pinyon-script.woff2") format("woff2");
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
}

img { max-width: 100%; height: auto; }

a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover, a:focus-visible { color: #000; }

h1, h2, h3 { font-style: italic; line-height: 1.25; }
h1 { font-size: 1.9rem; margin: 0 0 .6em; }
h2 { font-size: 1.35rem; margin: 1.4em 0 .5em; }

/* ---------- Rozvržení: hlavička nahoře, menu vlevo, obsah vpravo ---------- */
.page {
  max-width: 1040px;
  margin: 24px auto;
  display: grid;
  grid-template-columns: 180px 1fr;
  grid-template-areas:
    "header header"
    "nav    content"
    "nav    footer";
  grid-template-rows: auto 1fr auto;
}

.site-header {
  grid-area: header;
  display: flex;
  align-items: center;
  gap: 12px 20px;
  flex-wrap: wrap;
  background: var(--panel);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 12px 28px 10px;
  min-height: 60px;
}
.logo {
  font-family: "Pinyon Script", "Brush Script MT", cursive;
  font-size: 2.7rem;
  line-height: 1.2;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  font-weight: bold; /* písmo má jen jednu tloušťku, tučnost dopočítá prohlížeč */
}
.logo:hover, .logo:focus-visible { color: #3d2219; }
.tagline {
  margin: 0;
  font-size: 1.45rem;
  font-style: italic;
  font-weight: bold;
  color: var(--text);
}

.site-nav {
  grid-area: nav;
  align-self: start;
  background: var(--panel);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 12px 10px 18px;
  text-align: center;
}
.site-nav__title {
  margin: 0 0 12px;
  font-size: 1.7rem;
  font-weight: bold;
  font-style: italic;
  letter-spacing: .02em;
  color: var(--text);
  text-transform: uppercase;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li a {
  display: block;
  padding: 4px 6px;
  font-size: 1.15rem;
  font-weight: bold;
  font-style: italic;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 6px;
}
.site-nav li a:hover,
.site-nav li a:focus-visible { border-color: var(--text); color: var(--text); }
.site-nav li a[aria-current="page"] { background: var(--bg); }
.site-nav__lang { margin: 22px 0 0; font-size: .9rem; display: flex; justify-content: center; gap: 12px; }
.site-nav__lang a[aria-current="page"] { font-weight: bold; }

.menu-toggle { display: none; }

.content { grid-area: content; padding: 18px 0 10px 32px; min-width: 0; }
.site-footer {
  grid-area: footer;
  margin-left: 32px;
  padding: 12px 0 0;
  border-top: 2px solid var(--text);
  text-align: center;
  font-size: .9rem;
}
.site-footer p { margin: .3em 0; }
.site-footer .small { font-size: .82rem; }
.notice { color: var(--accent); font-weight: bold; }
.notice a { color: inherit; }

/* ---------- Obsah ---------- */
.lead { font-style: italic; font-weight: bold; font-size: 1.1rem; text-align: justify; hyphens: auto; }
.text { text-align: justify; hyphens: auto; max-width: 70ch; }

.intro { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 28px; align-items: start; }
.intro img { border: 1px solid var(--text); display: block; }
.intro h1 { text-align: center; font-size: 2.2rem; }

.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 20px; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.button {
  display: inline-block;
  padding: 6px 16px;
  background: var(--panel);
  border: 1px solid var(--text);
  border-radius: 999px;
  font-weight: bold;
  font-style: italic;
  text-decoration: none;
}
.button:hover, .button:focus-visible { background: var(--text); color: var(--bg); }
.button--ghost { background: transparent; }

.box {
  border: 2px solid var(--text);
  border-radius: 10px;
  padding: 4px 22px 14px;
  margin: 0 0 22px;
  background: rgba(255, 255, 255, .15);
}
.box h2 { margin: .7em 0 .4em; text-decoration: underline; text-underline-offset: 4px; }

.techniques { columns: 2 12em; }

.note { font-style: italic; text-align: center; margin-top: 24px; }
.source { text-align: right; font-style: italic; font-size: .9rem; }

/* ---------- Mřížka výrobků ---------- */
.products__row {
  list-style: none;
  margin: 0;
  padding: 18px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  row-gap: 22px;
}
.products__row + .products__row { border-top: 1px solid var(--text); }
.products__row > li { flex: 0 1 calc(100% / var(--cols)); padding: 0 8px; }
.product { text-align: center; font-size: .95rem; line-height: 1.35; }
.product a { display: inline-block; line-height: 0; cursor: zoom-in; }
.product img {
  border: 1px solid var(--text);
  background: #fff8;
  transition: transform .15s ease, box-shadow .15s ease;
}
.product a:hover img, .product a:focus-visible img { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(95, 56, 44, .3); }
.product p { margin: .25em 0 0; }
.product__code { font-weight: bold; }
.product__note { font-size: .85rem; font-style: italic; }
.product__price { font-weight: bold; }

/* ---------- Lightbox ---------- */
.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(30, 18, 12, .88); }
.lightbox figure { margin: 0; text-align: center; color: #fff; }
.lightbox img {
  max-width: min(92vw, 900px);
  max-height: 82vh;
  width: auto;
  border: 3px solid var(--panel);
  background: var(--bg);
}
.lightbox figcaption { margin-top: 8px; font-style: italic; }
.lightbox button {
  position: fixed;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox button:hover, .lightbox button:focus-visible { background: rgba(0, 0, 0, .7); }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 12px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 12px; top: 50%; translate: 0 -50%; }

/* ---------- Mobil a tablet ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .page {
    margin: 0;
    grid-template-columns: 1fr;
    grid-template-areas: "header" "nav" "content" "footer";
  }
  .site-header { border-radius: 0; padding: 10px 14px 8px; justify-content: space-between; }
  .logo { font-size: 2.1rem; }
  .tagline { order: 3; flex-basis: 100%; font-size: 1rem; margin: 0 0 4px; }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font: bold italic 1rem var(--font);
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--text);
    border-radius: 999px;
    cursor: pointer;
  }
  .menu-toggle__icon, .menu-toggle__icon::before, .menu-toggle__icon::after {
    display: block; width: 18px; height: 2px; background: currentColor; position: relative;
  }
  .menu-toggle__icon::before, .menu-toggle__icon::after { content: ""; position: absolute; left: 0; }
  .menu-toggle__icon::before { top: -6px; }
  .menu-toggle__icon::after { top: 6px; }

  .site-nav { border-radius: 0; padding: 6px 14px 14px; border-top: 1px solid var(--panel-dark); }
  .js .site-nav:not(.is-open) { display: none; }
  .site-nav__title { display: none; }
  .site-nav ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .site-nav__lang { margin-top: 10px; }

  .content { padding: 16px 14px 8px; }
  .site-footer { margin: 0 14px 16px; }

  h1 { font-size: 1.6rem; }
  .lead, .text { text-align: left; }
  .intro { grid-template-columns: 1fr; }
  .intro img { margin: 0 auto; max-height: 60vh; width: auto; }
  .intro h1 { font-size: 1.8rem; }
  .box { padding: 2px 14px 10px; }
  .products__row > li { flex-basis: 50%; }
  .products__row[style*="--cols: 1"] > li { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
