/* =========================================================
   Apothekeversand.de – UI (Header + Filter + Cards)
   Datei: /css/apotheke-ui.css
   ========================================================= */

:root{
  --bg:#f5f7fb;
  --surface:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e5e7eb;

  --primary:#0b66ff;
  --primaryHover:#0a57d9;

  --radius:14px;
  --radiusSm:12px;
  --shadow:0 10px 30px rgba(2, 8, 23, .06);
  --shadowSm:0 6px 18px rgba(2, 8, 23, .06);

  --controlH:44px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}

/* Container */
.wrap{
  max-width:1200px;
  margin:0 auto;
  padding:14px 16px;
}

/* Header */
.site-header{
  background:var(--surface);
  border-bottom:1px solid var(--border);
}

.topbar{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
}

.brand__title{
  font-size:22px;
  font-weight:800;
  line-height:1.1;
  margin:0;
}
.brand__subtitle{
  margin-top:6px;
  font-size:13px;
  color:var(--muted);
}

/* Template Switch */
.tpl-form{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:220px;
  align-items:flex-end;
}
.tpl-form .field__label{
  font-size:12px;
  color:var(--muted);
}

/* Panels */
.panel{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadowSm);
  padding:14px;
}

/* Fields */
.field{display:flex;flex-direction:column;gap:6px}
.field__label{
  font-size:12px;
  color:var(--muted);
}

.control{
  width:100%;
  height:var(--controlH);
  padding:0 12px;
  border:1px solid #d1d5db;
  border-radius:12px;
  background:#fff;
  color:var(--text);
  outline:none;
}
.control::placeholder{color:#94a3b8}
.control:focus{
  border-color:rgba(11,102,255,.55);
  box-shadow:0 0 0 4px rgba(11,102,255,.12);
}

/* =========================================================
   Apothekeversand.de – Header (Med-Preisvergleich Stil)
   Datei: /css/apotheke-header.css
   ========================================================= */

:root{
  --ap-bg:#ffffff;
  --ap-border:#e5e7eb;
  --ap-text:#111827;
  --ap-muted:#6b7280;

  --ap-orange:#e86a00;
  --ap-orange2:#f39b2e;
  --ap-orangeDark:#c85a00;

  --ap-green:#4b7a2a;
  --ap-shadow:0 10px 26px rgba(2,8,23,.10);
  --ap-shadow2:0 6px 16px rgba(2,8,23,.08);

  --ap-radius:12px;
  --ap-radiusLg:16px;
}

.ap-wrap{
  max-width:1200px;
  margin:0 auto;
  padding:0 16px;
}

/* Screen-reader only */
.sr-only{
  position:absolute !important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

.ap-header{
  background:var(--ap-bg);
  border-bottom:1px solid var(--ap-border);
}

/* -------- Top row (Logo + Info + Teaser + Template) -------- */
.ap-top{
  background:#f8fafc;
}
.ap-top__inner{
  display:grid;
  grid-template-columns: 240px 1fr auto;
  gap:14px;
  align-items:center;
  padding:14px 0;
}

.ap-logo{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:var(--ap-text);
  min-height:56px;
}
.ap-logo__mark{
  width:56px;height:56px;
  border-radius:14px;
  background:
    radial-gradient(circle at 30% 35%, rgba(255,255,255,.7), rgba(255,255,255,0) 55%),
    linear-gradient(135deg, var(--ap-orange2), var(--ap-orange));
  box-shadow:var(--ap-shadow2);
}
.ap-logo__name{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}
.ap-logo__title{
  font-weight:900;
  font-size:18px;
  /* BRAND NO SHOW (kommt step2) -> hidden */
  display:none;
}
.ap-logo__sub{
  font-size:12px;
  color:var(--ap-muted);
  /* optional: kannst du zeigen lassen, wenn du willst */
  display:none;
}

.ap-info{
  color:var(--ap-text);
}
.ap-info__head{
  font-weight:800;
  font-size:14px;
  margin:0 0 6px 0;
}
.ap-info__list{
  margin:0;
  padding:0 0 0 18px;
  color:#374151;
  font-size:13px;
  line-height:1.45;
}
.ap-info__list li{margin:2px 0}

.ap-topright{
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.ap-app{
  font-size:13px;
  color:#374151;
  text-align:right;
}
.ap-app a{
  color:var(--ap-orange);
  font-weight:800;
  text-decoration:none;
}
.ap-app a:hover{text-decoration:underline}

/* Template Select (klein, clean) */
.ap-tpl{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:180px;
}
.ap-tpl label{
  font-size:12px;
  color:var(--ap-muted);
}
.ap-tpl select{
  height:40px;
  border-radius:12px;
  border:1px solid #d1d5db;
  padding:0 12px;
  background:#fff;
  outline:none;
}
.ap-tpl select:focus{
  border-color:rgba(232,106,0,.6);
  box-shadow:0 0 0 4px rgba(232,106,0,.15);
}

/* -------- Actionbar (Kategorien + Suche) -------- */
.ap-actionbar{
  background:linear-gradient(90deg, var(--ap-orange), var(--ap-orange2));
}
.ap-actionbar__inner{
  display:grid;
  grid-template-columns: 180px 1fr;
  gap:12px;
  align-items:center;
  padding:10px 0;
}

.ap-catbtn{
  height:46px;
  border-radius:12px;
  border:2px solid rgba(255,255,255,.35);
  background:rgba(0,0,0,.12);
  color:#fff;
  font-weight:900;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  user-select:none;
}
.ap-catbtn:hover{background:rgba(0,0,0,.18)}
.ap-catbtn:active{transform:translateY(1px)}
.ap-catbtn svg{width:18px;height:18px}

/* Search */
.ap-search{
  display:flex;
  gap:10px;
  align-items:center;
}
.ap-search__field{
  position:relative;
  flex:1;
}
.ap-search input[type="search"]{
  width:100%;
  height:46px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.18);
  padding:0 92px 0 14px;
  outline:none;
  background:#fff;
  font-size:14px;
}
.ap-search input[type="search"]:focus{
  border-color:rgba(0,0,0,.28);
  box-shadow:0 0 0 4px rgba(255,255,255,.25);
}

.ap-search__iconbtn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  height:36px;
  width:36px;
  border-radius:10px;
  border:1px solid #e5e7eb;
  background:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.ap-search__iconbtn:hover{filter:brightness(0.98)}
.ap-search__iconbtn:active{transform:translateY(-50%) translateY(1px)}

.ap-search__mic{right:48px}
.ap-search__clear{right:8px}
.ap-search__clear[disabled]{opacity:.45; cursor:default}

.ap-search__submit{
  height:46px;
  border-radius:12px;
  border:2px solid rgba(255,255,255,.45);
  background:rgba(255,255,255,.18);
  color:#fff;
  font-weight:900;
  padding:0 16px;
  cursor:pointer;
  display:flex;
  gap:10px;
  align-items:center;
}
.ap-search__submit:hover{background:rgba(255,255,255,.25)}
.ap-search__submit:active{transform:translateY(1px)}
.ap-search__submit svg{width:18px;height:18px}

/* -------- Quicknav (Top Kategorien links) -------- */
.ap-quicknav{
  background:#fff;
  border-bottom:1px solid var(--ap-border);
}
.ap-quicknav__inner{
  display:flex;
  align-items:center;
  gap:14px;
  padding:10px 0;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
.ap-quicknav__inner a{
  white-space:nowrap;
  text-decoration:none;
  color:#111827;
  font-weight:800;
  font-size:13px;
  padding:8px 10px;
  border-radius:999px;
}
.ap-quicknav__inner a:hover{background:#f3f4f6}
.ap-quicknav__all{
  background:#111827;
  color:#fff !important;
}
.ap-quicknav__all:hover{filter:brightness(1.05); background:#111827}

/* -------- Mega menu -------- */
.ap-mega[hidden]{display:none}
.ap-mega{
  position:fixed;
  inset:0;
  z-index:999;
}
.ap-mega__overlay{
  position:absolute;
  inset:0;
  background:rgba(2,8,23,.45);
}
.ap-mega__panel{
  position:relative;
  margin-top:18px;
  background:#fff;
  border-radius:16px;
  box-shadow:var(--ap-shadow);
  overflow:hidden;
}
.ap-mega__cols{
  display:grid;
  grid-template-columns: 280px 1fr;
  min-height:420px;
}

.ap-mega__left{
  background:#f8fafc;
  border-right:1px solid var(--ap-border);
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.ap-mega__item{
  width:100%;
  text-align:left;
  border:1px solid transparent;
  background:#fff;
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-weight:900;
  color:#111827;
}
.ap-mega__item:hover{border-color:#e5e7eb}
.ap-mega__item[aria-selected="true"]{
  border-color:rgba(232,106,0,.35);
  box-shadow:0 0 0 4px rgba(232,106,0,.12);
}
.ap-mega__count{
  font-weight:900;
  font-size:12px;
  color:#6b7280;
}
.ap-mega__item--all{
  background:#111827;
  color:#fff;
  border-color:#111827;
  text-decoration:none;
  display:flex;
  align-items:center;
  justify-content:center;
}
.ap-mega__item--all:hover{filter:brightness(1.05)}

.ap-mega__right{
  padding:16px;
}
.ap-mega__subhead{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.ap-mega__title{
  font-size:16px;
  font-weight:1000;
}
.ap-mega__more{
  text-decoration:none;
  font-weight:900;
  color:var(--ap-orangeDark);
}
.ap-mega__more:hover{text-decoration:underline}

.ap-mega__grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:8px 14px;
}
.ap-mega__grid a{
  text-decoration:none;
  color:#111827;
  font-weight:700;
  font-size:13px;
  padding:8px 10px;
  border-radius:10px;
}
.ap-mega__grid a:hover{background:#f3f4f6}

@media (max-width:980px){
  .ap-top__inner{
    grid-template-columns: 1fr;
  }
  .ap-info{display:none;}
  .ap-topright{justify-content:space-between}
  .ap-actionbar__inner{grid-template-columns:1fr}
  .ap-catbtn{width:100%}
  .ap-search{width:100%}
  .ap-mega__cols{grid-template-columns:1fr}
  .ap-mega__left{border-right:none;border-bottom:1px solid var(--ap-border)}
  .ap-mega__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:560px){
  .ap-app{display:none}
  .ap-mega__grid{grid-template-columns:1fr}
}

/* Hint */
.hint{
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--muted);
  font-size:12px;
  padding:10px 12px;
  border:1px dashed #d1d5db;
  border-radius:12px;
  background:#fbfdff;
}

/* (Optional) Cards/Produkte – falls du auch den Rest aus dem Inline-CSS rausziehen willst */
.products{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:12px}
@media(max-width:980px){.products{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.products{grid-template-columns:1fr}}

.card{background:#fff;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;box-shadow:var(--shadowSm)}
.img{aspect-ratio:1/1;background:#f1f5f9;display:flex;align-items:center;justify-content:center}
.img img{max-width:100%;max-height:100%;object-fit:contain}
.card .c{padding:10px;display:flex;flex-direction:column;gap:6px}
.t{font-size:13px;line-height:1.25;font-weight:800}
.meta{font-size:12px;color:#475569}
.price{font-size:14px;font-weight:900}
.go{margin-top:auto;padding:10px}
.go a{display:block;text-align:center;text-decoration:none;background:#111827;color:#fff;padding:10px;border-radius:12px;font-weight:900}
.go a:hover{filter:brightness(1.05)}

.pager{display:flex;justify-content:space-between;align-items:center;margin-top:12px}
.pager a{color:var(--primary);text-decoration:none;font-weight:800}
.pager a:hover{text-decoration:underline}