/* =============================================================================
   Kouzelná Linka — Design Base
   Shared chrome (header, footer, buttons, container) used across all pages.
   Loaded AFTER page-specific CSS so design takes precedence on shared classes.
   Source: design_handoff/ui_kit.css (visual system locked).
   ============================================================================= */

/* -------- Reset for new design pages (use .design-page on body) -------- */
.design-page * { box-sizing: border-box; margin: 0; padding: 0; }
.design-page {
  font-family: var(--zs-font-body);
  font-size: var(--zs-body);
  line-height: var(--zs-leading-body);
  color: var(--zs-text);
  background: var(--zs-white);
  -webkit-font-smoothing: antialiased;
}
.design-page img { max-width: 100%; display: block; }
.design-page button { font-family: inherit; cursor: pointer; border: none; background: none; }
.design-page a { color: inherit; text-decoration: none; }
.design-page html { scroll-behavior: smooth; }
.design-page :focus-visible {
  outline: 3px solid var(--zs-gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Container (scoped so it doesn't fight legacy .container with different max-width) */
.zs-container { max-width: var(--zs-container); margin: 0 auto; padding: 0 1.5rem; }

/* -------- Buttons (design-system pill buttons) -------- */
.zs-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--zs-font-body); font-weight: 700; font-size: 0.9375rem;
  padding: 0.75rem 1.75rem; border-radius: var(--zs-radius-pill);
  border: 2px solid transparent; cursor: pointer;
  transition: transform 0.25s var(--zs-ease), box-shadow 0.25s var(--zs-ease), background 0.25s var(--zs-ease);
  position: relative; overflow: hidden;
  text-decoration: none;
  line-height: 1;
}
.zs-btn:hover { transform: translateY(-2px); }
.zs-btn:active { transform: translateY(0) scale(0.98); }

.zs-btn-primary { background: var(--zs-gold); color: var(--zs-cosy-1); border-color: var(--zs-gold); box-shadow: 0 0 20px rgba(232,185,49,0.3); }
.zs-btn-primary:hover { background: var(--zs-gold-hover); border-color: var(--zs-gold-hover); box-shadow: var(--zs-shadow-cta); color: var(--zs-cosy-1); }

.zs-btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.zs-btn-outline-light:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); color: #fff; }

.zs-btn-outline-dark { background: transparent; color: var(--zs-text); border-color: var(--zs-border); }
.zs-btn-outline-dark:hover { border-color: var(--zs-text); background: var(--zs-cream); color: var(--zs-text); }

.zs-btn-cta-white { background: #fff; color: #C41E3A !important; border-color: #fff; padding: 0.9rem 2rem; font-size: 1rem; }
.zs-btn-cta-white:hover { background: var(--zs-cream); color: #C41E3A !important; }
.zs-btn-cta-white span { color: #C41E3A !important; }

/* Shimmer on hover — primary CTAs only.
   The anchor is the stacking context (isolation: isolate); text content
   sits at z-index 1 via a span wrapper so the absolutely-positioned
   ::before overlay (z-index 0) can never visually clip it. */
.zs-btn-primary, .zs-btn-cta-white { isolation: isolate; }
.zs-btn-primary::before, .zs-btn-cta-white::before {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  transition: left 0.6s var(--zs-ease);
  z-index: 0;
  pointer-events: none;
}
.zs-btn-primary > *, .zs-btn-cta-white > * { position: relative; z-index: 1; }
.zs-btn-primary:hover::before, .zs-btn-cta-white:hover::before { left: 100%; }

/* -------- Header (.zs-header — scoped, replaces legacy .site-header) -------- */
.zs-header {
  height: var(--zs-header-h);
  background: var(--zs-cosy-1);
  color: var(--zs-hero-text-muted);
  border-bottom: 1px solid rgba(254, 243, 226, 0.08);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center;
}
.zs-header .zs-container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.zs-header .zs-logo { display: flex; align-items: center; gap: 0.55rem; color: var(--zs-hero-text); }
.zs-logo-mark { width: 40px; height: 40px; display: block; flex-shrink: 0; border-radius: 8px; }
@media (max-width: 768px) {
  .zs-logo-mark { width: 32px; height: 32px; }
}
.zs-logo-text { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 1.28rem; letter-spacing: -0.015em; }
.zs-logo-text .accent { color: var(--zs-gold); font-style: italic; }
/* Shared Kouzelná Linka wordmark. Kept here so every public page uses the
   same proportions; checkout-specific compact rules below still take precedence. */
.zs-header .zs-logo--kouzelna-linka {
  flex-shrink: 0;
  gap: .68rem;
}
.zs-logo--kouzelna-linka .zs-logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  filter: drop-shadow(0 6px 13px rgba(0, 0, 0, .24));
}
.zs-logo--kouzelna-linka .zs-logo-text {
  color: #fff4df;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.38rem;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}
.zs-logo--kouzelna-linka .accent {
  margin-left: .08em;
  color: var(--zs-gold-soft);
  font-style: italic;
  font-weight: 700;
}

@media (max-width: 700px) {
  .zs-header .zs-logo--kouzelna-linka { gap: .48rem; }
  .zs-logo--kouzelna-linka .zs-logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }
  .zs-logo--kouzelna-linka .zs-logo-text {
    font-size: 1.1rem;
    letter-spacing: -.02em;
  }
}
.order-header-trust { display: none; }
.zs-header nav { display: flex; gap: 2rem; align-items: center; }
.zs-header nav a { color: var(--zs-hero-text-muted); font-size: 0.9375rem; font-weight: 600; transition: color 0.2s; }
.zs-header nav a:hover { color: var(--zs-hero-accent); }
.zs-header nav a.is-active { color: var(--zs-hero-accent); }

/* Nav CTA — gold pill (cosy-1 dark text on gold bg, beats inherited design-page link color) */
body.design-page .zs-btn-nav,
body.design-page .zs-btn-nav *,
.zs-btn-nav,
.zs-btn-nav * { color: var(--zs-cosy-1); }
.zs-btn-nav {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--zs-gold); border: 2px solid var(--zs-gold);
  border-radius: var(--zs-radius-pill);
  padding: 0.55rem 1.25rem;
  font-family: var(--zs-font-body); font-size: 0.9375rem; font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 12px rgba(232,185,49,0.3);
  text-decoration: none;
  transition: background 0.2s var(--zs-ease), box-shadow 0.2s var(--zs-ease), transform 0.2s var(--zs-ease);
  line-height: 1;
}
.zs-btn-nav:hover {
  background: var(--zs-gold-hover);
  border-color: var(--zs-gold-hover);
  box-shadow: 0 6px 18px rgba(232,185,49,0.45);
  transform: translateY(-1px);
}

/* Hamburger (mobile) */
.zs-hamburger {
  display: none;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 0;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}
.zs-hamburger span {
  display: block;
  width: 23px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transform-origin: center;
  transition: transform .2s var(--zs-ease), opacity .2s var(--zs-ease);
}
.zs-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.zs-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.zs-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.zs-mobile-overlay {
  display: none;
  position: fixed;
  inset: var(--zs-header-h) 0 0 0;
  background:
    radial-gradient(circle at 85% 16%, rgba(232,185,49,.13), transparent 30%),
    linear-gradient(160deg, rgba(31,42,28,.99), rgba(25,10,7,.99) 62%);
  z-index: 99;
  padding: 1.25rem 1rem max(2rem, env(safe-area-inset-bottom));
  flex-direction: column;
  gap: .45rem;
  overflow-y: auto;
}
.zs-mobile-overlay a {
  display: flex;
  min-height: 54px;
  align-items: center;
  padding: .75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.09);
  color: #fff;
  font-family: var(--zs-font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}
.zs-mobile-overlay .zs-btn-nav { justify-content: center; margin-top: .8rem; border-bottom: 0; }
.zs-mobile-overlay.is-open { display: flex; }
body.menu-open { overflow: hidden; }
body.menu-open .sticky-mobile-cta { display: none !important; }

/* -------- Footer garland (signature 4px stripe above footer) -------- */
.footer-garland {
  height: 4px;
  background: repeating-linear-gradient(90deg,
    var(--zs-red) 0 20px,
    var(--zs-gold) 20px 24px,
    var(--zs-green) 24px 44px,
    var(--zs-gold) 44px 48px);
}

/* -------- Footer (.zs-footer — cosy palette, social icons) -------- */
.zs-footer {
  background: var(--zs-cosy-1);
  color: var(--zs-hero-text-muted);
  padding: 3rem 0 1.5rem;
  font-size: 0.875rem;
}
.zs-footer .zs-container { max-width: var(--zs-container); margin: 0 auto; padding: 0 1.5rem; }
.zs-footer a { color: inherit; text-decoration: none; transition: color 0.2s; }
.zs-footer a:hover { color: var(--zs-hero-accent); }
.zs-footer h5 {
  font-family: var(--zs-font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--zs-hero-text);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.zs-footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}
.zs-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(254, 243, 226, 0.12);
}
.zs-footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--zs-hero-text);
  margin-bottom: 1rem;
}
.zs-footer-logo .zs-logo-text { font-size: 1.08rem; }
.zs-footer-tag { line-height: 1.6; max-width: 20rem; margin: 0 0 1rem; }
.zs-footer-contact { display: inline-block; color: var(--zs-hero-accent) !important; font-weight: 700; }
.zs-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.25rem;
  font-size: 0.8125rem;
  color: var(--zs-hero-text-muted);
  flex-wrap: wrap;
}
.zs-footer-pay { display: inline-flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.zs-footer-pay-label { color: var(--zs-hero-text-muted); font-size: 0.75rem; margin-right: 0.15rem; }

/* Social icons */
.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(254, 243, 226, 0.08);
  color: var(--zs-hero-text-muted);
  transition: background 0.2s var(--zs-ease), color 0.2s var(--zs-ease), transform 0.2s var(--zs-ease);
}
.footer-social-link:hover {
  background: var(--zs-hero-accent);
  color: var(--zs-cosy-1);
  transform: translateY(-2px);
}
.footer-social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
/* Platební odznaky (partial payment-badges.ejs) — bílé pilulky s reálnými znaky */
.pay-badges { display: inline-flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.pay-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  height: 27px;
  padding: 0 0.55rem;
  border-radius: 6px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}
.pay-badge svg { display: block; flex-shrink: 0; }
.pay-badge em {
  font-style: normal;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1;
  color: #3c4043;
}
.pay-badge[aria-label="Apple Pay"] em { color: #000; }
.zs-cz-line { display: inline-flex; align-items: center; gap: 0.4rem; }
.zs-cz-flag { display: inline-block; border-radius: 1px; flex-shrink: 0; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .zs-btn-primary::before, .zs-btn-cta-white::before { animation: none !important; transition: none !important; }
}

/* Responsive — header + footer */
@media (max-width: 900px) {
  .zs-header nav { display: none; }
  .zs-hamburger { display: inline-flex; }
  .zs-footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .zs-footer-bottom { flex-direction: column; align-items: flex-start; }
}

body.page-objednat .zs-header nav,
body.page-objednat .zs-hamburger { display: none; }
body.page-objednat .order-header-trust {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--zs-hero-text-muted);
  font-size: .8rem;
  font-weight: 700;
}
body.page-objednat .order-header-trust svg { width: 17px; height: 17px; fill: none; stroke: var(--zs-gold); stroke-width: 2; }

/* -------- Sticky mobile CTA (visible only on mobile, hidden on /objednat) -------- */
.sticky-mobile-cta { display: none; }
@media (max-width: 768px) {
  /* body.design-page prefix overrides `.design-page a { color: inherit }`
     (specificity 0,1,1) — ensures the bar text stays white on red bg. */
  body.design-page .sticky-mobile-cta,
  body.design-page .sticky-mobile-cta strong,
  body.design-page .sticky-mobile-cta em,
  body.design-page .sticky-mobile-cta span,
  body.design-page .sticky-mobile-cta svg {
    color: #fff;
  }
  body.design-page .sticky-mobile-cta {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 100;
    padding: .8rem max(1rem, env(safe-area-inset-left)) calc(.8rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-right));
    background: linear-gradient(135deg, var(--zs-red) 0%, var(--zs-red-dark) 100%);
    text-decoration: none;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  }
  body.design-page .sticky-mobile-cta .sticky-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
  }
  body.design-page .sticky-mobile-cta strong {
    font-family: var(--zs-font-heading);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: 0.02em;
    display: block;
  }
  body.design-page .sticky-mobile-cta em {
    font-style: normal;
    font-weight: 400;
    font-size: 0.8125rem;
    opacity: 0.9;
    display: block;
    margin-top: 0.125rem;
  }
  body.design-page .sticky-mobile-cta .phone-icon { width: 24px; height: 24px; flex-shrink: 0; }
  body.design-page .sticky-mobile-cta .arrow { width: 18px; height: 18px; flex-shrink: 0; }
  /* Prevent bar from hiding content */
  body.design-page main { padding-bottom: 76px; }
}

@media (max-width: 420px) {
  body.page-objednat .zs-logo-text { font-size: .95rem; }
  body.page-objednat .order-header-trust { font-size: .7rem; }
}

.zs-skip-link {
  position: fixed;
  top: .65rem;
  left: .65rem;
  z-index: 1000;
  padding: .7rem 1rem;
  border-radius: .55rem;
  background: #fff8e8;
  color: #32180f !important;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  transform: translateY(-160%);
  transition: transform .18s ease;
}
.zs-skip-link:focus { transform: translateY(0); }

/* The checkout header must remain composed even on legacy 320px phones. */
@media (max-width: 350px) {
  body.page-objednat .zs-header .zs-container { padding-inline: .75rem; }
  body.page-objednat .zs-header .zs-logo { gap: .35rem; }
  body.page-objednat .zs-logo-mark { width: 30px; height: 30px; }
  body.page-objednat .zs-logo-text { font-size: .82rem; }
  body.page-objednat .order-header-trust {
    max-width: 84px;
    gap: .3rem;
    font-size: .62rem;
  }
  body.page-objednat .order-header-trust svg { width: 14px; height: 14px; }
}
