/* =================== Inter Font (self-hosted) =================== */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* =================== Basis =================== */
:root {
  --footer-h: 84px;
  --primary:        #15803d;
  --primary-hover:  #166534;
  --primary-light:  #f0fdf4;
  --primary-border: #bbf7d0;
  --price-bg:       #dc2626;
}

html, body {
  height: 100%;
  margin: 0;
  background-color: #f2ede5;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-top: 58px;
  color: #1e293b;
  line-height: 1.6;
}

/* =================== Navbar =================== */
.navbar.fixed-top {
  background: #fefcf8;
  border-bottom: 1px solid #e5ddd3;
  box-shadow: 0 1px 4px rgba(60,30,10,.07);
}

.navbar-brand, .navbar-brand:hover {
  color: var(--primary) !important;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 0;
}

.navbar-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #d4af37;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  flex-shrink: 0;
}

.navbar-brand-text {
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: .2px;
  background: linear-gradient(180deg, #7a4d00 0%, #c99012 50%, #f0c94c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 576px) {
  .navbar-logo { width: 34px; height: 34px; }
  .navbar-brand-text { font-size: 1rem; }
}

.navbar-icons {
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.navbar-icons a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: #6c757d;
  text-decoration: none;
  padding: .35rem .5rem;
  font-size: .875rem;
  font-weight: 500;
  border-radius: 6px;
  transition: color .15s, background .15s;
}

.navbar-icons a:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-label { display: none; }
@media (min-width: 769px) { .nav-label { display: inline; } }

/* =================== Footer =================== */
footer {
  background: #fefcf8;
  border-top: 1px solid #e5ddd3;
  padding: 1.25rem 1rem;
  color: #6c757d;
  font-size: .875rem;
}

footer a { color: #6c757d; text-decoration: none; }
footer a:hover { color: var(--primary); }

@media (min-width: 769px) {
  footer { height: var(--footer-h); display: flex; align-items: center; }
  .avoid-footer { margin-bottom: calc(var(--footer-h) + 1.25rem); }
}

/* =================== Cards =================== */
.card {
  background: #fefcf8;
  border: 1px solid #e5ddd3;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(60,30,10,.05);
  transition: box-shadow .2s, transform .2s;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(60,30,10,.1);
  transform: translateY(-2px);
}

.card-header {
  background: #f7f2eb;
  border-bottom: 1px solid #e5ddd3;
  padding: .875rem 1.25rem;
  font-weight: 600;
}

.card-header-title {
  margin: 0;
  padding: 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #1e293b;
}

.card-image { position: relative; }
.card-image figure img { display: block; }

/* Badge-Positionierung auf Produktbildern */
.badge-pos          { position: absolute; top: .6rem; z-index: 2; }
.badge-pos.badge-left  { left: .6rem; }
.badge-pos.badge-right { right: .6rem; }

.price-badge {
  position: absolute;
  right: .6rem;
  bottom: .6rem;
  z-index: 2;
  background: var(--price-bg);
  color: #fff;
  font-weight: 700;
  padding: .25rem .65rem;
  border-radius: 6px;
  font-size: .82rem;
}

/* =================== Buttons =================== */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* =================== Formulare =================== */
.form-control, .form-select {
  border-color: #ced4da;
  border-radius: 6px;
  color: #1e293b;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21,128,61,.15);
}

.form-label {
  font-size: .85rem;
  font-weight: 500;
  color: #495057;
  margin-bottom: .3rem;
}

.form-text { color: #6c757d; }
.form-check-label { color: #1e293b; }

.input-group-text {
  background: #f7f2eb;
  border-color: #ced4da;
  color: #6c757d;
}

input[readonly] { background: #f7f2eb !important; }

.is-invalid { border-color: #dc3545 !important; }
.invalid-feedback { color: #dc3545; font-size: .8rem; }

/* =================== Alerts =================== */
.alert { border-radius: 8px; }

/* =================== Tabellen =================== */
.table th {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6c757d;
  background: #f7f2eb;
}

.cart-table td, .cart-table th { vertical-align: middle; }

/* =================== Typografie =================== */
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }

.text-primary { color: var(--primary) !important; }

/* Konsistenter Seiten-Header */
.page-hero {
  padding: 2rem 0 1.5rem;
  margin-bottom: 0;
}

.page-hero .container {
  border-bottom: 1px solid #e5ddd3;
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

/* Bulma-Shims */
.section { padding: 3rem 1.5rem; }
.title    { font-weight: 700; color: #1e293b; }
.subtitle { color: #6c757d; }
.has-text-white       { color: #fff !important; }
.has-text-grey        { color: #6c757d !important; }
.has-text-grey-dark   { color: #1e293b !important; }
.has-text-grey-light  { color: #adb5bd !important; }
.has-text-centered    { text-align: center !important; }
.has-text-weight-bold     { font-weight: 700 !important; }
.has-text-weight-semibold { font-weight: 600 !important; }
.has-text-warning { color: #d97706 !important; }
.has-text-success { color: #16a34a !important; }
.has-text-danger  { color: #dc2626 !important; }
.has-text-primary { color: var(--primary) !important; }
.is-size-3 { font-size: 2rem !important; }
.is-size-5 { font-size: 1.25rem !important; }
.is-size-6 { font-size: 1rem !important; }
.is-size-7 { font-size: .82rem !important; }
.pt-8 { padding-top: 4rem !important; }
.pb-8 { padding-bottom: 4rem !important; }
.is-muted { opacity: .55; }
.icon { display: inline-flex; align-items: center; justify-content: center; }
.icon.is-large { width: 3rem; height: 3rem; font-size: 1.5rem; }
.icon.is-small  { width: 1.5rem; height: 1.5rem; }
.ml-auto { margin-left: auto !important; }

/* =================== Sterne =================== */
.text-warning { color: #d97706 !important; }
.text-success { color: #16a34a !important; }
.text-danger  { color: #dc2626 !important; }
.text-muted   { color: #6c757d !important; }

.stars { display: flex; flex-direction: row-reverse; justify-content: flex-start; gap: .25rem; }
.stars input { display: none; }
.stars label { cursor: pointer; font-size: 1.4rem; color: #ced4da; transition: color .15s; }
.stars label:hover, .stars label:hover ~ label { color: #d97706; }
.stars input:checked ~ label { color: #d97706; }

/* =================== Produkt-Badges =================== */
.badge { font-size: .72rem; font-weight: 600; }

/* =================== Galerie (ohne JS) =================== */
.g-radio { position: absolute; opacity: 0; pointer-events: none; }

.gallery-main {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #f7f2eb;
  border: 1px solid #e5ddd3;
}

.gallery-main figure { display: none; margin: 0; }
.gallery-main img    { width: 100%; display: block; }

#g1:checked ~ .gbox .fig-g1,
#g2:checked ~ .gbox .fig-g2,
#g3:checked ~ .gbox .fig-g3 { display: block; }

.thumbs { display: flex; gap: .5rem; margin-top: .5rem; }
.thumb { flex: 1; border-radius: 8px; overflow: hidden; border: 2px solid #dee2e6; cursor: pointer; transition: border-color .15s; }
.thumb img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.thumb:hover { border-color: var(--primary); }

#g1:checked ~ .gbox label[for="g1"],
#g2:checked ~ .gbox label[for="g2"],
#g3:checked ~ .gbox label[for="g3"] { border-color: var(--primary); }

/* =================== Tabs (Produktseite) =================== */
.tab-links a {
  display: inline-block;
  margin-right: .35rem;
  padding: .4rem .9rem;
  border-radius: 6px;
  background: #f7f2eb;
  border: 1px solid #e5ddd3;
  text-decoration: none;
  color: #6c757d;
  font-size: .9rem;
  font-weight: 500;
  transition: all .15s;
}

.tab-links a.is-active, .tab-links a:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.tab-pane { display: none; }
.tab-pane:first-of-type { display: block; }
.tab-pane:target { display: block; }
.card-body:has(.tab-pane:target) .tab-pane:first-of-type:not(:target) { display: none; }

/* =================== Mengenrabatt =================== */
.discount-card.is-compact {
  border-radius: 8px;
  background: #f7f2eb;
  border: 1px solid #e5ddd3;
}

.discount-list { list-style: none; margin: 0; padding: .25rem .5rem; }
.discount-item {
  display: grid; align-items: center; gap: .5rem;
  grid-template-columns: 1fr auto auto;
  padding: .4rem .5rem; border-radius: 6px;
}
.discount-item + .discount-item { border-top: 1px solid #e5ddd3; }
.discount-qty   { font-weight: 600; font-size: .9rem; white-space: nowrap; }
.discount-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-weight: 700; font-size: .7rem;
  background: var(--primary-light); border: 1px solid var(--primary-border);
  color: var(--primary); padding: .15rem .5rem; border-radius: 999px;
}
.discount-price { font-weight: 700; font-size: .95rem; white-space: nowrap; }
.discount-item.is-best { background: #fff7ed; }
.discount-note  { font-size: .75rem; color: #6c757d; padding: .2rem .5rem .4rem; }

@media (max-width: 768px) {
  .discount-item { grid-template-columns: 1fr auto; grid-template-areas: "qty price" "badge price"; }
  .discount-qty   { grid-area: qty; }
  .discount-badge { grid-area: badge; }
  .discount-price { grid-area: price; justify-self: end; }
}

/* =================== Checkout CSS-only Logik =================== */
form:has(select[name="addr_type"] option[value="street"]:checked) .addr-packstation { display: none; }
form:has(select[name="addr_type"] option[value="packstation"]:checked) .addr-street  { display: none; }

.contact-fields .contact-field { display: block; }
form:has(select[name="contact"] option[value="session"]:checked)  .contact-fields .contact-field  { display: none; }
form:has(select[name="contact"] option[value="session"]:checked)  .contact-fields .field-mail     { display: block; }
form:has(select[name="contact"] option[value="threema"]:checked)  .contact-fields .contact-field  { display: none; }
form:has(select[name="contact"] option[value="threema"]:checked)  .contact-fields .field-threema  { display: block; }
form:has(select[name="contact"] option[value="telegram"]:checked) .contact-fields .contact-field  { display: none; }
form:has(select[name="contact"] option[value="telegram"]:checked) .contact-fields .field-telegram { display: block; }

.bill-fields { display: none; }
form:has(input[name="bill_enable"]:checked) .bill-fields { display: block; }

/* =================== Warenkorb =================== */
.summary-card {
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: 10px;
  padding: 1.25rem;
}

.summary-row { display: flex; justify-content: space-between; align-items: center; margin: .3rem 0; }
.summary-row strong { font-weight: 700; }

/* =================== Breadcrumbs =================== */
.breadcrumbs-wrap {
  background: #f7f2eb;
  border-radius: 6px;
  padding: .35rem .875rem;
  display: inline-block;
  border: 1px solid #e5ddd3;
}

.breadcrumb { margin: 0; }
.breadcrumb-item a { color: #6c757d; text-decoration: none; }
.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-item.active { color: #1e293b; }

.product-title { color: #1e293b; font-size: 1.4rem; }

/* =================== FAQ Details =================== */
details summary {
  cursor: pointer;
  list-style: none;
  padding: .6rem 0;
  color: #1e293b;
  font-weight: 500;
  transition: color .15s;
}
details summary:hover { color: var(--primary); }
details summary::marker { display: none; }
details[open] summary { color: var(--primary); }
details p { color: #6c757d; padding: .35rem 0 .5rem 1rem; border-left: 3px solid var(--primary); margin: .25rem 0 0 .25rem; }

/* =================== KPI =================== */
.kpi { display: flex; align-items: baseline; gap: .5rem; }
.kpi .num { font-size: 2rem; font-weight: 800; }

/* =================== Chips =================== */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .7rem; border-radius: 999px;
  border: 1px solid #e5ddd3;
  background: #fff; font-size: .82rem;
}

/* =================== Fokus =================== */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* =================== Sonstiges =================== */
hr { border-color: #e5ddd3; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #ede8e0; }
::-webkit-scrollbar-thumb { background: #c8bfb4; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #a89e92; }

/* =================== Produktkarte =================== */
.product-card-name  { font-size: .95rem; line-height: 1.3; }
.product-card-desc  { font-size: .8rem;  line-height: 1.4; }
.product-card-meta  { font-size: .8rem; }
.product-card-stars { font-size: .75rem; }
.product-img        { object-fit: cover; }
.product-img.oos    { filter: grayscale(40%); }
.oos-overlay        { background: rgba(255,255,255,.55); z-index: 3; }

/* =================== Produktseite =================== */
.stars-display  { font-size: .9rem; }
.tier-label     { font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }
.tier-discount  { font-size: .7rem; }
.review-stars   { font-size: .85rem; }

/* =================== Kontakt =================== */
.contact-card-header          { padding: 1.25rem; }
.contact-card-header.telegram { background: rgba(0,136,204,.25); }

/* =================== Warenkorb =================== */
.cart-heading { font-size: 1.2rem; }
.cart-subheading { font-size: 1.1rem; }
.cart-product-thumb { width: 48px; height: 48px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.cart-product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.qty-input { width: 7rem; text-align: center; }

/* =================== Utilities =================== */
.captcha-img     { height: 52px; border: 1px solid #e5e5e5; border-radius: 6px; }
.page-spacer     { height: 4rem; }
.container-narrow { max-width: 980px; }

/* =================== Hero Carousel =================== */
.hero-carousel { overflow: hidden; margin-top: -1.5rem; }

.hero-slide {
  height: 460px;
  padding: 2rem 0;
  position: relative;
  overflow: hidden;
}

.hero-slide--1 {
  background: radial-gradient(circle at 78% 45%, #1f6b45 0%, #0d3b27 45%, #061d13 100%);
}
.hero-slide--2 {
  background: radial-gradient(circle at 78% 45%, #3a2a12 0%, #141008 45%, #050505 100%);
}
.hero-slide--3 {
  background: radial-gradient(circle at 78% 45%, #31456f 0%, #131d36 45%, #070b15 100%);
}

.hero-title {
  font-size: 2.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: .75rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.25);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,.88);
  margin-bottom: 1.5rem;
  max-width: 540px;
}

.hero-cta {
  background: #fff;
  color: var(--primary);
  border: none;
  font-weight: 700;
  padding: .65rem 1.75rem;
}
.hero-cta:hover {
  background: #f0fdf4;
  color: var(--primary-hover);
}

.hero-slide-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 2rem;
}

.hero-text { flex: 1; min-width: 0; }

.hero-logo-img {
  height: 300px;
  width: auto;
  flex-shrink: 0;
  margin-right: 5rem;
  pointer-events: none;
  user-select: none;
}

.hero-media-wrap {
  flex-shrink: 0;
  width: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-media {
  display: block;
  width: 380px;
  height: 380px;
  object-fit: cover;
  border-radius: 26px;
  border: 2px solid rgba(212, 175, 55, .55);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  background: #000;
}

@media (max-width: 992px) {
  .hero-slide { height: 400px; }
  .hero-title { font-size: 1.9rem; }
  .hero-media-wrap { width: 300px; }
  .hero-media { width: 280px; height: 280px; }
}

@media (max-width: 768px) {
  .hero-logo-img { height: 150px; margin-right: 0; }
  .hero-slide { height: 300px; padding: 1rem 0; }
  .hero-slide-inner { gap: .75rem; }
  .hero-media-wrap { width: 155px; }
  .hero-media { width: 145px; height: 145px; border-radius: 16px; }
}

@media (max-width: 576px) {
  .hero-media-wrap { width: clamp(125px, 32vw, 155px); }
  .hero-media { width: clamp(118px, 30vw, 145px); height: clamp(118px, 30vw, 145px); }
}

.hero-carousel .carousel-item        { display: none; }
.hero-carousel .carousel-item.active { display: block; }

.carousel-indicators [data-bs-target] {
  background-color: rgba(255,255,255,.6);
  border-radius: 999px;
  width: 8px;
  height: 8px;
  border: none;
}
.carousel-indicators .active {
  background-color: #fff;
}

@media (max-width: 768px) {
  .hero-slide { height: 300px; }
  .hero-title { font-size: 1.4rem; }
  .hero-subtitle { font-size: .9rem; margin-bottom: 1rem; }

  .hero-carousel {
    position: relative;
    left: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: -4.5rem;
    width: 100vw;
    border-radius: 0;
  }
}
