/* ============================================================================
   eBike Spareparts — Chrome (header / announce / nav / footer / trust)
   Claude Design kit.css 1:1
   ========================================================================== */

/* Sticky-header ei katkea template-part-wrapperiin (display:contents base.css) */
.eb-site-header { display: block; }

/* Announce — huolto/maat-copy + sivustolinkit, ei rahtilupausta */
.eb-announce {
  background: var(--ink-900); color: var(--steel-200);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
  padding: 8px 16px;
}
.eb-announce b { color: var(--volt-500); font-weight: 600; }
.eb-announce-inner {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 8px 24px; max-width: var(--maxw); margin: 0 auto;
}
.eb-announce-copy { color: var(--steel-200); }
.eb-announce-nav { display: flex; align-items: center; gap: 4px; }
@media (min-width: 721px) {
  .eb-announce-nav {
    padding-left: 18px;
    border-left: 1px solid var(--ink-600);
  }
}
.eb-announce-nav a {
  font-family: var(--font-text); font-weight: 600; font-size: 13px;
  letter-spacing: 0; color: #fff; padding: 3px 9px; border-radius: var(--r-sm);
  white-space: nowrap;
}
.eb-announce-nav a:hover,
.eb-announce-nav a:focus-visible {
  color: var(--ink-900); background: var(--volt-500); text-decoration: none;
}

/* Header */
.eb-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246,247,242,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.eb-header-row { display: flex; align-items: center; gap: 22px; height: 68px; }

.eb-logo { display: flex; align-items: center; gap: 10px; flex: none; text-decoration: none; }
.eb-logo:hover { text-decoration: none; }
.eb-logo img { width: 32px; height: 32px; display: block; }
.eb-logo .wm { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -.01em; line-height: 1; }
.eb-logo .wm .b { color: var(--fg1); }
.eb-logo .wm .s { color: var(--steel-500); }

.eb-search { flex: 1; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-pill); padding: 10px 16px; transition: border-color .15s, box-shadow .15s; margin: 0; }
.eb-search:focus-within { border-color: var(--info); box-shadow: 0 0 0 3px rgba(46,107,255,.16); }
.eb-search svg { width: 18px; height: 18px; color: var(--steel-500); flex: none; }
.eb-search input { border: 0; outline: 0; background: transparent; flex: 1; font-size: 14px; color: var(--fg1); font-family: var(--font-text); min-width: 0; }

.eb-iconbtn { position: relative; width: 42px; height: 42px; border-radius: var(--r-sm); border: 0; background: transparent; display: grid; place-items: center; color: var(--fg1); cursor: pointer; transition: background .15s; flex: none; }
.eb-iconbtn:hover { background: var(--surface-2); }
.eb-iconbtn svg { width: 21px; height: 21px; }

/* Header cart-count (badge) — eroaa drawer-headin luvusta scope-luokalla */
.eb-cart-trigger .eb-cart-count {
  position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: var(--r-pill); background: var(--volt-500); color: var(--on-accent);
  font-family: var(--font-mono); font-weight: 600; font-size: 10px; display: grid; place-items: center; line-height: 1;
}

/* Nav — tiivis vasemmalle, ei space-between / flex-grow koko chrome-leveyteen */
.eb-nav { display: flex; align-items: center; justify-content: flex-start; gap: 8px; height: 46px; border-top: 1px solid var(--border); overflow: visible; }
.eb-nav-links {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 8px; flex: 0 1 auto; overflow: visible;
}
.eb-nav a { font-family: var(--font-text); font-weight: 600; font-size: 13px; color: var(--fg2); padding: 8px 10px; border-radius: var(--r-sm); transition: background .15s, color .15s; white-space: nowrap; }
.eb-nav a:hover { background: var(--surface-2); color: var(--fg1); text-decoration: none; }
.eb-nav .spacer { display: none; }

/* Merkkien lapsidropdown: label + caret samassa <a class="eb-nav-parent"> */
.eb-nav-item { position: relative; flex: 0 0 auto; display: flex; align-items: center; }
.eb-nav-parent { display: inline-flex; align-items: center; gap: 4px; }
.eb-nav-caret {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; padding: 0; border: 0;
  background: transparent; color: var(--steel-500); pointer-events: none;
}
.eb-nav-caret svg { width: 14px; height: 14px; display: block; }
.eb-nav-sub {
  display: none; position: absolute; top: calc(100% - 2px); left: 0; z-index: 50;
  min-width: 228px; padding: 6px; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
}
.eb-nav-sub a { white-space: nowrap; }
@media (min-width: 861px) {
  .eb-nav-item:hover > .eb-nav-parent,
  .eb-nav-item:focus-within > .eb-nav-parent { background: var(--surface-2); color: var(--fg1); }
  .eb-nav-item:hover .eb-nav-sub,
  .eb-nav-item:focus-within .eb-nav-sub,
  .eb-nav-item.is-open .eb-nav-sub { display: flex; }
}
.eb-nav a.svc { color: var(--fg1); font-weight: 700; }
.eb-nav a.svc::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--volt-500); margin-right: 7px; vertical-align: middle; }
.eb-nav-toggle { width: 42px; height: 42px; border: 0; background: transparent; color: var(--fg1); cursor: pointer; border-radius: var(--r-sm); }
.eb-nav-toggle:hover { background: var(--surface-2); }
/* Spesifisempi kuin .eb-iconbtn (woocommerce.css latautuu chrome.css:n jälkeen) → piilossa desktopilla */
.eb-header .eb-nav-toggle { display: none; }

/* Lang switcher */
.eb-lang { position: relative; flex: none; }
.eb-lang-btn { display: inline-flex; align-items: center; gap: 5px; height: 42px; padding: 0 10px; border: 0; background: transparent; border-radius: var(--r-sm); color: var(--fg1); cursor: pointer; transition: background .15s; }
.eb-lang-btn:hover { background: var(--surface-2); }
.eb-lang-btn .code { font-family: var(--font-mono); font-weight: 600; font-size: 12px; letter-spacing: .04em; }
.eb-lang-menu { position: absolute; top: 48px; right: 0; z-index: 50; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 6px; min-width: 168px; display: flex; flex-direction: column; gap: 2px; }
.eb-lang-menu[hidden] { display: none; }
.eb-lang-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 0; background: transparent; border-radius: var(--r-sm); font-family: var(--font-text); font-weight: 600; font-size: 13.5px; color: var(--fg1); text-align: left; transition: background .14s; }
.eb-lang-item:hover { background: var(--surface-2); text-decoration: none; }
.eb-lang-item.active { background: var(--volt-100); }
.eb-lang-item .lc { font-family: var(--font-mono); font-size: 10px; font-weight: 600; color: var(--steel-500); background: var(--surface-2); border-radius: var(--r-xs); padding: 2px 5px; flex: none; }
.eb-lang-item.active .lc { background: var(--volt-500); color: var(--ink-900); }
.eb-lang-item svg { margin-left: auto; color: var(--volt-600); }

/* Trust strip */
.eb-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.eb-trust .cell { background: var(--surface); padding: 20px 22px; display: flex; gap: 13px; align-items: center; }
.eb-trust .cell svg { width: 22px; height: 22px; color: var(--ink-900); flex: none; }
.eb-trust .cell b { font-weight: 700; font-size: 14px; display: block; }
.eb-trust .cell small { color: var(--fg2); font-size: 12px; }

/* Footer */
.eb-footer { background: var(--ink-900); color: var(--steel-300); margin-top: auto; padding: 48px 0 28px; }
.eb-footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 36px; border-bottom: 1px solid var(--ink-600); }
.eb-footer h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--steel-400); margin: 0 0 14px; }
.eb-footer a { display: block; color: var(--steel-300); font-size: 13.5px; padding: 5px 0; }
.eb-footer a:hover { color: var(--volt-500); text-decoration: none; }
.eb-footer .wm { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: #fff; }
.eb-footer .wm .s { color: var(--volt-500); }
.eb-footer a.eb-footer-logo,
.eb-footer a.eb-footer-logo:hover {
  display: inline-block;
  padding: 0;
  font-size: inherit;
  color: inherit;
}
.eb-footer-tagline { color: var(--steel-400); font-size: 13.5px; max-width: 260px; margin-top: 14px; }
.eb-footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 22px; font-family: var(--font-mono); font-size: 11px; color: var(--steel-500); flex-wrap: wrap; }

@media (max-width: 860px) {
  /* Logo-rivi: logo | haku (oma rivi) | kieli + cart + hampurilainen oikealla */
  .eb-header-row { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 10px; }
  .eb-logo { margin-right: auto; }
  .eb-search { order: 3; flex-basis: 100%; }
  .eb-account { display: none; }              /* tili löytyy valikosta/footerista */
  .eb-header .eb-nav-toggle { display: grid; place-items: center; }

  /* Alarivi pelkkä ankkuri dropdownille — ei näkyvää palkkia */
  .eb-nav { border-top: 0; min-height: 0; height: 0; padding: 0; position: relative; }
  .eb-nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 6px;
    flex-direction: column; align-items: stretch;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
    padding: 8px; gap: 2px; box-shadow: var(--shadow-lg); z-index: 45;
  }
  .eb-nav-links.open { display: flex; }
  .eb-nav-links a { padding: 12px 14px; font-size: 15px; }
  .eb-nav-item { flex-wrap: wrap; width: 100%; }
  .eb-nav-item > .eb-nav-parent { flex: 1; display: flex; width: 100%; }
  .eb-nav-caret { pointer-events: auto; margin-left: auto; width: 42px; height: 42px; flex: none; cursor: pointer; }
  .eb-nav-sub {
    position: static; width: 100%; min-width: 0; display: none;
    box-shadow: none; border: 0; padding: 0 0 4px 12px; background: transparent;
  }
  .eb-nav-item.is-open .eb-nav-sub { display: flex; }

  .eb-trust { grid-template-columns: repeat(2, 1fr); }
  .eb-footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) { .eb-lang-btn .code { display: none; } }
@media (max-width: 520px) { .eb-trust { grid-template-columns: 1fr; } .eb-footer-cols { grid-template-columns: 1fr; } }
