/* ============================================================
   HLAVOUNI.CZ — Homepage v3 („Hlavouni“ — postavičky)
   hero (fotka s postavičkami) · karty kategorií · USP · promo duo
   (věrnostní + newsletter) · nejoblíbenější kousky · 3 bannery
   ============================================================ */
:root { --terra: var(--orange); --terra-deep: var(--orange-deep); }

/* Sekce jsou flex-items ve sloupci (.hp-sections). */
.hp-sections > .container, .hp-sections > .container-wide { width: 100%; }
.hp-sections > .band { width: 100%; }
.hp-sections > .container-wide { margin-top: var(--s-5); }
.hp-sections > .hero { margin-top: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: #dfe3e6; min-height: clamp(440px, 41vw, 700px); display: flex; align-items: center; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; opacity: 0; transition: opacity var(--hero-tx, 1s) ease; }
.hero-bg img.is-active { opacity: 1; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(243,242,239,.92) 0%, rgba(243,242,239,.78) 26%, rgba(243,242,239,.25) 44%, rgba(243,242,239,0) 58%); }
.hero-inner { position: relative; z-index: 1; width: 100%; padding-top: clamp(36px, 4.5vw, 64px); padding-bottom: clamp(36px, 4.5vw, 64px); }
.hero-content { max-width: 600px; }
.hero-headline {
  font-family: var(--font-hero); font-weight: 400; text-transform: uppercase;
  font-size: clamp(40px, 4.9vw, 72px); line-height: 0.94; letter-spacing: -0.01em; color: var(--fg-0);
}
.hero-headline .line { display: block; }
.hero-sub { margin-top: 22px; font-size: 17px; line-height: 1.5; color: var(--fg-1); max-width: 360px; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-proof { margin-top: 20px; font-size: 13.5px; color: var(--fg-1); }
.hero-proof strong { font-weight: 700; color: var(--fg-0); }
.hero-note { position: absolute; z-index: 2; left: clamp(380px, 41vw, 620px); top: clamp(14px, 2.6vw, 40px); display: flex; align-items: flex-start; gap: 4px; color: var(--fg-0); pointer-events: none; }
/* Ukotvení na fotku (dopočítává JS v hp.php) — jinak na širokém monitoru ujede pryč od kšiltovky. */
.hero-note.is-anchored { left: var(--note-x); top: var(--note-y); transform: translate(-100%, -100%); }
.hero-note-text { font-family: var(--font-hand); font-size: clamp(22px, 2.3vw, 34px); line-height: 1; text-align: center; transform: rotate(-8deg); font-weight: 600; }
.hero-note-arrow { width: 34px; height: 52px; order: 3; transform: scaleX(-1) rotate(-14deg); margin-top: 40px; margin-left: -6px; }
.hero-note-heart { width: 22px; height: 22px; order: 2; align-self: flex-start; transform: rotate(14deg); margin-top: -8px; }
@media (max-width: 960px) {
  .hero { min-height: 0; align-items: flex-end; }
  .hero::before { background: linear-gradient(180deg, rgba(243,242,239,.18) 0%, rgba(243,242,239,.72) 45%, rgba(243,242,239,.96) 70%); }
  .hero-inner { padding-top: 46vw; padding-bottom: var(--s-6); }
  .hero-bg img { object-position: 60% 0; }
  .hero-content { max-width: none; }
  .hero-headline { font-size: clamp(38px, 10.5vw, 56px); }
  .hero-sub br { display: none; }
  .hero-note { left: auto; right: 12px; top: 10px; }
  .hero-note-text { font-size: 22px; }
  .hero-note-arrow { display: none; }
}

/* ---------- Kategorie – karty ---------- */
.cat-row-wrap.container-wide { margin-top: var(--s-5); }
.cat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.cat-card { display: flex; flex-direction: column; background: var(--bg-3); border-radius: var(--r-md); padding: 18px 14px 14px; color: var(--fg-0); transition: transform .2s ease, background .2s ease; }
.cat-card:hover { transform: translateY(-3px); background: #e6e3de; }
.cat-card-img { height: clamp(96px, 8.6vw, 124px); display: flex; align-items: center; justify-content: center; }
.cat-card-img img { max-height: 100%; width: auto; max-width: 92%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(20,20,20,.14)); transition: transform .25s ease; }
.cat-card:hover .cat-card-img img { transform: translateY(-3px) scale(1.03); }
.cat-card-name { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; font-size: 14.5px; font-weight: 700; }
.cat-card-name svg { transition: transform .2s; }
.cat-card:hover .cat-card-name svg { transform: translateX(3px); }
@media (max-width: 640px) { .cat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } .cat-card { padding: 10px; } .cat-card-name { font-size: 12.5px; gap: 5px; } }

/* ---------- USP ---------- */
.band-white { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.usp-band { margin-top: var(--s-5); }
.usp-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); padding: 22px 0; }
.usp-item { display: flex; align-items: center; gap: 14px; }
.usp-icon { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; color: var(--fg-0); flex-shrink: 0; }
.usp-text strong { display: block; font-size: 14.5px; font-weight: 700; color: var(--fg-0); }
.usp-text span { font-size: 13px; color: var(--fg-2); }
@media (max-width: 800px) { .usp-strip { grid-template-columns: repeat(2, 1fr); } .usp-icon { width: 38px; height: 38px; } }

/* ---------- Promo duo (věrnostní + newsletter) ---------- */
.promo-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.promo-card { position: relative; overflow: hidden; border-radius: var(--r-lg); min-height: 250px; display: flex; align-items: center; isolation: isolate; }
.promo-loyalty { background: #fff; border: 1px solid var(--line); }
.promo-newsletter { background: var(--beige); }
.promo-body { position: relative; z-index: 2; padding: clamp(22px, 3vw, 40px); max-width: 58%; }
.promo-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 2.6vw, 38px); line-height: 1; letter-spacing: -0.02em; color: var(--fg-0); }
.promo-title--brush { display: inline-block; text-transform: uppercase; transform: rotate(-3deg); margin: 4px 0 10px -6px; }
.promo-title--brush span { display: inline-block; padding: 8px 14px; background: var(--orange);
  clip-path: polygon(2% 12%, 96% 0, 100% 34%, 97% 88%, 60% 100%, 6% 94%, 0 60%); color: var(--fg-0); }
.promo-text { margin-top: 14px; font-size: 15px; line-height: 1.45; color: var(--fg-1); }
.promo-body .btn { margin-top: 18px; }
.promo-mascot { position: absolute; z-index: 1; pointer-events: none; }
.promo-mascot--loyalty { right: 12%; bottom: -4px; height: 92%; width: auto; }
.promo-body--wide { max-width: none; width: 100%; align-self: flex-start; }
.promo-newsletter .promo-title, .promo-newsletter .promo-text { max-width: 58%; }
.promo-form-wrap { position: relative; margin-top: 30px; }
.promo-mascot--newsletter { position: absolute; right: 7%; bottom: calc(100% - 18px); height: clamp(130px, 12vw, 175px); width: auto; z-index: 3; }
.promo-note { position: absolute; z-index: 2; right: 14px; top: 16px; color: var(--fg-0); font-family: var(--font-hand); font-size: clamp(18px, 1.5vw, 24px); line-height: 1; text-align: center; font-weight: 600; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 120px; }
.promo-note--loyalty { transform: rotate(-8deg); }
.promo-note--newsletter { transform: rotate(-6deg); top: 18px; right: 10px; max-width: 96px; }
.promo-doodle-crown { width: 34px; height: 26px; }
.promo-doodle-arrow { width: 30px; height: 40px; }
.promo-doodle-mail { width: 40px; height: 30px; transform: rotate(-12deg); }
.promo-form { display: flex; gap: 8px; margin-top: 0; background: #fff; border-radius: var(--r-sm); padding: 5px; border: 1px solid var(--line); max-width: none; position: relative; z-index: 2; }
.promo-form input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 12px; font-size: 14px; color: var(--fg-0); outline: none; }
.promo-form .btn { margin: 0; white-space: nowrap; }
.promo-msg { margin-top: 18px; padding: 14px 16px; background: #fff !important; border: 1px solid rgba(46,158,68,.4); border-radius: var(--r-sm); color: var(--fg-0) !important; font-size: 14px; line-height: 1.45; max-width: 420px; display: flex; flex-direction: column; gap: 2px; }
.promo-msg strong { color: #2e9e44; display: flex; align-items: center; gap: 8px; }
.promo-msg strong::before { content: "✓"; display: inline-flex; width: 20px; height: 20px; border-radius: 50%; background: #2e9e44; color: #fff; align-items: center; justify-content: center; font-size: 12px; }
.promo-newsletter .newsletter-msg.err { margin-top: 10px; background: #fff; border: 1px solid rgba(200,69,44,.4); border-radius: var(--r-sm); padding: 10px 14px; color: #a63822; }
@media (max-width: 1100px) { .promo-body { max-width: 62%; } .promo-note { display: none; } }
@media (max-width: 900px) { .promo-duo { grid-template-columns: 1fr; } .promo-body { max-width: 64%; } }
@media (max-width: 560px) {
  .promo-card { min-height: 0; align-items: flex-start; }
  .promo-body { max-width: none; padding-right: 96px; }
  .promo-body--wide { padding-right: clamp(22px, 3vw, 40px); }
  .promo-mascot--loyalty { right: -14px; height: 120px; bottom: -6px; }
  .promo-mascot--newsletter { right: 0; height: 96px; bottom: calc(100% - 8px); }
  .promo-newsletter .promo-title, .promo-newsletter .promo-text { max-width: none; }
  .promo-form-wrap { margin-top: 70px; }
  .promo-form { background: #fff; }
  .promo-form .btn { padding: 10px 12px; font-size: 13px; }
}

/* ---------- Nejoblíbenější kousky ---------- */
.section-featured { margin-top: var(--s-6); }
.section-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--fg-2); }
.h2--underline { position: relative; display: inline-block; margin-bottom: 0; padding-bottom: 6px; }
.h2--underline::after { content: ""; position: absolute; left: 0; bottom: 0; width: 38%; height: 5px; border-radius: 3px; background: var(--orange); transform: skewX(-12deg); }
.product-grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 1200px) { .product-grid-5 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 960px) { .product-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .product-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); } }

/* ---------- Tři bannery s postavičkami ---------- */
.banner-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: var(--s-7); }
.mbanner { position: relative; overflow: hidden; border-radius: var(--r-lg); min-height: clamp(200px, 17vw, 240px); display: flex; align-items: center; justify-content: flex-end; isolation: isolate; color: #fff; }
.mbanner-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -2; transition: transform .6s ease; }
.mbanner:hover .mbanner-bg { transform: scale(1.04); }
.mbanner--dark { background: #262321; overflow: visible; }
.mbanner--dark::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(90deg, rgba(30,25,20,.25), rgba(30,25,20,.6)); }
.mbanner--olive { background: radial-gradient(120% 140% at 20% 10%, #5c6d3c 0%, #3f4b2a 60%, #33401f 100%); }
.mbanner--light { background: var(--beige); color: var(--fg-0); }
.mbanner-mascot { position: absolute; z-index: 1; left: 0; bottom: -2px; height: 88%; width: auto; max-width: 52%; object-fit: contain; object-position: left bottom; pointer-events: none; }
.mbanner--dark .mbanner-mascot { height: 76%; left: 1%; bottom: -6px; }
.mbanner--olive { justify-content: flex-start; }
.mbanner--olive .mbanner-mascot { left: auto; right: 3%; height: 88%; object-position: right bottom; }
.mbanner--light { justify-content: flex-start; }
.mbanner--light .mbanner-mascot { height: 90%; left: auto; right: 1%; object-position: right bottom; }
.mbanner--light .mbanner-body { padding-left: clamp(16px, 2vw, 28px); padding-right: 8px; }
.mbanner-body { position: relative; z-index: 2; width: 52%; padding: 20px clamp(16px, 2vw, 28px) 20px 8px; }
.mbanner--olive .mbanner-body { width: 52%; padding-left: clamp(16px, 2vw, 28px); padding-right: 8px; }
.mbanner-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 2.2vw, 34px); line-height: 1; letter-spacing: -0.02em; }
.mbanner-sub { margin-top: 8px; font-size: 13.5px; opacity: .9; line-height: 1.35; }
.mbanner-btn { margin-top: 14px; }
@media (max-width: 960px) { .banner-trio { grid-template-columns: 1fr; } .mbanner { min-height: 190px; } .mbanner-body { width: 58%; } .mbanner--light .mbanner-mascot, .mbanner--olive .mbanner-mascot { height: 86%; } }

/* ---------- Instagram (volitelné) ---------- */
.insta { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s-5); align-items: center; padding: var(--s-6) 0; }
.insta-head .h2 { font-size: 26px; }
.insta-head p { color: var(--fg-2); font-size: 13.5px; margin: 8px 0 14px; }
.insta-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.insta-tile { position: relative; aspect-ratio: 1; border-radius: var(--r-xs); overflow: hidden; background: var(--bg-3); display: block; }
.insta-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.insta-tile:hover img { transform: scale(1.06); }
.insta-tile--note { background: var(--bg-3); display: flex; align-items: center; justify-content: center; text-align: center; font-family: var(--font-hand); font-size: clamp(18px, 1.6vw, 24px); line-height: 1.1; color: var(--fg-0); transform: rotate(-4deg); }
@media (max-width: 960px) { .insta { grid-template-columns: 1fr; } .insta-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .insta-tile--note { display: none; } }
@media (max-width: 560px) { .insta-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Blog „Čtení pod čepici“ ---------- */
.blog-sec { position: relative; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; }
.blog-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: visible; text-decoration: none; color: var(--fg-0); transition: transform .25s ease, box-shadow .25s ease; }
.blog-card:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 18px 40px rgba(20,20,20,.10); }
.blog-card:nth-child(2n):hover { transform: translateY(-4px) rotate(.6deg); }
.bc-media { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 20px 20px 0 0; overflow: hidden; background: var(--bg-3); }
.bc-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.blog-card:hover .bc-media img { transform: scale(1.05); }
.bc-chip { position: absolute; left: 14px; top: 14px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; }
.bc-sticker { position: absolute; right: 12px; bottom: 12px; background: #fff; color: var(--fg-0); font-family: var(--font-hand); font-size: 20px; font-weight: 600; line-height: 1; padding: 8px 12px; border-radius: 6px; transform: rotate(-4deg); box-shadow: 0 6px 14px rgba(0,0,0,.14); }
.blog-card:nth-child(2n) .bc-sticker { transform: rotate(3deg); }
.bc-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.bc-meta { font-size: 12.5px; color: var(--fg-2); }
.bc-title { font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.25; letter-spacing: -.01em; }
.bc-excerpt { font-size: 14px; line-height: 1.5; color: var(--fg-1); }
.bc-more { margin-top: 4px; font-size: 13.5px; font-weight: 700; color: var(--orange); display: inline-flex; align-items: center; gap: 6px; }
.blog-card--peek { z-index: 1; }
.blog-peek { position: absolute; left: 22px; bottom: calc(100% - 26px); width: clamp(90px, 8.5vw, 120px); height: auto; pointer-events: none; filter: drop-shadow(0 8px 12px rgba(0,0,0,.18)); transition: transform .3s ease; transform-origin: bottom center; }
.blog-card--peek:hover .blog-peek { transform: translateY(-8px) rotate(-6deg); }
.blog-signoff { margin: 22px 0 0; text-align: right; font-family: var(--font-hand); font-size: clamp(20px, 1.7vw, 26px); color: var(--fg-2); transform: rotate(-1.5deg); }
@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; gap: 18px; } .blog-peek { width: 84px; } .blog-signoff { text-align: center; } }
