/* Digitale-Apotheke 1.0 platform replacement CSS
   Used by: linden-apotheke-teutschenthal.de, hubertus-apotheke-en.de
   Restores: layout, horizontal nav, header band, content sections, cookie banner */

/* ==========  Reset / baseline ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Open Sans', 'Lato', Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #2a1820;
  background: #fff5f8;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #2f7a3a; text-decoration: none; }
a:hover { color: #1c5824; text-decoration: underline; }

/* ==========  Header ========== */
header, .header, .site-header, #header {
  background: linear-gradient(135deg, #4a8d3a 0%, #2f7a3a 100%);
  color: white;
  padding: 20px 0;
  border-bottom: 4px solid #c9d36b;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
header .container, header > div, .site-header > div {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
header h1, .site-title { font-size: 26px; font-weight: 700; color: white; margin: 0; }
header img.logo, .site-logo { max-height: 64px; width: auto; }

/* ==========  Navigation ========== */
nav, .nav, .navigation, #site-navigation, header ul {
  display: flex;
  flex-wrap: wrap;
}
nav ul, .nav ul, header ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
nav ul li, .nav ul li, header ul li, header li {
  display: inline-flex !important;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav ul li a, .nav ul li a, header ul li a, header li a {
  display: inline-block;
  padding: 10px 16px;
  color: white;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
  border-radius: 3px;
  transition: background 0.2s;
}
nav ul li a:hover, header ul li a:hover { background: rgba(255,255,255,0.15); text-decoration: none; }

/* On dark header, override default link color */
header a, header nav a { color: white; }

/* ==========  Main content ========== */
main, .main, #main, .content, .site-content, .entry-content, article {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 20px;
}
main > section, main > article, .content > section, .entry-content > section,
section, .section {
  background: white;
  padding: 28px 24px;
  margin-bottom: 24px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

h1, h2, h3, h4 { color: #2f7a3a; margin-top: 0; line-height: 1.25; }
h1 { font-size: 32px; font-weight: 700; margin-bottom: 18px; }
h2 { font-size: 24px; font-weight: 600; margin-bottom: 14px; border-bottom: 2px solid #c9d36b; padding-bottom: 8px; }
h3 { font-size: 19px; font-weight: 600; margin-bottom: 12px; color: #4a8d3a; }
h4 { font-size: 16px; font-weight: 600; margin-bottom: 10px; }

p { margin: 0 0 14px 0; }
ul, ol { margin: 0 0 16px 0; padding-left: 26px; }
li { margin-bottom: 6px; }

/* ==========  Buttons ========== */
button, .button, input[type="submit"], .btn {
  display: inline-block;
  padding: 10px 22px;
  background: #2f7a3a;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
button:hover, .button:hover, .btn:hover { background: #1c5824; color: white; text-decoration: none; }
.btn-secondary, button.secondary { background: #c9d36b; color: #2a1820; }
.btn-secondary:hover { background: #a8b552; }

/* ==========  Cards / grid ========== */
.card, .feature-box, .box {
  background: white;
  padding: 22px;
  border-radius: 6px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  margin-bottom: 20px;
}
.cards, .features, .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* ==========  Footer ========== */
footer, .footer, #footer {
  background: #2a1820;
  color: #c9d36b;
  padding: 36px 20px;
  margin-top: 40px;
  font-size: 14px;
}
footer a, footer a:visited { color: #c9d36b; }
footer a:hover { color: white; }
footer .container { max-width: 1200px; margin: 0 auto; }
footer p { margin: 0 0 8px 0; }

/* ==========  Cookie banner ========== */
.cookie-notice, .cookie-banner, #cookie-notice, #cookie-banner,
.da-cookie-consent, #da-cookie-consent, .cookie-consent,
[class*="cookie"]:not([class*="cookie-product"]) {
  position: fixed !important;
  bottom: 0 !important;
  left: 0; right: 0;
  background: rgba(42, 59, 37, 0.95) !important;
  color: white !important;
  padding: 16px 20px !important;
  z-index: 9999 !important;
  font-size: 13px !important;
  box-shadow: 0 -3px 12px rgba(0,0,0,0.2);
  max-height: 50vh;
  overflow-y: auto;
}
.cookie-notice button, .cookie-banner button, .da-cookie-consent button,
[class*="cookie"] button { margin: 0 4px; }

/* ==========  Mobile responsive ========== */
@media (max-width: 768px) {
  header .container, header > div { flex-direction: column; gap: 12px; }
  nav ul, header ul { flex-direction: column; align-items: stretch; gap: 2px; }
  nav ul li a, header li a { display: block; padding: 8px 12px; }
  h1 { font-size: 26px; }
  h2 { font-size: 20px; }
  main { padding: 0 12px; }
  section, .section { padding: 18px 14px; }
}

/* ==========  Misc ========== */
.alert, .notice {
  background: #fff3cd;
  border-left: 4px solid #f0c040;
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 3px;
}
.alert-success, .alert.success { background: #d4edda; border-left-color: #2f7a3a; }

/* Tables */
table { border-collapse: collapse; width: 100%; margin-bottom: 16px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e0e6d4; }
th { background: #f0f5e8; color: #2a1820; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Forms */
input[type="text"], input[type="email"], input[type="tel"], input[type="search"],
textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c0d4a8;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  background: white;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: #2f7a3a; }
label { display: block; margin-bottom: 6px; font-weight: 600; color: #2a1820; }

/* Hide WP admin bar offset */
html { margin-top: 0 !important; }

/* Sticky header on scroll? keep simple */
.is-fixed { position: sticky; top: 0; z-index: 100; }

/* Replace missing images with placeholder background */
img:not([src]),
img[src=""] {
  display: inline-block;
  width: 100%;
  height: 200px;
  background: #e8efd4;
  position: relative;
}

/* ========== Bootstrap-3 grid + product cards (scoped to main content, NOT header) ========== */
.row { display: block; margin-left: -10px; margin-right: -10px; }
.row:before, .row:after { content: " "; display: table; }
.row:after { clear: both; }
[class*="col-"] { position: relative; min-height: 1px; padding-left: 10px; padding-right: 10px; box-sizing: border-box; }

/* Grid scoped to main content + shop section, NOT inside header */
main .col-xs-1,#content .col-xs-1{width:8.333%;float:left}
main .col-xs-2,#content .col-xs-2{width:16.666%;float:left}
main .col-xs-3,#content .col-xs-3{width:25%;float:left}
main .col-xs-4,#content .col-xs-4{width:33.333%;float:left}
main .col-xs-6,#content .col-xs-6{width:50%;float:left}
main .col-xs-12,#content .col-xs-12{width:100%;float:left}

@media (min-width: 768px){
  main .col-sm-1,#content .col-sm-1{width:8.333%;float:left}
  main .col-sm-2,#content .col-sm-2{width:16.666%;float:left}
  main .col-sm-3,#content .col-sm-3{width:25%;float:left}
  main .col-sm-4,#content .col-sm-4{width:33.333%;float:left}
  main .col-sm-6,#content .col-sm-6{width:50%;float:left}
  main .col-sm-8,#content .col-sm-8{width:66.666%;float:left}
  main .col-sm-9,#content .col-sm-9{width:75%;float:left}
  main .col-sm-12,#content .col-sm-12{width:100%;float:left}
}

@media (min-width: 992px){
  main .col-md-3,#content .col-md-3{width:25%;float:left}
  main .col-md-4,#content .col-md-4{width:33.333%;float:left}
  main .col-md-6,#content .col-md-6{width:50%;float:left}
  main .col-md-8,#content .col-md-8{width:66.666%;float:left}
}

.clearfix:before,.clearfix:after{content:" ";display:table}.clearfix:after{clear:both}

/* Header layout — aside FULL width with logo + horizontal menu, image goes below */
header .wrapper, header .wrapper.clearfix, #header .wrapper, #header .wrapper.clearfix { display: block; width: 100%; }
header aside.col-sm-3, #header aside.col-sm-3 {
  float: none !important; width: 100% !important; clear: both;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
  padding: 8px 16px; box-sizing: border-box;
}
header aside.col-sm-3 .phone-mail { flex: 0 0 auto; display: flex; align-items: center; gap: 16px; }
header aside.col-sm-3 .phone-mail #logo img { max-height: 64px; width: auto; }
header aside.col-sm-3 nav { flex: 1; min-width: 250px; }
header aside.col-sm-3 .notdienst { flex: 0 0 auto; margin-left: auto; padding: 8px 18px; background: #c14d76; color: #fff; border-radius: 3px; font-weight: 600; text-decoration: none; }
header aside.col-sm-3 .notdienst:hover { background: #95374f; }
header .col-sm-9, #header .col-sm-9, header .col-sm-9.header-image {
  float: none !important; width: 100% !important; clear: both; display: block;
}
header .col-sm-12, #header .col-sm-12 { float: none !important; width: 100% !important; }
header .nav_btn { display: none; }


/* Header navigation — horizontal flex */
ul.nav, .menu-main-menu-front-page-container ul {
  list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0; align-items: center;
}
ul.nav > li, .menu-main-menu-front-page-container ul > li {
  display: inline-block; padding: 0; border: 0; flex: 0 0 auto;
}
ul.nav > li > a, .menu-main-menu-front-page-container ul > li > a {
  display: block; padding: 8px 12px; color: #2a1820; text-decoration: none;
  font-weight: 600; font-size: 13px; border-bottom: 0;
}
ul.nav > li > a:hover { color: #c14d76; }
ul.nav > li.current-menu-item > a { color: #c14d76; }

/* ========== Product card layout — for shop pages ========== */
.product-item {
  position: relative; background: #fff; border: 1px solid #e2d8db; border-radius: 5px;
  padding: 14px 12px 16px; margin-bottom: 18px; text-align: center;
  transition: box-shadow .2s, transform .15s; min-height: 290px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.product-item:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.08); transform: translateY(-2px); }
.product-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; }
.product-image { height: 130px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; overflow: hidden; }
.product-image img { max-height: 120px !important; max-width: 110px !important; width: auto !important; height: auto; object-fit: contain; }
.product-image a { display: block; line-height: 0; }
.product-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.product-info .title { font-size: 13px; line-height: 1.3; margin: 0 0 6px; min-height: 50px; }
.product-info .title a { color: #2a1820; text-decoration: none; font-weight: 600; display: block; }
.product-info .title a:hover { color: #c14d76; }
.product-info .price, .product-info .preis { font-size: 16px; font-weight: 700; color: #c14d76; margin: 6px 0; }
.product-info .pzn { font-size: 11px; color: #999; margin-bottom: 6px; }

/* Product grid cells inside .col-sm-9 (the shop content area) */
.col-sm-9 .col-sm-4, .col-sm-9 .col-xs-6 { float: left; box-sizing: border-box; padding: 0 10px; }
.col-sm-9 .col-xs-6 { width: 50%; }
@media (min-width: 768px) { .col-sm-9 .col-sm-4 { width: 33.333% !important; } }

/* jPlist UI */
.jplist-panel { background: #fff5f8; padding: 12px 14px; border-radius: 4px; margin-bottom: 14px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.jplist-select, .jplist-input { padding: 6px 10px; border: 1px solid #d4a8b8; border-radius: 3px; font-size: 13px; }
.jplist-pagination { display: flex; gap: 4px; flex-wrap: wrap; }
.jplist-pagination a, .jplist-pagination button { padding: 4px 10px; background: #fff; border: 1px solid #d4a8b8; border-radius: 3px; color: #2a1820; text-decoration: none; cursor: pointer; }
.jplist-pagination a:hover { background: #c14d76; color: #fff; }
.jplist-pagination .jplist-current, .jplist-pagination .selected { background: #c14d76; color: #fff; border-color: #c14d76; }

.pages, .page { display: block; clear: both; }
.pages:after, .page:after { content: " "; display: table; clear: both; }

/* Vorbestellung shop layout: sidebar 25% + content 75% */
.vorbestellung-wrapper > .col-sm-3, .vorbestellung-content .col-sm-3,
.vorbestellung-wrapper > .col-sm-9, .vorbestellung-content .col-sm-9 {
  float: left; box-sizing: border-box;
}
@media (min-width: 768px) {
  .vorbestellung-wrapper > .col-sm-3 { width: 25%; }
  .vorbestellung-wrapper > .col-sm-9 { width: 75%; }
}


/* ========== Gravity Forms (Rezept etc) — compact, collapsible ========== */
.gform_wrapper {
  max-width: 760px;
  margin: 18px auto 24px;
  background: #fff;
  border: 1px solid #e2d8db;
  border-radius: 6px;
  padding: 18px 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  position: relative;
}
/* Collapse by default — show only the form heading; expand on hover/focus-within */
.gform_wrapper { max-height: 56px; overflow: hidden; transition: max-height .3s ease; cursor: pointer; }
.gform_wrapper:focus-within, .gform_wrapper:hover { max-height: 4000px; cursor: default; }
.gform_wrapper::before {
  content: "Rezept einreichen ▼";
  display: block;
  background: #c14d76;
  color: #fff;
  padding: 12px 16px;
  margin: -18px -22px 14px;
  border-radius: 6px 6px 0 0;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.4px;
}
.gform_wrapper:focus-within::before, .gform_wrapper:hover::before {
  content: "Rezept einreichen ▲";
}

.gform_wrapper form { margin: 0; }
.gform_wrapper .gform_heading { display: none; }
.gform_wrapper .gform_body { display: block; }

.gform_wrapper ul.gform_fields { list-style: none; padding: 0; margin: 0 -8px; display: flex; flex-wrap: wrap; }
.gform_wrapper ul.gform_fields > li.gfield { flex: 0 0 50%; padding: 0 8px; margin-bottom: 12px; box-sizing: border-box; }
.gform_wrapper ul.gform_fields > li.gfield_full, .gform_wrapper ul.gform_fields > li[class*="gf_full_width"] { flex: 0 0 100%; }
@media (max-width: 600px) { .gform_wrapper ul.gform_fields > li.gfield { flex: 0 0 100%; } }

.gform_wrapper .gfield_label {
  display: block; font-weight: 600; font-size: 13px; color: #2a1820;
  margin-bottom: 4px; letter-spacing: 0.2px;
}
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper input[type="number"],
.gform_wrapper input[type="date"],
.gform_wrapper input[type="file"],
.gform_wrapper textarea,
.gform_wrapper select {
  width: 100%; padding: 7px 10px; font-size: 13px;
  border: 1px solid #d4a8b8; border-radius: 3px;
  background: #fff; box-sizing: border-box;
}
.gform_wrapper input:focus, .gform_wrapper textarea:focus, .gform_wrapper select:focus {
  border-color: #c14d76; outline: 0; box-shadow: 0 0 0 2px rgba(193,77,118,0.15);
}
.gform_wrapper textarea { min-height: 70px; max-height: 110px; resize: vertical; }

.gform_wrapper ul.gfield_radio, .gform_wrapper ul.gfield_checkbox {
  list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 14px;
}
.gform_wrapper ul.gfield_radio > li, .gform_wrapper ul.gfield_checkbox > li {
  margin: 0; display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px;
}
.gform_wrapper ul.gfield_radio input, .gform_wrapper ul.gfield_checkbox input { margin: 0; }

.gform_wrapper .gfield_required { color: #c0392b; margin-left: 3px; }
.gform_wrapper .gfield_description, .gform_wrapper .ginput_complex .ginput_full label { font-size: 11px; color: #888; }

.gform_wrapper .gform_footer {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid #f0e8d8;
}
.gform_wrapper .gform_footer .button, .gform_wrapper .gform_footer input[type="submit"] {
  background: #c14d76; color: #fff; padding: 10px 26px;
  border: 0; border-radius: 3px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background .2s;
}
.gform_wrapper .gform_footer .button:hover, .gform_wrapper .gform_footer input[type="submit"]:hover {
  background: #95374f;
}

/* Validation error */
.gform_wrapper .validation_error {
  background: #c0392b; color: #fff; padding: 10px 14px; border-radius: 3px;
  margin-bottom: 12px; font-size: 13px;
}
.gform_wrapper .gfield_error label { color: #c0392b; }
.gform_wrapper .gfield_error input, .gform_wrapper .gfield_error textarea, .gform_wrapper .gfield_error select {
  border-color: #c0392b; box-shadow: 0 0 0 1px rgba(192,57,43,0.18);
}

/* Compact spacing for known forms 2-5 (preorder/cart) — same rules apply */
