/* =========================
   GLOBAL (alle Seiten)
   File: /shop/css/global.css
========================= */

/* Reset */
*{ box-sizing:border-box; margin:0; padding:0; }
html,body{ margin:0; padding:0; }
img{ max-width:100%; height:auto; display:block; }
a{ color:inherit; }

/* =========================
   Vars
========================= */
:root{
  --bg:#f3f4f6;
  --bg-soft:#f9fafb;

  --accent:#11287a;
  --accent-soft:rgba(17,40,122,.12);

  --text-main:#111827;
  --text-muted:#6b7280;

  --shadow-soft:0 18px 40px rgba(15,23,42,.06);
  --shadow-chip:0 8px 20px rgba(148,163,184,.18);

  --page-max:1200px;
  --page-pad:16px;

  /* Header spacing */
  --header-content-top: 20px; /* nur Logo/Suche/Nav runter */
  --header-gap: 16px;         /* Grid gap */

  /* Logo / Partner */
  --swiss:#11287a;
  --logo-size:44px;

  --partner-left:80px;
  --partner-top:-14px;
  --partner-gap:1px;
  --synlogo-h:84px;

  /* CTA */
  --peptid-btn-minw:240px;
  --peptid-btn-icon:24px;
}
.header,
.top-banner-inner{
  max-width: var(--page-max);
  margin: 0 auto;
  padding-inline: var(--page-pad);
}


/* Base */
body{
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  background:var(--bg);
  color:var(--text-main);
  min-height:100vh;
  overflow-x:hidden;
}

/* =========================
   PAGE WRAPPER
========================= */
.page{
  width:100%;
  display:flex;
  justify-content:center;
  padding:var(--page-pad);
  padding-top:calc(var(--page-pad) + env(safe-area-inset-top, 0));
  padding-bottom:calc(var(--page-pad) + env(safe-area-inset-bottom, 0));
  overflow-x:hidden;
}

.app{
  width:100%;
  max-width:var(--page-max);
  padding:18px 18px 22px;
  background:transparent;
  border:none;
  border-radius:0;
  box-shadow:none;
  min-width:0;
}

/* verhindert doppeltes padding wenn header.js Content mountet */
#appContent{ width:100%; margin:0; padding:0; }
#appContent .page{ padding-top:0; }

/* =========================
   FULL-WIDTH TOP BANNER
========================= */
.top-banner-bleed{
  width:100vw;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
  background:#11287a;
  color:#fff;
  overflow-x:hidden;
}

.top-banner-inner{
  width:100%;
  padding:10px 16px;
  min-height:44px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  gap:12px;
}

.banner-spacer{ min-width:0; }

.banner-center{
  text-align:center;
  font-weight:600;
  letter-spacing:.01em;
  white-space:nowrap;
  justify-self:center;
  padding:0 10px;
}

.banner-right{
  justify-self:end;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:600;
  white-space:nowrap;
  min-width:0;
}

.banner-mail-icon{
  width:18px; height:18px;
  object-fit:contain;
  display:block;
  flex:0 0 auto;
}

.banner-email{
  color:#fff;
  text-decoration:none;
  font-weight:600;
  flex:0 1 auto;
}
.banner-email:hover{ text-decoration:underline; }

@media (max-width:820px){
  .top-banner-inner{
    grid-template-columns:1fr;
    justify-items:center;
    gap:6px;
    min-height:auto;
    padding:10px 16px;
  }
  .banner-center{
    white-space:normal;
    font-size:13px;
    padding:0;
  }
  .banner-right{
    justify-self:center;
    font-size:12px;
    white-space:normal;
  }
}

/* =========================
   HEADER (NEUE STRUKTUR)
   HTML erwartet:
   .header-main | .header-nav | .header-search | .peptid-btn
   -> Searchbar reicht bis Peptid Button (Gap wird "überbrückt")
========================= */
.header{
  display:grid;
  grid-template-columns: auto minmax(0, 1fr) max-content; /* rechts = nur Buttonbreite */
  grid-template-rows: auto auto;                          /* oben Nav, unten Search+CTA */
  gap: var(--header-gap);
  margin-bottom:16px;
  min-width:0;
  align-items:start;
}



/* LEFT: Logo/Partner belegt beide Reihen */
.header-main{
  grid-column:1;
  grid-row:1 / span 2;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
  align-items:flex-start;
}

/* TOP RIGHT: Language + Links + Icons (in der mittleren Spalte) */
.header-nav{
  grid-column: 2 / 4;   /* ✅ spannt über Mitte + rechte Spalte */
  grid-row: 1;
  justify-self: end;    /* ✅ ganz rechts am Header */
  align-self: start;

  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  min-width:0;
}


/* CENTER BOTTOM: Search */
.header-search{
  grid-column:2;
  grid-row:2;
  min-width:0;
  width:100%;
  justify-self:stretch;
  align-self:end;
  overflow:visible;
  position:relative;
  z-index:1;
}

/* Searchbar überbrückt den Grid-gap zur rechten Spalte -> endet am Button */
.header-searchbar{
  width: calc(100% + var(--header-gap) - 14px);
  max-width:none !important;
  margin:0 !important;

  display:flex;
  align-items:center;
  gap:10px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:999px;
  padding:14px 18px;
  box-shadow:0 14px 28px rgba(15,23,42,.06);
  min-width:0;
}

.header-searchbar .search-icon-img{
  width:18px;
  height:18px;
  display:block;
  object-fit:contain;
  user-select:none;
  pointer-events:none;
  opacity:.9;
  flex:0 0 auto;
}

.header-search-input{
  border:none;
  outline:none;
  background:transparent;
  font-size:16px;
  color:var(--text-main);
  width:100%;
  min-width:0;
  font-weight:400;
}

/* RIGHT BOTTOM: CTA Button */
.peptid-btn{
  grid-column:3;
  grid-row:2;
  justify-self:end;
  align-self:end;
}

/* ✅ Mobile: Layout */
@media (max-width: 940px){
  .header{
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "nav"
      "cta"
      "search";
    grid-template-rows: auto auto auto auto;
    gap: 6px;
    align-items: start;
  }

  /* nur Nav etwas tiefer */
  .header-nav{
    margin-top: 40px;
  }

  /* Mobile: Logo + Partner zentriert */
  .header-main{
    grid-area: main;
    align-items: center;
    text-align: center;
  }

  .logo-wrap{
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 0;
    padding-right: 0;
  }

  .partner-row{
    justify-content: center;
    margin-left: 0 !important;
    margin-top: 0 !important;
  }

  /* Nav-Layout */
  .header-nav{
    grid-area: nav;
    width: 100%;
    display: flex;
    align-items: center;
    justify-self: center;
    justify-content: center;
    gap: 10px;
  }

  .nav-links{ justify-content: center; }

  .peptid-btn{
    grid-area: cta;
    width: 100%;
    justify-content: center;
  }

  .header-search{
    grid-area: search;
    width: 100%;
  }

  .header-searchbar{ width: 100%; }
}

/* =========================
   LOGO
========================= */
.logo-wrap{
  position:relative;
  display:inline-block;
  padding:10px 6px 22px 6px;
}

.logo{
  font-family:"Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size:var(--logo-size);
  line-height:1;
  letter-spacing:-.02em;
  display:inline-flex;
  align-items:center;
  gap:.07em;
  user-select:none;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  position:relative;
  z-index:2;
}

.logo .swiss{ color:var(--swiss); font-weight:600; }
.logo .peps{
  color:#000;
  font-weight:700;
  display:inline-block;
  transform-origin:left center;
  transform:scale(.985);
  letter-spacing:-.003em;
}

.logo .plus{
  width:.55em;
  height:.55em;
  position:relative;
  display:inline-block;
  margin-left:.06em;
  transform:translateY(-.07em);
  transform-origin:50% 50%;
  animation:plusSpin 900ms cubic-bezier(.2,.9,.2,1) 220ms 1 both;
}
.logo .plus::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:.03em;
  background:
    linear-gradient(var(--swiss), var(--swiss)) center/100% .18em no-repeat,
    linear-gradient(var(--swiss), var(--swiss)) center/.18em 100% no-repeat;
}
@keyframes plusSpin{
  0%{ transform:translateY(-.07em) rotate(-120deg); opacity:0; }
  45%{ opacity:1; }
  100%{ transform:translateY(-.07em) rotate(0deg); opacity:1; }
}

.scan-wrap{
  position:absolute;
  left:0; right:0;
  bottom:6px;
  height:18px;
  pointer-events:none;
  z-index:1;
}
.scan-line{
  position:absolute;
  left:0;
  top:50%;
  height:3px;
  width:100%;
  transform:translateY(-50%) scaleX(0);
  transform-origin:left center;
  background:linear-gradient(
    90deg,
    rgba(17,40,122,.12) 0%,
    rgba(17,40,122,.95) 55%,
    rgba(17,40,122,.60) 100%
  );
  border-radius:999px;
  animation:lineGrow 1920ms ease-out 550ms 1 forwards;
}
@keyframes lineGrow{
  0%{ transform:translateY(-50%) scaleX(0); opacity:0; }
  10%{ opacity:1; }
  100%{ transform:translateY(-50%) scaleX(1); opacity:1; }
}
@media (prefers-reduced-motion: reduce){
  .logo .plus{ animation:none; }
  .scan-line{ animation:none; display:none; }
}

/* =========================
   Partner (Syncom) – Overlay (keine Layout-Verschiebung)
========================= */
.partner-row{
  position: absolute;
  left: var(--partner-left, 170px);
  top: calc(100% - 22px);
  display: inline-flex;
  align-items: center;
  gap: var(--partner-gap, 8px);
  margin: 0 !important;
  line-height: 1;
  white-space: nowrap;
  max-width: 100%;
}

.partner-text{
  font-size: 12px;
  color: #111827;
  font-weight: 800;
  letter-spacing: .02em;
  transform: translateY(-1px);
}

.partner-logo{
  height: var(--synlogo-h, 26px);
  width: auto;
  object-fit: contain;
  transform: translateY(-2px);
  max-width: 100%;
}



/* ✅ wichtig: parent muss position:relative haben */
.header-main{ position: relative; }

/* Mobile: zentrieren falls du mobile zentriert willst */
@media (max-width: 940px){
  .partner-row{
    left: 50%;
    transform: translateX(-50%);
  }
}


/* =========================
   NAV / BUTTONS
========================= */
.lang-switch{
  display:inline-flex;
  background:#e5e7eb;
  border-radius:999px;
  padding:2px;
  border:1px solid #d1d5db;
  flex:0 0 auto;
}
.lang-btn{
  border:none;
  background:transparent;
  font-size:11px;
  padding:4px 9px;
  border-radius:999px;
  cursor:pointer;
  color:#4b5563;
  font-weight:800;
  white-space:nowrap;
}
.lang-btn.active{
  background:var(--accent);
  color:#fff;
  box-shadow:0 6px 14px rgba(17,40,122,.25);
}

.nav-links{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
  min-width:0;
  max-width:100%;
}

@media (max-width: 940px){
  .nav-links{
    justify-content:flex-start;
  }
}

.nav-link-text{
  font-size:13px;
  color:#4b5563;
  text-decoration:none;
  padding:6px 8px;
  border-radius:999px;
  border:1px solid transparent;
  font-weight:800;
  transition:color .12s ease-out, border-color .12s ease-out, background .12s ease-out;
  white-space:nowrap;
}
.nav-link-text:hover{
  color:#0f172a;
  border-color:#e5e7eb;
  background:#fff;
}

.nav-link-pill{
  font-size:13px;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid #cbd5e1;
  background:#fff;
  color:#0f172a;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-weight:800;
  box-shadow:0 6px 16px rgba(148,163,184,.16);
  transition:background .12s ease-out, border-color .12s ease-out, box-shadow .12s ease-out, transform .08s ease-out, color .12s ease-out;
  white-space:nowrap;
}
.nav-link-pill:hover{
  background:rgba(17,40,122,.08);
  border-color:var(--accent);
  box-shadow:0 10px 24px rgba(15,23,42,.16);
  transform:translateY(-1px);
}

.peptid-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 20px;
  min-width:var(--peptid-btn-minw);
  border-radius:14px;
  border:1px solid var(--accent);
  background:var(--accent);
  color:#fff;
  text-decoration:none;
  font-weight:800;
  font-size:16px;
  box-shadow:0 14px 28px rgba(17,40,122,.22);
  transition:transform .08s ease-out, box-shadow .12s ease-out, background .12s ease-out, border-color .12s ease-out;
  white-space:nowrap;
}
.peptid-btn:hover{
  background:#000;
  border-color:#000;
  box-shadow:0 18px 34px rgba(15,23,42,.22);
  transform:translateY(-1px);
}

.peptid-btn-icon{
  width:var(--peptid-btn-icon);
  height:var(--peptid-btn-icon);
  object-fit:contain;
  flex:0 0 auto;
  filter:brightness(0) invert(1);
  opacity:.95;
  user-select:none;
  pointer-events:none;
}

.icon-button{
  position:relative;
  width:38px;
  height:38px;
  border-radius:999px;
  border:1px solid #e5e7eb;
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:var(--shadow-chip);
  transition:transform .12s ease-out, box-shadow .12s ease-out, border-color .12s ease-out, background .12s ease-out;
  text-decoration:none;
  padding:0;
  flex:0 0 auto;
}
.icon-button:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 24px rgba(15,23,42,.12);
  border-color:var(--accent);
  background:#f9fafb;
}

.nav-icon{
  width:18px;
  height:18px;
  object-fit:contain;
  user-select:none;
  pointer-events:none;
}

.cart-badge{
  position:absolute;
  top:-4px;
  right:-2px;
  min-width:16px;
  height:16px;
  border-radius:999px;
  background:var(--accent);
  border:1px solid #f9fafb;
  font-size:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  color:#fff;
  padding:0 4px;
  transform-origin:center;
}

/* Mini cart */
.mini-cart{
  position:absolute;
  top:115%;
  right:0;
  width:260px;
  max-height:320px;
  background:rgba(15,23,42,.97);
  border-radius:18px;
  padding:8px 8px 10px;
  box-shadow:0 18px 40px rgba(15,23,42,.7);
  border:1px solid rgba(148,163,184,.7);
  color:#e5e7eb;
  opacity:0;
  pointer-events:none;
  transform:translateY(6px);
  transition:opacity .16s ease-out, transform .16s ease-out;
  z-index:45;
  backdrop-filter:blur(12px);
}
.mini-cart.visible{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}

/* ✅ Checkout loading overlay */
.checkout-loading-overlay{
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 9999;
}

.checkout-loading-card{
  width: min(420px, calc(100% - 32px));
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(148,163,184,0.45);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  padding: 18px 16px;
  text-align: center;
}

.checkout-spinner{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(17, 40, 122, 0.18);
  border-top-color: rgba(17, 40, 122, 0.95);
  margin: 2px auto 10px;
  animation: checkoutSpin 0.8s linear infinite;
}

@keyframes checkoutSpin { to { transform: rotate(360deg); } }

.checkout-loading-text{
  font-weight: 900;
  letter-spacing: -0.01em;
}

.checkout-loading-sub{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(15,23,42,0.65);
}
:root{ --banner-gap: 30px; }  /* hier ändern */

.top-banner-bleed{
  margin-bottom: var(--banner-gap);
}
