/* =========================================================
   HOLZPRODUKT JANUŠ s. r. o. – styl webu
   Barvy odvozené z původní hlavičky (dřevo + terakota)
   ========================================================= */

:root {
  --c-wood: #E6A655;
  --c-wood-soft: #F6E3C6;
  --c-accent: #BB4123;
  --c-accent-600: #9E361C;
  --c-text: #3B2A1E;
  --c-muted: #7A6656;
  --c-bg: #FFFFFF;
  --c-bg-alt: #FBF8F3;
  --c-line: #EDE4D8;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(59, 42, 30, .05), 0 14px 34px -18px rgba(59, 42, 30, .28);
  --shadow-hover: 0 2px 4px rgba(59, 42, 30, .06), 0 22px 44px -20px rgba(59, 42, 30, .38);
  --header-h: 80px;
  --section-y: clamp(64px, 9vw, 112px);
  --font: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--c-text); background: var(--c-bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-accent); }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .5em; color: var(--c-text); }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--c-wood); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--c-accent); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.muted { color: var(--c-muted); }

.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: .95em; height: .95em; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--c-accent); margin-bottom: 12px; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--c-wood); border-radius: 2px; }

/* ---------- Tlačítka ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 20px; border-radius: 999px; border: 1.5px solid transparent; font: inherit; font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .2s; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-primary { background: var(--c-accent); color: #fff; box-shadow: 0 10px 22px -12px rgba(187, 65, 35, .8); }
.btn-primary:hover { background: var(--c-accent-600); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--c-text); border-color: var(--c-line); }
.btn-ghost:hover { border-color: var(--c-wood); transform: translateY(-1px); }
.band-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hlavička ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.5) blur(12px); -webkit-backdrop-filter: saturate(1.5) blur(12px); border-bottom: 1px solid var(--c-line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { flex: none; }
.brand img { height: 54px; width: auto; border-radius: 10px; }
.nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list > li > a, .nav-sub-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; border: 0; background: none; color: var(--c-text); font: inherit; font-weight: 700; font-size: .97rem; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s; }
.nav-list > li > a:hover, .nav-sub-toggle:hover { background: var(--c-bg-alt); color: var(--c-accent); }
.nav-list a[aria-current="page"], .nav-sub-toggle.is-active { color: var(--c-accent); }
.has-sub { position: relative; }
.nav-sub { position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px; list-style: none; margin: 0; padding: 8px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-sm); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s; }
.has-sub.is-open .nav-sub { opacity: 1; visibility: visible; transform: none; }
.nav-sub a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--c-text); text-decoration: none; font-weight: 600; }
.nav-sub a:hover, .nav-sub a[aria-current="page"] { background: var(--c-bg-alt); color: var(--c-accent); }
.nav-sub-toggle .ico { transition: transform .2s; }
.has-sub.is-open .nav-sub-toggle .ico { transform: rotate(180deg); }
.header-phone { display: inline-flex; align-items: center; gap: 8px; color: var(--c-text); font-weight: 800; text-decoration: none; white-space: nowrap; }
.header-phone .ico { color: var(--c-accent); }
.nav-toggle { display: none; }

@media (max-width: 1080px) { .header-phone span { display: none; } .header-phone { width: 42px; height: 42px; justify-content: center; border: 1.5px solid var(--c-line); border-radius: 999px; } }
@media (max-width: 880px) {
  :root { --header-h: 68px; }
  .header-inner { gap: 10px; }
  .brand img { height: 38px; border-radius: 7px; }
  .header-phone { margin-left: auto; }
  .header-cta { padding: 9px 14px; }
  .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 42px; height: 42px; padding: 0 11px; border: 1.5px solid var(--c-line); border-radius: 999px; background: #fff; cursor: pointer; }
  .nav-toggle span { display: block; height: 2px; background: var(--c-text); border-radius: 2px; transition: transform .25s, opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav { position: absolute; left: 0; right: 0; top: var(--header-h); margin: 0; background: #fff; border-bottom: 1px solid var(--c-line); box-shadow: 0 20px 30px -24px rgba(59, 42, 30, .5); max-height: calc(100svh - var(--header-h)); overflow-y: auto; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s; }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; }
  .nav-list > li > a, .nav-sub-toggle { width: 100%; justify-content: space-between; padding: 14px 8px; border-radius: 8px; font-size: 1.05rem; }
  .nav-sub { position: static; min-width: 0; padding: 0 0 8px 12px; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none; }
  .has-sub.is-open .nav-sub { display: block; }
}
@media (min-width: 521px) { .header-cta .ico { display: none; } }
@media (max-width: 520px) {
  .brand img { height: 30px; }
  .header-cta { width: 42px; height: 42px; padding: 0; }
  .header-cta span { display: none; }
}
@media (max-width: 370px) { .brand img { height: 26px; } .header-inner { gap: 8px; } }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 96px); background: linear-gradient(180deg, #fff 0%, var(--c-bg-alt) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero .lead { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--c-muted); max-width: 520px; margin-bottom: 30px; }
.hero-contact { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 26px 0 0; color: var(--c-muted); font-weight: 600; }
.hero-contact a, .hero-contact span { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.hero-contact a { color: var(--c-text); font-weight: 800; }
.hero-contact .ico { color: var(--c-accent); }
.hero-media { position: relative; padding: 0 0 40px 40px; }
.hero-media img { width: 100%; border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.hero-media .hero-media-small { position: absolute; left: 0; bottom: 0; width: 46%; border: 6px solid #fff; border-radius: 20px; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } .hero-media { max-width: 560px; } }

/* ---------- Sekce ---------- */
.section { padding: var(--section-y) 0; }
.section-tight { padding-top: clamp(32px, 5vw, 56px); }

/* ---------- Dlaždice kategorií ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 28px; }
@media (max-width: 960px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-tile { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--c-text); box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.cat-media { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 18px; background: #fff; }
.cat-media { overflow: hidden; }
.cat-media img { width: 100%; height: 100%; object-fit: contain; }
.cat-name { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-top: 1px solid var(--c-line); font-weight: 800; font-size: 1.12rem; }
.cat-name .ico { color: var(--c-accent); transition: transform .2s; }
.cat-tile:hover .cat-name .ico { transform: translateX(4px); }
.catalog-link { margin: 32px 0 0; }

/* ---------- Hlavička stránky ---------- */
.page-head { padding: clamp(28px, 5vw, 56px) 0 clamp(20px, 3vw, 32px); background: linear-gradient(180deg, #fff 0%, var(--c-bg-alt) 100%); border-bottom: 1px solid var(--c-line); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; color: var(--c-muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--c-muted); }
.page-head-grid { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.page-head h1 { margin: 0; }
.page-head-img { width: 200px; height: 140px; object-fit: contain; background: #fff; border-radius: var(--radius-sm); padding: 8px; box-shadow: var(--shadow); }
@media (max-width: 560px) { .page-head-img { width: 120px; height: 88px; } }

/* ---------- Toolbar / hledání ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
.search { position: relative; flex: 1 1 340px; max-width: 480px; }
.search .ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--c-muted); pointer-events: none; }
.search input { width: 100%; padding: 13px 16px 13px 46px; border: 1.5px solid var(--c-line); border-radius: 999px; font: inherit; font-size: .97rem; color: var(--c-text); background: #fff; }
.search input:focus { outline: none; border-color: var(--c-wood); box-shadow: 0 0 0 4px rgba(230, 166, 85, .25); }
.toolbar-info { margin: 0; color: var(--c-muted); font-size: .95rem; }
.no-results { padding: 40px 0; text-align: center; color: var(--c-muted); }

/* ---------- Karty produktů ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; align-items: start; }
.card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .25s; scroll-margin-top: calc(var(--header-h) + 16px); }
.card:hover { box-shadow: var(--shadow-hover); }
.card:target { outline: 3px solid var(--c-wood); outline-offset: 2px; }
.card-media { position: relative; display: block; width: 100%; height: 260px; padding: 14px; border: 0; border-bottom: 1px solid var(--c-line); background: #fff; cursor: zoom-in; overflow: hidden; }
.card-media img { width: 100%; height: 100%; max-width: none; object-fit: contain; object-position: center; }
.zoom-hint { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--c-text); font-size: .8rem; font-weight: 700; box-shadow: 0 2px 8px rgba(59, 42, 30, .15); opacity: .85; }
.card-body { padding: 16px 18px 18px; }
.card-title { margin: 0 0 12px; font-size: 1.02rem; }
.card-details { border-top: 1px solid var(--c-line); }
.card-details summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; cursor: pointer; font-weight: 700; color: var(--c-accent); list-style: none; }
.card-details summary::-webkit-details-marker { display: none; }
.card-details summary .ico { transition: transform .2s; }
.card-details[open] summary .ico { transform: rotate(180deg); }
.details-inner { padding-bottom: 6px; }
.item-name { margin: 14px 0 6px; font-size: .95rem; font-weight: 800; }
.item-name:first-child { margin-top: 0; }
.params { width: 100%; border-collapse: collapse; font-size: .9rem; margin-bottom: 8px; }
.params th, .params td { padding: 6px 0; border-bottom: 1px dashed var(--c-line); vertical-align: top; text-align: left; }
.params th { width: 46%; padding-right: 10px; font-weight: 600; color: var(--c-muted); }
.params tr.sub th { border-bottom-color: transparent; }
.params tr.sub td { padding-left: 2px; }
.params tr.note td { color: var(--c-text); }
.card-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 800; text-decoration: none; }
.card-cta .ico { transition: transform .2s; }
.card-cta:hover .ico { transform: translateX(3px); }

.empty-cat { padding: 40px; border-radius: var(--radius); background: var(--c-bg-alt); text-align: center; }
.empty-cat p { font-size: 1.1rem; }
.empty-cat .band-actions { justify-content: center; }

/* ---------- Kontaktní pruh ---------- */
.contact-band { background: var(--c-bg-alt); border-top: 1px solid var(--c-line); }
.band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.band h2 { margin-bottom: 6px; }
.band p { margin: 0; }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-firm { font-size: 1.3rem; font-weight: 800; margin-bottom: 18px; }
.contact-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; }
.contact-item { display: flex; align-items: center; gap: 18px; padding: 16px 20px; border: 1px solid var(--c-line); border-radius: var(--radius); background: #fff; color: var(--c-text); text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.contact-item:hover { border-color: var(--c-wood); box-shadow: var(--shadow); }
.contact-ico { display: grid; place-items: center; width: 50px; height: 50px; flex: none; border-radius: 50%; background: var(--c-accent); color: #fff; font-size: 1.25rem; }
.contact-item small { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); }
.contact-item strong { display: block; font-size: clamp(1.1rem, 2.4vw, 1.35rem); font-weight: 800; line-height: 1.3; word-break: break-word; }
.company-data { margin: 0 0 28px; padding: 20px 22px; border-radius: var(--radius); background: var(--c-bg-alt); display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; font-size: .95rem; }
.company-data .full { grid-column: 1 / -1; }
.company-data dt { font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); }
.company-data dd { margin: 0; font-weight: 600; }
@media (max-width: 480px) { .company-data { grid-template-columns: 1fr; } }
.contact-maps { display: grid; gap: 16px; }
.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--c-bg-alt); }
.map-embed iframe { display: block; width: 100%; height: 360px; border: 0; }
.map-orient { margin: 0; padding: 12px; border: 1px solid var(--c-line); border-radius: var(--radius); background: #fff; }

/* ---------- Patička ---------- */
.site-footer { background: #2E2117; color: #E9DCCB; padding: 56px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer address { font-style: normal; }
.footer-name { font-weight: 800; color: #fff; font-size: 1.05rem; }
.footer-h { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--c-wood); margin-bottom: 10px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); color: #B9A792; font-size: .88rem; }
.footer-bottom p { margin: 0 0 4px; }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; overflow: visible; }
.lightbox::backdrop { background: rgba(30, 20, 12, .82); }
.lightbox figure { margin: 0; padding: 16px; background: #fff; border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0, 0, 0, .4); }
.lightbox img { max-width: min(86vw, 520px); max-height: 74vh; width: auto; height: auto; }
.lightbox figcaption { max-width: min(86vw, 520px); margin-top: 10px; font-weight: 700; font-size: .95rem; text-align: center; }
.lb-close, .lb-prev, .lb-next { position: fixed; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: #fff; color: var(--c-text); font-size: 30px; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox:not(.has-many) .lb-prev, .lightbox:not(.has-many) .lb-next { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
