/* --- Meesho-like two-panel layout --- */

.smart-search-box {
    margin-top: -20px !important;
}

.boxing-scanner .bi-camera {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.3rem;
    color: #0d5afd;
}

/* Dynamic heights between header and footer */
html, body {
    height: 100%;
    /* Allow page scroll; scroll locking is handled by internal wrappers */
}

:root {
    --header-h: 0px;
    --footer-h: 0px;
    --pane-h: calc(100vh - var(--header-h) - var(--footer-h));
}

/* Ensure the main content wrapper doesn't scroll the page */
.page-content-wrapper {
    height: var(--pane-h);
    min-height: var(--pane-h);
    overflow: hidden; /* contain internal scrollers (panes) */
}

/* New wrapper to contain the two-panel layout */
.content-wrapper {
    /* Keep the two-panel area fixed between header and footer */
    position: fixed;
    top: var(--header-h);
    bottom: var(--footer-h);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* panes manage their own scrolling */
}

/* Ensure categories-wrap takes the available height and doesn't overflow */
.categories-wrap {
    display: flex;
    flex: 1 1 auto;
    min-height: 0; /* Allows internal scrolling */
    height: 100%;
    padding-bottom: 0;
}

.left-pane {
    width: 112px;
    flex: 0 0 112px;
    height: 100%; /* Use 100% of wrapper height */
    overflow-y: auto;
    border-right: 1px solid #eef1f6;
    position: relative;
}

.right-pane {
    flex: 1 1 auto;
    height: 100%; /* Use 100% of wrapper height */
    overflow-y: auto;
    position: relative;
}

/* Preserve scroll behavior, contain scroll chaining, and hide scrollbars */
.left-pane, .right-pane {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.left-pane::-webkit-scrollbar,
.right-pane::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.left-pane::-webkit-scrollbar-thumb, .right-pane::-webkit-scrollbar-thumb {
    background: #cfd6e4;
    border-radius: 4px;
}

.left-pane::-webkit-scrollbar-track, .right-pane::-webkit-scrollbar-track {
    background: transparent;
}


/* category item on left */
.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: background .2s, color .2s;
    text-align: center;
    position: relative;
}

    .cat-item + .cat-item {
        border-top: 1px solid #e9edf5;
    }
/* Meesho-like light tile */
.cat-item {
    background: #f4f6fb;
    border: 1px solid #e6e8f0;
}

    .cat-item.active, .cat-item:hover {
        background: #f3e9ff;
        border-color: #e4d2ff;
        color: #6f1ab1;
    }
        /* Active indicator bar on the far left */
        .cat-item.active::before {
            content: "";
            position: absolute;
            left: 0;
            top: 8px;
            bottom: 8px;
            width: 4px;
            border-radius: 4px;
            background: #D98B4F;
        }

.cat-thumb {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f2f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.cat-name {
    font-size: 13px;
    line-height: 1.2;
    font-weight: 500;
    color: #616173;
    text-align: center;
    max-width: 92px;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
    hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    font-family: "Mier book", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}


/* right sections */
.section-divider {
    border: 0;
    border-top: 2px solid #eef1f6;
    margin: 18px 0 0px;
}

.section-title {
    font-weight: 800;
    font-size: 1rem;
    margin: 0 0 10px;
    color: #0d5afd;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0px 0 12px !important;
}
    /* Gradient animated text like #chatSubtitle */
    .section-header .title {
        font-weight: 800;
        font-size: 1rem;
        white-space: nowrap;
        background: linear-gradient(90deg, #2563eb 0%, #bcdcff 20%, #e2d7d7 40%, #bcdcff 60%, #bcc6dd 100%);
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
        background-size: 400% 100%;
        will-change: background-position;
        display: inline-block;
        animation: subtitle-glow-move 5.2s linear infinite;
        margin-left: 10px;
    }

    .section-header::after {
        content: "";
        height: 2px;
        background: #eef1f6;
        flex: 1;
        border-radius: 2px;
    }

.subgrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 4px;
    padding-left: 10px;
    padding-right: 10px;
}

.subcard {
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 12px;
    padding: 5px 2px;;
    text-align: center;
    box-shadow: 0 2px 12px rgba(13, 90, 253, 0.04);
    cursor: pointer;
}

.subcard-thumb {
    width: 56px;
    height: 56px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 50%;
    overflow: hidden;
}

    .subcard-thumb img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.subcard-title {
    font-size: 10.72px;
    font-weight: 600;
    color: #616173;
    white-space: normal;
    word-break: break-word;
    hyphens: auto;
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}


@media (max-width: 768px) {
    .left-pane {
        width: 96px;
        padding-left: 5px;

        flex-basis: 96px;
    }

    .subgrid {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }
}

@media (max-width: 420px) {
    .subgrid {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }
}


/* Keyframes for animated gradient text (matches self.css) */
@keyframes subtitle-glow-move {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* One-time section highlight when selected from left pane */
.highlight-once {
    position: relative;
    animation: section-glow-pop 800ms ease-out 1;
}

@keyframes section-glow-pop {
    0% {
        box-shadow: 0 0 0 0 rgba(217,139,79,0);
        background-color: transparent;
    }

    30% {
        box-shadow: 0 0 0 10px rgba(217,139,79,0.18);
        background-color: rgba(217,139,79,0.06);
    }

    70% {
        box-shadow: 0 0 0 4px rgba(217,139,79,0.10);
        background-color: rgba(217,139,79,0.03);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(217,139,79,0);
        background-color: transparent;
    }
}

@media (prefers-reduced-motion: reduce) {
    .highlight-once {
        animation: none;
    }
}

/* Ensure footer stays at the bottom */
.footer-nav-area {
    position: sticky;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}
 /* floating button*/
  /* Floating Action Button Styles */
  .fab-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 1000;
}

.fab-main {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0d5afd, #0a4fd9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(13, 90, 253, 0.4);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20;
    position: relative;
    animation: float 3s ease-in-out infinite, pulse 2s ease-in-out infinite;
    border: none;
    outline: none;
    overflow: hidden;
}

.fab-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #0d5afd, #4a90e2, #0d5afd);
    background-size: 200% 200%;
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: all 0.6s ease;
    animation: gradientPulse 3s ease infinite;
}

.fab-main:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 25px rgba(13, 90, 253, 0.5);
}

.fab-main:hover::before {
    opacity: 1;
}

.fab-main:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 4px 10px rgba(13, 90, 253, 0.3);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes gradientPulse {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.fab-main:hover {
    background: #0b4ad1;
}

.fab-main.active {
    transform: rotate(45deg);
}

.fab-main i {
    color: #fff;
    font-size: 1.8rem;
    transition: transform 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.fab-main:hover i {
    transform: rotate(90deg) scale(1.1);
}

.fab-options {
    position: absolute;
    bottom: 65px;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.fab-options.show {
    display: flex;
}

.fab-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.fab-option-button {
    width: 50px;
    height: 50px;
    background: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.fab-option-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.fab-option-button:hover::before {
    transform: scale(1);
}

.fab-option-label {
    background: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #4a4a4a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateX(20px);
    border: none;
    position: relative;
    z-index: 1;
    overflow: visible;
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    margin: 2px;
}

.fab-option-label::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 23px;
    background: linear-gradient(45deg, #ff00ff, #00f7ff, #00ff6a, #ffeb3b);
    background-size: 400% 400%;
    animation: borderRun 3s linear infinite;
    opacity: 0;
    transition: all 0.5s ease;
    z-index: -1;
    filter: blur(1.5px);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

@keyframes borderRun {
    0% { 
        background-position: 0% 50%;
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
    }
    50% { 
        background-position: 100% 50%;
        box-shadow: 0 0 12px #00ff6a;
    }
    75% { 
        background-position: 200% 50%;
        box-shadow: 0 0 18px #ffeb3b;
    }
    100% { 
        background-position: 0% 50%;
        box-shadow: 0 0 10px #ff00ff;
    }
}

.fab-option:hover .fab-option-label::after {
    opacity: 1;
    filter: blur(1px) brightness(1.3);
    transform: scale(1.02);
}

.fab-option-label::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 24px;
    z-index: -1;
    background: linear-gradient(45deg, 
        #ff00ff, #ff00ff,
        #00f7ff, #00f7ff,
        #00ff6a, #00ff6a,
        #ffeb3b, #ffeb3b,
        #ff00ff, #ff00ff);
    background-size: 400% 400%;
    animation: neonBorder 8s linear infinite;
    opacity: 0;
    transition: all 0.3s ease;
    filter: blur(1.5px) brightness(1.2);
}

.fab-option:hover .fab-option-label::before {
    opacity: 1;
    filter: blur(1.5px) brightness(1.3);
    transform: scale(1.02);
}

.fab-option:nth-child(1) .fab-option-label::after {
    background: linear-gradient(45deg, #ff00ff, #ff00c3, #00f7ff, #ff00ff);
    animation-duration: 3s;
}

.fab-option:nth-child(2) .fab-option-label::after {
    background: linear-gradient(45deg, #00f7ff, #00ffaa, #00ff6a, #00f7ff);
    animation-duration: 4s;
}

.fab-option:nth-child(3) .fab-option-label::after {
    background: linear-gradient(45deg, #00ff6a, #a2ff00, #ffeb3b, #00ff6a);
    animation-duration: 5s;
}

.fab-option:nth-child(4) .fab-option-label::after {
    background: linear-gradient(45deg, #ffeb3b, #ff9100, #ff00ff, #ffeb3b);
    animation-duration: 6s;
}

@keyframes neonBorder {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

@keyframes borderGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.fab-options.show .fab-option-label {
    opacity: 1;
    transform: translateX(0);
    animation: labelAppear 0.4s ease-out forwards;
}

@keyframes labelAppear {
    0% { opacity: 0; transform: translateX(20px) scale(0.9); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

.fab-option:hover .fab-option-button {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.fab-option:hover .fab-option-label {
    transform: translateX(0) scale(1.05);
    color: #2c3e50;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.fab-option:hover .fab-option-label {
    color: #2c3e50;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.fab-option i {
    color: #0d5afd;
    font-size: 1.4rem;
}

/* Different colors for each option */
.fab-option:nth-child(1) .fab-option-button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.fab-option:nth-child(2) .fab-option-button {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.fab-option:nth-child(3) .fab-option-button {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.fab-option:nth-child(4) .fab-option-button {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.fab-option .fab-option-button i {
    color: white;
    transition: transform 0.3s ease;
}

.fab-option:hover .fab-option-button i {
    transform: scale(1.2);
}

/* Animation for each option */
.fab-option {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.fab-options.show .fab-option {
    opacity: 1;
    transform: translateY(0);
}

.fab-options.show .fab-option:nth-child(1) { transition-delay: 0.05s; }
.fab-options.show .fab-option:nth-child(2) { transition-delay: 0.1s; }
.fab-options.show .fab-option:nth-child(3) { transition-delay: 0.15s; }
.fab-options.show .fab-option:nth-child(4) { transition-delay: 0.2s; }

/* Overlay */
.fab-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

.fab-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .fab-container {
        bottom: 70px;
        right: 15px;
    }
    
    .fab-option-label {
        font-size: 12px;
        padding: 6px 12px;
    }
}
