/**
 * Just Computers Mega Menu - Frontend Styles
 * Clean Light Theme (Fiverr Style) - Uncluttered Columns, Clean Typography, Zero Card Boxes
 * Fully Isolated & Theme-Proof
 */

:root {
    --jcm-font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    
    /* Clean Light Theme (Default - Fiverr Style) */
    --jcm-bg-base: #ffffff;
    --jcm-bg-overlay: #ffffff;
    --jcm-text-title: #222325;
    --jcm-text-links: #62646a;
    --jcm-text-hover: #1dbf73;
    --jcm-accent: #1dbf73;
    --jcm-border-light: #e4e5e7;
    --jcm-search-btn-bg: #222325;
    --jcm-badge-pink: #e83e8c;
    
    --jcm-transition: all 0.18s ease;
}

/* -------------------------------------------------------------
   THEME-PROOF ISOLATION RESETS
   ------------------------------------------------------------- */
#jcm-fullscreen-overlay,
#jcm-fullscreen-overlay *,
#jcm-fullscreen-overlay *::before,
#jcm-fullscreen-overlay *::after {
    box-sizing: border-box !important;
    -webkit-font-smoothing: antialiased;
}

#jcm-fullscreen-overlay ul,
#jcm-fullscreen-overlay ol {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

#jcm-fullscreen-overlay li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

#jcm-fullscreen-overlay a {
    text-decoration: none !important;
    color: inherit;
}

#jcm-fullscreen-overlay button,
#jcm-fullscreen-overlay input {
    font-family: inherit;
}

/* -------------------------------------------------------------
   FLOATING & TOPBAR TRIGGER BUTTONS
   ------------------------------------------------------------- */
.jcm-floating-trigger {
    position: fixed;
    z-index: 2147483646 !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #222325 !important;
    border: 1px solid #222325 !important;
    border-radius: 9999px !important;
    color: #ffffff !important;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    transition: all 0.18s ease;
    font-family: var(--jcm-font-main);
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    user-select: none;
}

.jcm-floating-trigger:hover {
    background: #1dbf73 !important;
    border-color: #1dbf73 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(29, 191, 115, 0.3);
}

.jcm-floating-trigger.jcm-pos-bottom-right { bottom: 24px; right: 24px; }
.jcm-floating-trigger.jcm-pos-bottom-left { bottom: 24px; left: 24px; }
.jcm-floating-trigger.jcm-pos-top-right { top: 24px; right: 24px; }
.jcm-floating-trigger.jcm-pos-top-left { top: 24px; left: 24px; }

.jcm-trigger-icon {
    display: inline-flex;
    align-items: center;
    color: #fff;
}

.jcm-trigger-label {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

/* -------------------------------------------------------------
   FULLSCREEN OVERLAY CONTAINER (CLEAN LIGHT)
   ------------------------------------------------------------- */
.jcm-fullscreen-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2147483647 !important;
    font-family: var(--jcm-font-main);
    color: #222325 !important;
    overflow: hidden !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.jcm-fullscreen-overlay.is-active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.jcm-overlay-backdrop {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.jcm-overlay-container {
    position: relative !important;
    z-index: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    background: #ffffff !important;
    background: var(--jcm-bg-overlay, #ffffff) !important;
    overflow: hidden !important;
    transform: translateY(-8px);
    transition: transform 0.25s ease;
}

.jcm-fullscreen-overlay.is-active .jcm-overlay-container {
    transform: translateY(0);
}

/* -------------------------------------------------------------
   TOP HEADER BAR (FIVERR STYLE)
   ------------------------------------------------------------- */
.jcm-clean-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 32px !important;
    padding: 18px 48px !important;
    border-bottom: 1px solid #e4e5e7 !important;
    background: #ffffff !important;
    flex-shrink: 0 !important;
}

.jcm-header-brand {
    display: flex !important;
    align-items: center !important;
}

.jcm-brand-title-clean {
    font-size: 26px !important;
    font-weight: 800 !important;
    letter-spacing: -0.6px !important;
    color: #222325 !important;
    display: flex !important;
    align-items: baseline !important;
    line-height: 1 !important;
    cursor: default;
}

.jcm-brand-title-clean strong {
    font-weight: 800 !important;
    color: #222325 !important;
}

.jcm-brand-title-clean .jcm-dot {
    color: #1dbf73 !important;
    font-size: 32px !important;
    line-height: 0 !important;
    margin-left: 1px !important;
}

.jcm-brand-logo-img {
    max-height: 40px !important;
    width: auto !important;
    object-fit: contain !important;
}

/* SEARCH INPUT */
.jcm-clean-search {
    flex: 1 !important;
    max-width: 650px !important;
}

.jcm-clean-search-box {
    display: flex !important;
    align-items: center !important;
    border: 1px solid #c5c6c9 !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    overflow: hidden !important;
    height: 44px !important;
    transition: border-color 0.18s ease;
}

.jcm-clean-search-box:focus-within {
    border-color: #222325 !important;
}

.jcm-clean-search-box input {
    flex: 1 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    color: #222325 !important;
    background: transparent !important;
    line-height: 44px !important;
    height: 44px !important;
    margin: 0 !important;
}

.jcm-clean-search-box input::placeholder {
    color: #95979d !important;
}

.jcm-search-btn {
    width: 48px !important;
    height: 44px !important;
    border: none !important;
    outline: none !important;
    background: #222325 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
}

.jcm-search-btn:hover {
    background: #1dbf73 !important;
}

.jcm-search-clear {
    background: transparent !important;
    border: none !important;
    font-size: 20px !important;
    line-height: 1 !important;
    color: #95979d !important;
    cursor: pointer !important;
    padding: 0 10px !important;
}

.jcm-clean-close-btn {
    background: transparent !important;
    border: none !important;
    color: #62646a !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px !important;
    border-radius: 50% !important;
    transition: all 0.18s ease;
    margin: 0 !important;
}

.jcm-clean-close-btn:hover {
    color: #222325 !important;
    background: #f1f2f4 !important;
}

/* -------------------------------------------------------------
   HORIZONTAL CATEGORY BAR (1ST LEVEL TABS - FIVERR STYLE)
   ------------------------------------------------------------- */
.jcm-clean-cat-bar {
    border-bottom: 1px solid #e4e5e7 !important;
    background: #ffffff !important;
    padding: 0 48px !important;
    flex-shrink: 0 !important;
}

.jcm-clean-cat-scroll {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
}
.jcm-clean-cat-scroll::-webkit-scrollbar { display: none !important; }

.jcm-cat-tab-btn {
    background: transparent !important;
    border: none !important;
    padding: 14px 18px !important;
    font-family: var(--jcm-font-main) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #62646a !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    position: relative !important;
    transition: all 0.18s ease;
}

.jcm-cat-tab-btn:hover {
    color: #222325 !important;
}

.jcm-cat-tab-btn.active {
    color: #222325 !important;
    font-weight: 700 !important;
}

.jcm-cat-tab-btn.active::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 18px !important;
    right: 18px !important;
    height: 3px !important;
    background: #1dbf73 !important;
    border-radius: 2px 2px 0 0 !important;
}

/* -------------------------------------------------------------
   MAIN BODY: CLEAN COLUMNS AREA (ZERO CARDS, CLEAN TYPOGRAPHY)
   ------------------------------------------------------------- */
.jcm-overlay-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 36px 48px !important;
    background: #ffffff !important;
}

.jcm-section-panel {
    display: none;
}

.jcm-section-panel.active {
    display: block !important;
    animation: jcmCleanFade 0.2s ease;
}

@keyframes jcmCleanFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* COLUMNS GRID / WRAPPER */
.jcm-clean-columns-wrapper {
    display: grid !important;
    gap: 36px 40px !important;
    align-items: start !important;
    max-width: 1440px !important;
}

.jcm-clean-columns-wrapper.jcm-cols-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}
.jcm-clean-columns-wrapper.jcm-cols-5 {
    grid-template-columns: repeat(5, 1fr) !important;
}
.jcm-clean-columns-wrapper.jcm-cols-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}
.jcm-clean-columns-wrapper.jcm-cols-auto {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}

/* COLUMN GROUP (NO CARDS, ZERO BORDERS) */
.jcm-clean-col-group {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 24px !important;
}

/* 2ND LEVEL: BOLD COLUMN TITLE */
.jcm-clean-col-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #222325 !important;
    margin: 0 0 14px 0 !important;
    letter-spacing: -0.2px !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    line-height: 1.3 !important;
}

.jcm-clean-col-title a {
    color: #222325 !important;
    text-decoration: none !important;
    transition: color 0.18s ease;
}

.jcm-clean-col-title a:hover {
    color: #1dbf73 !important;
}

/* 3RD LEVEL: CLEAN LINKS UNDER COLUMN */
.jcm-clean-link-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.jcm-clean-link-list li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.jcm-clean-item-link {
    font-size: 14px !important;
    color: #62646a !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    transition: all 0.18s ease;
    display: inline-flex !important;
    align-items: center !important;
}

.jcm-clean-item-link:hover {
    color: #1dbf73 !important;
    transform: translateX(2px);
}

.jcm-clean-item-link .jcm-link-text {
    color: inherit !important;
}

/* BADGES (NEW, HOT) */
.jcm-clean-badge {
    display: inline-block !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    padding: 3px 6px !important;
    border-radius: 3px !important;
    letter-spacing: 0.5px !important;
    margin-left: 6px !important;
    text-transform: uppercase !important;
}

.jcm-clean-badge.badge-new {
    background: #fdf2f7 !important;
    color: #e83e8c !important;
    border: 1px solid #f8d7e6 !important;
}

.jcm-clean-badge.badge-hot {
    background: #fff5f5 !important;
    color: #e53e3e !important;
    border: 1px solid #fed7d7 !important;
}

.jcm-clean-badge.badge-sale {
    background: #eefbf4 !important;
    color: #1dbf73 !important;
    border: 1px solid #bbf2d6 !important;
}

/* FILTERED STATE */
.jcm-filtered-out {
    display: none !important;
}

/* -------------------------------------------------------------
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ------------------------------------------------------------- */
@media (max-width: 1024px) {
    .jcm-clean-header {
        padding: 16px 24px !important;
        gap: 20px !important;
    }

    .jcm-clean-cat-bar {
        padding: 0 24px !important;
    }

    .jcm-overlay-body {
        padding: 24px !important;
    }

    .jcm-clean-columns-wrapper.jcm-cols-4,
    .jcm-clean-columns-wrapper.jcm-cols-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .jcm-clean-header {
        padding: 14px 16px !important;
        gap: 12px !important;
        flex-wrap: wrap !important;
    }

    .jcm-clean-search {
        order: 3 !important;
        max-width: 100% !important;
        width: 100% !important;
        margin-top: 8px !important;
    }

    .jcm-clean-cat-bar {
        padding: 0 16px !important;
    }

    .jcm-cat-tab-btn {
        padding: 12px 14px !important;
        font-size: 14px !important;
    }

    .jcm-overlay-body {
        padding: 20px 16px !important;
    }

    .jcm-clean-columns-wrapper,
    .jcm-clean-columns-wrapper.jcm-cols-4,
    .jcm-clean-columns-wrapper.jcm-cols-5,
    .jcm-clean-columns-wrapper.jcm-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px 20px !important;
    }

    .jcm-floating-trigger {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .jcm-clean-columns-wrapper,
    .jcm-clean-columns-wrapper.jcm-cols-4,
    .jcm-clean-columns-wrapper.jcm-cols-5,
    .jcm-clean-columns-wrapper.jcm-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}
