/*
Theme Name: Cukrárna Dačice 2026
Description: Jednostránková responzivní šablona pro Cukrárnu Dačice – Marie Tichá.
Version: 0.13.2
Requires at least: 5.9
Requires PHP: 7.4
Text Domain: cukrarna
*/

:root {
  --accent: #C44C6A;
  --accent-ink: #A7415A; /* tmavší odstín hlavní barvy pro drobný text na světlém pozadí */
  --hero-bg: #F6F3EB;
  --ink: #1F1A2E;
  --ink-2: #2D2740;
  --text-2: #4A4458;
  --muted: #5C566B;
  --ground: #F8F7F4;
  --tint: #F5E3E8;
  --line: #E4DFE8;
  --on-dark: #DCD7E6;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Figtree', system-ui, sans-serif;
  --header-h: 97px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--ground);
}
img { max-width: 100%; height: auto; }
a { color: var(--ink); }
a:hover { color: var(--muted); }
h1, h2, h3 { font-family: var(--display); margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* Šířka a okraje jako na původním webu: obsah nejvýš 1520 px, 35 px od kraje. */
.wrap { max-width: 1520px; margin: 0 auto; padding-left: 35px; padding-right: 35px; }
.h2 { font-weight: 800; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.05; letter-spacing: -0.02em; }
.h3 { font-weight: 700; font-size: 26px; letter-spacing: -0.01em; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tlačítka */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 13px 26px;
  border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 17px; text-decoration: none;
}
.btn--dark { background: var(--ink); color: #fff; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--dark:hover, .btn--accent:hover { color: #fff; opacity: .9; }
.btn--light:hover, .btn--outline:hover { color: var(--ink); opacity: .8; }

/* Záhlaví */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ground); border-bottom: 1px solid var(--line); }
/* Přihlášený správce má nahoře lištu WordPressu – záhlaví se přichytí pod ni. */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand:hover { color: var(--ink); }
.brand img { width: 72px; height: 72px; object-fit: contain; mix-blend-mode: multiply; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap; }
.brand__name { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -0.01em; }
.brand__sub { font-size: 13px; color: var(--muted); font-weight: 500; }
.site-header__right { display: flex; align-items: center; gap: 8px; }
.nav__list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__list a { display: block; padding: 11px 10px; text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.phone { min-height: 44px; padding: 9px 20px; font-size: 16px; white-space: nowrap; }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0;
  border: 2px solid var(--ink); border-radius: 50%;
  background: transparent; color: var(--ink); cursor: pointer;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%; z-index: 20;
    background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(31, 26, 46, .12);
  }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 12px; }
  .nav__list a { padding: 14px 12px; font-size: 18px; border-bottom: 1px solid var(--line); }
  .nav__list li:last-child a { border-bottom: 0; }
}
@media (max-width: 520px) {
  :root { --header-h: 81px; }
  .wrap { padding-left: 20px; padding-right: 20px; }
  .brand img { width: 56px; height: 56px; }
  .brand__name { font-size: 18px; }
  .brand__sub { display: none; }
  .phone { padding: 9px 14px; }
  .phone__num { display: none; }
}

/* Oznámení o mimořádném zavření */
.notice { background: var(--accent); color: #fff; font-weight: 600; text-align: center; padding: 12px 0; }
.hours .hours__text > p.hours__alert { color: #fff; font-size: 17px; font-weight: 600; padding: 14px 18px; border: 2px solid #fff; border-radius: 12px; }

/* Úvod – pruh s texturou přes celou šířku, který ho oddělí od menu.
   Vlastní obrázek pozadí: Vzhled → Přizpůsobit → Cukrárna – fotky na úvodní stránce. */
.hero-band {
  background-color: var(--hero-bg);
  background-image: url(assets/img/pozadi-uvod.jpg);
  background-size: 1064px 852px;
  background-repeat: repeat;
}
/* Varianty pozadí – přepínají se ve Vzhled → Přizpůsobit → Cukrárna – vzhled. */
body.pozadi-vsude .site-header,
body.pozadi-uvod .site-header { background: #fff; }
body.pozadi-vsude {
  background-color: var(--hero-bg);
  background-image: url(assets/img/pozadi-uvod.jpg);
  background-size: 1064px 852px;
  background-repeat: repeat;
}
body.pozadi-vsude .hero-band { background: none; }
body.pozadi-ruzova .hero-band { background: var(--tint); }
body.pozadi-zadne .hero-band { background: none; }
@media (min-width: 1500px) {
  .hero-band .hero { gap: 88px; }
  .hero-band .hero__slides { height: 620px; }
  .hero-band .hero h1 { font-size: 5.2rem; }
  .hero-band .lead { font-size: 22px; }
}

/* Úvod */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 56px; align-items: center; align-content: center; min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); padding-top: 48px; padding-bottom: 112px; }
.hero__text { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.eyebrow { font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.hero h1 { font-weight: 800; font-size: clamp(2.5rem, 5.2vw, 4.4rem); line-height: 1.02; letter-spacing: -0.025em; text-wrap: balance; }
.lead { font-size: 20px; line-height: 1.5; color: var(--text-2); max-width: 30em; text-wrap: pretty; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.status { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.status__dot { width: 10px; height: 10px; border-radius: 50%; background: #8A8496; flex: none; }
.status.is-open .status__dot { background: #2E7D4F; }
.hero__media { position: relative; }
.hero__slides { position: relative; height: 500px; border-radius: 28px; overflow: hidden; background: #E9E4EC; }
.hero__slide { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; transition: opacity .9s ease; pointer-events: none; }
.hero__slide.is-active { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .hero__slide { transition: none; } }
.hero__dots { display: flex; justify-content: center; gap: 4px; padding-top: 10px; }
.hero__dot { width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.hero__dot::before { content: ''; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); box-sizing: border-box; }
.hero__dot.is-active::before { background: var(--ink); }
.hero__award { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; color: var(--accent-ink); }
.seal {
  position: absolute; right: 24px; bottom: -44px;
  width: 156px; height: 156px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  transform: rotate(-8deg); box-shadow: 0 14px 30px rgba(31, 26, 46, .22);
  font-family: var(--display); font-weight: 800; line-height: 1.1;
}
/* Pečeť: všechny řádky stejným písmem. Styl se volí ve Vzhled → Přizpůsobit → Cukrárna – vzhled. */
.seal__top, .seal__mid { font-size: 19px; }
.seal__year { font-size: 34px; line-height: 1.05; }
.seal--jednotna .seal__top, .seal--jednotna .seal__mid, .seal--jednotna .seal__year { font-size: 21px; line-height: 1.15; }
.seal--puvodni .seal__top { font-family: var(--body); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.seal--puvodni .seal__mid { font-size: 20px; }
@media (max-width: 520px) {
  .hero { gap: 40px; padding-top: 24px; padding-bottom: 88px; }
  .hero__slides { height: 320px; }
  .seal { width: 128px; height: 128px; right: 12px; bottom: -40px; }
  .seal__top, .seal__mid, .seal--puvodni .seal__mid { font-size: 15px; } .seal__year { font-size: 28px; }
  .seal--jednotna .seal__top, .seal--jednotna .seal__mid, .seal--jednotna .seal__year { font-size: 17px; }
  .seal--puvodni .seal__top { font-size: 11px; }
  .lead { font-size: 18px; }
}

/* Otevírací doba */
.hours { background: var(--ink); color: #fff; }
.hours__in { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 56px; align-items: start; padding-top: 88px; padding-bottom: 88px; }
.hours__text { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.hours__text > p:not(.status) { font-size: 19px; color: var(--on-dark); max-width: 26em; text-wrap: pretty; }
.hours .status { padding: 12px 18px; border-radius: 12px; background: var(--ink-2); font-size: 17px; }
.hours .status.is-open .status__dot { background: #6FD39A; }
.hours__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hours__list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-radius: 12px; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.hours__list li.is-today { background: var(--accent); font-weight: 700; }
.hours__day { display: flex; align-items: center; gap: 12px; }
.tag { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: #fff; color: var(--ink); }

/* O cukrárně */
.about { padding-top: 104px; padding-bottom: 96px; }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; padding-bottom: 56px; }
.section-head p { font-size: 19px; color: var(--text-2); text-wrap: pretty; }
.section-head--row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; max-width: none; padding-bottom: 48px; }
.section-head--row p { font-size: 18px; max-width: 24em; }
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 24px; }
.milestone { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.milestone svg { width: 34px; height: 38px; }
.milestone__year { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--accent); }
.milestone p { color: var(--text-2); }

/* Sortiment */
.range { background: var(--tint); }
.range__in { padding-top: 96px; padding-bottom: 96px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; background: #fff; border-radius: 24px; overflow: hidden; color: var(--ink); text-decoration: none; }
a.card { transition: transform .15s ease, box-shadow .15s ease; }
a.card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 16px 30px rgba(31, 26, 46, .14); }
.card__body .card__more { color: var(--accent-ink); font-weight: 700; margin-top: auto; padding-top: 14px; }
.card img { display: block; width: 100%; height: 260px; object-fit: cover; object-position: center 62%; }
.card__body { display: flex; flex-direction: column; flex: 1; gap: 8px; padding: 26px 28px 30px; }
.card__body p { color: var(--text-2); }
.section-head--sub { padding: 64px 0 24px; align-items: center; }
.section-head--sub .more { padding: 0; }
/* Ochutnávka: vždy 4 fotky na řádek (na mobilu 2), fotky rostou se šířkou okna. */
.photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.photos img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 65%; border-radius: 20px; }
@media (min-width: 1500px) { .photos:not(.photos--wide) img { aspect-ratio: 1 / 1; } }
@media (max-width: 760px) { .photos:not(.photos--wide) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.photos--wide { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.photos--wide img { object-position: center; }
@media (max-width: 520px) {
  .photos:not(.photos--wide) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .photos:not(.photos--wide) img { border-radius: 14px; }
  .photos--wide img { height: 240px; }
}

/* Aktuality */
.news { padding-top: 0; padding-bottom: 96px; }
.news__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; }
.news__item { display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.news__date { font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.news__item h3 a { text-decoration: none; }
.news__item p { color: var(--text-2); }

/* Fotogalerie */
.more { display: inline-block; padding: 11px 0; font-weight: 700; font-size: 17px; color: var(--accent-ink); }

/* Zvětšení fotky po kliknutí (úvodní stránka) */
img.zoomable { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(20, 16, 30, .94); }
.lightbox::backdrop { background: rgba(20, 16, 30, .94); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox__img { max-width: calc(100vw - 32px); max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); width: auto; height: auto; border-radius: 12px; }
.lightbox__btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; }
.lightbox__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; bottom: 16px; }
.lightbox__next { right: 16px; bottom: 16px; }
.lightbox__count { position: absolute; left: 0; right: 0; bottom: 28px; text-align: center; color: #fff; font-weight: 600; pointer-events: none; }
@media (min-width: 900px) {
  .lightbox__prev, .lightbox__next { top: 50%; bottom: auto; transform: translateY(-50%); }
  .lightbox__img { max-width: calc(100vw - 180px); max-height: calc(100vh - 128px); }
  .lightbox__count { bottom: 18px; }
}

/* Kontakt */
.contact { padding-top: 96px; padding-bottom: 104px; }
.contact__box { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); border-radius: 28px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.contact__text { display: flex; flex-direction: column; gap: 28px; padding: 48px; align-items: flex-start; }
.contact__rows { display: flex; flex-direction: column; gap: 18px; list-style: none; margin: 0; padding: 0; font-size: 18px; }
.contact__rows li { display: flex; gap: 14px; align-items: center; }
.contact__rows li:first-child { align-items: flex-start; }
.contact__rows svg { flex: none; width: 24px; height: 24px; }
.contact__rows a { display: inline-block; padding: 10px 0; font-weight: 600; overflow-wrap: anywhere; }
.contact__note { color: var(--muted); font-size: 16px; }
.contact__map { min-height: 380px; background: #E9E4EC; }
.contact__map iframe { display: block; width: 100%; height: 100%; min-height: 380px; border: 0; }
@media (max-width: 520px) { .contact__text { padding: 32px 24px; } }

/* Zápatí */
.site-footer { background: var(--ink); color: var(--on-dark); font-size: 15px; }
.site-footer__in { text-align: center; padding-top: 36px; padding-bottom: 36px; text-wrap: balance; }

/* Podstránky a příspěvky */
.content { padding-top: 48px; padding-bottom: 104px; max-width: 860px; }
.content__title { font-weight: 800; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.05; letter-spacing: -0.02em; padding-bottom: 32px; }
.entry > * + * { margin-top: 1.1em; }
.entry h2 { font-size: 30px; margin-top: 1.6em; }
.entry h3 { font-size: 24px; margin-top: 1.4em; }
.entry img { border-radius: 16px; }
.entry a { color: var(--accent-ink); }
.post-list { display: flex; flex-direction: column; gap: 24px; }
.content--wide { max-width: 1520px; }
.about__more { padding-top: 36px; }
.cards--rozcestnik { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); margin-top: 32px; }
.cards--rozcestnik .card { border: 1px solid var(--line); }
.cards--rozcestnik .card img { height: 200px; }
.entry .wp-block-gallery { margin-top: 32px; }
.entry .wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 16px; }
.back { padding-top: 40px; }
.pagination { padding-top: 40px; font-weight: 700; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }

/* Stránka O nás: text vlevo, fotky vpravo, pod tím pás tří fotek. */
.onas__cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.onas__text { max-width: 720px; }
.onas__text > :first-child { margin-top: 0; }
.onas__fotky { position: relative; padding-bottom: 72px; }
.onas__fotky img { display: block; width: 100%; object-fit: cover; }
.onas__velka { height: 440px; border-radius: 28px; }
.onas__mala { position: absolute; right: 24px; bottom: 0; width: 52% !important; height: 190px; border-radius: 20px; border: 8px solid #fff; box-shadow: 0 18px 36px rgba(31, 26, 46, .16); }
.onas__pas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-top: 72px; }
.onas__pas img { display: block; width: 100%; height: 300px; object-fit: cover; object-position: center 62%; border-radius: 20px; }
@media (max-width: 900px) {
  .onas__cols { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .onas__velka { height: 320px; }
  .onas__pas { padding-top: 48px; gap: 12px; }
  .onas__pas img { height: 180px; border-radius: 14px; }
}
@media (max-width: 520px) {
  .onas__velka { height: 240px; }
  .onas__mala { height: 130px; right: 12px; }
  .onas__pas img { height: 120px; }
}
