/* ==========================================================
   Masche & Co. – OpenCart 4 theme stylesheet
   Restyles the core Bootstrap 5 markup; no core files changed.
   ========================================================== */
:root {
  --ks-ground: #F4EFE6;
  --ks-paper: #FFFDF8;
  --ks-ink: #2B2A26;
  --ks-ink-soft: #4A473F;
  --ks-muted: #5A564C;
  --ks-line: #DCD3C3;
  --ks-accent: #9A3F26;
  --ks-accent-dark: #7A3019;
  --ks-sage: #B9C2A4;
  --ks-display: "Fraunces", Georgia, "Times New Roman", serif;
  --ks-body: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --bs-body-bg: var(--ks-ground);
  --bs-body-color: var(--ks-ink);
  --bs-link-color: var(--ks-ink);
  --bs-link-color-rgb: 43, 42, 38;
  --bs-link-hover-color: var(--ks-accent-dark);
  --bs-link-hover-color-rgb: 122, 48, 25;
  --bs-border-color: var(--ks-line);
}

body {
  background: var(--ks-ground);
  color: var(--ks-ink);
  font-family: var(--ks-body);
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3, h4, h5, .h1, .h2, .h3 {
  font-family: var(--ks-display);
  font-weight: 400;
  color: var(--ks-ink);
  letter-spacing: -0.01em;
}
h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }

a { color: var(--ks-ink); text-underline-offset: 3px; }
a:hover { color: var(--ks-accent-dark); }

:focus-visible { outline: 3px solid var(--ks-accent); outline-offset: 2px; }

/* ---------- Top bar ---------- */
#top {
  background: var(--ks-ink);
  border: 0;
  padding: 6px 0;
  margin: 0;
  font-size: 14px;
}
#top, #top a, #top .btn-link, #top .dropdown-toggle { color: #F4EFE6; text-decoration: none; }
#top a:hover { color: #E3A58A; }

/* ---------- Header ---------- */
header {
  background: var(--ks-ground);
  border-bottom: 1px solid var(--ks-line);
  padding: 22px 0;
}
#logo h1, #logo a {
  font-family: var(--ks-display);
  font-size: 30px;
  font-weight: 600;
  margin: 0;
  text-decoration: none;
  color: var(--ks-ink);
}
#logo img { max-height: 64px; width: auto; }

#search .form-control {
  background: var(--ks-paper);
  border: 1px solid #8C8578;
  border-radius: 999px 0 0 999px;
  min-height: 46px;
  padding-left: 20px;
}
#search .btn {
  background: var(--ks-ink);
  border: 1px solid var(--ks-ink);
  color: #F4EFE6;
  border-radius: 0 999px 999px 0;
  min-width: 52px;
}
#search .btn:hover { background: var(--ks-accent); border-color: var(--ks-accent); }

#header-cart .btn,
#header-cart .btn-inverse {
  background: transparent;
  border: 1px solid var(--ks-ink);
  color: var(--ks-ink);
  border-radius: 999px;
  min-height: 46px;
  font-weight: 600;
  box-shadow: none;
}
#header-cart .btn:hover { background: var(--ks-ink); color: #F4EFE6; }
#header-cart .dropdown-menu { background: var(--ks-paper); border-color: var(--ks-line); border-radius: 16px; }

/* ---------- Category menu ---------- */
#menu {
  background: transparent;
  background-image: none;
  border: 0;
  border-bottom: 1px solid var(--ks-line);
  border-radius: 0;
  min-height: 0;
  padding: 6px 0;
  margin-bottom: 0;
}
#menu .navbar-nav > li > a,
#menu .nav-link {
  color: var(--ks-ink);
  font-weight: 500;
  font-size: 16px;
  text-shadow: none;
  padding: 10px 18px;
}
#menu .navbar-nav > li > a:hover,
#menu .nav-link:hover { color: var(--ks-accent-dark); background: transparent; }
#menu .dropdown-menu { background: var(--ks-paper); border-color: var(--ks-line); border-radius: 16px; padding: 12px; }
#menu .dropdown-item:hover { background: var(--ks-ground); }
#menu #category, #menu .navbar-brand { color: var(--ks-ink); font-family: var(--ks-display); text-shadow: none; }
#menu .navbar-toggler { border-color: var(--ks-ink); }

/* ---------- Buttons ---------- */
.btn { border-radius: 999px; font-weight: 600; }
.btn-primary {
  --bs-btn-bg: var(--ks-accent);
  --bs-btn-border-color: var(--ks-accent);
  --bs-btn-hover-bg: var(--ks-accent-dark);
  --bs-btn-hover-border-color: var(--ks-accent-dark);
  --bs-btn-active-bg: var(--ks-accent-dark);
  --bs-btn-active-border-color: var(--ks-accent-dark);
  background-image: none;
  color: #fff;
  text-shadow: none;
  padding-left: 24px;
  padding-right: 24px;
}
.btn-light, .btn-default {
  background: transparent;
  border: 1px solid var(--ks-ink);
  color: var(--ks-ink);
}
.btn-light:hover, .btn-default:hover { background: var(--ks-ink); color: #F4EFE6; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  background: transparent;
  border: 0;
  padding: 20px 0 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.breadcrumb a { color: var(--ks-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ks-accent-dark); }

/* ---------- Product cards ---------- */
.product-thumb {
  background: transparent;
  border: 0;
  border-radius: 0;
  margin-bottom: 32px;
  overflow: visible;
}
.product-thumb .image {
  background-color: #D8C8AE;
  background-image:
    repeating-linear-gradient(60deg, rgba(43,42,38,.06) 0 3px, transparent 3px 16px),
    repeating-linear-gradient(-60deg, rgba(43,42,38,.06) 0 3px, transparent 3px 16px);
  border-radius: 20px;
  overflow: hidden;
  padding: 0;
  text-align: center;
}
.product-thumb .image img { border-radius: 20px; mix-blend-mode: multiply; }
.product-thumb .content, .product-thumb .caption { padding: 16px 2px 0; }
.product-thumb .description h4, .product-thumb h4 { font-family: var(--ks-display); font-size: 22px; font-weight: 400; margin-bottom: 4px; }
.product-thumb .description h4 a, .product-thumb h4 a { color: var(--ks-ink); text-decoration: none; }
.product-thumb .description p { color: var(--ks-muted); font-size: 15px; }
.product-thumb .price { color: var(--ks-ink); font-weight: 600; font-size: 18px; }
.product-thumb .price-new { color: var(--ks-accent); }
.product-thumb .price-old { color: var(--ks-muted); }
.product-thumb .price-tax { color: var(--ks-muted); font-size: 13px; font-weight: 400; }
.product-thumb .button-group {
  display: flex;
  gap: 8px;
  background: transparent;
  border: 0;
  padding: 8px 0 0;
}
.product-thumb .button-group button {
  flex: 1 1 auto;
  width: auto;
  min-height: 46px;
  background: transparent;
  border: 1px solid var(--ks-ink);
  border-radius: 999px;
  color: var(--ks-ink);
  font-weight: 600;
  text-transform: none;
}
.product-thumb .button-group button:first-child { flex-grow: 3; }
.product-thumb .button-group button + button { border-left: 1px solid var(--ks-ink); flex: 0 0 46px; }
.product-thumb .button-group button:hover { background: var(--ks-ink); color: #F4EFE6; }

/* ---------- Product page ---------- */
#product-product .image img, #product-info .image img, .image-additional img, .img-thumbnail {
  background-color: #D8C8AE;
  border: 0;
  border-radius: 20px;
}
.nav-tabs { border-bottom-color: var(--ks-line); }
.nav-tabs .nav-link { color: var(--ks-muted); border: 0; font-weight: 600; }
.nav-tabs .nav-link.active { color: var(--ks-ink); background: transparent; border-bottom: 2px solid var(--ks-accent); }

/* ---------- Sidebar, lists, forms ---------- */
.list-group-item { background: transparent; border-color: var(--ks-line); color: var(--ks-ink); }
.list-group-item.active { background: var(--ks-ink); border-color: var(--ks-ink); color: #F4EFE6; }
.form-control, .form-select {
  background-color: var(--ks-paper);
  border-color: #8C8578;
  border-radius: 12px;
  min-height: 46px;
}
.form-control:focus, .form-select:focus { border-color: var(--ks-accent); box-shadow: 0 0 0 3px rgba(154,63,38,.18); }
.card { background: var(--ks-paper); border-color: var(--ks-line); border-radius: 20px; }
.table { --bs-table-bg: transparent; }
.pagination .page-link { background: transparent; border-color: var(--ks-line); color: var(--ks-ink); }
.pagination .active .page-link, .pagination .page-item.active .page-link { background: var(--ks-ink); border-color: var(--ks-ink); color: #F4EFE6; }

/* ---------- Footer ---------- */
footer {
  background: var(--ks-ink);
  color: #D6CFC2;
  border: 0;
  margin-top: 64px;
  padding: 56px 0 32px;
}
footer h5 { font-family: var(--ks-display); color: #F4EFE6; font-size: 20px; font-weight: 400; margin-bottom: 14px; }
footer a { color: #D6CFC2; text-decoration: none; }
footer a:hover { color: #E3A58A; }
footer hr { border-color: rgba(244,239,230,.2); }

/* ==========================================================
   Home page blocks (common/home.twig override)
   ========================================================== */
.ks-knit {
  background-color: var(--ks-tile, #C98F74);
  background-image:
    repeating-linear-gradient(60deg, rgba(43,42,38,.07) 0 3px, transparent 3px 18px),
    repeating-linear-gradient(-60deg, rgba(43,42,38,.07) 0 3px, transparent 3px 18px);
}

.ks-hero { padding: 72px 0 80px; }
.ks-kicker { color: var(--ks-accent); font-weight: 600; font-size: 15px; margin-bottom: 18px; }
.ks-hero-title {
  font-family: var(--ks-display);
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.ks-hero-text { font-size: 1.2rem; color: var(--ks-ink-soft); max-width: 32em; margin-bottom: 32px; }
.ks-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.ks-link-strong { font-weight: 600; font-size: 1.05rem; }

.ks-hero-visual {
  position: relative;
  min-height: 460px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ks-hero-visual svg { width: 60%; max-width: 340px; height: auto; }
.ks-hero-badge {
  position: absolute;
  left: -24px;
  bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 22px;
  background: var(--ks-paper);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(43,42,38,.12);
}
.ks-hero-badge-label { font-size: 13px; font-weight: 600; color: #6B665B; }
.ks-hero-badge-title { font-family: var(--ks-display); font-size: 22px; }

.ks-usp { border-top: 1px solid var(--ks-line); border-bottom: 1px solid var(--ks-line); padding: 32px 0; }
.ks-usp-item { display: flex; align-items: center; gap: 16px; }
.ks-usp-item strong { display: block; font-size: 17px; }
.ks-usp-item span { display: block; color: var(--ks-muted); font-size: 15px; }

.ks-categories { padding: 72px 0 24px; }
.ks-section-title { font-size: clamp(2rem, 3.5vw, 3.2rem); margin-bottom: 32px; }
.ks-cat {
  display: flex;
  align-items: flex-end;
  min-height: 260px;
  padding: 24px;
  border-radius: 20px;
  text-decoration: none;
}
.ks-cat span {
  background: var(--ks-paper);
  color: var(--ks-ink);
  font-family: var(--ks-display);
  font-size: 24px;
  padding: 8px 20px;
  border-radius: 999px;
}
.ks-cat:hover span { background: var(--ks-ink); color: #F4EFE6; }

@media (max-width: 991.98px) {
  .ks-hero { padding: 40px 0 48px; }
  .ks-hero-visual { min-height: 320px; }
  .ks-hero-badge { left: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Auf Wunsch / Über uns (home) ---------- */
.ks-wish { background: var(--ks-ink); color: #F4EFE6; padding: 88px 0; margin-top: 48px; }
.ks-kicker-light { color: #E3A58A; }
.ks-wish-title { color: #F4EFE6; font-size: clamp(2rem, 3.5vw, 3.2rem); line-height: 1.08; margin-bottom: 20px; }
.ks-wish-text { color: #D6CFC2; font-size: 1.15rem; max-width: 34em; margin: 0; }
.ks-wish-card { background: var(--ks-ground); color: var(--ks-ink); border-radius: 24px; padding: 36px; }
.ks-wish-card p { color: var(--ks-ink-soft); margin-bottom: 24px; }
.ks-about { padding: 88px 0 24px; }
.ks-about-visual { min-height: 360px; border-radius: 24px; }
.ks-about-text { font-size: 1.15rem; color: var(--ks-ink-soft); max-width: 32em; margin-bottom: 20px; }
/* The wish block is dark – no big gap to the dark footer */
.ks-about + footer, .ks-wish + footer { margin-top: 0; }

/* ==========================================================
   Anpassung an OpenCart 4.1 – Kopfbereich wie im Entwurf
   ========================================================== */

/* Obere Leiste: hell und dezent statt dunkel */
#top {
  background: var(--ks-ground) !important;
  border-bottom: 1px solid var(--ks-line) !important;
  font-size: 14px;
}
#top, #top a, #top .btn-link, #top .dropdown-toggle, #top .list-inline-item {
  color: var(--ks-muted) !important;
}
#top a:hover { color: var(--ks-accent-dark) !important; }

/* Kopfzeile ohne Trennlinie – die Linie kommt unter dem Menü */
header { border-bottom: 0 !important; padding: 20px 0 12px !important; }

/* Menü: kein blauer Balken, dunkle Schrift, Linie darunter */
#menu, #menu.navbar, nav#menu, #menu .navbar, #menu .container, #menu .navbar-collapse {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
#menu {
  border-bottom: 1px solid var(--ks-line) !important;
  border-radius: 0 !important;
  padding: 4px 0 !important;
}
#menu .navbar-nav > li > a,
#menu .nav-link,
#menu a.dropdown-toggle {
  color: var(--ks-ink) !important;
  font-size: 17px;
  font-weight: 500;
  text-shadow: none !important;
  padding: 10px 20px !important;
}
#menu .navbar-nav > li:first-child > a,
#menu .navbar-nav > li:first-child > .nav-link { padding-left: 0 !important; }
#menu .navbar-nav > li > a:hover,
#menu .nav-link:hover { color: var(--ks-accent-dark) !important; }

/* Warenkorb-Button: Umriss statt dunkler Fläche */
#header-cart .btn,
#header-cart .btn-inverse,
#header-cart .btn-dark,
#header-cart button {
  background: transparent !important;
  border: 1px solid var(--ks-ink) !important;
  color: var(--ks-ink) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}
#header-cart .btn:hover,
#header-cart button:hover {
  background: var(--ks-ink) !important;
  color: #F4EFE6 !important;
}

/* Suche etwas ruhiger */
#search .form-control { min-height: 48px; }
#search .btn { background: transparent !important; color: var(--ks-ink) !important; border-color: #8C8578 !important; }
#search .btn:hover { background: var(--ks-ink) !important; color: #F4EFE6 !important; }

/* ==========================================================
   Kopfzeile wie im Entwurf: ohne Suche, Logo links, Warenkorb rechts
   ========================================================== */
#search,
header [class*="col"]:has(> #search) {
  display: none !important;
}
header .row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}
header .row > [class*="col"] {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
}
#logo { margin: 0 !important; }
#logo h1, #logo h1 a, #logo a {
  font-size: 30px !important;
  letter-spacing: -0.5px;
}

/* Warenkorb als schmale Pille mit Umriss */
#header-cart { text-align: right; }
#header-cart .dropdown,
#header-cart .d-grid {
  display: inline-block !important;
}
#header-cart .btn,
#header-cart .btn-inverse,
#header-cart .btn-dark,
#header-cart button {
  width: auto !important;
  min-height: 46px !important;
  padding: 0 20px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
#header-cart .dropdown-menu { min-width: 320px; right: 0; left: auto; }

@media (max-width: 575.98px) {
  #logo h1, #logo h1 a, #logo a { font-size: 24px !important; }
  #header-cart .btn, #header-cart button { padding: 0 14px !important; font-size: 14px !important; }
}

/* ==========================================================
   Produktkarten wie im Entwurf
   ========================================================== */

/* Bild füllt die ganze Kachel – kein zweiter Hintergrund */
.product-thumb .image {
  background: none !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}
.product-thumb .image a { display: block; }
.product-thumb .image img {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  border-radius: 20px !important;
  mix-blend-mode: normal !important;
}

/* Text: Name, kurze Beschreibung (max. 2 Zeilen), Preis */
.product-thumb .content,
.product-thumb .caption,
.product-thumb .description {
  padding: 16px 0 0 !important;
}
.product-thumb .description p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}
.product-thumb .price {
  color: var(--ks-ink) !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  margin: 0 !important;
}
.product-thumb .price-new { color: var(--ks-accent) !important; }
.product-thumb .price-tax { display: none !important; }

/* Ein Button „In den Warenkorb“ (Template product/thumb.twig des Themes) */
.product-thumb .button,
.product-thumb .button-group { display: none !important; }
.product-thumb .ks-cart-button { padding: 16px 0 0; }
.product-thumb .ks-btn-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  background: transparent;
  border: 1px solid var(--ks-ink);
  border-radius: 999px;
  color: var(--ks-ink);
  font-family: var(--ks-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.product-thumb .ks-btn-cart:hover,
.product-thumb .ks-btn-cart:focus-visible {
  background: var(--ks-ink);
  color: #F4EFE6;
}

/* ==========================================================
   Mobile Ansicht
   ========================================================== */
html, body { overflow-x: hidden; }

/* Menü-Button auf dem Handy sichtbar machen (war weiß auf hellem Grund) */
#menu .navbar-toggler,
#menu .navbar-toggler i,
#menu .navbar-toggler .fa-solid,
#menu #category,
#menu .navbar-brand {
  color: var(--ks-ink) !important;
  border-color: var(--ks-ink) !important;
  text-shadow: none !important;
}
#menu .navbar-toggler {
  background: transparent !important;
  border: 1px solid var(--ks-ink) !important;
  border-radius: 999px !important;
  padding: 8px 14px !important;
  min-height: 44px;
}
#menu .navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(154,63,38,.25) !important; }

@media (max-width: 991.98px) {
  #menu { padding: 10px 0 !important; }
  #menu .navbar-collapse { padding-top: 8px; }
  #menu .navbar-nav > li > a,
  #menu .nav-link,
  #menu a.dropdown-toggle {
    padding: 12px 0 !important;
    border-bottom: 1px solid var(--ks-line);
  }
  #menu .dropdown-menu { border: 0 !important; padding: 0 0 8px 16px !important; background: transparent !important; }

  .ks-hero { padding: 32px 0 40px; }
  .ks-hero-visual { min-height: 280px; border-radius: 20px; }
  .ks-hero-visual svg { width: 50%; }
  .ks-hero-badge { left: 12px; bottom: 12px; padding: 12px 16px; }
  .ks-hero-badge-title { font-size: 18px; }

  .ks-categories { padding: 48px 0 8px; }
  .ks-cat { min-height: 150px; }

  .ks-wish { padding: 56px 0; }
  .ks-wish-card { padding: 24px; }
  .ks-about { padding: 56px 0 16px; }
  .ks-about-visual { min-height: 200px; }
}

@media (max-width: 575.98px) {
  header { padding: 14px 0 8px !important; }
  header .row { gap: 12px; }
  #logo img { max-height: 44px !important; max-width: 48vw !important; }
  #logo h1, #logo h1 a, #logo a { font-size: 22px !important; }

  /* Warenkorb-Pille darf nicht aus dem Bildschirm ragen */
  #header-cart .btn, #header-cart button {
    min-height: 42px !important;
    max-width: 44vw;
    padding: 0 12px !important;
    font-size: 13px !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #header-cart .dropdown-menu { min-width: 0; width: calc(100vw - 24px); }

  .ks-hero-title { font-size: 2.3rem; }
  .ks-hero-text { font-size: 1.05rem; }
  .ks-hero-actions { gap: 16px; }
  .ks-hero-actions .btn { width: 100%; }
  .ks-usp { padding: 24px 0; }
  .ks-section-title { margin-bottom: 20px; }

  .product-thumb .description h4, .product-thumb h4 { font-size: 20px; }
  footer { padding: 40px 0 24px; margin-top: 40px; }
}
