/* ============================================================
   DOBRODRUHÁ — design system
   Modern, clean, airy. Warm off-white palette.
   All theming via CSS variables so the admin panel can retheme live.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* — color tokens (admin-editable) — */
  --bg:        #f2f1ed;   /* page background */
  --surface:   #eae1d7;   /* beige panels (was black on old site) */
  --surface-2: #e3ddd2;   /* slightly deeper beige */
  --card:      #ffffff;   /* white cards */
  --ink:       #34322e;   /* primary text — warm near-black */
  --ink-soft:  #514c45;   /* secondary text */
  --muted:     #8a8378;   /* tertiary / captions */
  --line:      #ddd6ca;   /* hairlines / borders */
  --accent:    #b5563b;   /* terracotta — nods to the old red thread */
  --accent-2:  #8a8f6f;   /* sage secondary */
  --accent-ink:#ffffff;   /* text on accent */
  --nav-ink:   #3d3a35;   /* menu text — dark grey */
  --logo-color:#34322e;   /* brand wordmark / logo tint */

  /* — type — */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body:    'Hanken Grotesk', system-ui, sans-serif;

  /* — geometry (admin-editable) — */
  --radius:    18px;
  --radius-sm: 10px;
  --maxw:      1240px;
  --gutter:    clamp(20px, 5vw, 64px);
  --section-y: clamp(64px, 9vw, 128px);
  --logo-h:    44px;      /* výška loga v hlavičce (na mobilu se zmenšuje) */

  --shadow-sm: 0 1px 2px rgba(52,50,46,.05), 0 2px 8px rgba(52,50,46,.05);
  --shadow:    0 8px 30px rgba(52,50,46,.08), 0 2px 8px rgba(52,50,46,.05);
  --shadow-lg: 0 24px 60px rgba(52,50,46,.14);

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }

/* ---------- layout helpers ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.stack > * + * { margin-top: 1rem; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .9rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--accent);
  display: inline-block;
}

.section-title { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 58ch; }

/* Pozn.: styl pro "hero"/banner blok (.pgbanner…) NENÍ tady — dd-blocks.js si ho
   sám vkládá do <head> za běhu (viz jeho vlastní <style> na konci souboru). Dřív tu
   byla druhá, konkurenční sada stejných pravidel, která se s tou první bila v cascade
   (naposledy vložené vyhrávalo, výsledek: nekonzistentní rozmazání/šířka banneru).
   Úpravy .pgbanner dělejte v dd-blocks.js, ne tady. */

/* ---------- cookie lišta ---------- */
.dd-cookiebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 1.6rem;
  padding: 1rem var(--gutter);
  background: var(--ink); color: #fff;
  box-shadow: 0 -8px 30px rgba(0,0,0,.18);
}
.dd-cookiebar p { margin: 0; max-width: 62ch; font-size: .92rem; line-height: 1.5; color: rgba(255,255,255,.92); }
.dd-cookiebar__actions { display: flex; gap: .7rem; flex-shrink: 0; }
.dd-cookiebar .btn--ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.dd-cookiebar .btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
@media (max-width: 640px) { .dd-cookiebar { justify-content: flex-start; } }

.dd-cookielink { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.dd-cookielink:hover { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  --b: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  gap: .55rem;
  padding: .85em 1.5em;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  border: 1.5px solid var(--b);
  background: var(--b);
  color: var(--accent-ink);
  cursor: pointer;
  transition: transform .25s var(--ease), background .2s, box-shadow .25s, color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: var(--card); color: var(--ink); border-color: var(--card); }
.btn--sm { padding: .6em 1.1em; font-size: .9rem; }
.btn--block { width: 100%; }

.link-arrow {
  font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; gap: .4em;
}
.link-arrow svg { transition: transform .25s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- generic card ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
}

/* ---------- tags / chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .4em .85em;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: .82rem; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: .2s;
}
.chip:hover { border-color: var(--line); }
.chip[aria-pressed="true"], .chip.is-active {
  background: var(--accent); color: var(--accent-ink);
}

/* =========================================================
   HEADER / NAV
   ========================================================= */
.topbar {
  background: var(--surface);
  color: var(--ink-soft);
  font-size: .9rem;
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .55rem;
}
.topbar__msg { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.topbar__msg span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); flex-shrink: 0; }
.topbar__right { display: flex; align-items: center; gap: 1.1rem; flex-shrink: 0; }
.topbar__right a { color: var(--ink-soft); white-space: nowrap; }
.topbar__right a:hover { color: var(--accent); }
@media (max-width: 640px) {
  .topbar { font-size: .84rem; }
  .topbar__right { display: none; }
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.is-stuck { border-color: var(--line); background: color-mix(in srgb, var(--bg) 95%, transparent); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-block: .9rem;
}
.brand { display: flex; align-items: center; gap: .7rem; flex-shrink: 0; }
.brand img { height: var(--logo-h, 44px); width: auto; }
.brand__img--footer { height: 60px !important; }
.brand--footer { display:inline-flex; align-items:center; }
.brand__wordmark{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--logo-color);
}
.brand__wordmark .brand__a{ color: var(--accent); }
.brand--footer .brand__wordmark{ font-size: 2rem; }

.nav__menu {
  display: flex; align-items: center; gap: .35rem;
  list-style: none; margin: 0; padding: 0;
}
.nav__menu a {
  color: var(--nav-ink); font-weight: 500; font-size: .98rem;
  padding: .5em .8em; border-radius: 999px; position: relative;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav__menu a:hover { background: var(--surface); }
.nav__menu a.is-active { color: var(--accent); }

.nav__actions { display: flex; align-items: center; gap: .4rem; }
.icon-btn {
  position: relative;
  width: 42px; height: 42px; border-radius: 999px;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  cursor: pointer; transition: .2s;
}
.icon-btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.icon-btn__count {
  position: absolute; top: -5px; right: -5px;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: .68rem; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--bg);
}
.nav__burger { display: none; }

@media (max-width: 1120px) {
  .nav__menu { gap: .1rem; }
  .nav__menu a { font-size: .92rem; padding: .5em .62em; }
}

@media (max-width: 900px) {
  .nav__menu { display: none; }
  .nav__burger { display: grid; }
  .brand { flex-shrink: 1; min-width: 0; }
  .brand img { max-width: 100%; object-fit: contain; object-position: left center; }
  .brand__recolor { max-width: 100%; }
}

/* úzké mobily (~400 px) — kompaktní header */
@media (max-width: 480px) {
  :root { --logo-h: 34px; }
  .nav { gap: .7rem; padding-block: .7rem; }
  .nav__actions { gap: .3rem; }
  .icon-btn { width: 38px; height: 38px; }
  .brand { gap: .5rem; }
  .brand__wordmark { font-size: 1.35rem; }
}
@media (max-width: 390px) {
  :root { --logo-h: 30px; }
  .nav__actions { gap: .2rem; }
  .icon-btn { width: 35px; height: 35px; }
  .icon-btn svg { width: 18px; height: 18px; }
}

/* mobile drawer */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(40,38,34,.4); z-index: 80;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(86vw, 360px);
  background: var(--bg); z-index: 81; padding: 1.5rem;
  transform: translateX(100%); transition: transform .35s var(--ease);
  display: flex; flex-direction: column; gap: .3rem; overflow-y: auto;
}
.drawer.open { transform: none; }
.drawer a { padding: .85em .4em; font-size: 1.15rem; font-weight: 500; border-bottom: 1px solid var(--line); color: var(--nav-ink); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: var(--section-y); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem;
  padding-block: clamp(48px, 6vw, 80px);
}
.footer-grid h4 { font-family: var(--font-body); font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 1rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-grid a:hover { color: var(--accent); }
.footer-logos { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
/* partner logos come as light (white) footer versions — shown as an ink silhouette so they stay visible on the beige footer */
.logo-sil { display: inline-block; overflow: hidden; height: 34px; aspect-ratio: 300/39; }
.logo-sil img { height: 100%; width: auto; transform: translateX(-3000px); filter: drop-shadow(3000px 0 0 var(--ink-soft)); }
.footer-bottom {
  border-top: 1px solid var(--line); padding-block: 1.3rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-size: .85rem; color: var(--muted); flex-wrap: wrap;
}
.socials { display: flex; gap: .5rem; }
.socials a {
  width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line); transition: .2s;
}
.socials a:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-2px); }

@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* =========================================================
   PRODUCT CARD (shop)
   ========================================================= */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.product {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product__media { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--surface); }
.product__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.product:hover .product__media img { transform: scale(1.05); }
.product__badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--card); color: var(--ink-soft);
  font-size: .72rem; font-weight: 700; padding: .3em .7em; border-radius: 999px;
  letter-spacing: .03em;
}
.like {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 38px; height: 38px; border-radius: 999px; border: 0; cursor: pointer;
  background: color-mix(in srgb, var(--card) 85%, transparent);
  backdrop-filter: blur(6px);
  display: grid; place-items: center; color: var(--ink-soft);
  transition: .2s;
}
.like:hover { transform: scale(1.12); }
.like svg { width: 19px; height: 19px; transition: .2s; }
.like.is-liked { color: var(--accent); }
.like.is-liked svg { fill: var(--accent); animation: pop .35s var(--ease); }
@keyframes pop { 0%{transform:scale(.6)} 50%{transform:scale(1.25)} 100%{transform:scale(1)} }
.like__count { position:absolute; bottom:-6px; right:-4px; font-size:.62rem; font-weight:700; background:var(--ink); color:#fff; border-radius:999px; padding:0 4px; min-width:14px; text-align:center; }

.product__body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.product__supplier { font-size: .76rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.product__name { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; line-height: 1.15; }
.product__foot { margin-top: auto; padding-top: .7rem; display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.product__price { font-size: 1.15rem; font-weight: 700; }
.add-btn {
  border: 0; border-radius: 999px; width: 40px; height: 40px; cursor: pointer;
  background: var(--ink); color: var(--bg); display: grid; place-items: center;
  transition: .2s;
}
.add-btn:hover { background: var(--accent); transform: rotate(90deg); }

/* =========================================================
   FORMS
   ========================================================= */
.field { display: grid; gap: .4rem; margin-bottom: 1rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  font-family: inherit; font-size: 1rem; color: var(--ink);
  padding: .8em 1em; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--card);
  transition: border-color .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }

/* =========================================================
   UTIL
   ========================================================= */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
[hidden] { display: none !important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

::selection { background: var(--accent); color: #fff; }

/* =========================================================
   POLISH — focus, interaction, rhythm, detail
   ========================================================= */
:where(a, button, input, select, textarea, [contenteditable]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn:active { transform: translateY(0) scale(.985); }
.icon-btn:active { transform: scale(.95); }

/* anchored sections clear the sticky header when jumped to */
main section[id], .hero[id] { scroll-margin-top: 92px; }

/* editorial nav: underline on hover / active instead of a pill */
.nav__menu a::after {
  content: ""; position: absolute; left: .8em; right: .8em; bottom: .3em; height: 2px;
  background: var(--accent); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; opacity: 0;
  transition: transform .26s var(--ease), opacity .2s;
}
.nav__menu a:hover { background: transparent; }
.nav__menu a:hover::after, .nav__menu a.is-active::after { transform: scaleX(1); opacity: 1; }

/* product card — softer rest state, warmer hover */
.product { box-shadow: var(--shadow-sm); }
.product:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); }
.product__name { transition: color .2s; }
.product a:hover .product__name { color: var(--accent); }
.product__price { letter-spacing: -.01em; }

/* category tile — nudge the arrow on hover */
.cat__go svg { transition: transform .25s var(--ease); }
.cat:hover .cat__go svg { transform: translateX(5px); }

/* buttons get a faint resting shadow for depth */
.btn { box-shadow: 0 1px 2px rgba(52, 50, 46, .06); }
.btn--ghost { box-shadow: none; }

/* gentle image load-in to avoid harsh pops */
@media (prefers-reduced-motion: no-preference) {
  .product__media img, .about__media img, .gallery img { transition: transform .5s var(--ease), filter .4s var(--ease); }
}

/* Posuvník (scrollbar): viditelný na počítači (na každé stránce), aby šlo scrollovat myší.
   Na mobilu ho necháme skrytý — tam se scrolluje prstem a systém si posuvník řeší sám. */
@media (max-width: 700px) {
  * { scrollbar-width: none; -ms-overflow-style: none; }
  *::-webkit-scrollbar { width: 0; height: 0; display: none; }
}

/* kontakty (patička + sekce) — veřejné styly (zbytek editoru je v ribbon.css, načítá se až při editaci) */
.contact-rows { display:flex; flex-direction:column; }
.ci-ic { color:var(--accent); display:inline-flex; flex-shrink:0; }
.footer-contact { list-style:none; padding:0; margin:0; }
.footer-contact li { display:flex; align-items:center; gap:6px; }
