/* Redesign PR1 — header, search, USP, cards, bottom nav */

:root {
  --header-search-max: 42rem;
  --bottom-nav-h: 64px;
  --top-rail-h: 36px;
}

/* —— Top rail (reviews / announcement) —— */
.top-rail {
  background: var(--surface-strong, #0f1720);
  color: #f5f7fa;
  font-size: 0.82rem;
  line-height: 1.35;
  min-height: var(--top-rail-h);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.top-rail[hidden] { display: none !important; }
.top-rail-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  text-align: center;
}
.top-rail a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.top-rail-stars { letter-spacing: 0.08em; color: #f5c542; }

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg, #fff);
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.site-header .nav-row-1 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
}
.header-search {
  position: relative;
  width: min(100%, var(--header-search-max));
  margin: 0 auto;
  justify-self: center;
}
.header-search-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 999px;
  padding: 0.65rem 1.1rem 0.65rem 2.6rem;
  font: inherit;
  background: var(--surface, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23667' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='5.5'/%3E%3Cpath d='m12.5 12.5 3.5 3.5'/%3E%3C/svg%3E") 0.9rem 50% no-repeat;
}
.header-search-input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent, #2a9d8f) 55%, transparent);
  outline-offset: 1px;
}
.header-search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--bg, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 32, 0.14);
  max-height: min(70vh, 480px);
  overflow: auto;
  z-index: 50;
  padding: 0.5rem;
}
.header-search-dropdown[hidden] { display: none !important; }
.hs-section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #667);
  padding: 0.45rem 0.65rem 0.25rem;
}
.hs-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}
.hs-row:hover, .hs-row:focus-visible, .hs-row.is-active {
  background: var(--surface-strong, #f3f5f7);
}
.hs-row img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}
.hs-row-title { font-weight: 600; font-size: 0.92rem; line-height: 1.25; }
.hs-row-meta { font-size: 0.78rem; color: var(--muted, #667); }
.hs-row-price { font-weight: 700; white-space: nowrap; }
.hs-chip {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--surface-strong, #eef1f4);
}
.hs-footer-link, .hs-cat-link, .hs-popular-btn {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  font: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.hs-footer-link:hover, .hs-cat-link:hover, .hs-popular-btn:hover {
  background: var(--surface-strong, #f3f5f7);
}
.hs-empty {
  padding: 0.85rem 0.65rem;
}
.hs-empty p { margin: 0 0 0.75rem; }
.nav-row-1-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.nav-row-1-actions .nav-cta { white-space: nowrap; }

.nav-row-2 {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0 0.65rem;
  border-top: 1px solid transparent;
}
.nav-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.85rem;
  align-items: center;
  font-size: 0.92rem;
}
.nav-cats a {
  color: inherit;
  text-decoration: none;
  padding: 0.35rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-cats a:hover { color: var(--accent-strong, #1f7a6c); }
.nav-cats .nav-more { position: relative; }
.nav-more-panel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 12rem;
  background: var(--bg, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 0.4rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  display: none;
  z-index: 45;
}
.nav-more:hover .nav-more-panel,
.nav-more:focus-within .nav-more-panel { display: grid; }
.nav-more-panel a {
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
}
.nav-help-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted, #556);
  white-space: nowrap;
}
.nav-help-line a { color: inherit; }

.mobile-cat-chips {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0 0 0.75rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mobile-cat-chips::-webkit-scrollbar { display: none; }
.mobile-cat-chips a {
  flex: 0 0 auto;
  border: 1px solid var(--border, #dde1e6);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  background: var(--surface, #fff);
  font-size: 0.88rem;
}

.mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  background: var(--bg, #fff);
  border-top: 1px solid var(--border, #e5e7eb);
  padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, 1fr);
  gap: 0.15rem;
}
.mobile-bottom-nav a, .mobile-bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 52px;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  font: inherit;
  font-size: 0.68rem;
  cursor: pointer;
}
.mobile-bottom-nav .mbn-ico { font-size: 1.15rem; line-height: 1; }

.chat-fab {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--bottom-nav-h) + 1rem + env(safe-area-inset-bottom));
  z-index: 56;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 0;
  background: var(--accent, #2a9d8f);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 32, 0.22);
}
.chat-fab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Hide legacy chrome removed in PR1 */
.offer-ticker,
.trust-strip,
.home-trust-tech,
.mobile-cta,
.chatbot-launcher { display: none !important; }

/* —— USP row —— */
.usp-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0 0.5rem;
}
.usp-card {
  display: block;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  border: 1px solid var(--border, #e5e7eb);
  background: var(--surface, #fff);
  text-decoration: none;
  color: inherit;
  min-height: 100%;
}
.usp-card:hover { border-color: color-mix(in srgb, var(--accent, #2a9d8f) 45%, var(--border)); }
.usp-card strong { display: block; margin: 0 0 0.35rem; font-size: 0.98rem; }
.usp-card span { display: block; font-size: 0.86rem; color: var(--muted, #556); line-height: 1.4; }

/* —— Product cards —— */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}
.product-card .thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: 12px;
  padding: 0.75rem;
  position: relative;
  overflow: hidden;
}
.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-card .klar-badge {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: #111;
  color: #fff;
  max-width: calc(100% - 1.1rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-card .featured-ribbon,
.product-card .vip-ribbon,
.product-card .storefront-badges-left { display: none !important; }
.product-card .example-image-note,
.product-card-example-slot .example-image-note {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  z-index: 2;
  margin: 0;
  font-size: 0.65rem;
  line-height: 1.2;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.92);
  color: var(--muted, #556);
  border: 0;
  box-shadow: none;
}
.product-card-example-slot { position: relative; height: 0; }
.product-card-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow: hidden;
  margin-top: 0.65rem;
}
.product-card-brand {
  margin: 0.45rem 0 0.15rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #667);
}
.product-card-title h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  line-height: 1.3;
  margin: 0;
  font-size: 0.98rem;
}
.product-card-price {
  margin-top: 0.45rem;
}
.product-card-price .price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
}
.product-card-price .price { font-size: 1.2rem; font-weight: 800; }
.product-card-price .price-was-inline {
  text-decoration: line-through;
  color: var(--muted, #778);
  font-size: 0.88rem;
}
.product-card-price .price-save-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success, #2f7d54) 18%, transparent);
  color: var(--success, #2f7d54);
}
.product-card-exchange {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--text, #122);
}
.product-card-exchange summary {
  cursor: pointer;
  list-style: none;
}
.product-card-exchange summary::-webkit-details-marker { display: none; }
.product-card-extra { display: none; }
.product-card-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  display: grid;
  gap: 0.55rem;
}
.product-card-footer .product-card-avail {
  white-space: normal;
  line-height: 1.3;
}

.stand-chip.is-klar { font-weight: 700; }

@media (min-width: 900px) {
  .nav-row-2 { display: flex; }
  .mobile-cat-chips { display: none; }
  .header-phone-mobile { display: none !important; }
  .usp-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .chat-fab { bottom: 1.25rem; }
  body { padding-bottom: 0; }
}
@media (max-width: 899px) {
  .site-header .nav-row-1 {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "brand actions actions"
      "search search search";
  }
  .site-header .brand { grid-area: brand; }
  .nav-row-1-actions { grid-area: actions; justify-self: end; }
  .header-search {
    grid-area: search;
    width: 100%;
    justify-self: stretch;
  }
  .nav-row-1-actions .nav-cta,
  .nav-row-1-actions #theme-toggle,
  .nav-row-1-actions #lang-switcher,
  .menu-toggle { display: none !important; }
  .mobile-bottom-nav { display: grid; }
  body { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
  .header-search { max-width: none; }
}

.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
