/* Banco Product Search – front-end styles
   brand green: #00923F  |  font: "Noto Sans" */

/* Header search button (desktop nav) */
.bps-header-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    background: #00923F;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-family: "Noto Sans", sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
    text-decoration: none;
}
.bps-header-search-btn:hover,
.bps-header-search-btn:focus {
    background: #007a34;
    color: #fff !important;
    outline: none;
    transform: translateY(-1px);
}
.bps-header-search-btn i {
    font-size: 13px;
}

/* Scrolled header — keep the same green button */
header.indx-header.scrolled#sticky-nvabar .bps-header-search-btn {
    background: #00923F;
    color: #fff !important;
}
header.indx-header.scrolled#sticky-nvabar .bps-header-search-btn:hover {
    background: #007a34;
}

/* Mobile nav group: wraps search icon + hamburger as one flex child so
   Bootstrap space-between doesn't break the layout on smaller screens */
.bps-mob-nav-group {
    display: none;
    align-items: center;
    gap: 14px;
}

/* Mobile search button */
.bps-mobile-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 18px;
    color: var(--black, #000);
    text-decoration: none;
    transition: color 0.2s;
    flex-shrink: 0;
}
.bps-mobile-search-btn:hover {
    color: #00923F;
}

/* Default transparent header — white to match hamburger lines */
header.indx-header:not(.scrolled) .bps-mobile-search-btn {
    color: #000;
}

/* After scroll (white bg) — black */
header.indx-header.scrolled .bps-mobile-search-btn {
    color: #000;
}

@media (max-width: 991.98px) {
    .bps-mob-nav-group {
        display: flex;
    }
    /* Remove any stray margin now that toggler lives inside the group */
    .bps-mob-nav-group .navbar-toggler {
        margin-left: 0 !important;
    }
    /* Hide the in-menu desktop icon */
    .bps-nav-search-item {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .bps-mob-nav-group {
        display: none !important;
    }
    .bps-nav-search-item {
        display: block !important;
    }
}

/* Modal overlay */
.bps-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.bps-modal-overlay.active {
    display: flex;
}

.bps-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    padding: 32px;
    position: relative;
    animation: bpsSlideUp .25s ease;
}
@keyframes bpsSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bps-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    color: #666;
}
.bps-modal-close:hover { color: #000; }

.bps-modal-title {
    margin: 0 0 20px;
    font-family: "Noto Sans", sans-serif;
    font-size: 22px;
    color: #1E1E1E;
}

.bps-modal-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #444;
}

.bps-modal-field {
    margin-bottom: 16px;
    flex: 1;
}

.bps-modal-row {
    display: flex;
    gap: 12px;
}

.bps-modal-form input[type="text"],
.bps-modal-form select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    font-family: "Noto Sans", sans-serif;
    transition: border-color 0.2s;
}
.bps-modal-form input[type="text"]:focus,
.bps-modal-form select:focus {
    border-color: #00923F;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,146,63,.12);
}

/* Shared button */
.bps-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: "Noto Sans", sans-serif;
    cursor: pointer;
    transition: background .2s, transform .15s;
}
.bps-btn-primary {
    background: #00923F;
    color: #fff;
}

.bps-btn-primary:hover {
    background: #007a34;
    transform: translateY(-1px);
}

/* Search page (shortcode output) */

.bps-search-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 0 60px;
}

/* Search form */
.bps-search-form {
    background: #f7f8fa;
    border-radius: 12px;
    padding: 24px 28px 20px;
    margin-bottom: 32px;
}

.bps-form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.bps-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #444;
}

.bps-field input[type="text"],
.bps-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    font-family: "Noto Sans", sans-serif;
    background: #fff;
    transition: border-color 0.2s;
}
.bps-field input[type="text"]:focus,
.bps-field select:focus {
    border-color: #00923F;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,146,63,.12);
}

.bps-field-submit {
    padding-bottom: 2px;
}

/* Results count */
.bps-results-header {
    margin-bottom: 20px;
}
.bps-results-count {
    font-size: 15px;
    color: #666;
    margin: 0;
}

/* Card grid */
.bps-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.bps-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.bps-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    transform: translateY(-2px);
}

.bps-card-image {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    overflow: hidden;
}
.bps-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    background: #fff;
}
.bps-card-img-placeholder {
    font-size: 48px;
    color: #ccc;
}

.bps-card-body {
    padding: 20px;
}

.bps-card-title {
    font-family: "Noto Sans", sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #1E1E1E;
    margin: 0 0 10px;
}

/* ── Badges ── */
.bps-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-right: 6px;
    margin-bottom: 12px;
}
.bps-badge-brand {
    background: #00923F;
    color: #fff;
}
.bps-badge-cat {
    background: #e8f5ee;
    color: #00703A;
}

/* ── Meta table inside card ── */
.bps-card-meta {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}
.bps-card-meta th {
    text-align: left;
    color: #888;
    font-weight: 600;
    padding: 4px 12px 4px 0;
    white-space: nowrap;
    width: 90px;
    vertical-align: top;
}
.bps-card-meta td {
    color: #333;
    padding: 4px 0;
    word-break: break-word;
}

/* ── Pagination ── */
.bps-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}
.bps-pagination ul {
    list-style: none;
    display: flex;
    gap: 6px;
    padding: 0;
    margin: 0;
}
.bps-pagination li a,
.bps-pagination li span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: all .2s;
}
.bps-pagination li a:hover {
    border-color: #00923F;
    color: #00923F;
}
.bps-pagination li span.current {
    background: #00923F;
    color: #fff;
    border-color: #00923F;
}

/* ── No results / welcome ── */
.bps-no-results,
.bps-welcome {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}
.bps-no-results-icon,
.bps-welcome-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 16px;
}
.bps-no-results h3,
.bps-welcome h3 {
    font-size: 20px;
    color: #1E1E1E;
    margin: 0 0 8px;
}
.bps-no-results p,
.bps-welcome p {
    max-width: 480px;
    margin: 0 auto;
    font-size: 15px;
}

/* ═══════════════ Responsive ═══════════════ */
@media (max-width: 991px) {
    .bps-form-grid {
        grid-template-columns: 1fr 1fr;
    }
    .bps-field-keyword {
        grid-column: span 2;
    }
}

@media (max-width: 575px) {
    .bps-form-grid {
        grid-template-columns: 1fr;
    }
    .bps-field-keyword {
        grid-column: span 1;
    }

    .bps-modal-row {
        flex-direction: column;
    }

    .bps-results-grid {
        grid-template-columns: 1fr;
    }

    .bps-search-wrap {
        padding: 24px 10px 40px;
    }

    .bps-search-form {
        padding: 16px;
    }
}

/* ═══════════════ Sticky right-side search button — removed ═══════════════ */
/* Sticky button has been replaced by the header nav button (.bps-header-search-btn). */
.bps-sticky-search-btn {
    display: none !important;
}
