/* =========================================================
   SmartGreens Mega Menu – Layout v2 (2026-09-21, Vorlage Erika)
   Path: enfold-child/assets/css/sg-megamenu.css
   Drei Spalten: Linklisten | Produkt-Highlights | USP-Panel.
   Farben/Radien/Laufweiten aus den Tokens in style.css. Schrift durchgehend Dunkelgruen (Erika 2026-09-21), nur der Button in Akzentfarbe.
   Alte Version: sg-megamenu.css.v1.bak (im Repo, nicht geladen).
   ========================================================= */

/* ---- Container (Position/Animation vom JS gesteuert) ---- */
.sg-mega-menu {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-16px);
    width: calc(100% - 40px);
    max-width: var(--sg-mega-max-width, 1500px);
    height: auto;
    max-height: calc(100vh - 100px);
    background: var(--sg-mega-bg, #ffffff);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(27, 36, 35, 0.12);
    border-radius: 0 0 var(--sg-mega-border-radius, 24px) var(--sg-mega-border-radius, 24px);
}
.sg-mega-menu.is-active { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }

.sg-mega-inner {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 340px;
    gap: 0;
    padding: 0;
}
.sg-mm-ico { width: 20px; height: 20px; flex: 0 0 20px; }

/* ---- Linke Spalte: Linklisten ---- */
.sg-mm-nav { padding: 32px 32px 32px 40px; border-right: 1px solid var(--sg-border); }
.sg-mm-all { display: block; text-decoration: none; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--sg-border); }
.sg-mm-all__title { display: flex; align-items: center; gap: 8px; color: var(--sg-green); font-size: 1.125rem; font-weight: 600; }
.sg-mm-all__title .sg-mm-ico { transition: transform 0.2s ease; }
.sg-mm-all:hover .sg-mm-ico { transform: translateX(4px); }
.sg-mm-all__sub { display: block; margin-top: 2px; color: var(--sg-green); font-size: var(--sg-meta); }
.sg-mm-group + .sg-mm-group { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--sg-border); }
.sg-mm-group__title { display: block; margin-bottom: 8px; color: var(--sg-green); font-size: 1.0625rem; font-weight: 600; }
.sg-mm-list { list-style: none; margin: 0; padding: 0; }
.sg-mm-list li { margin: 0; padding: 0; }
.sg-mm-list a { display: flex; align-items: center; gap: 12px; padding: 5px 0; color: var(--sg-green); font-size: var(--sg-body); text-decoration: none; }
.sg-mm-list a .sg-mm-ico { color: var(--sg-green); }
.sg-mm-list a:hover { color: var(--sg-green-dark); }
.sg-mm-list a:hover span { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Mitte: Highlights ---- */
.sg-mm-main { padding: 32px 40px 36px; }
#top .sg-mega-menu .sg-mm-eyebrow { margin: 0 0 4px; color: var(--sg-accent); font-size: var(--sg-meta); font-weight: 700; letter-spacing: var(--sg-tracking-caps); text-transform: uppercase; }
#top .sg-mega-menu .sg-mm-title { margin: 0 0 4px; color: var(--sg-green); font-size: 1.75rem; line-height: 1.15; font-weight: 600; }
#top .sg-mega-menu .sg-mm-sub { margin: 0 0 24px; color: var(--sg-green); font-size: 1.125rem; }
.sg-mm-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.sg-mm-product { display: flex; flex-direction: column; text-decoration: none; color: var(--sg-green); }
.sg-mm-product__img { position: relative; display: block; margin-bottom: 12px; border-radius: var(--sg-radius-card); overflow: hidden; }
.sg-mm-product__img img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; transition: transform 0.3s ease; }
.sg-mm-product:hover .sg-mm-product__img img { transform: scale(1.04); }
.sg-mm-product__name { color: var(--sg-green); font-weight: 600; font-size: var(--sg-body); line-height: 1.3; margin-bottom: 4px; }
.sg-mm-product__desc { color: var(--sg-green); font-size: var(--sg-meta); line-height: 1.4; }
.sg-mm-product__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; }
.sg-mm-product__price { color: var(--sg-green); font-weight: 600; font-size: var(--sg-meta); }
.sg-mm-product__price del { color: var(--sg-green); opacity: 0.7; font-weight: 400; margin-right: 4px; }
.sg-mm-product__go { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1.5px solid var(--sg-green); border-radius: 50%; color: var(--sg-green); transition: all 0.2s ease; }
.sg-mm-product:hover .sg-mm-product__go { background: var(--sg-green); border-color: var(--sg-green); color: #fff; }
.sg-mm-cta-wrap { text-align: center; margin-top: 28px; }
.sg-mm-cta { display: inline-flex; align-items: center; gap: 10px; padding: 12px 26px 12px 30px; border: 2px solid var(--sg-accent); border-radius: var(--sg-radius-btn); color: var(--sg-accent); font-weight: 600; text-decoration: none; letter-spacing: var(--sg-tracking-caps); text-transform: uppercase; font-size: var(--sg-body); transition: all 0.2s ease; }
.sg-mm-cta:hover { background: var(--sg-accent); color: #fff; }
.sg-mm-cta .sg-mm-ico { width: 18px; height: 18px; flex-basis: 18px; }

/* ---- Rechte Spalte: USP-Panel ---- */
.sg-mm-aside { margin: 16px 16px 16px 0; padding: 28px 28px 0; background: var(--sg-beige-light); border-radius: var(--sg-radius-card); display: flex; flex-direction: column; overflow: hidden; }
.sg-mm-usps { list-style: none; margin: 0; padding: 0; }
.sg-mm-usps li { display: flex; align-items: flex-start; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(35, 75, 72, 0.12); }
.sg-mm-usps li:last-child { border-bottom: 0; }
.sg-mm-usp__ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 52px; width: 52px; height: 52px; border: 1.5px solid var(--sg-green); border-radius: 50%; color: var(--sg-green); }
.sg-mm-usp__ico .sg-mm-ico { width: 24px; height: 24px; flex-basis: 24px; }
.sg-mm-usp__text { color: var(--sg-green); font-size: var(--sg-body); line-height: 1.4; }
.sg-mm-usp__text strong { display: block; color: var(--sg-green); font-size: 1.125rem; font-weight: 600; margin-bottom: 2px; }
.sg-mm-deco { margin: auto -28px 0; }
.sg-mm-deco img { display: block; width: 100%; height: 190px; object-fit: cover; object-position: center bottom; }

/* Mobile-Elemente auf dem Desktop aus */
.sg-mega-mobile-header, .sg-mega-close { display: none; }

/* ---- Schmaler Desktop ---- */
@media (max-width: 1399px) {
    .sg-mega-inner { grid-template-columns: 250px minmax(0, 1fr) 280px; }
    .sg-mm-nav { padding: 24px 24px 24px 28px; }
    .sg-mm-main { padding: 24px 28px 28px; }
    #top .sg-mega-menu .sg-mm-title { font-size: 1.625rem; }
    .sg-mm-products { gap: 16px; }
    .sg-mm-deco img { height: 150px; }
}
@media (max-width: 1199px) {
    .sg-mega-inner { grid-template-columns: 230px minmax(0, 1fr); }
    .sg-mm-aside { display: none; }
}

/* ---- Tablet / Mobil (< 992px): Vollbild, gestapelt ---- */
@media (max-width: 991px) {
    .sg-mega-menu { left: 0 !important; right: 0 !important; transform: translateX(0) translateY(-100%) !important; width: 100% !important; max-width: 100% !important; border-radius: 0 !important; top: 0 !important; max-height: 100vh; height: 100vh; background: var(--sg-mega-bg, #ffffff) !important; }
    .sg-mega-menu.is-active { transform: translateX(0) translateY(0) !important; }
    .sg-mega-close { display: flex; align-items: center; justify-content: center; position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--sg-beige-light); color: var(--sg-green); font-size: 30px; line-height: 1; cursor: pointer; z-index: 10; }
    .sg-mega-mobile-header { display: flex; align-items: center; justify-content: space-between; position: fixed; top: 0; left: 0; right: 72px; padding: 20px 24px; background: var(--sg-mega-bg, #ffffff); border-bottom: 1px solid var(--sg-border); z-index: 5; }
    .sg-mega-mobile-title { font-size: 1.25rem; font-weight: 600; color: var(--sg-green); }
    .sg-mega-shop-link { font-size: var(--sg-meta); font-weight: 600; color: var(--sg-accent); text-decoration: none; padding: 8px 16px; border: 1.5px solid var(--sg-accent); border-radius: var(--sg-radius-btn); }
    .sg-mega-inner { display: block; padding: 88px 24px 40px; }
    .sg-mm-nav { padding: 0 0 20px; border-right: 0; border-bottom: 1px solid var(--sg-border); }
    .sg-mm-main { padding: 20px 0 0; }
    .sg-mm-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .sg-mm-aside { display: block; margin: 24px 0 0; padding: 20px 20px 0; }
    .sg-mm-deco { margin: 0 -20px; }
    body.sg-mega-open { overflow: hidden; }
}
@media (max-width: 767px) {
    .sg-mega-inner { padding: 84px 16px 100px; }
    #top .sg-mega-menu .sg-mm-title { font-size: 1.5rem; }
    .sg-mm-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .sg-mm-product__desc { display: none; }
}
