/* bbmarkt - catalog lane additions on top of the reference theme.css.
   Only rules the static reference does not ship (OpenCart specific bits:
   struck prices, facet counters, option blocks, review list, pagination link
   variant) live here, everything else comes from theme.css unchanged. */

/* ---- cards ---------------------------------------------------------- */
.mk-card-old { color: var(--td-muted); font-size: 14px; font-weight: 600; margin-left: 6px; }
.mk-dot-grey { background: #9aa6bb; }
.mk-card-stock:has(.mk-dot-grey) { color: #6b7280; }
.mk-card-stock:has(.mk-dot-blue) { color: #2563eb; }
.mk-pdp-stock:has(.mk-dot-blue) { color: #2563eb; }

/* ---- listing head ---------------------------------------------------- */
.mk-listing-headline { min-width: 0; }
.mk-listing-count { font-size: 13px; color: var(--td-muted); margin: -6px 0 0; }
.mk-listing-lead { font-size: 14px; line-height: 1.7; color: #333; margin: 0 0 16px; }
.mk-listing-tools .mk-select { padding-right: 34px; max-width: 220px; }

/* ---- facets ---------------------------------------------------------- */
.mk-facet-count { margin-left: auto; font-size: 11px; color: var(--td-muted); }
.mk-facet-list .mk-check { width: 100%; }
.mk-facet-apply { display: flex; align-items: center; gap: 12px; }
.mk-facet-btn { height: 40px; min-height: 0; flex: 1 1 auto; }
.mk-facet-reset { font-size: 12.5px; color: var(--td-muted); text-decoration: none; }
.mk-facet-price .mk-facet-input { min-width: 0; }
/* facet lists grow, they never scroll inside the rail */
.mk-facet-list { max-height: none; overflow: visible; }
.mk-facet-list .mk-check span:first-of-type { overflow-wrap: anywhere; }
/* sidebar category rail: yellow accent for the current category */
.mk-facet-cats a {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 7px 10px 7px 12px; border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0; transition: background-color .15s ease, border-color .15s ease, padding-left .15s ease;
}
.mk-facet-cats a:hover { background: var(--td-surface); border-left-color: var(--td-border); padding-left: 16px; }
.mk-facet-cats a.mk-facet-active { border-left-color: var(--td-yellow); }
/* the box only mirrors the state, the whole row is the toggle link */
.mk-facet-cats a .mk-checkbox { pointer-events: none; flex: 0 0 auto; }
.mk-facet-toggle { margin-top: 6px; background: none; border: 0; padding: 0; font-size: 12.5px; font-weight: 600; color: var(--td-navy); text-decoration: none; cursor: pointer; }

/* ---- pagination as links (base design lives in theme.css) ------------ */
.mk-pagination .mk-page-btn { text-decoration: none; }
/* reviews use the shared common/pagination.twig, i.e. the same pills */
.mk-review-pages { display: flex; justify-content: center; }
.mk-review-pages .mk-pagination { margin-top: 16px; }
.mk-pagination .mk-page-active { pointer-events: none; }

/* ---- product page ---------------------------------------------------- */
/* daisyUI .btn wraps its content, the cart button has to stay one line */
.mk-pdp-cart, .mk-card-cart { flex-wrap: nowrap; white-space: nowrap; gap: 8px; }
.mk-pdp-cart { height: 42px; min-height: 0; line-height: 1; }
.mk-card-heart, .mk-pdp-actions .mk-card-heart { flex: 0 0 auto; }

.mk-pdp-options { display: grid; gap: 12px; margin: 16px 0 0; }
.mk-pdp-option .mk-facet-title { display: block; margin-bottom: 6px; }
.mk-option-select { width: 100%; max-width: 360px; }
/* Vollbild-Ansicht: das Bild f&uuml;llt das Fenster, Pfeile sitzen an den R&auml;ndern,
   der Schlie&szlig;en-Knopf oben rechts. */
.mk-lightbox { width: 100%; max-width: 100%; height: 100%; max-height: 100%; padding: 0; margin: 0; border: 0; background: rgba(10, 20, 40, .94); }
.mk-lightbox::backdrop { background: rgba(10, 20, 40, .92); }
.mk-lightbox .mk-lightbox-box {
  width: 100vw; max-width: none; height: 100vh; max-height: none;
  border-radius: 0; background: transparent; box-shadow: none;
  padding: 64px 84px; display: flex; align-items: center; justify-content: center;
}
.mk-lightbox .mk-lightbox-box img { width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 128px); object-fit: contain; }
.mk-lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); position: absolute; }
.mk-lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); position: absolute; }
.mk-lightbox-prev, .mk-lightbox-next { background: #fff; border: 1px solid var(--td-border); color: var(--td-navy); min-height: 0; width: 48px; height: 48px; font-size: 18px; }
.mk-lightbox .mk-lightbox-close { top: 24px; right: 24px; width: 48px; height: 48px; font-size: 18px; }
.mk-lightbox-prev:hover, .mk-lightbox-next:hover, .mk-lightbox .mk-lightbox-close:hover { background: var(--td-surface, #f4f6fa); }
.mk-tabpane { max-height: none; overflow: visible; }
.mk-tabpane table { width: 100%; }
/* the thumbnail strip: five per row, everything beyond scrolls smoothly */
.mk-gallery .mk-thumbs { scroll-behavior: smooth; scroll-snap-type: x mandatory; padding-bottom: 2px; }
.mk-gallery .mk-thumbs .mk-thumb { flex: 0 0 calc((100% - 4 * 8px) / 5); scroll-snap-align: start; }
.mk-gallery .mk-thumbs .mk-thumb img { width: 100%; height: auto; aspect-ratio: 1 / 1; }
@media (max-width: 640px) {
  .mk-lightbox .mk-lightbox-box { padding: 60px 12px; }
  .mk-lightbox-prev { left: 8px; }
  .mk-lightbox-next { right: 8px; }
  .mk-lightbox .mk-lightbox-close { top: 12px; right: 12px; }
}

/* breadcrumb: single line, the article name is what gets the ellipsis */
.mk-crumb-list { flex-wrap: nowrap; }
.mk-crumb-list li:last-child { min-width: 0; flex: 0 1 auto; }
.mk-crumb-list li:last-child .mk-crumb-current { max-width: 100%; }

/* ---- reviews ---------------------------------------------------------- */
.mk-reviews { display: grid; gap: 18px; }
.mk-review { border: 1px solid var(--td-border); border-radius: 4px; background: #fff; padding: 14px; margin-bottom: 10px; }
.mk-review-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mk-review-author { color: var(--td-navy); font-size: 14px; }
.mk-review-date { font-size: 12px; color: var(--td-muted); }
.mk-review-text { font-size: 14px; line-height: 1.7; color: #333; margin: 8px 0 0; }
.mk-rating-stars { display: flex; gap: 4px; }
.mk-rating-stars .mk-rating-star { background: none; border: none; padding: 0; font-size: 22px; color: #d5dceb; cursor: pointer; line-height: 1; }
.mk-rating-stars .mk-rating-on { color: var(--td-yellow); }

/* ---- grid safety net -------------------------------------------------- */
.mk-grid > .mk-card { height: 100%; }
.mk-listing { align-items: start; }

@media (max-width: 1100px) {
  /* the facet rail is a drawer here, nothing in the listing may push the page wider */
  .mk-listing { grid-template-columns: minmax(0, 1fr); }
  .mk-listing-main, .mk-grid, .mk-listing-head { min-width: 0; max-width: 100%; }
}

@media (max-width: 760px) {
  .mk-listing-head { flex-wrap: wrap; }
  /* "Filter" gets its own full width row, both sort selects share the next one */
  .mk-listing-tools { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-left: 0; }
  .mk-listing-tools .mk-filter-btn { grid-column: 1 / -1; width: 100%; }
  .mk-listing-tools .mk-select { width: 100%; min-width: 0; max-width: none; }
  .mk-review-head { flex-direction: column; gap: 2px; }
  /* three tabs share the row instead of scrolling sideways */
  .mk-tabs { display: flex; gap: 0; overflow: visible; }
  .mk-tabs .mk-tab { flex: 1 1 0; min-width: 0; padding-left: 2px; padding-right: 2px; font-size: 13px; white-space: nowrap; }
}
