/* Smartstore.MegaMenu. All selectors stay under .smm or .smm-acc. */
.megamenu-section .megamenu-container {
    justify-content: flex-start;
    align-items: stretch;
}

.smm-host,
.megamenu-section .megamenu-container > div {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

.smm-host > .smm,
.megamenu-section .megamenu-container .smm {
    width: 100%;
}

.smm {
    --smm-accent: var(--primary, #3d5a80);
    --smm-ink: #23254e;
    --smm-muted: #62666d;
    --smm-border: #e0e0e6;
    --smm-pad: 16px;
    --smm-radius: 12px;
    --smm-gap: 16px;
    display: flex;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
    position: relative;
    color: var(--smm-ink);
}

.smm-appearance-compact { --smm-pad: 10px; --smm-radius: 8px; --smm-gap: 10px; }
.smm-appearance-soft { --smm-pad: 20px; --smm-radius: 20px; --smm-gap: 18px; }
.smm-appearance-contrast { --smm-radius: 0; --smm-border: #111; --smm-accent: #111; --smm-ink: #111; }

.smm-trigger,
.smm-link,
.smm-rail-link,
.smm-menu a,
.smm-heading,
.smm-viewall {
    color: var(--smm-ink);
    text-decoration: none;
}

.smm-trigger,
.smm-link,
.smm-rail-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
    text-align: start;
}

.smm-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    min-width: 0;
}

.smm-cat + .smm-links {
    border-inline-start: 1px solid var(--smm-border);
    padding-inline-start: 16px;
    margin-inline-start: 8px;
}

.smm-link { color: var(--smm-muted); font-weight: 400; }
.smm-trigger { font-weight: 700; }
.smm .is-selected > .smm-link,
.smm .is-selected > .smm-trigger,
.smm .is-ancestor > .smm-link,
.smm-rail-item.is-selected > .smm-rail-row .smm-rail-link,
.smm-rail-item.is-active > .smm-rail-row .smm-rail-link { color: var(--smm-accent); }

.smm a:focus-visible,
.smm button:focus-visible,
.smm-acc a:focus-visible,
.smm-acc button:focus-visible {
    outline: 3px solid var(--smm-accent);
    outline-offset: 2px;
}

.smm-panel {
    container-name: smm-panel;
    container-type: inline-size;
    z-index: 1030;
    overflow: auto;
    background: #fff;
    color: var(--smm-ink);
    border: 1px solid var(--smm-border);
    border-radius: var(--smm-radius);
    box-shadow: 0 12px 32px #171a211f;
}

.smm-panel[hidden] { display: none !important; }

.smm-cat-body { position: relative; display: flex; min-height: 360px; }
.smm-rail { flex: 0 0 240px; max-height: inherit; overflow: auto; border-inline-end: 1px solid var(--smm-border); }
.smm-rail-link { width: 100%; justify-content: space-between; }
.smm-flyout-slot[hidden] { display: none !important; }
.smm-flyout-slot:not([hidden]) {
    display: block;
    position: absolute;
    inset-inline-start: 240px;
    inset-inline-end: 0;
    top: 0;
    bottom: 0;
    overflow: auto;
}

.smm-flyout { display: flex; align-items: flex-start; gap: var(--smm-gap); padding: var(--smm-pad); min-width: 0; }
.smm-columns, .smm-flyout > .smm-menu { flex: 1 1 auto; min-width: 0; }
.smm-columns { display: grid; grid-template-columns: repeat(var(--smm-columns, 3), minmax(0, 1fr)); gap: var(--smm-gap); }
.smm-column { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.smm-heading { font-weight: 700; border-inline-start: 2px solid var(--smm-accent); padding-inline-start: 8px; }
.smm-menu { list-style: none; margin: 0; padding: 0; }
.smm-menu .smm-menu { padding-inline-start: 12px; }
.smm-menu a, .smm-menu-label, .smm-menu-heading { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.smm-menu-heading { font-weight: 700; }
.smm-viewall { display: inline-flex; margin-bottom: 8px; color: var(--smm-accent); font-weight: 700; }

.smm-banner { flex: 0 0 220px; width: 220px; max-width: 100%; }
.smm-banner img { display: block; width: 100%; height: 280px; object-fit: cover; object-position: center; border-radius: calc(var(--smm-radius) - 4px); background: #f6f7f8; }
.smm-banner img.is-contain { object-fit: contain; }
.smm-banner img.is-cover { object-fit: cover; }
.smm-badge { margin-inline-start: 6px; }

@container smm-panel (max-width: 860px) {
    .smm-banner { display: none; }
    .smm-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.smm-acc-panel .smm-banner { width: 100%; flex-basis: auto; margin: 8px 12px 12px; }
.smm-acc-panel .smm-banner img { height: 160px; }

.smm-acc-section { padding: 12px 12px 4px; font-size: 12px; font-weight: 700; color: var(--smm-muted); }
.smm-acc-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--smm-border); }
.smm-acc-link, .smm-acc-label, .smm-acc-all {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 12px;
    color: var(--smm-ink);
    text-decoration: none;
}
.smm-acc-toggle {
    width: 48px;
    min-height: 44px;
    border: 0;
    border-inline-start: 1px solid var(--smm-border);
    background: transparent;
    color: inherit;
}
.smm-acc-toggle[aria-expanded="true"] { background: #f6f6f8; }
.smm-acc-panel { padding-inline-start: 8px; }
.smm-acc-panel[hidden] { display: none !important; }
.smm-acc-heading { padding: 10px 12px; font-weight: 700; }
.smm-acc-item.is-selected > .smm-acc-row .smm-acc-link,
.smm-acc-item.is-selected > .smm-acc-link { color: var(--smm-accent); }
.smm-acc-close { margin: 8px; }

.smm-preview-desktop { position: relative; min-height: 520px; border: 1px solid var(--smm-border); border-radius: 12px; overflow: auto; background: #fff; }
.smm-preview-phone { max-width: 420px; border: 1px solid var(--smm-border); border-radius: 16px; overflow: auto; background: #fff; }

.smm-style-reference .smm-panel[data-smm-panel="reference"] {
    min-height: 250px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: rgba(26, 33, 75, 0.09) 0 10px 40px -4px, rgba(0, 0, 0, 0.13) 0 12px 28px -12px;
    overflow: hidden;
}

.smm-style-reference .smm-panel[data-smm-panel="reference"]::before {
    content: "";
    position: absolute;
    top: -8px;
    inset-inline-start: var(--smm-pointer, 28px);
    border-inline: 8px solid transparent;
    border-bottom: 8px solid #fff;
}

.smm-ref {
    position: relative;
    min-height: 250px;
    padding: 24px;
    overflow: hidden;
}

.smm-ref.is-quarter {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 30px;
    row-gap: 16px;
}

.smm-ref.is-plain { display: flex; align-items: flex-start; gap: 24px; }
.smm-ref-all { grid-column: 1 / -1; }
.smm-ref-intro { grid-column: span var(--smm-intro, 1); min-width: 0; }
.smm-ref-nav { grid-column: span var(--smm-nav, 1); min-width: 0; }
.smm-ref-teaser { grid-column: span var(--smm-teaser, 1); min-width: 0; }
.smm-ref.is-plain .smm-ref-nav { flex: 1 1 auto; }
.smm-ref .smm-heading { font-size: 16px; font-weight: 600; line-height: 1.4; color: #222; border: 0; padding: 0; }
.smm-ref .smm-menu a { font-size: 14px; font-weight: 400; line-height: 1.4; color: #999; }
.smm-intro-picture { display: block; width: 100%; max-height: 180px; object-fit: contain; margin-bottom: 12px; }
.smm-intro-copy { font-size: 14px; line-height: 1.5; color: var(--smm-ink); }
.smm-intro-copy a { color: var(--smm-accent); }

.smm-art {
    position: absolute;
    z-index: 0;
    max-width: min(40%, 360px);
    max-height: calc(100% - 24px);
    pointer-events: none;
    overflow: hidden;
}

.smm-art img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.smm-art.is-x-start { inset-inline-start: 0; }
.smm-art.is-x-center { inset-inline-start: 50%; }
.smm-art.is-x-end { inset-inline-end: 0; }
.smm-art.is-y-top { inset-block-start: 0; }
.smm-art.is-y-center { inset-block-start: 50%; }
.smm-art.is-y-bottom { inset-block-end: 0; }
.smm-art.is-x-start.is-y-top,
.smm-art.is-x-end.is-y-top,
.smm-art.is-x-start.is-y-bottom,
.smm-art.is-x-end.is-y-bottom { transform: translate(calc(var(--smm-ox, 0) * 1px * var(--smm-inline-end, 1)), calc(var(--smm-oy, 0) * 1px)); }
.smm-ref, .smm-flyout { --smm-inline-end: 1; }
[dir="rtl"] .smm-ref, [dir="rtl"] .smm-flyout { --smm-inline-end: -1; }
.smm-ref-intro, .smm-ref-nav, .smm-ref-teaser, .smm-viewall { position: relative; z-index: 1; }

.smm-teaser-heading { margin: 0 0 8px; font-size: 16px; font-weight: 600; line-height: 1.4; }
.smm-rotator-list { display: flex; flex-direction: column; gap: 8px; }
.smm-rotator.is-ready .smm-rotator-list { display: block; }
.smm-rotator-card { display: flex; flex-direction: column; gap: 6px; min-height: 44px; color: inherit; text-decoration: none; }
.smm-rotator-card img { width: 100%; max-height: 140px; object-fit: contain; }
.smm-rotator-name { font-weight: 600; }
.smm-rotator-price { font-weight: 700; color: var(--smm-accent); }
.smm-rotator-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.smm-rotator-controls button { min-height: 44px; min-width: 44px; border: 1px solid var(--smm-border); background: #fff; border-radius: 8px; }
.smm-rotator.is-ready .smm-rotator-item[hidden] { display: none !important; }

.smm-acc .smm-art { position: static; max-width: 100%; margin: 8px 12px 12px; pointer-events: none; }
.smm-preview-desktop .smm-teaser a, .smm-preview-phone .smm-teaser a { pointer-events: none; }

@container smm-panel (max-width: 720px) {
    .smm-ref.is-quarter { grid-template-columns: 1fr; }
    .smm-ref-intro, .smm-ref-nav, .smm-ref-teaser, .smm-ref-all { grid-column: auto; }
    .smm-art { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .smm-panel, .smm-flyout, .smm-acc-panel, .smm-rotator-item { transition: none; }
}
