/* Shop-Ergänzungen zu style.css.
   Gemeinsame Karten, Typografie, Farben und Komponenten stehen in style.css. */

/* 1 — Shop-Flächen und Herstellerfarben */
html.lightmode .main:has(.shop-kategorie, .shop-produkt) {
    --mlt-media-bg: #e6e6e6;
    --mlt-glass-bg: #fff;
    --mlt-glass-shine: transparent;
    --mlt-glass-border: #c3cbd6;
    --mlt-glass-shadow: 0 6px 20px rgba(20, 30, 45, .07);
    background: #edf0f4;
}
.shop-kategorie-card.brand-card picture {
    background: var(--brand-ci2, var(--mlt-media-bg));
}
.shop-kategorie-card.brand-card picture img {
    padding: clamp(18px, 2vw, 28px);
}
.shop-kategorie-card.brand-card h3::after {
    background: var(--brand-ci1, var(--mlt-red-color));
}

/* Beschreibung des zugehörigen Ordnerartikels unter der Kategorieüberschrift. */
.shop-category-description {
    max-width: 1040px;
    margin: 24px auto 0;
    line-height: 1.8;
    text-align: left;
}
.shop-category-description p:last-child {
    margin-bottom: 0;
}

/* 2 — Hinweis zum Vermietkatalog */
.shop-build-notice {
    width: 100%;
    background: rgba(196, 0, 0, .10);
    border-bottom: 1px solid rgba(196, 0, 0, .25);
    font-size: .85rem;
}
.shop-build-notice-inner {
    padding: 8px var(--gutter);
}
.shop-build-notice-short {
    font-weight: 600;
    color: #c40000;
}
.darkmode .shop-build-notice-short {
    color: #ff6970;
}
.shop-build-notice-detail {
    margin-left: .75rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-2px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.shop-build-notice:hover .shop-build-notice-detail {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
@media (max-width: 768px) {
    .shop-build-notice-detail {
        display: block;
        margin: .15rem 0 0;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}

/* 3 — Shop-Header und Suche */
/* Der Cursor im Sticky-Header darf den Sprunglink-Abstand nicht als verdeckten Bereich behandeln. */
html:has(.header .produkt-suche:focus) {
    scroll-padding-top: 0;
}
.header .header-container.mobile {
    display: none;
    min-height: 0;
    height: auto;
    padding: 0 var(--gutter) 12px;
}
.header .header-container.mobile .header-container-inside {
    height: auto;
    justify-content: space-between;
    gap: 12px;
}
.header-search-wrapper {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    max-width: 100%;
    padding: 0 1rem;
}
.header .header-container.mobile .header-search-wrapper {
    padding: 0;
}
.shop-suche {
    position: relative;
    width: 100%;
    max-width: 350px;
    height: auto;
    box-sizing: border-box;
}
.shop-suche form {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: 100%;
    height: 44px;
    border: 1px solid var(--mlt-border);
    border-radius: var(--radius-small);
    background: var(--secondary-color);
    overflow: hidden;
    transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}
.header .shop-suche input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    min-height: 0;
    height: 100%;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    border-radius: 0;
    outline: none;
    background: transparent;
    font-size: 16px; /* Verhindert automatisches Zoomen auf iOS. */
    font-weight: 400;
}
.header .shop-suche button {
    flex: 0 0 auto;
    min-height: 0;
    height: 100%;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    border-radius: 0;
    background: var(--mlt-action-red);
    cursor: pointer;
}
.header .shop-suche button img {
    height: 20px !important;
    filter: brightness(0) invert(1);
}
.shop-suche form:focus-within {
    border-color: var(--mlt-red-color);
    box-shadow: 0 0 0 3px var(--mlt-red-soft);
}
.header .shop-suche button:is(:hover, :focus-visible) {
    background: var(--mlt-red-dark);
    outline: none;
}
.header-warenkorb {
    display: flex;
    margin: 0 0 0 15px;
}
.header .header-container.mobile .header-warenkorb {
    margin: 0;
}
.header-warenkorb img {
    display: block;
    height: 26px !important;
    padding-top: 12px;
    padding-right: 5px;
}

/* Live-Suchergebnisse */
#live-ergebnisse-global {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    max-width: 90vw;
    max-height: min(65vh, 640px);
    padding: 8px;
    background: var(--secondary-color);
    border: 1px solid var(--mlt-border);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-medium);
    z-index: 999;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    display: none;
}
.live-search-results ul {
    display: grid;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.live-search-results li {
    margin: 0;
    padding: 0;
    border: 0;
}
.live-search-results li a {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 76px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--main-font-color);
    font-size: .95rem;
    line-height: 1.45;
    transition: background var(--motion-fast) ease;
}
.live-search-results li a:is(:hover, :focus-visible) {
    background: var(--third-color);
    color: var(--main-font-color);
}
.live-search-results li a:focus-visible {
    outline: 2px solid var(--mlt-red-color);
    outline-offset: -2px;
}
.live-search-results li a span {
    min-width: 0;
    overflow-wrap: anywhere;
}
.live-search-results img {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 8px;
}
@media (max-width: 1024px) {
    html:has(.header-container.mobile) { --header-height: 137px; }
    .header:has(.header-container.mobile) .header-container.desktop { min-height: 80px; }
    .header-container:not(.mobile) .header-search-wrapper { display: none; }
    .header .header-container.mobile { display: block; box-sizing: border-box; }
    .header-search-wrapper { padding: 0; }
    .header .header-container.mobile .header-search-wrapper { flex: 1; min-width: 0; }
    #live-ergebnisse-global {
        width: 100%;
        max-width: 100%;
        max-height: 50dvh;
        border-radius: 0 0 var(--radius-medium) var(--radius-medium);
    }
    .live-search-results li a { gap: 12px; padding: 8px; min-height: 64px; }
    .live-search-results img { width: 48px; height: 48px; }
}

/* 4 — Produktdetails */
.breadcrumb a:hover{
  color: var(--mlt-red-color);
}

.produkt-detail-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.produkt-detail-links {
    flex: 1 1 50%;
    min-width: min(300px, 100%);
}

.produkt-detail-rechts {
    flex: 1 1 30%;
    min-width: min(350px, 100%);
}

.produkt-item img{
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 10px;
  height: auto;
}

.owl-produkt-page-carousel .owl-nav{
  font-size: 50px;
  font-weight: bold;
  color: var(--mlt-red-color);
  margin-top: 0px !important;
  height: 0;
}
.owl-produkt-page-carousel .owl-prev {
  position: absolute;
  top:0;
  bottom:0;
  left:20px;
}
.owl-produkt-page-carousel .owl-next {
  position: absolute;
  top:0;
  bottom:0;
  right:20px;
}

.owl-produkt-page-carousel .owl-next:hover,
.owl-produkt-page-carousel .owl-prev:hover {
  background: none !important;
  color: rgba(255, 0, 0, 0.503);
}
.owl-produkt-page-carousel .owl-dots {
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  color: var(--mlt-red-color);
}

.owl-produkt-page-carousel .owl-dot span {
  display: block;
  width: 10px;
  height: 10px;
  background-color:  var(--mlt-red-color) !important;
  border-radius: 50%;
  opacity: 1;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}

.owl-produkt-page-carousel .owl-dot.active span {
  background-color: white !important;
  opacity: 0.7;
}
.produkt-infos{
  background-color: var(--secondary-color);
  padding: 20px;
  border-radius: 10px;
}
.produkt-infos p{
  padding-top: 20px;
}
.produkt-infos ul{
  padding-top: 0;
}
.produkt-infos li{
  padding-left: 10px;
  line-height: 125%;
  font-weight: 300;
}
.produkt-infos li::before{
  content: "• "; 
  color: var(--mlt-red-color);
}

.produkt-features {
  display: flex;
  justify-content: center; /* Inhalte zentrieren */
  flex-wrap: wrap;
  gap: 1rem;
}

.produkt-daten {
  margin-top: 2rem;
}
.produkt-tabelle {
  width: 100%;
  border-collapse: collapse;
}

.produkt-tabelle th,
.produkt-tabelle td {
  padding: 8px 12px;
  border-bottom: 1px solid #ccc;
  text-align: left;
}

.produkt-tabelle th {
  width: 1%;
  white-space: nowrap;
  font-weight: bold;
  background: var(--secondary-color);
  color: var(--main-font-color);
}
.produkt-tabelle span.checkIcon{
  padding-right: 10px;
}

.produkt-tabelle td {
  background: transparent;
  text-align: right;
}

/* Kompakte Zellen lassen Bezeichnung und Messwert auch auf schmalen Geräten nebeneinander. */
@media (max-width: 480px) {
  .produkt-tabelle { font-size: .875rem; }
  .produkt-tabelle th, .produkt-tabelle td { padding: 8px; }
}

/* 5 — Mengenauswahl */
.number-input.menge input[type="number"]{
  border: none;
  background-color: var(--secondary-color);
  padding: 10px;
  font-weight: bold;
  font-size: 16px;
  -webkit-appearance: none;
  width: fit-content;
  text-align: center;
  -moz-appearance: textfield;
  max-width: 80px;
  margin: 0;
}
.number-input.menge input[type="number"]::-webkit-inner-spin-button,
.number-input.menge input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.number-input.menge {
  display: flex;
  gap: 0;
  height: fit-content;
}
.number-input.menge button {
  border: none;
  padding: 10px;
  left: 0;
}
.number-input.menge button.decrement{
  border-radius: 10px 0 0 10px;
}
.number-input.menge button.increment{
  border-radius:  0 10px 10px 0;
}
/* 6 — Warenkorb */
.warenkorb-item{
  display: flex;
  margin-top: 20px;
  flex-direction: column;
}
.warenkorb-item .item-titel h3{
  margin-top: 0px;
  margin-bottom: 0px;
  line-height: normal;
  font-size: 16px;
}
.warenkorb-item .item-body{
  display: flex;
  flex-direction: row;
  align-items: center;  
  gap: 30px;
}
.warenkorb-item .item-bild{
  display: flex;
  gap: 6px;   
  max-width: 150px; 
  margin-top: 0;
  margin-bottom: 0;
  aspect-ratio: 1/1;
  background-color: var(--secondary-color);     
  border-radius: 10px;
}
.warenkorb-item .item-bild img{
  width: 100%;
  object-fit: contain;
}
.warenkorb-item .item-body span.handle{
  cursor: grab;
  margin-top: 0;
  margin-bottom: 0;
  line-height: 1;
  user-select: none;
  font-weight: 600;
  font-size: 1.5rem;
}
.warenkorb-item .item-infos{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
}
.warenkorb-item p.kommentar{
  line-height: normal;
  flex: 1;
}
.warenkorb-item .durchgestrichen {
    text-decoration: line-through;
    color: #999;
}
.warenkorb-item .item-preise{
  flex: 0.5;
}
.warenkorb-item .dein-preis {
    font-weight: bold;
    color: #d60000;
}
.warenkorb-item .action {
  display: flex;
  gap: 20px;
}
.warenkorb-item button.loeschen-button  {
  border: none;
  border-radius: 10px;
  margin: 0;
}
.warenkorb-item .item-infos .summenpreis {
  flex: 0.3;
  text-align: end;
}

.warenkorb-summe {
  text-align: end;
}
@media (max-width: 1024px) {
  .warenkorb-item .item-infos{
      flex-direction: column;
      gap: 5px;
    }
    .warenkorb-item .summenpreis p,
    .warenkorb-item .summenpreis b {
      margin: 0;
      display: inline;
    }
}

@media (max-width: 768px) {
  .warenkorb-item .item-body{
    gap: 5px;
  }
  .warenkorb-item .item-bild{
    gap: 3px;   
    max-width: 100px;          
  }
  
}

/* Direkte Materialanfrage und ergänzender Hinweis auf den Warenkorb. */
.produkt-anfrage {
    margin-top: 16px;
}
.produkt-anfrage-hinweis {
    margin: 12px 0 0;
    color: var(--mlt-muted);
    font-size: .9rem;
    line-height: 1.6;
}
