/* ================================================================
   BAJRA BOOKSTORE SMART SEARCH — STYLESHEET
   Accents: #8E1616 (Crimson), #D4AF37 (Gold), #140305 (Dark)
   ================================================================ */

.bajra-smart-search-form {
    position: relative;
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}

.bajra-search-input-wrap {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 2px 4px 2px 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.bajra-search-input-wrap:focus-within {
    border-color: #8E1616;
    box-shadow: 0 0 0 3px rgba(142, 22, 22, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
}

.bajra-search-icon {
    font-size: 16px;
    color: #8E1616;
    margin-right: 10px;
}

.bajra-search-field {
    flex: 1;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: #1a202c !important;
    padding: 8px 0 !important;
    height: auto !important;
    min-width: 0;
}

.bajra-search-field::placeholder {
    color: #a0aec0;
    font-size: 13.5px;
}

.bajra-search-clear {
    background: none;
    border: none;
    color: #a0aec0;
    font-size: 14px;
    padding: 6px 8px;
    cursor: pointer;
    transition: color 0.2s;
}

.bajra-search-clear:hover {
    color: #8E1616;
}

.bajra-search-submit {
    background: #8E1616 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 8px 18px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, transform 0.1s ease !important;
    white-space: nowrap;
}

.bajra-search-submit:hover {
    background: #D4AF37 !important;
    color: #140305 !important;
}

/* --- LIVE SEARCH DROPDOWN --- */
.bajra-live-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    overflow: hidden;
    max-height: 480px;
    display: flex;
    flex-direction: column;
}

.bajra-dropdown-header {
    padding: 10px 16px;
    background: #fdfcfb;
    border-bottom: 1px solid #f1f5f9;
    font-size: 12px;
    color: #64748b;
}

.bajra-dropdown-header strong {
    color: #8E1616;
}

.bajra-dropdown-list {
    overflow-y: auto;
    max-height: 380px;
}

.bajra-search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #f8fafc;
    text-decoration: none !important;
    color: inherit !important;
    transition: background-color 0.15s ease;
    gap: 12px;
}

.bajra-search-result-item:last-child {
    border-bottom: none;
}

.bajra-search-result-item:hover,
.bajra-search-result-item.is-selected {
    background-color: #fdf8f4;
}

.bajra-item-thumb {
    width: 42px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.bajra-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bajra-item-details {
    flex: 1;
    min-width: 0;
}

.bajra-item-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bajra-search-result-item:hover .bajra-item-title {
    color: #8E1616;
}

.bajra-item-author {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 4px 0;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bajra-item-cat {
    display: inline-block;
    font-size: 10.5px;
    background: #f1f5f9;
    color: #475569;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
}

.bajra-item-meta {
    text-align: right;
    flex-shrink: 0;
}

.bajra-item-price {
    display: block;
    font-size: 13.5px;
    font-weight: 800;
    color: #8E1616;
}

.bajra-item-price ins {
    text-decoration: none;
    color: #8E1616;
}

.bajra-item-price del {
    font-size: 11px;
    color: #94a3b8;
    margin-right: 4px;
}

.bajra-item-stock {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.bajra-item-stock.in-stock {
    color: #16a34a;
}

.bajra-item-stock.out-of-stock {
    color: #dc2626;
}

.bajra-dropdown-footer {
    padding: 10px 16px;
    background: #fdfcfb;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

.bajra-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #8E1616 !important;
    text-decoration: none !important;
}

.bajra-view-all-btn:hover {
    color: #D4AF37 !important;
}

.bajra-search-loading,
.bajra-dropdown-empty {
    padding: 24px 16px;
    text-align: center;
    color: #64748b;
    font-size: 13.5px;
}

.bajra-dropdown-empty p {
    margin: 0 0 10px 0;
}

/* Category Pill Styling for Zero-Result View */
.bajra-cat-pill {
    display: inline-block;
    padding: 8px 16px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 24px;
    color: #1e293b !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.bajra-cat-pill:hover {
    border-color: #8E1616;
    background: #8E1616;
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .bajra-smart-search-form {
        max-width: 100%;
    }
    
    .bajra-search-submit {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }

    .bajra-search-field {
        font-size: 13px !important;
    }

    .bajra-item-thumb {
        width: 36px;
        height: 52px;
    }

    .bajra-item-title {
        font-size: 13px;
    }
}

/* ================================================================
   SLIDE-DOWN MOBILE SEARCH BAR & GENRE DRAWER STYLES
   ================================================================ */
.bb-mobile-search-dropdown-bar {
    background: #1a1a1a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.bb-mobile-search-dropdown-bar .bajra-smart-search-form {
    max-width: 100%;
}

.bb-mobile-search-dropdown-bar .bajra-search-input-wrap {
    background: #ffffff;
    border-radius: 20px;
    padding: 2px 6px 2px 14px;
}

/* Slide-out Genre Drawer */
.bb-genre-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    z-index: 1000000;
    display: flex;
    justify-content: flex-end;
}

.bb-genre-drawer-content {
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.25);
    animation: bbSlideInRight 0.25s ease-out;
}

@keyframes bbSlideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.bb-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fdfcfb;
    border-bottom: 1px solid #eef2f6;
}

.bb-drawer-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
}

.bb-drawer-close:hover {
    color: #8E1616;
}

.bb-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
}

.bb-drawer-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bb-drawer-cat-list li {
    margin-bottom: 8px;
}

.bb-drawer-cat-list a {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.bb-drawer-cat-list a:hover {
    background: #8E1616;
    color: #ffffff !important;
    transform: translateX(4px);
}
