/* -------- Scrollbar -------- */
.scrollbar-none::-webkit-scrollbar {
    display: none;
}

.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* -------- Megamenu Core -------- */
.nmenu-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Bridge: transparent area between trigger & panel to prevent gap flicker */
.nmenu-wrap::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;
    /* covers the gap */
    background: transparent;
    z-index: 9998;
}

.nmenu-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 9999;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.13), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #efefef;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.nmenu-panel-categories {
    width: min(1280px, calc(100vw - 40px));
    min-height: 680px;
    max-height: 82vh;
}

.nmenu-panel.is-open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* -------- Trigger btn -------- */
.nmenu-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #3d4152;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    border: none;
    background: transparent;
    user-select: none;
}

.nmenu-btn:hover,
.nmenu-btn.active {
    background: #fff5f0;
    color: #ff6a00;
}

.nmenu-btn .chevron {
    transition: transform 0.2s;
    color: #aaa;
}

.nmenu-btn.active .chevron {
    transform: rotate(180deg);
    color: #ff6a00;
}

/* -------- Left sidebar categories -------- */
.cat-sidebar {
    width: 292px;
    min-height: 680px;
    max-height: 82vh;
    overflow-y: auto;
    border-right: 1.5px solid #f5f5f5;
    padding: 10px 8px;
    flex-shrink: 0;
}

.cat-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    font-size: 13px;
    font-weight: 600;
    color: #3d4152;
    white-space: nowrap;
    position: relative;
}

.cat-sidebar-item:hover,
.cat-sidebar-item.cat-active {
    background: #fff5f0;
    color: #ff6a00;
}

.cat-sidebar-item img.cat-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.cat-sidebar-item .cat-icon-ph {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: linear-gradient(135deg, #ff9a3c22, #ff6a0022);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
}

/* -------- Right sub-category panel -------- */
.cat-sub-content {
    flex: 1;
    padding: 22px 34px 30px;
    overflow-y: auto;
    max-height: 82vh;
    min-width: 0;
}

.cat-sub-panel {
    display: none;
}

.cat-sub-panel.cat-panel-active {
    display: block;
}

.sub-cat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(104px, 1fr));
    gap: 28px 26px;
}

.sub-cat-link {
    font-size: 12px;
    font-weight: 700;
    color: #3d4152;
    padding: 8px 6px;
    border-radius: 12px;
    transition: color 0.15s, background 0.15s, transform 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    text-align: center;
    min-width: 0;
}

.sub-cat-link:hover {
    color: #ff6a00;
    background: #fff5f0;
    transform: translateY(-2px);
}

.sub-cat-thumb {
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: #f6f7f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #ff6a00;
    font-size: 22px;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.sub-cat-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sub-cat-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
}

@media (max-width: 1200px) {
    .nmenu-panel-categories {
        width: min(1040px, calc(100vw - 32px));
    }

    .sub-cat-grid {
        grid-template-columns: repeat(5, minmax(96px, 1fr));
        gap: 22px;
    }

    .cat-sidebar {
        width: 260px;
    }
}

.cat-heading-link {
    font-size: 16px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 18px;
    display: block;
    text-decoration: none;
    padding-bottom: 8px;
    border-bottom: 2px solid #f5f5f5;
}

.cat-heading-link:hover {
    color: #ff6a00;
}

/* -------- Vendor cards -------- */
.vendor-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 12px;
    border-radius: 10px;
    border: 1.5px solid #f3f3f3;
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
    background: #fafafa;
    text-decoration: none;
}

.vendor-card:hover {
    border-color: #ff6a00;
    box-shadow: 0 4px 16px rgba(255, 106, 0, 0.10);
    transform: translateY(-2px);
    background: #fff;
}

.vendor-card img {
    height: 38px;
    width: 80px;
    object-fit: contain;
}

.vendor-card span {
    font-size: 11px;
    font-weight: 700;
    color: #444;
    text-align: center;
    max-width: 90px;
    line-height: 1.3;
}

/* -------- Protection cards -------- */
.protection-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1.5px solid #f3f3f3;
    transition: border-color 0.18s, box-shadow 0.18s;
    text-decoration: none;
    background: #fafafa;
}

.protection-card:hover {
    border-color: #ff6a00;
    box-shadow: 0 4px 16px rgba(255, 106, 0, 0.10);
    background: #fff;
}

.protection-card .p-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 22px;
}

.protection-card .p-text h4 {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 2px;
}

.protection-card .p-text p {
    font-size: 11.5px;
    color: #888;
    margin: 0;
}

.protection-card .p-arrow {
    margin-left: auto;
    color: #ccc;
    transition: color 0.18s, transform 0.18s;
}

.protection-card:hover .p-arrow {
    color: #ff6a00;
    transform: translateX(3px);
}

/* -------- Mobile accordion -------- */
.mob-acc-content {
    display: none !important;
}

.mob-acc-content.mob-open {
    display: block !important;
}

.mob-acc-content.mob-vendor-list.mob-open {
    display: flex !important;
}

.mob-acc-chevron {
    transition: transform 0.2s;
}

.mob-acc-btn.mob-expanded .mob-acc-chevron {
    transform: rotate(180deg);
}

/* -------- Keyframes -------- */
@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nmenu-panel.is-open {
    animation: menuFadeIn 0.18s ease forwards;
}

/* Tabs */
#nav-tabs {
    max-width: 1280px;
    margin: 12px auto 0;
    padding: 0 16px;
}

.tab-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    overflow-x: auto;
    border-bottom: 1.5px solid #f3f4f6;
    scroll-behavior: smooth;
    scroll-padding-inline: 50%;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    position: relative;
    top: 1.5px;
    padding: 10px 14px;
    border: none;
    border-bottom: 2.5px solid transparent;
    background: transparent;
    color: #3d4152;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}

.tab-btn:hover,
.tab-btn:focus-visible {
    color: #ff6a00;
}

.tab-btn:focus-visible {
    outline: 2px solid rgba(255, 106, 0, .35);
    outline-offset: -2px;
    border-radius: 6px 6px 0 0;
}

.tab-btn.tab-active {
    color: #ff6a00;
    font-weight: 800;
    border-bottom-color: #ff6a00;
    border-bottom: 5px solid;
}

.tab-badge {
    color: #f59e0b;
    animation: bounce 1s infinite;
}

@media (max-width: 768px) {
    .desk-only {
        display: none !important;
    }

    #mob-ham {
        display: flex !important;
    }

    #desk-nav {
        display: none !important;
    }

    /* Keep the complete tab group centered whenever it fits.
   JavaScript centers the active tab when horizontal overflow is needed. */
    #nav-tabs {
        padding-inline: 10px;
    }

    .tab-row {
        justify-content: safe center;
    }

    .tab-btn {
        font-size: 12px;
        padding: 9px 8px;
        gap: 4px;
    }

    /* Search bar - compact on mobile */
    #nav-search input {
        padding: 9px 12px !important;
        font-size: 12px !important;
    }

    #nav-search button[type=submit] {
        padding: 8px 14px !important;
        font-size: 12px !important;
    }

    #nav-search button[type=button] {
        display: none !important;
    }
}

@media (max-width: 360px) {
    #nav-tabs {
        padding-inline: 6px;
    }

    .tab-btn {
        font-size: 11px;
        padding-inline: 6px;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}
