/* =====================================================
   Santec Products Mega Menu
   categories → sub categories → product previews
   ===================================================== */
.navbar .navbar-nav .dropdown .dropdown-menu.smm-dropdown {
    padding: 12px 20px 30px;
    background: transparent;
    box-shadow: none;
    border-top: 0 !important;
    animation: smm-open .28s cubic-bezier(.22, .61, .36, 1) both;
}
.smm {
    --smm-accent: var(--base-color, #c92c46);
    --smm-soft: var(--base-soft, #fbeef0);
    --smm-text: var(--dark-gray, #16171b);
    --smm-muted: #6b6f78;
    --smm-line: #eeeef0;
    --smm-bg: #f8f8f9;
    --smm-ease: cubic-bezier(.22, .61, .36, 1);
    display: grid;
    grid-template-columns: 270px 250px minmax(0, 1fr);
    max-width: 1240px;
    height: 530px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--smm-line);
    border-radius: 16px;
    box-shadow: 0 2px 4px rgba(16, 17, 20, .03), 0 24px 60px rgba(16, 17, 20, .10);
    overflow: hidden;
    text-align: left;
}

/* ---------- shared ---------- */
.smm-label {
    display: block;
    padding: 0 24px 10px;
    color: var(--smm-muted);
    font-size: 13px;
    line-height: 18px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.smm-cats, .smm-subs { padding: 24px 0; overflow-y: auto; }
.smm-cats { background: var(--smm-bg); border-right: 1px solid var(--smm-line); }
.smm-subs { position: relative; border-right: 1px solid var(--smm-line); }
.smm-products { position: relative; padding: 24px 28px; overflow-y: auto; }

/* ---------- column 1 · categories ---------- */
.navbar .navbar-nav .dropdown .smm a.smm-cat,
.navbar .navbar-nav .dropdown .smm a.smm-cat:hover {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 12px 2px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--smm-text);
    transition: background-color .25s var(--smm-ease);
}
.navbar .navbar-nav .dropdown .smm a.smm-cat:hover { background: rgba(16, 17, 20, .04); }
.navbar .navbar-nav .dropdown .smm a.smm-cat.active {
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 17, 20, .06), 0 0 0 1px var(--smm-line);
}
.smm-cat-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    filter: grayscale(1) opacity(.55);
    transition: filter .3s var(--smm-ease);
}
.smm-cat:hover .smm-cat-icon,
.smm-cat.active .smm-cat-icon { filter: none; }
.smm-cat-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.smm-cat-name { font-size: 15px; line-height: 20px; font-weight: 600; }
.smm-cat-meta { color: var(--smm-muted); font-size: 13px; line-height: 18px; font-weight: 400; }
.smm-chevron {
    color: var(--smm-accent);
    font-size: 12px;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .25s var(--smm-ease), transform .25s var(--smm-ease);
}
.smm-item.active .smm-chevron { opacity: 1; transform: none; }

/* ---------- column 2 · sub categories ---------- */
.navbar .navbar-nav .dropdown .smm a.smm-sub,
.navbar .navbar-nav .dropdown .smm a.smm-sub:hover {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 12px 2px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #45474e;
    font-size: 14.5px;
    line-height: 20px;
    font-weight: 500;
    transition: background-color .25s var(--smm-ease), color .25s var(--smm-ease);
}
.navbar .navbar-nav .dropdown .smm a.smm-sub:hover { color: var(--smm-text); background: rgba(16, 17, 20, .04); }
.navbar .navbar-nav .dropdown .smm a.smm-sub.active { background: var(--smm-soft); color: var(--smm-accent); font-weight: 600; }
.smm-count {
    flex: 0 0 auto;
    min-width: 24px;
    padding: 0 7px;
    border-radius: 20px;
    background: #f1f1f3;
    color: var(--smm-muted);
    font-size: 13px;
    line-height: 22px;
    font-weight: 600;
    text-align: center;
    transition: background-color .25s var(--smm-ease), color .25s var(--smm-ease);
}
.smm-sub.active .smm-count { background: var(--smm-accent); color: #fff; }

.smm-sub-list { flex: 1 1 auto; }
.navbar .navbar-nav .dropdown .smm a.smm-viewall,
.navbar .navbar-nav .dropdown .smm a.smm-viewall:hover {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px 24px 0;
    padding: 12px 14px;
    border-radius: 100px;
    background: var(--smm-text);
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
}
.navbar .navbar-nav .dropdown .smm a.smm-viewall:hover { background: var(--smm-accent); }
.smm-viewall i, .smm-head-link i { font-size: 14px; }  /* timing comes from santec-modern.css */
.smm-viewall:hover i, .smm-head-link:hover i { transform: translateX(3px); }

/* ---------- column 3 · products ---------- */
.smm-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--smm-line);
}
.smm-head-title {
    display: block;
    color: var(--smm-text);
    font-size: 19px;
    line-height: 26px;
    font-weight: 700;
    letter-spacing: -.015em;
}
.smm-head-count { display: block; color: var(--smm-muted); font-size: 13px; line-height: 20px; }
.navbar .navbar-nav .dropdown .smm a.smm-head-link,
.navbar .navbar-nav .dropdown .smm a.smm-head-link:hover {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    color: var(--smm-accent);
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.smm-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.navbar .navbar-nav .dropdown .smm a.smm-card,
.navbar .navbar-nav .dropdown .smm a.smm-card:hover {
    display: block;
    padding: 0;
    color: var(--smm-text);
}
.smm-card-img {
    display: block;
    aspect-ratio: 600 / 415;
    border-radius: 12px;
    background: var(--smm-bg);
    overflow: hidden;
}
.smm-card-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--smm-ease);
}
.smm-card-img.is-contain img { object-fit: contain; padding: 14%; }
.smm-card:hover .smm-card-img img { transform: scale(1.05); }
.smm-card-title {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    transition: color .25s var(--smm-ease);
}
.smm-card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--smm-muted);
    font-size: 13px;
    line-height: 18px;
    font-weight: 500;
    transition: color .25s var(--smm-ease);
}
.smm-card-link i { font-size: 12px; transition: transform .25s var(--smm-ease); }
.smm-card:hover .smm-card-title,
.smm-card:hover .smm-card-link { color: var(--smm-accent); }
.smm-card:hover .smm-card-link i { transform: translateX(3px); }

/* ---------- panes · smooth cross-fade ---------- */
.smm-pane {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity .28s var(--smm-ease), transform .28s var(--smm-ease), visibility 0s linear .28s;
}
.smm-pane.active {
    position: relative;
    inset: auto;
    opacity: 1;
    visibility: visible;
    overflow: visible;
    pointer-events: auto;
    transform: none;
    transition: opacity .28s var(--smm-ease), transform .28s var(--smm-ease), visibility 0s;
}
.smm-subs > .smm-pane { display: flex; flex-direction: column; padding: 24px 0; }
.smm-subs > .smm-pane.active { min-height: 100%; padding: 0; }
.smm-subs { padding: 24px 0; }
.smm-products > .smm-pane { padding: 24px 28px; }
.smm-products > .smm-pane.active { padding: 0; }

@keyframes smm-open {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* ---------- compact menu text (site-wide paragraph sizes don't apply here) ---------- */
.navbar .navbar-nav .dropdown .smm .smm-card-title { font-size: 15px !important; line-height: 20px !important; }
.navbar .navbar-nav .dropdown .smm .smm-card-link { font-size: 13px !important; }
.navbar .navbar-nav .dropdown .smm a.smm-viewall,
.navbar .navbar-nav .dropdown .smm a.smm-head-link { font-size: 15px !important; }

/* ---------- designed scrollbars: thin, rounded, shown on hover ---------- */
.smm-cats, .smm-subs, .smm-products {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    scrollbar-gutter: stable;
    transition: scrollbar-color .3s ease;
}
.smm-cats:hover, .smm-subs:hover, .smm-products:hover { scrollbar-color: rgba(201, 44, 70, .35) transparent; }
.smm-cats::-webkit-scrollbar, .smm-subs::-webkit-scrollbar, .smm-products::-webkit-scrollbar { width: 6px; height: 6px; }
.smm-cats::-webkit-scrollbar-track, .smm-subs::-webkit-scrollbar-track, .smm-products::-webkit-scrollbar-track { background: transparent; margin: 14px 0; }
.smm-cats::-webkit-scrollbar-thumb, .smm-subs::-webkit-scrollbar-thumb, .smm-products::-webkit-scrollbar-thumb { border-radius: 10px; background: transparent; }
.smm-cats:hover::-webkit-scrollbar-thumb, .smm-subs:hover::-webkit-scrollbar-thumb, .smm-products:hover::-webkit-scrollbar-thumb { background: rgba(201, 44, 70, .3); }
.smm-cats::-webkit-scrollbar-thumb:hover, .smm-subs::-webkit-scrollbar-thumb:hover, .smm-products::-webkit-scrollbar-thumb:hover { background: rgba(201, 44, 70, .6); }
.smm-cats::-webkit-scrollbar-button, .smm-subs::-webkit-scrollbar-button, .smm-products::-webkit-scrollbar-button { display: none; height: 0; }
/* the sub-category list never needs its own scrollbar */
.smm-subs { overflow-y: hidden; }

/* ---------- laptops ---------- */
@media (max-width: 1199px) {
    .smm { grid-template-columns: 240px 220px minmax(0, 1fr); height: 450px; }
    .smm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .smm-products { padding: 20px 22px; }
}

/* ---------- tablets & phones · chips + 2-col grid ---------- */
@media (max-width: 991px) {
    .navbar .navbar-nav .dropdown .dropdown-menu.smm-dropdown { padding: 0 0 12px; animation: none; }
    .smm {
        display: block;
        height: auto;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .smm-label { display: none; }
    .smm-cats, .smm-subs {
        display: flex;
        gap: 8px;
        padding: 12px 15px;
        border-right: 0;
        border-bottom: 1px solid var(--smm-line);
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .smm-cats::-webkit-scrollbar, .smm-subs::-webkit-scrollbar { display: none; }
    .smm-cats { background: #fff; }

    .navbar .navbar-nav .dropdown .smm a.smm-cat,
    .navbar .navbar-nav .dropdown .smm a.smm-cat:hover,
    .navbar .navbar-nav .dropdown .smm a.smm-sub,
    .navbar .navbar-nav .dropdown .smm a.smm-sub:hover {
        flex: 0 0 auto;
        gap: 8px;
        margin: 0;
        padding: 6px 12px 6px 6px;
        border: 1px solid var(--smm-line);
        border-radius: 100px;
        background: #fff;
        box-shadow: none;
        white-space: nowrap;
    }
    .navbar .navbar-nav .dropdown .smm a.smm-sub,
    .navbar .navbar-nav .dropdown .smm a.smm-sub:hover { padding: 7px 8px 7px 14px; font-size: 13.5px; }
    .navbar .navbar-nav .dropdown .smm a.smm-cat.active,
    .navbar .navbar-nav .dropdown .smm a.smm-sub.active {
        border-color: var(--smm-accent);
        background: var(--smm-soft);
        box-shadow: none;
    }
    .smm-cat-icon { flex-basis: 28px; width: 28px; height: 28px; border-radius: 50%; }
    .smm-cat-name { font-size: 13.5px; }
    .smm-cat-meta, .smm-chevron { display: none; }

    .smm-subs > .smm-pane, .smm-subs > .smm-pane.active { flex-direction: row; padding: 0; min-height: 0; }
    .smm-subs > .smm-pane.active { display: flex; }
    .smm-subs > .smm-pane:not(.active) { display: none; }
    .smm-sub-list { display: flex; gap: 8px; }
    .smm-subs .smm-viewall { display: none !important; }

    .smm-products { padding: 15px; overflow: visible; }
    .smm-products > .smm-pane:not(.active) { display: none; }
    .smm-pane { transition: none; transform: none; }
    .smm-head { margin-bottom: 14px; padding-bottom: 10px; }
    .smm-head-title { font-size: 16px; line-height: 22px; }
    .smm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .smm-card-title { margin-top: 8px; font-size: 13.5px; line-height: 19px; }
    .smm-card-link { display: none; }
}
@media (min-width: 576px) and (max-width: 991px) {
    .smm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
