/* =====================================================
   21SRN - Public Shop Navigation
   Desktop: horizontal premium navigation
   Mobile: collapsible navigation
   ===================================================== */

.spm-menu-section {
    position: relative;
    z-index: 40;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
}

.spm-nav {
    position: relative;
    z-index: 40;
    width: 100%;
    font-family: inherit;
    direction: inherit;
}

.spm-list,
.spm-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.spm-item {
    position: relative;
    min-width: 0;
}

.spm-entry {
    display: flex;
    align-items: center;
    gap: 5px;
}

.spm-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 9px 14px;
    border-radius: 10px;
    color: #203650 !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-shadow: none !important;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.spm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.spm-branch {
    position: relative;
}

.spm-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 40px;
    flex-shrink: 0;
    cursor: pointer;
    list-style: none;
    border-radius: 8px;
    color: #203650;
}

.spm-toggle::-webkit-details-marker,
.spm-hamburger::-webkit-details-marker {
    display: none;
}

.spm-chevron {
    width: 8px;
    height: 8px;
    border-inline-end: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
}

.spm-branch[open] > .spm-toggle .spm-chevron {
    transform: rotate(225deg);
}

/* Desktop navigation */

.spm-menu-section .spm-desktop-wrap {
    display: block;
    width: 100%;
    min-width: 0;
}

.spm-nav--desktop {
    display: block;
    width: 100%;
    overflow: visible;
}

.spm-nav--desktop > .spm-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
    width: 100%;
}

.spm-nav--desktop > .spm-list > .spm-item {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
}

.spm-nav--desktop > .spm-list > .spm-item > .spm-entry {
    min-height: 46px;
    padding: 3px 5px;
    gap: 3px;
    border: 1px solid #b8d6ef;
    border-radius: 11px;
    background: linear-gradient(135deg, #edf7ff 0%, #d5eaff 55%, #c5e0fa 100%);
    box-shadow: 0 3px 10px rgba(35, 83, 130, .12);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.spm-nav--desktop > .spm-list > .spm-item:hover > .spm-entry {
    transform: translateY(-2px);
    border-color: #76addd;
    box-shadow: 0 7px 16px rgba(35, 83, 130, .2);
}

.spm-nav--desktop > .spm-list > .spm-item > .spm-entry > .spm-link {
    width: auto;
    min-width: max-content;
    max-width: none;
    min-height: 40px;
    padding: 7px 11px;
    white-space: nowrap;
    color: #193753 !important;
    font-size: 14px;
    font-weight: 750;
}

.spm-nav--desktop > .spm-list > .spm-item > .spm-entry > .spm-link:hover,
.spm-nav--desktop > .spm-list > .spm-item > .spm-entry > .spm-link:focus-visible {
    color: #0d2742 !important;
    background: rgba(255,255,255,.65) !important;
    outline: none;
}

.spm-nav--desktop .spm-icon,
.spm-nav--desktop .spm-toggle {
    color: #244d70;
}

/* Desktop dropdowns */

.spm-nav--desktop .spm-submenu {
    display: none;
    position: absolute;
    inset-block-start: calc(100% + 7px);
    inset-inline-start: 0;
    z-index: 100;
    min-width: 225px;
    max-width: 300px;
    padding: 8px;
    overflow: visible;
    border: 1px solid #d7e3ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(24, 48, 75, .17);
}

.spm-nav--desktop .spm-branch[open] > .spm-submenu {
    display: block;
}

.spm-nav--desktop .spm-submenu .spm-submenu {
    inset-block-start: -8px;
    inset-inline-start: 100%;
    margin-inline-start: 5px;
}

.spm-nav--desktop .spm-submenu .spm-entry {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 4px;
    margin: 2px 0;
    border-radius: 8px;
    background: #f2f7fc;
    transition: background .2s ease;
}

.spm-nav--desktop .spm-submenu .spm-entry:hover {
    background: #e3effb;
}

.spm-nav--desktop .spm-submenu .spm-link {
    flex: 1;
    justify-content: flex-start;
    min-height: 42px;
    width: auto;
    max-width: none;
    white-space: normal;
    color: #203650 !important;
    font-size: 13px;
    font-weight: 650;
}

.spm-nav--desktop .spm-submenu .spm-toggle {
    color: #244d70;
}

/* Mobile hamburger */

.spm-mobile-shell {
    display: none;
    position: relative;
    z-index: 110;
    width: max-content;
    max-width: 100%;
}

.spm-hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 9px 17px;
    border: 1px solid #a9cbe9;
    border-radius: 11px;
    background: linear-gradient(135deg, #edf7ff, #cfe6fb);
    color: #193753;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    list-style: none;
    box-shadow: 0 4px 12px rgba(35, 83, 130, .13);
}

.spm-hamburger-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 19px;
}

.spm-hamburger-lines i {
    display: block;
    width: 19px;
    height: 2px;
    border-radius: 3px;
    background: currentColor;
}

/* Mobile dropdown panel */

.spm-nav--mobile {
    display: none;
    position: absolute;
    inset-block-start: calc(100% + 8px);
    inset-inline-start: 0;
    z-index: 120;
    width: min(90vw, 370px);
    max-height: min(70vh, 560px);
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #d7e3ef;
    border-radius: 13px;
    background: #fff;
    color: #203650;
    box-shadow: 0 14px 34px rgba(24, 48, 75, .18);
}

.spm-mobile-shell[open] .spm-nav--mobile {
    display: block;
}

.spm-nav--mobile .spm-item {
    width: 100%;
}

.spm-nav--mobile .spm-entry {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
    border-bottom: 1px solid #e9eff5;
}

.spm-nav--mobile .spm-link {
    flex: 1;
    justify-content: flex-start;
    min-height: 46px;
    white-space: normal;
    color: #203650 !important;
}

.spm-nav--mobile .spm-toggle {
    width: 42px;
    height: 42px;
}

.spm-nav--mobile .spm-submenu {
    display: none;
    position: static;
    min-width: 0;
    max-width: none;
    margin: 3px 8px 9px;
    padding: 5px 9px;
    border: 0;
    border-inline-start: 2px solid #b9d5ed;
    border-radius: 0;
    background: #f5f9fd;
    box-shadow: none;
}

.spm-nav--mobile .spm-branch[open] > .spm-submenu {
    display: block;
}

.spm-nav--mobile .spm-submenu .spm-entry {
    background: transparent;
}

.spm-nav--mobile .spm-submenu .spm-link {
    font-size: 13px;
}

/* Header placement and responsive behavior */

@media (min-width: 992px) {
    .shop-details .card-body > .d-flex.flex-lg-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 22px !important;
        overflow: visible !important;
    }

    .shop-details .card-body > .d-flex.flex-lg-row > .spm-menu-section {
        flex: 1 1 auto;
        min-width: 0;
        order: 1;
    }

    .shop-details .card-body > .d-flex.flex-lg-row > .d-flex.align-items-center {
        flex: 0 0 auto;
        order: 2;
    }

    .spm-nav--desktop > .spm-list {
        justify-content: center;
    }

    .spm-mobile-shell {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .shop-details .card-body > .d-flex.flex-lg-row {
        display: flex;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 14px !important;
        overflow: visible !important;
    }

    .spm-menu-section {
        display: flex;
        flex: 0 0 auto;
        width: 100%;
        justify-content: flex-start;
        order: 1;
        margin: 0;
        padding: 0;
    }

    .spm-desktop-wrap {
        display: none !important;
    }

    .spm-mobile-shell {
        display: block !important;
        width: 100%;
    }

    .spm-hamburger {
        width: 100%;
        justify-content: center;
    }

    .spm-nav--mobile {
        width: 100%;
        max-width: 100%;
    }

    .shop-details:has(.spm-mobile-shell) {
        height: auto !important;
        min-height: 0 !important;
    }

    .shop-details:has(.spm-mobile-shell) .card-body {
        height: auto !important;
        min-height: 0 !important;
        padding: 12px !important;
        overflow: visible !important;
    }

    .spm-nav--desktop {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .spm-nav *,
    .spm-mobile-shell * {
        transition: none !important;
    }
}

/* Fix: transparent submenu arrow control */
.spm-nav .spm-toggle,
.spm-nav .spm-toggle:hover,
.spm-nav .spm-toggle:focus,
.spm-nav .spm-toggle:focus-visible,
.spm-nav .spm-toggle:active {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: none;
}

.spm-nav .spm-toggle {
    padding: 0 !important;
    min-width: 24px;
    border-radius: 0 !important;
}

.spm-nav .spm-chevron {
    background: transparent !important;
    box-shadow: none !important;
}

/* 21SRN - Premium shop menu visual update */

/* Main desktop menu buttons */
.spm-nav--desktop > .spm-list > .spm-item > .spm-entry {
    background: linear-gradient(120deg, #102d4f 0%, #145b78 55%, #087e83 100%) !important;
    border: 1px solid #39c6d6 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 13px rgba(8, 48, 75, .22) !important;
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease !important;
}

.spm-nav--desktop > .spm-list > .spm-item:hover > .spm-entry {
    background: linear-gradient(120deg, #16416b 0%, #087e91 60%, #08a6a0 100%) !important;
    border-color: #70e4e8 !important;
    box-shadow: 0 7px 20px rgba(0, 130, 150, .3) !important;
    transform: translateY(-2px);
}

.spm-nav--desktop > .spm-list > .spm-item > .spm-entry > .spm-link,
.spm-nav--desktop > .spm-list > .spm-item > .spm-entry > .spm-link:hover {
    color: #fff !important;
    background: transparent !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .2) !important;
}

.spm-nav--desktop > .spm-list > .spm-item > .spm-entry > .spm-toggle {
    color: #fff !important;
}

/* Completely transparent submenu arrow controls */
.spm-nav details.spm-branch > summary.spm-toggle,
.spm-nav details.spm-branch > summary.spm-toggle:hover,
.spm-nav details.spm-branch > summary.spm-toggle:focus,
.spm-nav details.spm-branch > summary.spm-toggle:focus-visible,
.spm-nav details.spm-branch > summary.spm-toggle:active {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: none !important;
    background-color: transparent !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-width: 24px !important;
    width: 24px !important;
    border-radius: 0 !important;
}

.spm-nav details.spm-branch > summary.spm-toggle::before,
.spm-nav details.spm-branch > summary.spm-toggle::after {
    display: none !important;
    content: none !important;
}

.spm-nav .spm-toggle .spm-chevron {
    display: block;
    background: transparent !important;
    box-shadow: none !important;
    border-color: currentColor !important;
    pointer-events: none;
}

/* Keep dropdown items readable */
.spm-nav--desktop .spm-submenu .spm-entry {
    background: #f2f7fc !important;
}

.spm-nav--desktop .spm-submenu .spm-entry:hover {
    background: #e3effb !important;
}

.spm-nav--desktop .spm-submenu .spm-link {
    color: #203650 !important;
    background: transparent !important;
}

.spm-nav--desktop .spm-submenu .spm-toggle {
    color: #145b78 !important;
}

/* Mobile menu */
.spm-nav--mobile .spm-entry {
    background: #f0f7fb !important;
    border-radius: 9px;
    margin-bottom: 5px;
}

.spm-nav--mobile .spm-link {
    color: #173c59 !important;
}

.spm-nav--mobile .spm-toggle {
    color: #087e83 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.spm-nav--mobile .spm-submenu {
    background: #f5f9fd !important;
}

@media (prefers-reduced-motion: no-preference) {
    .spm-nav--desktop > .spm-list > .spm-item > .spm-entry {
        animation: spmMenuAppear .35s ease both;
    }

    @keyframes spmMenuAppear {
        from { opacity: .75; transform: translateY(4px); }
        to { opacity: 1; transform: translateY(0); }
    }
}


/* Final fix: white arrow, fully transparent and compact control */
.spm-nav .spm-entry > .spm-branch > summary.spm-toggle,
.spm-nav .spm-entry > .spm-branch > summary.spm-toggle:hover,
.spm-nav .spm-entry > .spm-branch > summary.spm-toggle:focus,
.spm-nav .spm-entry > .spm-branch > summary.spm-toggle:focus-visible,
.spm-nav .spm-entry > .spm-branch > summary.spm-toggle:active {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 20px !important;
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    height: 28px !important;
    min-height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    color: #fff !important;
    list-style: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.spm-nav .spm-toggle::before,
.spm-nav .spm-toggle::after {
    content: none !important;
    display: none !important;
}

.spm-nav .spm-toggle::-webkit-details-marker {
    display: none !important;
}

.spm-nav .spm-toggle .spm-chevron {
    display: block !important;
    width: 8px !important;
    height: 8px !important;
    background: transparent !important;
    border: 0 !important;
    border-inline-end: 2px solid #fff !important;
    border-bottom: 2px solid #fff !important;
    box-shadow: none !important;
    color: #fff !important;
    pointer-events: none !important;
}


/* Remove any independent background from submenu branch */
.spm-nav--desktop .spm-entry > details.spm-branch,
.spm-nav--desktop .spm-entry > details.spm-branch[open] {
    display: inline-flex !important;
    flex: 0 0 20px !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    min-width: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.spm-nav--desktop .spm-entry > details.spm-branch > summary.spm-toggle {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
}

.spm-nav--desktop .spm-entry > details.spm-branch > .spm-submenu {
    position: absolute !important;
}

