/* MTF 0.1.27. B2C listing/card presentation only. Native prices and cart stay intact. */
.product-box:has(> .mtf-retail-card--compact) {
    border-color: #dce5ed;
    border-radius: 12px;
    box-shadow: 0 1px 3px #07386506;
}
.product-box:has(> .mtf-retail-card--compact):hover {
    border-color: #b1c4d5;
    box-shadow: 0 5px 16px #07386512;
}
.mtf-retail-card--compact > .card-body { padding: 12px; gap: 0; }
.product-box .mtf-retail-card--compact .product-image-wrapper {
    height: 132px;
    min-height: 0;
    flex: 0 0 132px;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}
.product-box .mtf-retail-card--compact .product-image {
    width: 100%; height: 100%; max-height: 132px; object-fit: contain;
}
/* Shopware 6.7 links its image using the title's stretched-link. The zoom
   trigger now owns that image area; the product title remains a normal link. */
.mtf-retail-card--compact .product-name.stretched-link::after { display: none; }
.mtf-retail-card--compact .product-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    font-size: .9375rem;
    line-height: 1.35;
    height: auto;
    min-height: 4.05em;
    max-height: 4.05em;
    margin: 0;
    font-weight: 650;
    overflow: hidden;
    overflow-wrap: anywhere;
}
.mtf-retail-card--compact .product-name:hover { text-decoration: underline; }
.mtf-retail-card--compact .mtf-retail-article {
    font-size: .72rem; line-height: 1.35; margin: 4px 0 6px;
}
.mtf-retail-card--compact .product-rating { height: auto; margin: 0 0 4px; }
.mtf-retail-card--compact .product-variant-characteristics { min-height: 0; margin: 0 0 4px; }
.mtf-retail-card--compact .product-variant-characteristics-text { height: auto; min-height: 0; }
.mtf-retail-card--compact .product-description { display: none; }
.mtf-retail-card--compact .product-price-info { margin-top: auto; padding-top: 4px; }
.mtf-retail-card--compact .product-price-unit {
    height: auto; min-height: 0; overflow: visible; margin: 0 0 3px;
    font-size: .75rem; line-height: 1.4;
}
.mtf-retail-card--compact .product-cheapest-price {
    min-height: 0; height: auto; margin: 0 0 3px; line-height: 1.4; font-size: .75rem;
}
.mtf-retail-card--compact .product-price-wrapper { height: auto; min-height: 0; }
.mtf-retail-card--compact .product-price {
    font-size: 1.375rem; line-height: 1.25; margin: 0; overflow: visible;
    font-variant-numeric: tabular-nums;
}
.mtf-retail-card--compact .product-price-tax-link {
    font-size: .75rem !important; line-height: 1.4; margin-top: 3px;
}
.mtf-retail-card--compact .mtf-retail-availability { margin: 5px 0 0; font-size: .75rem; }
.mtf-retail-card--compact .mtf-retail-availability p { margin-bottom: 2px; }
.mtf-retail-card--compact .product-action { margin-top: 9px; }
.mtf-retail-card--compact .buy-widget { display: flex; align-items: stretch; gap: 8px; }
.mtf-retail-card--compact .buy-widget > .d-grid { flex: 1 1 0; min-width: 0; }
.mtf-retail-card--compact .mtf-retail-quantity {
    position: relative; display: flex; flex: 0 0 64px; margin: 0;
}
/* Keep the native label available to assistive technology, without a separate row. */
.mtf-retail-card--compact .mtf-retail-quantity > span {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.mtf-retail-card--compact .mtf-retail-quantity .form-control {
    width: 64px; min-width: 0; min-height: 44px; height: 100%; padding: 6px 3px;
    font-size: .9375rem; border-color: #b1c4d5; border-radius: 7px;
}
.mtf-retail-card--compact .btn-buy,
.mtf-retail-card--compact .btn-detail {
    width: 100%; min-height: 44px; padding: 8px; border-radius: 7px;
    line-height: 1.25; font-size: .875rem; overflow-wrap: anywhere; white-space: normal;
}
.mtf-retail-card--compact .mtf-retail-zoom-trigger {
    position: relative; z-index: 2; cursor: zoom-in; border-radius: 8px;
}
.mtf-retail-zoom-badge {
    position: absolute; left: 4px; bottom: 4px; display: grid; place-items: center;
    width: 28px; height: 28px; color: #073865; background: #fff;
    border: 1px solid #dce5ed; border-radius: 50%; pointer-events: none;
}
.mtf-retail-zoom-badge svg { width: 16px; height: 16px; }
/* One lazy-created, accessible native dialog; no Bootstrap modal/slider state changes. */
dialog.mtf-retail-zoom {
    --mtf-zoom-ink: var(--bs-primary, #073865);
    display: none; padding: 0; margin: auto; color: #173d5f; background: #fff;
    width: min(960px, calc(100vw - 32px)); height: min(780px, calc(100vh - 32px));
    height: min(780px, calc(100dvh - 32px));
    max-width: calc(100vw - 32px); max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px); border: 1px solid #dce5ed; border-radius: 14px;
    box-shadow: 0 18px 80px #0005; overflow: hidden;
}
dialog.mtf-retail-zoom[open] { display: flex; flex-direction: column; }
dialog.mtf-retail-zoom::backdrop { background: #10273ac4; }
.mtf-retail-zoom-header {
    display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between;
    gap: 16px; padding: 14px 16px; border-bottom: 1px solid #e2e8ee;
}
.mtf-retail-zoom-title {
    color: var(--mtf-zoom-ink); font: inherit; font-size: 1rem; line-height: 1.4;
    font-weight: 700; margin: 0; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.mtf-retail-zoom button, .mtf-retail-zoom-details {
    font: inherit; font-size: .9375rem; line-height: 1.35; min-height: 44px;
    border: 1px solid #b1c4d5; border-radius: 7px; background: #fff;
    color: var(--mtf-zoom-ink); padding: 10px 14px; text-decoration: none; cursor: pointer;
}
.mtf-retail-zoom button:disabled { opacity: .5; cursor: default; }
.mtf-retail-zoom .mtf-retail-zoom-close {
    flex: 0 0 44px; width: 44px; height: 44px; padding: 0; font-size: 1.75rem;
}
.mtf-retail-zoom-stage {
    flex: 1 1 0; min-height: 0; position: relative; overflow: auto;
    background: #fff; overscroll-behavior: contain; touch-action: pan-x pan-y pinch-zoom;
}
.mtf-retail-zoom-canvas {
    display: grid; place-items: center; min-width: 100%; min-height: 100%;
    width: max-content; height: max-content;
}
.mtf-retail-zoom-image {
    display: block; max-width: none; max-height: none; object-fit: contain; cursor: zoom-in;
}
.mtf-retail-zoom-image[hidden] { display: none; }
.mtf-retail-zoom.is-enlarged .mtf-retail-zoom-image { cursor: zoom-out; }
.mtf-retail-zoom-status {
    position: absolute; inset: 0; display: grid; place-items: center; padding: 24px;
    text-align: center; font-size: .9375rem;
}
.mtf-retail-zoom-status[hidden] { display: none; }
.mtf-retail-zoom-footer {
    display: flex; flex: 0 0 auto; align-items: center; flex-wrap: wrap; gap: 8px;
    padding: 12px 16px; border-top: 1px solid #e2e8ee; background: #f7f9fb;
}
.mtf-retail-zoom-hint { flex: 1 1 180px; margin: 0; font-size: .8125rem; line-height: 1.4; color: #52647b; }
.mtf-retail-zoom :is(a,button,[tabindex]):focus-visible { outline: 3px solid #4f82b5; outline-offset: -3px; }
@media (max-width: 575.98px) {
    .mtf-retail-zoom-header { padding: 10px; gap: 8px; }
    .mtf-retail-zoom-title { font-size: .875rem; }
    .mtf-retail-zoom-footer { padding: 10px; }
    .mtf-retail-zoom-hint { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .product-box:has(> .mtf-retail-card--compact) { transition: none; }
}

/* Approved finishing pass: compact imagery, refined blue CTA, aligned controls. */
.product-box:has(> .mtf-retail-card--compact) {
    border: 1px solid #dfe7f0; border-radius: 12px; background: #fff;
    box-shadow: 0 3px 13px #143f7110;
    transition: box-shadow .16s ease, border-color .16s ease;
}
@media (hover: hover) {
    .product-box:has(> .mtf-retail-card--compact):hover { border-color: #b1c6dc; box-shadow: 0 7px 23px #123c701c; }
}
.mtf-retail-card--compact > .card-body { padding: 14px; }
.mtf-retail-card--compact .product-name { font-weight: 700; letter-spacing: -.01em; }
.mtf-retail-card--compact .mtf-retail-article { color: #64758a; }
.mtf-retail-card--compact .product-price { font-size: 1.5rem; line-height: 1.25; }
.mtf-retail-card--compact .product-price-tax-link { color: #064e92; }
.mtf-retail-card--compact .product-price-unit:empty,
.mtf-retail-card--compact .product-cheapest-price:empty { display: none; }
.mtf-retail-card--compact .product-action { margin-top: 12px; }
.mtf-retail-card--compact .buy-widget { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.mtf-retail-card--compact .buy-widget > .d-grid { flex: none; }
.mtf-retail-card--compact .mtf-retail-quantity { flex: none; align-self: center; width: 64px; margin: 0; }
.mtf-retail-card--compact .mtf-retail-stepper {
    display: grid; grid-template-columns: 36px minmax(44px, 1fr) 36px;
    align-items: stretch; align-self: center; width: 132px; max-width: 100%;
    height: 38px; border: 1px solid #c6d5e4; border-radius: 6px; background: #fff;
}
.mtf-retail-card--compact .mtf-retail-stepper .mtf-retail-quantity { width: auto; min-width: 0; align-self: stretch; display: flex; }
.mtf-retail-card--compact .mtf-retail-stepper .form-control {
    width: 100%; min-width: 0; min-height: 36px; height: 36px; padding: 3px 0;
    font: inherit; font-size: .9375rem; text-align: center; border: 0;
    border-radius: 0; appearance: textfield; -moz-appearance: textfield; box-shadow: none;
}
.mtf-retail-stepper input::-webkit-inner-spin-button,
.mtf-retail-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.mtf-retail-stepper .mtf-retail-step {
    display: grid; place-items: center; min-width: 0; width: 36px; min-height: 36px;
    height: 36px; padding: 0; border: 0; border-radius: 5px; background: #f4f7fb;
    color: #073865; font: inherit; font-size: 1.15rem; line-height: 1; cursor: pointer;
}
.mtf-retail-stepper .mtf-retail-step:hover:not(:disabled) { background: #e6eef8; }
.mtf-retail-stepper .mtf-retail-step:disabled { color: #7c8b9c; background: #f8fafc; cursor: default; }
.mtf-retail-card--compact .btn-buy,
.mtf-retail-card--compact .btn-detail {
    width: 100%; min-height: 44px; border-radius: 7px; line-height: 1.3;
    padding: 10px 8px; font-size: .875rem; font-weight: 700;
}
.mtf-retail-card--compact .btn-buy { background: #0757ae; border-color: #0757ae; box-shadow: inset 0 1px 0 #ffffff1c; }
.mtf-retail-card--compact .btn-buy:hover { background: #06488f; border-color: #06488f; }
.mtf-retail-card--compact .btn-buy:disabled { opacity: .6; cursor: default; }
.mtf-retail-card--compact .btn-buy::before {
    content: ''; display: inline-block; width: 18px; height: 18px; margin-inline-end: 7px;
    vertical-align: -4px; background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h3l3 13h11l3-10H6M8 16l-1 3h13'/%3E%3Ccircle cx='9' cy='22' r='1'/%3E%3Ccircle cx='18' cy='22' r='1'/%3E%3C/svg%3E") center/contain no-repeat;
}
.mtf-retail-card--compact .product-wishlist { top: 0; bottom: auto; right: 0; z-index: 5; }
.mtf-retail-card--compact .product-wishlist-action { border-radius: 50%; border: 1px solid #dce5ed; background: #fff; box-shadow: none; }
.mtf-retail-card--compact .product-badges { top: 12px; left: 12px; gap: 4px; }
.mtf-retail-card--compact .product-badges .badge { border-radius: 5px; font-size: .75rem; height: auto; line-height: 1.4; padding: 4px 7px; }
.mtf-retail-zoom-badge { width: 30px; height: 30px; background: #fff; box-shadow: 0 1px 4px #103b7010; }
.mtf-retail-card--compact :is(a,button,input):focus-visible { outline: 3px solid #3e79bc; outline-offset: 2px; }
.mtf-retail-stepper :is(button,input):focus-visible { outline-offset: -2px; }
/* A single gap owns BOTH axes; reset native flex gutters and row/column margins. */
.mtf-retail-list .cms-listing-row {
    --mtf-columns: 1; --bs-gutter-x: 0; --bs-gutter-y: 0;
    display: grid; grid-template-columns: repeat(var(--mtf-columns), minmax(0, 1fr));
    gap: 12px; margin: 0; padding: 0;
}
.mtf-retail-list .cms-listing-row > .cms-listing-col {
    display: flex; width: auto; max-width: none; min-width: 0; flex: none;
    padding: 0; margin: 0;
}
.mtf-retail-list .cms-listing-col > .product-box { width: 100%; margin: 0; }
.mtf-retail-list .cms-listing-col:only-child:not(:has(.product-box)) { grid-column: 1 / -1; }
@media (min-width: 360px) { .mtf-retail-list .cms-listing-row { --mtf-columns: 2; } }
@media (min-width: 768px) { .mtf-retail-list .cms-listing-row { --mtf-columns: 3; } }
@media (min-width: 1200px) { .mtf-retail-list .cms-listing-row { --mtf-columns: 4; } }
.mtf-retail-list[data-mtf-view="list"] .cms-listing-row { --mtf-columns: 1; }
@media (min-width: 576px) {
    .mtf-retail-list[data-mtf-view="list"] .mtf-retail-card--compact > .card-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: center; }
    .mtf-retail-list[data-mtf-view="list"] .product-image-wrapper { margin: 0; }
    .mtf-retail-list[data-mtf-view="list"] .product-name { min-height: 0; max-height: 4.05em; }
    .mtf-retail-list[data-mtf-view="list"] .buy-widget { flex-direction: row; justify-content: flex-start; }
    .mtf-retail-list[data-mtf-view="list"] .buy-widget > .d-grid { min-width: 170px; }
    .mtf-retail-list[data-mtf-view="list"] .mtf-retail-stepper { margin: 0; }
}
.mtf-retail-list .cms-element-product-listing-actions { margin-block: 0 16px; align-items: center; row-gap: 8px; }
.mtf-retail-sort-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.mtf-retail-sort-tools .sorting { width: auto; max-width: 100%; min-width: 180px; }
.mtf-retail-view-switch { display: none; gap: 5px; }
.mtf-retail-list[data-mtf-view] .mtf-retail-view-switch { display: flex; }
.mtf-retail-view-switch button {
    display: grid; place-items: center; width: 40px; height: 40px; padding: 9px;
    border: 1px solid #c6d5e4; border-radius: 7px; background: #f4f7fb; color: #073865;
}
.mtf-retail-view-switch button[aria-pressed="true"] { color: #fff; background: #0757ae; border-color: #0757ae; }
.mtf-retail-view-switch svg { width: 20px; height: 20px; }
.mtf-retail-view-switch button:focus-visible { outline: 3px solid #3e79bc; outline-offset: 2px; }
/* B2C full-page polish: no effect on B2B, checkout, approval or consent logic. */
.mtf-retail-storefront { background: #fbfcfe; }
.mtf-retail-storefront .header-main { background: #fff; box-shadow: 0 3px 15px #133f7010; }
.mtf-retail-storefront .header-search-input { border-color: #d6e1ed; border-radius: 9px; background: #f9fbfd; }
.mtf-retail-storefront .mtf-primary-nav { border-top: 0; margin-top: 0; padding: 0 0 6px; border-color: #eef2f7; }
.mtf-retail-storefront .mtf-primary-links a { border-radius: 6px; }
.mtf-retail-storefront .filter-panel-item-toggle,
.mtf-retail-storefront .sorting { min-height: 40px; border: 1px solid #c6d5e4; border-radius: 7px; background-color: #fff; color: #073865; }
.mtf-retail-storefront .filter-panel-wrapper { margin-bottom: 14px; }
.mtf-retail-storefront .cms-block-product-listing .cms-block-container { padding-top: 16px !important; padding-bottom: 16px !important; }
.mtf-retail-storefront .cookie-permission-container { background: #fff; border-top: 1px solid #dce5ed; box-shadow: 0 -3px 14px #133f700c; }
.mtf-retail-storefront .cookie-permission-container .btn { border-radius: 7px; min-height: 40px; }
.mtf-retail-storefront .cookie-permission-container .btn-primary { background: #0757ae; border-color: #0757ae; }
.mtf-approved-logo { width: 181px; max-width: 100%; height: auto; object-fit: contain; }
@media (max-width: 575.98px) {
    .mtf-retail-card--compact > .card-body { padding: 10px; }
    .product-box .mtf-retail-card--compact .product-image-wrapper { height: 120px; flex-basis: 120px; }
    .product-box .mtf-retail-card--compact .product-image { max-height: 120px; }
    .mtf-retail-card--compact .product-name { font-size: .875rem; }
    .mtf-retail-card--compact .product-price { font-size: 1.25rem; }
    .mtf-retail-card--compact .btn-buy { font-size: .8125rem; padding: 8px 3px; }
    .mtf-retail-card--compact .btn-buy::before { width: 15px; height: 15px; margin-inline-end: 4px; }
    .mtf-retail-card--compact .mtf-retail-stepper { width: 120px; grid-template-columns: 32px minmax(38px, 1fr) 32px; }
    .mtf-retail-stepper .mtf-retail-step { width: 32px; }
    .mtf-retail-sort-tools { justify-content: space-between; }
    .mtf-retail-sort-tools .sorting { min-width: 130px; flex: 1 1 130px; }
    .mtf-approved-logo { width: 145px; }
}
@media (prefers-reduced-motion: reduce) { .product-box:has(> .mtf-retail-card--compact) { transition: none; } }
