/* Nakamichi — page layout. Builds on tokens.css + components.css (Ahifi Design System). */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
img { max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.media-cover { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Layout primitives ---------- */
.container { max-width: var(--container-max); margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }
.section { padding-top: clamp(48px, 8vw, 80px); }
.section-gap { margin-top: clamp(48px, 8vw, 80px); }
.section-pad { padding-block: clamp(48px, 8vw, 80px); }
.band { background: var(--surface-soft); }
.page-head { padding-top: var(--space-5); }
.page-head > .h1 { margin-bottom: var(--space-3); }
.page-head > .lead { max-width: 720px; margin-bottom: var(--space-10); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: var(--space-7-5); }
.section-head--page { flex-wrap: wrap; gap: 20px 32px; margin-bottom: var(--space-10); }
.section-intro { max-width: 640px; margin: var(--space-3) 0 var(--space-7-5); color: var(--muted-strong); font-weight: 500; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.load-more { display: flex; justify-content: center; margin-top: var(--space-10); }
.lead { font-size: 18px; line-height: 1.5; color: var(--muted-strong); text-wrap: pretty; }
.lead--ink { color: var(--ink); }
.muted-text { color: var(--muted-strong); font-weight: 500; }
.eyebrow { color: var(--muted-strong); margin-bottom: var(--space-3); }
.eyebrow--on-dark { color: var(--line); }
.meta { display: flex; align-items: center; gap: 12px; margin-bottom: var(--space-4); font-size: 14px; font-weight: 500; color: var(--muted-strong); }

.split { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); }
.split--center { align-items: center; }
.split__media { flex: 1 1 min(100%, 520px); aspect-ratio: 3 / 2; border-radius: var(--radius-xl); overflow: hidden; }
.split__media .ph { height: 100%; }
.split__body { flex: 1 1 min(100%, 420px); max-width: 640px; }
.split__body .h1 { margin-bottom: var(--space-5); }
.split__body .lead { margin-bottom: var(--space-7-5); }
.split__aside { flex: 1 1 min(100%, 320px); max-width: 480px; }
.split__aside .h2 { margin-bottom: var(--space-3); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--surface); transition: box-shadow .3s; }
.site-header.is-scrolled { box-shadow: var(--shadow-sticky); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-top: 16px; padding-bottom: 14px; }
.site-header__logo img { display: block; height: 28px; width: auto; }
.site-header__actions { display: flex; align-items: center; gap: 12px; }
.site-header__toggle { display: none; }
.site-nav { order: 3; flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 8px 28px; white-space: nowrap; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.site-nav__divider { width: 1px; align-self: stretch; background: var(--hairline); }
.lang-switch { display: flex; gap: 4px; padding: 4px; background: var(--surface-soft); border-radius: var(--radius-pill); }
.lang-switch a { padding: 8px 10px; border-radius: var(--radius-pill); color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 600; line-height: 1; transition: background .3s, color .3s; }
.lang-switch a.is-active { background: var(--ink); color: var(--on-dark); }

@media (max-width: 1023px) {
  .site-header__cta { display: none; }
  .site-header__toggle { display: inline-block; }
  .site-nav { display: none; flex-direction: column; gap: 16px; padding-bottom: 12px; }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav a { font-size: 18px; }
  .site-nav__divider { width: 100%; height: 1px; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 var(--space-5); display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted-strong); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; }
.breadcrumb a { color: var(--muted-strong); }

/* ---------- Round arrow buttons ---------- */
.arrow-group { display: flex; gap: 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface-soft); color: var(--ink); font: 18px/1 var(--font-sans); cursor: pointer; transition: background .3s, color .3s; }
.icon-btn:hover { background: var(--line); }
.icon-btn--on-dark { background: transparent; border: 1px solid var(--on-dark); color: var(--on-dark); }
.icon-btn--on-dark:hover { background: var(--surface); color: var(--ink); }

/* ---------- Home: hero slider + promo tiles ---------- */
.hero { display: flex; flex-wrap: wrap; gap: 32px; padding-top: var(--space-5); }
.hero__slider { flex: 2 1 min(100%, 560px); position: relative; min-height: clamp(480px, 60vw, 560px); border-radius: var(--radius-xl); overflow: hidden; background: #15161a; }
.hero__track { position: absolute; inset: 0; display: flex; transition: transform .6s ease; }
.hero__slide { flex: 0 0 100%; position: relative; }
.hero__media { position: absolute; inset: 0; height: 100%; border-radius: 0; }
.hero__slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--scrim), rgba(0,0,0,.2) 70%); }
.hero__content { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; max-width: 640px; padding: clamp(24px, 5vw, 56px) clamp(24px, 5vw, 56px) 96px; color: var(--on-dark); }
.hero__content .flag { margin-bottom: var(--space-5); }
.hero__content .h1 { color: var(--on-dark); margin-bottom: var(--space-4); text-wrap: balance; }
.hero__content p { font-size: 16px; font-weight: 500; margin-bottom: var(--space-7-5); text-wrap: pretty; }
.hero__controls { position: absolute; z-index: 2; left: clamp(24px, 5vw, 56px); right: clamp(24px, 4vw, 40px); bottom: 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hero__dots { display: flex; gap: 8px; }
.hero__dots button { width: 12px; height: 6px; padding: 0; border: 0; border-radius: var(--radius-pill); background: rgba(255,255,255,.4); cursor: pointer; transition: width .3s, background .3s; }
.hero__dots button.is-active { width: 32px; background: var(--on-dark); }
.hero__side { flex: 1 1 min(100%, 320px); display: flex; flex-direction: column; gap: 32px; }

/* ---------- Home: category carousel ---------- */
.carousel { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel__item { flex: 0 0 clamp(220px, calc((100% - 96px) / 4.5), 340px); scroll-snap-align: start; }

/* ---------- Product grid (catalogue — no cart) ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: clamp(12px, 2vw, 32px); }
.product-link { display: block; height: 100%; color: var(--ink); text-decoration: none; }
.b-product__price-label { margin: var(--space-4) 0 6px; font-size: 12px; font-weight: 500; line-height: 1; color: var(--muted-strong); }
@media (max-width: 1023px) { .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }

/* ---------- Home: Fidela ---------- */
.facts { margin-bottom: var(--space-10); }
.facts__row { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr); gap: clamp(12px, 3vw, 24px); padding: 18px 0; border-top: 1px solid var(--hairline); }
.facts dt { font-size: 20px; font-weight: 600; line-height: 1.2; }
.facts dd { font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--muted-strong); }
.line-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding-bottom: clamp(48px, 8vw, 80px); }
.line-card { display: flex; flex-direction: column; gap: 6px; padding: var(--space-5); border-radius: var(--radius-l); background: var(--surface); color: var(--ink); text-decoration: none; transition: background .3s; }
.line-card:hover { background: var(--line); }
.line-card strong { font-size: 18px; font-weight: 600; line-height: 1.3; }
.line-card span { font-size: 14px; font-weight: 500; color: var(--muted-strong); }

/* ---------- Dark CTA blocks ---------- */
.dealer, .cta-band { background: var(--ink); color: var(--on-dark); border-radius: var(--radius-xl); padding: clamp(24px, 5vw, 64px); display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); }
.dealer .h1, .cta-band .h2 { color: var(--on-dark); }
.dealer .lead, .cta-band p { color: var(--line); }
.dealer__text { flex: 1 1 min(100%, 380px); max-width: 560px; }
.dealer__text .h1 { margin-bottom: var(--space-5); text-wrap: balance; }
.dealer__text .lead { margin-bottom: var(--space-10); }
.dealer__form { flex: 1 1 min(100%, 420px); background: var(--surface); color: var(--ink); border-radius: var(--radius-l); padding: clamp(20px, 4vw, 40px); }
.perks { list-style: none; padding: 0; }
.perks li { display: flex; align-items: baseline; gap: 14px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.16); font-weight: 500; }
.perks .dot { flex: none; }
.cta-band { align-items: center; justify-content: space-between; gap: 24px 64px; }
.cta-band__text { flex: 1 1 min(100%, 480px); max-width: 720px; }
.cta-band .h2 { margin-bottom: var(--space-3); }
.cta-band p { font-size: 18px; line-height: 1.5; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 20px; margin-bottom: 20px; }
.lead-form .inp { margin: 0; }
.lead-form > .h3 { margin-bottom: var(--space-5); }
.form-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; }
.form-note { max-width: 320px; font-size: 12px; font-weight: 500; color: var(--muted-strong); }
.form-success { min-height: 360px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px; }
.form-success[hidden] { display: none; }
.form-success p { color: var(--muted-strong); font-weight: 500; margin-bottom: 12px; }
.form-success--soft { background: var(--surface-soft); border-radius: var(--radius-l); padding: clamp(24px, 4vw, 40px); }
.topic-picker { border: 0; padding: 0; margin: 0 0 var(--space-7-5); display: flex; flex-wrap: wrap; gap: 8px; }
.topic { position: relative; }
.topic input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.topic .btn__text { background: var(--line); color: var(--ink); }
.topic input:checked + .btn .btn__text { background: var(--ink); color: var(--on-dark); }
.topic input:focus-visible + .btn { outline: 2px solid var(--info); outline-offset: 2px; border-radius: var(--radius-pill); }

/* ---------- Category page ---------- */
.subcats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: var(--space-10); }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; padding: var(--space-5) 0; border-top: 1px solid var(--hairline); margin-bottom: var(--space-7-5); }
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter__label { margin-right: 4px; font-size: 14px; font-weight: 500; color: var(--muted-strong); }
.result-count { margin-bottom: var(--space-5); font-size: 14px; font-weight: 500; color: var(--muted-strong); }

/* ---------- Product detail ---------- */
.pdp { display: flex; flex-wrap: wrap; align-items: flex-start; gap: clamp(32px, 5vw, 64px); }
.gallery { flex: 1 1 min(100%, 560px); min-width: 0; max-width: 680px; }
.gallery__main { position: relative; padding: clamp(24px, 6vw, 72px); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-image-well), inset 0 0 0 1px var(--hairline); }
.gallery__main .ph { aspect-ratio: 1 / 1; }
.gallery__flags { position: absolute; top: 18px; left: 18px; z-index: 2; display: flex; gap: 6px; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.gallery__thumb { padding: 10px; border: 2px solid transparent; border-radius: var(--radius-l); background: var(--surface-soft); cursor: pointer; transition: border-color .3s; }
.gallery__thumb[aria-current="true"] { border-color: var(--ink); }
.gallery__thumb .ph { aspect-ratio: 1 / 1; }
.pdp__info { flex: 1 1 min(100%, 460px); max-width: 640px; }
.pdp__info .h2 { margin-bottom: var(--space-3); }
.pdp__perex { margin-bottom: var(--space-7-5); color: var(--muted-strong); text-wrap: pretty; }
.pdp__price { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-7-5); }
.pdp__price span { font-size: 12px; font-weight: 500; color: var(--muted-strong); }
.pdp__price strong { font-size: 30px; font-weight: 600; line-height: 1; }
.note-box { margin-top: var(--space-10); padding: var(--space-5) clamp(20px, 3vw, 30px); border-radius: var(--radius-l); background: var(--surface-soft); font-size: 14px; font-weight: 500; line-height: 1.5; }
.spec-list { margin-bottom: var(--space-7-5); }
.spec-list__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--hairline); font-size: 14px; }
.spec-list dt { color: var(--muted-strong); font-weight: 500; }
.spec-list dd { font-weight: 600; }
.spec-list--closed { max-width: 760px; border-bottom: 1px solid var(--hairline); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--space-7-5); }
#informace { scroll-margin-top: 110px; }
.tab-panel { max-width: 760px; }
.downloads { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.downloads__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: var(--space-4) var(--space-5); border-radius: var(--radius-l); background: var(--surface-soft); }
.downloads__item div { display: flex; flex-direction: column; gap: 2px; }
.downloads__item span { font-size: 12px; font-weight: 500; color: var(--muted-strong); }

/* ---------- Content pages ---------- */
.prose { display: flex; flex-direction: column; gap: var(--space-5); line-height: 1.6; text-wrap: pretty; }
.prose ul { padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; }
.prose .h3 { margin-top: var(--space-5); }
.prose__figure { aspect-ratio: 3 / 2; border-radius: var(--radius-l); overflow: hidden; margin: var(--space-5) 0; }
.prose__figure .ph { height: 100%; }
.prose--article { max-width: 800px; font-size: 18px; }
.intro-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px 64px; margin-bottom: var(--space-10); }
.intro-head .h1 { flex: 1 1 min(100%, 420px); max-width: 720px; text-wrap: balance; }
.intro-head .lead { flex: 1 1 min(100%, 420px); max-width: 640px; }
.wide-media { aspect-ratio: 21 / 9; min-height: 260px; border-radius: var(--radius-xl); overflow: hidden; }
.wide-media .ph { height: 100%; }
.timeline { flex: 2 1 min(100%, 560px); list-style: none; padding: 0; }
.timeline__row { display: grid; grid-template-columns: minmax(0, 120px) minmax(0, 1fr); gap: clamp(12px, 3vw, 32px); padding: var(--space-5) 0; border-top: 1px solid var(--hairline); }
.timeline__year { font-size: 24px; font-weight: 600; line-height: 1.2; }
.timeline .h4 { margin-bottom: 6px; }
.timeline p { color: var(--muted-strong); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: clamp(12px, 2vw, 32px); }
.soft-card { display: flex; flex-direction: column; gap: 10px; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius-l); background: var(--surface-soft); }
.soft-card p { color: var(--muted-strong); }

/* ---------- News ---------- */
.feature { color: var(--ink); text-decoration: none; }
.feature__media { flex: 3 1 min(100%, 560px); aspect-ratio: 16 / 9; border-radius: var(--radius-xl); overflow: hidden; }
.feature__media .ph { height: 100%; transition: transform .3s; }
.feature:hover .feature__media .ph { transform: scale(1.1); }
.feature__body { flex: 2 1 min(100%, 380px); max-width: 600px; }
.feature__body .h2 { margin-bottom: var(--space-4); text-wrap: balance; }
.feature__body .lead { margin-bottom: var(--space-7-5); }
.feature:hover .btn--dark .btn__text { background: var(--ink); color: var(--on-dark); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(24px, 3vw, 40px) clamp(12px, 2vw, 32px); }
.b-reference__title a::after { content: ""; position: absolute; inset: 0; }
.article-head { max-width: calc(800px + 2 * clamp(20px, 4vw, 40px)); padding-top: var(--space-5); }
.article-head .meta { margin-top: var(--space-5); }
.article-head .h1 { margin-bottom: var(--space-5); text-wrap: balance; }
.perex-lg { font-size: 20px; line-height: 1.5; color: var(--muted-strong); text-wrap: pretty; }
.article-hero { max-width: 1280px; padding-block: var(--space-10); }
.article-hero .ph { aspect-ratio: 16 / 9; border-radius: var(--radius-xl); }
.prose--article.container { max-width: calc(800px + 2 * clamp(20px, 4vw, 40px)); }

/* ---------- Contact ---------- */
.contact { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px 64px; }
.contact__info { flex: 1 1 min(100%, 380px); display: flex; flex-direction: column; gap: 16px; }
.contact__form { flex: 1.4 1 min(100%, 480px); min-width: 0; }
.contact-card { gap: 6px; }
.contact-card .h4 { margin-bottom: 6px; }
.contact-card a { color: var(--ink); font-weight: 600; }
.contact-card__phone { text-decoration: none; font-weight: 500 !important; }
.contact-card__hours { font-size: 14px; font-weight: 500; color: var(--muted-strong); }
.company { display: flex; flex-direction: column; gap: 4px; padding-top: var(--space-5); font-style: normal; font-size: 14px; font-weight: 500; line-height: 1.6; color: var(--muted-strong); }
.company strong { color: var(--ink); font-size: 16px; font-weight: 600; }
.map { position: relative; aspect-ratio: 21 / 9; min-height: 300px; border-radius: var(--radius-xl); overflow: hidden; }
.map > .ph, .map > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; }
.map__card { position: absolute; left: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); max-width: calc(100% - 32px); display: flex; flex-direction: column; gap: 4px; padding: 20px 24px; border-radius: var(--radius-l); background: var(--surface); }
.map__card span { font-size: 14px; font-weight: 500; color: var(--muted-strong); }
.map__card a { margin-top: 6px; font-size: 14px; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(48px, 8vw, 80px); background: var(--surface-soft); }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 32px; padding-top: var(--space-15); padding-bottom: clamp(20px, 4vw, 40px); }
.site-footer__brand { grid-column: span 2; min-width: 0; }
.site-footer__brand img { display: block; height: 28px; width: auto; margin-bottom: 16px; }
.site-footer__brand p { max-width: 360px; margin-bottom: 20px; font-size: 14px; font-weight: 500; color: var(--muted-strong); }
.site-footer__title { margin-bottom: 12px; font-size: 16px; font-weight: 600; }
.site-footer__col ul { list-style: none; padding: 0; }
.site-footer__col a { display: block; color: var(--muted-strong); text-decoration: none; font-size: 14px; font-weight: 500; line-height: 28px; }
.site-footer__col a:hover { color: var(--ink); }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; border-top: 1px solid var(--hairline); font-size: 12px; font-weight: 500; color: var(--muted-strong); }
.site-footer__bottom nav { display: flex; gap: 20px; }
.site-footer__bottom a { color: var(--muted-strong); text-decoration: none; }
@media (max-width: 1023px) { .site-footer__brand { grid-column: 1 / -1; } }
