/* ==========================================================================
   b-home.css – homepage (podle brooksrunning.com/en_us)
   hero + bannery (.hb-carousel) · dlaždice (.hb-tile) · produktové rails (.hb-rail)
   značky · sekce NewsletterSocial / WhyCraft
   Karty produktů (.product-box) stylizuje b-catalog.css; tady je jen layout railu.
   ========================================================================== */

/* ---------- společné prvky sekcí ---------- */
.hb-section { padding: 60px 0; background: #fff; }
.hb-section-alt { background: var(--b-cream); }
.hb-section-title,
h2.hb-section-title {
    margin: 0 0 32px;
    font-size: 38px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -.01em;
    text-align: center;
}
.home-random-rails:empty { display: none; }

/* ==========================================================================
   HERO + BANNERY (.hb-carousel)
   ========================================================================== */
.hb-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--b-ink);
    color: #fff;
}
.hb-hero { height: clamp(480px, 52vw, 820px); }
.hb-banner { aspect-ratio: 2 / 1; min-height: 360px; max-height: 800px; }
.hb-banner-wrap { width: 100%; margin: 0; }

.hb-carousel-viewport {
    position: absolute; inset: 0;
    display: flex;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; -ms-overflow-style: none;
    overscroll-behavior-x: contain;
    outline: 0;
}
.hb-carousel-viewport::-webkit-scrollbar { display: none; }

.hb-slide {
    position: relative;
    flex: 0 0 100%; min-width: 100%;
    overflow: hidden;
    scroll-snap-align: start; scroll-snap-stop: always;
}
.hb-hero-link,
.hb-hero-inner { position: absolute; inset: 0; display: block; color: #fff; }
.hb-hero-link:hover { color: #fff; }

.hb-media,
.hb-media picture,
.hb-media img,
.hb-media video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.hb-media img,
.hb-media video { object-fit: cover; }
/* obrázky/videa slidů nejsou produktové fotky – bez podkladové barvy */
.hb-media img:not(.is-loaded) { color: transparent; }

/* text vlevo dole + tmavý přechod pod textem */
.hb-hero-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: flex-end;
    background: linear-gradient(0deg, rgba(14, 19, 31, .55) 0%, rgba(14, 19, 31, 0) 55%);
}
.hb-hero-content {
    width: 100%; max-width: 1440px; margin: 0 auto;
    padding: 0 var(--b-gutter) 64px;
}
.hb-hero-text { max-width: 640px; }
.hb-hero-title {
    margin: 0 0 12px;
    color: #fff;
    font-size: 68px; line-height: 1; font-weight: 700; letter-spacing: -.01em;
    text-transform: none; text-decoration: none;
}
.hb-banner .hb-hero-title { font-size: 48px; }
.hb-hero-desc { margin: 0 0 20px; max-width: 34em; color: #fff; font-size: 16px; line-height: 24px; }
.hb-hero-text .b-cta,
.hb-hero-cta { color: #fff; }
.hb-hero-text .b-cta:hover,
.hb-hero-cta:hover { color: #fff; border-bottom-color: #fff; text-decoration: none; }
.hb-hero-text .b-cta:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* šipky karuselu – čtverečky 40px */
.hb-carousel-btn {
    position: absolute; top: 50%; z-index: 3;
    width: 40px; height: 40px; margin-top: -20px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--b-ink); border-radius: 0;
    background: #fff; color: var(--b-ink);
    cursor: pointer;
    transition: box-shadow .2s ease-in-out;
}
.hb-carousel-prev { left: var(--b-gutter); }
.hb-carousel-next { right: var(--b-gutter); }
.hb-carousel-btn svg,
.hb-rail-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; stroke-linejoin: miter; }
.hb-carousel-btn:hover,
.hb-carousel-btn:focus-visible { box-shadow: 4px 4px 0 -1px #fff, 4px 4px 0 0 var(--b-ink); }
.hb-carousel-btn:focus-visible { outline: 2px solid var(--b-blue); outline-offset: 2px; }

/* tečky = tenké proužky */
.hb-carousel-dots {
    position: absolute; left: 50%; bottom: 24px; z-index: 3;
    display: flex; gap: 6px; transform: translateX(-50%);
}
.hb-carousel-dot {
    position: relative; width: 32px; height: 20px; padding: 0;
    border: 0; border-radius: 0; background: transparent; cursor: pointer;
}
.hb-carousel-dot::after {
    content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px;
    background: rgba(255, 255, 255, .5);
}
.hb-carousel-dot:hover::after { background: rgba(255, 255, 255, .85); }
.hb-carousel-dot.is-active::after { background: #fff; }
.hb-carousel-dot:focus-visible { outline: 2px solid #fff; outline-offset: 0; }

/* pauza / přehrát (přístupnost) */
.hb-media-toggle {
    position: absolute; right: var(--b-gutter); bottom: 20px; z-index: 3;
    width: 40px; height: 40px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--b-ink); border-radius: 0;
    background: #fff; color: var(--b-ink);
    cursor: pointer;
    transition: box-shadow .2s ease-in-out;
}
.hb-media-toggle svg { width: 14px; height: 14px; fill: currentColor; }
.hb-media-toggle .hb-icon-play { display: none; }
.hb-media-toggle.is-paused .hb-icon-pause { display: none; }
.hb-media-toggle.is-paused .hb-icon-play { display: block; }
.hb-media-toggle:hover,
.hb-media-toggle:focus-visible { box-shadow: 4px 4px 0 -1px #fff, 4px 4px 0 0 var(--b-ink); }
.hb-media-toggle:focus-visible { outline: 2px solid var(--b-blue); outline-offset: 2px; }

/* ==========================================================================
   „VÍCE ZPŮSOBŮ NAKUPOVÁNÍ" – dlaždice (.hb-tile)
   ========================================================================== */
.hb-tiles-section { padding: 60px 20px; background: var(--b-cream); }
.hb-tiles-section .hb-section-title { margin-bottom: 32px; }
.hb-tiles-wrap { padding-left: 0; padding-right: 0; }
.hb-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.hb-tile {
    position: relative; display: block; overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--b-tile);
    color: #fff;
    isolation: isolate;
}
.hb-tile:hover { color: #fff; text-decoration: none; }
.hb-tile img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hb-tile::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(0deg, rgba(14, 19, 31, .65) 0%, rgba(14, 19, 31, 0) 50%);
}
.hb-tile-body {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 20px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
}
.hb-tile-title { display: block; font-size: 24px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; color: #fff; }
.hb-tile-desc { display: block; margin-top: 4px; font-size: 14px; line-height: 20px; font-weight: 400; color: #fff; }
.hb-tile-cta {
    display: inline-block; padding-bottom: 2px;
    border-bottom: 2px solid #fff;
    font-size: 14px; line-height: 1.3; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
    transition: border-color .2s ease;
}
.hb-tile:hover .hb-tile-cta,
.hb-tile:focus-visible .hb-tile-cta { border-bottom-color: var(--b-teal); }
.hb-tile:focus-visible { outline: 2px solid var(--b-blue); outline-offset: 2px; }
.hb-tile.is-static { cursor: default; }

/* ==========================================================================
   PRODUKTOVÉ RAILS (.hb-rail) – karty = .product-box (b-catalog.css)
   ========================================================================== */
.hb-section-rail { --hb-cols: 4; padding: 60px 0; }
.hb-section-head {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    column-gap: 16px; margin-bottom: 32px;
}
.hb-section-head .hb-section-title { grid-column: 2; margin: 0; }
.hb-rail-all {
    grid-column: 1; justify-self: start;
    font-size: 14px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
    border-bottom: 2px solid currentColor; line-height: 1.3; padding-bottom: 1px;
}
.hb-rail-all:hover { color: var(--b-ink); border-bottom-color: var(--b-blue); text-decoration: none; }
.hb-rail-nav { grid-column: 3; justify-self: end; display: flex; gap: 8px; }

.hb-rail-arrow {
    width: 40px; height: 40px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--b-ink); border-radius: 0;
    background: #fff; color: var(--b-ink); cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}
.hb-rail-arrow:hover { background: var(--b-ink); color: #fff; }
.hb-rail-arrow:focus-visible { outline: 2px solid var(--b-blue); outline-offset: 2px; }
.hb-section-rail.is-static .hb-rail-nav,
.hb-rail.is-static .hb-rail-arrow { display: none; }

.hb-rail { position: relative; }
.hb-rail-viewport {
    margin: 0 -8px;                       /* vyrovná 8px padding karet, aby lícovaly s kontejnerem */
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -ms-overflow-style: none;
    overscroll-behavior-x: contain;
    cursor: grab; outline: 0;
}
.hb-rail-viewport::-webkit-scrollbar { display: none; }
.hb-rail-viewport:focus-visible { outline: 2px solid var(--b-blue); outline-offset: 2px; }
.hb-rail-viewport.is-dragging { cursor: grabbing; user-select: none; }
.hb-rail-viewport.is-dragging a { pointer-events: none; }
.hb-rail-track { display: flex; width: max-content; }
.hb-rail .hb-rail-item {
    flex: 0 0 calc((min(100vw, 1440px) - 2 * var(--b-gutter) + 16px) / var(--hb-cols));
    margin: 0; padding: 0 8px;
    display: block;
}
.hb-rail .hb-rail-item .product-box { height: 100%; }

/* ==========================================================================
   NAŠE ZNAČKY / DOPORUČUJEME (ZnackyMenu)
   ========================================================================== */
.hb-section-alt .znacka-container {
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 4 / 5; padding: 0; overflow: hidden;
    background: var(--b-tile); color: var(--b-ink);
}
.hb-section-alt a.znacka-container:hover { color: var(--b-ink); text-decoration: none; box-shadow: 6px 6px 0 -3px var(--b-cream), 6px 6px 0 0 var(--b-ink); }
.hb-section-alt .znacka-container { transition: box-shadow .2s ease-in-out; }
.hb-section-alt .znacka-container img { width: 100%; height: 100%; object-fit: cover; }
.hb-section-alt .znacka-name { font-size: 16px; font-weight: 800; letter-spacing: .64px; text-transform: uppercase; text-align: center; }

/* ==========================================================================
   NewsletterSocial + WhyCraft (starší sekce, v Brooks homepage nepoužité)
   ========================================================================== */
.newsletter { padding: 32px 0; }
.newsletter h3 { font-size: 24px; }
.newsletter p { font-size: 14px; line-height: 20px; }
.newsletter a { font-size: 14px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; border-bottom: 2px solid currentColor; }
.social-box {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    height: 100%; min-height: 120px; padding: 16px;
    border: 1px solid var(--b-line); background: #fff; color: var(--b-ink);
    font-size: 14px; text-align: center;
}
.social-box i { font-size: 32px; }
a:hover > .social-box { border-color: var(--b-ink); }
.why-craft { padding: 40px 0; }
.why-craft .title .icon { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; margin-right: 12px; border: 1px solid var(--b-ink); font-weight: 700; }
.why-craft-item { height: 100%; padding: 16px; border: 1px solid var(--b-line); background: #fff; }
.why-craft-item .title { display: flex; align-items: center; font-size: 16px; font-weight: 700; }
.why-craft-header .title { font-size: 24px; font-weight: 700; }

/* ==========================================================================
   RESPONZIVITA
   ========================================================================== */
@media (max-width: 1199px) {
    .hb-hero-title { font-size: 56px; }
    .hb-banner .hb-hero-title { font-size: 40px; }
}

@media (max-width: 991px) {
    .hb-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hb-section-rail { --hb-cols: 3; }
}

@media (max-width: 767px) {
    .hb-section { padding: 40px 0; }
    .hb-section-title,
    h2.hb-section-title { font-size: 28px; margin-bottom: 24px; }
    .hb-hero { height: clamp(440px, 120vw, 600px); }
    .hb-banner { aspect-ratio: 4 / 5; min-height: 0; max-height: 600px; }
    .hb-hero-content { padding-bottom: 56px; }
    .hb-hero-title,
    .hb-banner .hb-hero-title { font-size: 40px; }
    .hb-carousel-btn { display: none; }
    .hb-media-toggle { right: 16px; bottom: 12px; }
    .hb-carousel-dots { bottom: 16px; }
    .hb-tiles-section { padding: 40px 16px; }
    .hb-tile-body { padding: 14px; }
    .hb-tile-title { font-size: 20px; }
    .hb-section-rail { --hb-cols: 2.2; padding: 40px 0; }
    .hb-section-head { grid-template-columns: 1fr; row-gap: 12px; }
    .hb-section-head .hb-section-title { grid-column: 1; }
    .hb-rail-all { grid-column: 1; justify-self: center; grid-row: 2; }
    .hb-rail-nav { display: none; }
    .hb-section-alt .znacka-container { padding: 0; }
}

@media (max-width: 575px) {
    .hb-tile-cta { font-size: 12px; letter-spacing: 1px; }
}

@media (prefers-reduced-motion: reduce) {
    .hb-carousel-btn, .hb-media-toggle, .hb-rail-arrow, .hb-tile-cta { transition: none; }
}

/* ==========================================================================
   KARUSEL PRODUKTŮ PODLE BROOKS ("More best sellers")
   karta 280 px, mezera 28 px, nadpis 38/700 uprostřed, šipky pod karuselem
   ========================================================================== */
.hb-section-rail { padding: 60px 0 60px; }
.hb-section-rail > .container-xxl { max-width: none; padding-left: 19px; padding-right: 19px; }
.hb-section-head { display: block; margin-bottom: 30px; text-align: center; }
.hb-section-head .hb-section-title { margin: 0; font-size: 38px; line-height: 38px; text-align: center; }
.hb-rail-all { display: none; }

.hb-rail-viewport { margin: 0; }
.hb-rail .hb-rail-item { flex: 0 0 308px; width: 308px; padding: 0 14px; }

.hb-section-rail > .container-xxl > .hb-rail-nav { display: flex; justify-content: center; gap: 24px; margin-top: 28px; }
.hb-rail-arrow { width: 32px; height: 32px; border: 0; background: transparent; color: var(--b-ink); }
.hb-rail-arrow:hover { background: transparent; color: var(--b-blue); }
.hb-rail-arrow svg { width: 20px; height: 20px; stroke-width: 2.2; }

@media (max-width: 767px) {
    .hb-section-head .hb-section-title { font-size: 28px; line-height: 32px; }
    .hb-rail .hb-rail-item { flex-basis: 220px; width: 220px; padding: 0 8px; }
    .hb-section-rail > .container-xxl { padding-left: 8px; padding-right: 8px; }
    .hb-section-rail > .container-xxl > .hb-rail-nav { display: flex; }
}

/* rail: bez automatického jezdění; šipky + tečky uprostřed pod karuselem */
.hb-rail-viewport { cursor: auto; scroll-snap-type: x proximity; }
.hb-rail .hb-rail-item { scroll-snap-align: start; }
.hb-section-rail > .container-xxl > .hb-rail-nav { display: flex; align-items: center; justify-content: center; gap: 14px; width: max-content; max-width: 100%; margin: 28px auto 0; justify-self: auto; }
.hb-rail-dots { display: flex; align-items: center; gap: 8px; min-width: 40px; padding: 0 6px; }
.hb-rail-dots span { flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--b-alt); cursor: pointer; transition: background-color .2s ease, transform .2s ease; }
.hb-rail-dots span.is-active { background: var(--b-ink); transform: scale(1.4); }
.hb-rail-arrow:disabled { opacity: .3; cursor: default; }
.hb-rail-arrow:disabled:hover { color: var(--b-ink); }

/* rozbalená hover karta přesahuje rail dolů – viewport dostane rezervu, layout se nemění */
.hb-rail-viewport { padding-bottom: 170px; margin-bottom: -170px; }
.hb-rail-viewport.is-dragging { cursor: grabbing; user-select: none; scroll-snap-type: none; }
.hb-rail-viewport.is-dragging a { pointer-events: none; }
.hb-rail-viewport { cursor: grab; }

/* šipky a tečky musí ležet NAD neviditelnou rezervou viewportu (jinak do nich myš netrefí) */
.hb-section-rail > .container-xxl > .hb-rail-nav { position: relative; z-index: 10; }
.hb-rail-viewport { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -ms-overflow-style: none; scroll-snap-type: none; pointer-events: auto; }
.hb-rail-viewport::-webkit-scrollbar { display: none; width: 0; height: 0; }
.hb-rail .hb-rail-item { scroll-snap-align: none; }
