/* MOBILE SIDEBAR STYLES */

/* Hamburger Trigger */
.fifo-mobile-menu-trigger {
    display: none;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: #374151;
}

@media (max-width: 991px) {
    .fifo-mobile-menu-trigger {
        display: flex !important;
        order: 1;
        flex: 0 0 auto;
    }
}

/* Base Wrapper & Overlay */
.fifo-sidebar-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 999998 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.fifo-sidebar-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.fifo-sidebar-wrapper {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
    width: 85vw !important;
    max-width: 400px !important;
    height: 100vh !important;
    background: #FFFFFF !important;
    z-index: 999999 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
    border-radius: 0 24px 24px 0 !important;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15) !important;
    overflow: hidden !important; /* Contains the sliding track */
    display: flex !important;
    flex-direction: column !important;
}
.fifo-sidebar-wrapper.is-open {
    transform: translateX(0) !important;
}

/* Slider Track Mechanism */
.fifo-sidebar-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}
.fifo-sidebar-panel {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
}
.fifo-sidebar-panel::-webkit-scrollbar {
    width: 4px;
}
.fifo-sidebar-panel::-webkit-scrollbar-thumb {
    background: #E5E7EB;
    border-radius: 4px;
}

/* Header inside Panel 0 */
.fifo-sb-profile-header {
    background: linear-gradient(135deg, #7C3AED 0%, #4C1D95 100%);
    padding: 30px 20px 60px 20px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.fifo-sb-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    border: none;
    cursor: pointer;
}
.fifo-sb-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    object-fit: cover;
}
.fifo-sb-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.fifo-sb-greeting {
    color: #FFF;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}
.fifo-sb-welcome {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    margin: 0;
}
.fifo-sb-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.5);
    color: #FFF;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 6px;
    width: fit-content;
}

/* Action Cards */
.fifo-sb-action-cards {
    display: flex;
    background: #FFF;
    border-radius: 12px;
    margin: -30px 20px 20px 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    position: relative;
    z-index: 10;
    border: 1px solid #F3F4F6;
    flex-shrink: 0;
}
.fifo-sb-action-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    text-decoration: none;
    position: relative;
    gap: 8px;
}
.fifo-sb-action-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: #F3F4F6;
}
.fifo-sb-action-icon {
    color: #7C3AED;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fifo-sb-action-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.fifo-sb-action-title {
    color: #4B5563;
    font-size: 11px;
    font-weight: 700;
}
.fifo-sb-action-count {
    background: #F3F4F6;
    color: #111827;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
}
.fifo-sb-action-cards-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    pointer-events: none;
}

/* Category Lists */
.fifo-sb-list {
    display: flex;
    flex-direction: column;
    padding: 0 20px;
    flex-shrink: 0;
}
.fifo-sb-list-item {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #F3F4F6;
    text-decoration: none;
    gap: 16px;
    cursor: pointer;
    background: none;
    border-left: none; border-right: none; border-top: none;
    width: 100%;
    text-align: left;
}
.fifo-sb-list-item:last-child {
    border-bottom: none;
}
.fifo-sb-list-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F9FAFB; /* Fallback */
    flex-shrink: 0;
}
.fifo-sb-list-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}
.fifo-sb-list-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.fifo-sb-list-title {
    color: #111827;
    font-size: 14px;
    font-weight: 600;
}
.fifo-sb-list-sub {
    color: #6B7280;
    font-size: 11px;
}
.fifo-sb-list-arrow {
    color: #9CA3AF;
}

/* Accordions for Shop Pet & Shop Categories */
.fifo-sb-acc-wrap {
    padding: 10px 20px;
    flex-shrink: 0;
}
.fifo-sb-acc-header {
    display: flex;
    align-items: center;
    padding: 14px 0;
    gap: 14px;
    cursor: pointer;
    border-bottom: 1px solid #F3F4F6;
}
.fifo-sb-acc-header .fifo-sb-list-icon {
    background: #F3ECFF;
    color: #7C3AED;
}
.fifo-sb-acc-chevron {
    transition: transform 0.3s ease;
    color: #9CA3AF;
}
.fifo-sb-acc.is-open .fifo-sb-acc-chevron {
    transform: rotate(180deg);
}
.fifo-sb-acc-body {
    display: none;
    padding: 16px 0;
    border-bottom: 1px solid #F3F4F6;
}
.fifo-sb-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.fifo-sb-grid-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.fifo-sb-grid-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #F9FAFB;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: contain;
    padding: 4px;
}
.fifo-sb-grid-item span {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

/* Utility & Footers */
.fifo-sb-why {
    margin: 20px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px;
    flex-shrink: 0;
}
.fifo-sb-why h3 {
    text-align: center;
    color: #7C3AED;
    font-size: 13px;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.fifo-sb-why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.fifo-sb-why-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}
.fifo-sb-why-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fifo-sb-why-item span {
    font-size: 10px;
    font-weight: 700;
    color: #000000;
    line-height: 1.2;
}

.fifo-sb-footer {
    padding: 20px;
    border-top: 1px solid #F3F4F6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-bottom: 60px; /* Space for whatsapp */
}
.fifo-sb-footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}
.fifo-sb-footer a {
    color: #6B7280;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* WhatsApp Floater */
.fifo-sb-whatsapp {
    position: sticky;
    bottom: 0;
    background: #7C3AED;
    padding: 12px 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 20;
    margin-top: auto;
}
.fifo-sb-cat {
    position: absolute;
    bottom: 0;
    left: 20px;
    width: 90px;
    height: 90px;
    pointer-events: none;
    z-index: 21;
}
.fifo-sb-cat img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transform: translateY(18px) scale(1.1); /* Poking up from the bottom */
}
.fifo-sb-whatsapp-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 20px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #FFF;
    text-decoration: none;
}
.fifo-sb-whatsapp-btn .text-block {
    display: flex;
    flex-direction: column;
}
.fifo-sb-whatsapp-btn .text-title {
    font-size: 9px;
    text-transform: uppercase;
    opacity: 0.9;
}
.fifo-sb-whatsapp-btn .text-sub {
    font-size: 12px;
    font-weight: 700;
}

/* Drill-Down Panel Specifics */
.fifo-sb-panel-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #FFFFFF;
    border-bottom: 1px solid #F3F4F6;
    position: sticky;
    top: 0;
    z-index: 10;
}
.fifo-sb-back-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    cursor: pointer;
    padding: 0;
}
.fifo-sb-back-btn svg {
    color: #6B7280;
}
