* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body,
.opac-body {
    background: #eef2f7;
}

/* OPAC search results header */
.opac-search-header {
    background: linear-gradient(160deg, var(--brand-button-bg, #c2cc08) 0%, #ed6b2f 100%);
    color: var(--brand-button-text, #fff);
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem) clamp(1.5rem, 3.5vw, 2.25rem);
}

.opac-search-header-inner {
    max-width: 920px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.35rem;
}

.opac-search-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: inherit;
}

.opac-search-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.opac-search-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

.opac-search-logo {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    object-fit: cover;
}

.opac-search-title {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
}

.opac-search-header-form {
    width: 100%;
}

.opac-search-header-row {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
}

.opac-search-input {
    flex: 1;
    min-width: 0;
    height: 50px;
    padding: 0 1.15rem;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.opac-search-input:focus {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.opac-search-btn {
    height: 50px;
    padding: 0 1.35rem;
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
    background: var(--brand-success-bg, #2e7d32);
    border-color: var(--brand-success-bg, #2e7d32);
}

.opac-search-btn:hover {
    background: var(--brand-success-hover-bg, #256628);
    border-color: var(--brand-success-hover-bg, #256628);
    color: var(--brand-success-text, #fff);
}

.opac-search-header-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    margin-top: 0.85rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.88);
}

.opac-search-query-label strong {
    color: #fff;
}

.opac-search-clear-link {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.opac-search-clear-link:hover {
    color: rgba(255, 255, 255, 0.85);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.opac-top-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.opac-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--brand-nav-link, #ed6b2f);
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.opac-nav-link:hover {
    background-color: var(--brand-nav-hover-bg, #ffffff);
    color: var(--brand-nav-hover-text, #c2cc08);
    transform: scale(1.03);
}

.opac-nav-link:focus-visible {
    outline: 3px solid rgba(31, 121, 2, 0.35);
    outline-offset: 2px;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;

}

.logo img {
    height: 50px;
    margin-right: 10px;
}

.logout-btn {
    padding: 10px 30px;
    background-color: var(--brand-button-hover-bg, #f90);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    border-radius: 50px;
    font-weight: 900;
}

.hero-text img {
    width: 100%;
    height: auto;
    overflow-x: auto;
    margin-bottom: 30px;
    display: flex;
}

.carousel {
    display: flex;
    overflow-x: auto;

    gap: 15px;

    margin-top: 10px;
    margin-bottom: 30px;
}



.carousel img {
    height: 200px;
    border-radius: 5px;
}

.layout {
    display: flex;
}

.opac-results-shell {
    display: flex;
    align-items: flex-start;
    gap: clamp(1.25rem, 3vw, 2rem);
    max-width: 1240px;
    margin: 0 auto;
    padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 3vw, 1.75rem) clamp(2.5rem, 4vw, 3.5rem);
}

.opac-facets {
    width: 280px;
    flex: 0 0 280px;
    position: sticky;
    top: 1rem;
}

.opac-filters-panel {
    background: #fff;
    border: 1px solid #ed6b2f;
    border-radius: 14px;
    padding: 1.35rem;
    box-shadow: 0 4px 18px rgba(15, 42, 92, 0.05);
}

.opac-filter-group + .opac-filter-group {
    margin-top: 1.35rem;
    padding-top: 1.35rem;
    border-top: 1px solid #ed6b2f;
}

.opac-filter-heading {
    margin: 0 0 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ed6b2f;
}

.opac-filter-result-count {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--brand-nav-link, #ed6b2f);
    line-height: 1.2;
}

.opac-filter-select {
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    border-color: #ed6b2f;
    font-size: 0.95rem;
}

.opac-facet-item {
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.35rem;
    border-radius: 10px;
    color: #1e293b;
    font-size: 0.95rem;
    background: #ed6b2f;
}

.opac-facet-item.is-active {
    background: color-mix(in srgb, var(--brand-nav-link, #ed6b2f) 10%, white);
    border-left: 4px solid var(--brand-nav-link, #ed6b2f);
    font-weight: 700;
}

.opac-facet-link {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0;
    color: var(--brand-nav-link, #ed6b2f);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
}

.opac-facet-link:hover {
    text-decoration: underline;
}

.opac-facet-form {
    margin: 0;
}

/* Legacy facet cards — kept for copies page compatibility */
.opac-facet-card {
    background: #fff;
    border: 1px solid #e6edf2;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
}

.opac-facet-card--primary {
    padding: 0;
    overflow: hidden;
}

.opac-facet-card--primary .opac-facet-title {
    padding: 1rem 1.1rem;
    background: #fff;
    color: var(--brand-nav-link, #22333b);
    border-bottom: 1px solid #22333b;
}

.opac-facet-title {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 8px;
}

.opac-facet-sub {
    margin-bottom: 8px;
}

.opac-results-panel {
    flex: 1;
    min-width: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(15, 42, 92, 0.05);
    overflow: hidden;
}

.opac-results-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid #eef2f7;
    background: #fafbfd;
}

.opac-results-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
}

.opac-results-subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.92rem;
    color: #64748b;
}

.opac-results-empty {
    padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
    text-align: center;
}

.opac-results-empty-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #334155;
}

.opac-results-empty-text {
    margin: 0;
    color: #64748b;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.55;
}

.opac-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.25rem 1.5rem 1.75rem;
}

.opac-result-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eef2f7;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.opac-result-row:hover {
    border-color: #dbe2ea;
    box-shadow: 0 10px 24px rgba(15, 42, 92, 0.08);
    transform: translateY(-1px);
}

.opac-result-row--ebook {
    text-decoration: none;
    color: inherit;
    display: flex;
}

.opac-result-row--ebook:hover .opac-result-title-link {
    text-decoration: underline;
}

.opac-result-title-link {
    color: var(--brand-nav-link, #22333b);
    text-decoration: none;
    font-weight: 700;
}

.opac-result-title-link:hover {
    text-decoration: underline;
}

.opac-results-panel .pagination {
    margin: 0 1.5rem 1.75rem;
}

@media (max-width: 991.98px) {
    .opac-results-shell {
        flex-direction: column;
    }

    .opac-facets {
        width: 100%;
        flex: 0 0 auto;
        position: static;
    }

    .opac-filters-panel {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1rem 1.25rem;
        padding: 1.15rem;
    }

    .opac-filter-group + .opac-filter-group {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

    .opac-search-header-row {
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .opac-search-header-row {
        flex-direction: column;
    }

    .opac-search-btn {
        width: 100%;
    }

    .opac-results-list {
        padding: 1rem;
    }

    .opac-results-head {
        padding: 1.1rem 1rem;
    }
}

.sidebar {
    width: 15%;
    background-color: #ffffff;

    margin-bottom: auto;
    margin-top: 20px;
    border-radius: 20px;
    margin-left: 50px;
    text-align: center;
    display: grid;
}

.sidebar h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    background-color: var(--brand-nav-link, #1f7902);
    color: var(--brand-button-text, #ffffff);
    padding: 12px;
    text-align: center;
    border-top-right-radius: 20px;
    border-top-left-radius: 20px;
}


.sidebar button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: #ffffff;
    cursor: pointer;
    text-align: left;
}

.sidebar a {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: #ffffff;
    cursor: pointer;
    text-align: left;
    color: #000;
    /* make text black */
    text-decoration: none;
}

.sidebar a:hover {
    background: #f0f0f0;
}

.sidebar a.active {
    background: var(--brand-nav-link, #1f7902);
    color: #000;
    font-weight: bold;
}

.sidebar button.active {
    background: var(--brand-button-hover-bg, #f90);
    color: var(--brand-button-text, #ffffff);
}

.main-content {
    flex: 1;
    padding: 20px 50px 20px 20px;
    min-width: 0;
}

.filters {
    min-height: 90px;
    align-items: center;
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 20px;
    background-color: white;
    overflow: hidden;
    margin-right: 0;
}

.filters select,
.filters input {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}


.courses-list{
    max-height: 300px;   /* adjust height if needed */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 5px;
}

/* Optional nicer scrollbar */
.courses-list::-webkit-scrollbar{
    width: 6px;
}

.courses-list::-webkit-scrollbar-thumb{
    background: #888;
    border-radius: 10px;
}

.courses-list::-webkit-scrollbar-thumb:hover{
    background: #555;
}

        #nab{
        color: #ed6b2f  !important;
        }

#searchBar {

    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
    position: relative;
    border-radius: 30px;
    background-color: #edf0f7;
    height: auto;
    display: flex;
    flex-wrap: wrap;

}

.search form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.lahi {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.lahi select {
    flex: 1 1 200px;   /* responsive width */
    min-width: 0;      /* 🔥 IMPORTANT: allows shrinking */
    max-width: 100%;   /* prevents overflow */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#yearFilter {
    border-radius: 50px;
}

#courseInput {
    border-radius: 50px;
    background-color: #edf0f7;

}

#programInput {
    border-radius: 50px;
    background-color: #edf0f7;

}

#nab{
    color: var(--brand-nav-link, #1f7902);
}

#cartButton {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-weight: 500;
}
#cartButton:hover{
            color: var(--brand-nav-link-active, #ffe202);
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-right: 0;
}

.book-card {
    background: white;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    cursor: pointer;

}
.book-card p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px; /* controls truncation length (~25 chars visually) */
    margin: 0 auto;
}

.book-card img {
    height: 180px;
    margin-bottom: 10px;
}

footer {
    padding: 10px;

    background: #05014a;
    color: white;
    text-align: center;
    margin-top: 40px;
}

.foter {

    align-items: center;

}


.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

#loanTermsModal.modal {
    z-index: 1100;
}

#loanTermsModal .modal-content {
    display: block;
    flex-direction: column;
    max-width: 440px;
    width: 92%;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 75%;
    max-width: 900px;
    display: flex;
    flex-direction: row;
    /* side-by-side */
    gap: 25px;
    position: relative;
}

.close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
}



.close:hover {
    color: #000;
}


.close {
    float: right;
    cursor: pointer;
    font-size: 1.2rem;
}

@media (max-width: 991.98px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-width: 100%;
        margin-left: 0 !important;
        margin-right: 0;
        box-shadow: none;
        padding: 12px clamp(12px, 3vw, 20px);
    }

    .main-content {
        padding: 16px clamp(12px, 3vw, 24px) !important;
    }

    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .modal-content {
        width: 94% !important;
        max-width: 100% !important;
        flex-direction: column !important;
        padding: 16px !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-wide,
    .cart-modal-clean,
    .opac-record-modal.modal-content {
        width: 94% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 90vh !important;
        padding: 20px !important;
    }

    .modal-body-flex {
        flex-direction: column;
        align-items: center;
    }

    .modal-left img {
        width: 100%;
        max-width: 220px;
    }

    .filters .lahi {
        flex-direction: column;
        width: 100%;
    }

    .filters select,
    .filters input {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    #nab,
    .opac-new-arrivals-title {
        margin-left: 0 !important;
        font-size: clamp(1.1rem, 5vw, 1.65rem);
    }

    .carousel .arrow.left {
        left: 4px;
    }

    .carousel .arrow.right {
        right: 4px;
    }
}

.carousel-container {
    position: relative;
    width: 100%;

    margin: auto;
    overflow: hidden;



}

.carosel p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;   /* adjust based on your card width */
    margin: 8px auto 0;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 10px;
}


.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.arrow.left {
    left: -15px;
}

.arrow.right {
    right: -15px;

}

.arrow svg {
    width: 30px;
    /* larger arrow */
    height: 30px;
    fill: black;
    color: blue;
}


.arrow:hover {
    background-color: #f8f8f8;
}

#e-book {
    text-align: center;
    background-color: var(--brand-button-bg, #1f7902);
    border-radius: 40px;

    width: 200px;
    align-items: center;
    margin-left: 10px;
}

h1 {
    font-family: 'Rubik', sans-serif;
    font-size: 32px;
    font-weight: 600;
    margin-left: 35px;
}


footer {
    background-color: #05014a;
    width: 100%;
    height: 4rem;
    padding: 1rem;

}

.footer-img {
    max-width: 100%;
    height: 2rem;
}

.a51-footer {
    text-align: center;
}

.a51-footer h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
}

.modal-wide {
    width: 70%;
    max-width: 900px;
}

.modal-body-flex {
    display: flex;
    gap: 25px;
}

.modal-left img {
    width: 250px;
    height: auto;
    border-radius: 8px;
}

.modal-right {
    flex: 1;
}

.toast-custom {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    z-index: 9999;
    font-size: 14px;
}

.toast-custom.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success { background: #28a745; }
.toast-error { background: #dc3545; }

.cart-modal {
    width: 400px;
    max-width: 90%;
    padding: 20px;
    border-radius: 12px;
}

.cart-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    max-height: 300px;
    overflow-y: auto;
}

.cart-list li {
    background: #f8f9fa;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-list button {
    border: none;
    background: #dc3545;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.cart-list button:hover {
    background: #b02a37;
}

.cart-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.cart-modal-modern {
    width: 420px;
    max-width: 95%;
    border-radius: 16px;
    padding: 20px;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.cart-header h4 {
    margin: 0;
    font-weight: 600;
}

.cart-header span {
    font-size: 13px;
    color: #888;
}

.cart-items {
    flex: 1;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

/* ITEM CARD */
.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    transition: all 0.25s ease;
}

.cart-item:hover {
    background: #f1f3f5;
    transform: translateY(-2px);
}

/* LEFT SIDE */
.cart-info {
    display: flex;
    flex-direction: column;
}

.cart-title {
    font-weight: 600;
    font-size: 14px;
}

.cart-author {
    font-size: 12px;
    color: #777;
}

/* REMOVE BUTTON */
.remove-btn {
    border: none;
    background: #ffe5e5;
    color: #d11a2a;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.remove-btn:hover {
    background: #ffcccc;
}

/* FOOTER */
.cart-footer-modern {
    border-top: 1px solid #eee;
    padding-top: 12px;
    margin-top: 10px;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.cart-actions button {
    flex: 1;
    border-radius: 10px;
}

/* EMPTY STATE */
.empty-cart {
    text-align: center;
    padding: 40px 10px;
    color: #999;
}

.empty-cart i {
    font-size: 40px;
    margin-bottom: 10px;
}

.modal-content {
    animation: scaleIn 0.2s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* OPAC borrow cart (aligned with pantas-library-system) */
.cart-modal-clean {
    width: 75%;
    max-width: 1100px;
    height: 80vh;
    border-radius: 24px;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.cart-modal-clean .cart-header {
    display: block;
    margin-bottom: 25px;
}

.cart-modal-clean .cart-header h2 {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-modal-clean .cart-header p {
    color: #888;
    margin: 0;
}

.cart-modal-clean .cart-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.cart-modal-clean .cart-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cart-modal-clean .cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 20px 25px;
    border-radius: 16px;
    margin-bottom: 20px;
    transition: 0.2s ease;
}

.cart-modal-clean .cart-item:hover {
    background: #e9ecef;
}

.cart-modal-clean .cart-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.cart-modal-clean .cart-count {
    font-size: 18px;
}

.cart-modal-clean .empty-cart {
    text-align: center;
    color: #aaa;
    padding: 60px 0;
    font-size: 18px;
}

.toast-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toast-card.toast-success {
    border-left: 4px solid #198754;
}

.toast-card.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-card.toast-info {
    border-left: 4px solid #0d6efd;
}

@keyframes slideIn {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* OPAC record modal (tabs, holdings, staff MARC + DB fields) */
.opac-record-modal.modal-content {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    max-height: 92vh;
    overflow-y: auto;
    width: 94%;
    max-width: 980px;
}

.opac-detail-loading {
    min-height: 120px;
}

.opac-breadcrumb {
    color: #1f7902;
    font-weight: 600;
}

.opac-library-location {
    color: #c45c11;
    font-weight: 600;
}

.opac-detail-cover-col {
    text-align: center;
    flex: 0 0 200px;
}

.opac-detail-cover-col #modalImg {
    max-width: 200px;
    width: 100%;
    height: auto;
}

.opac-bib-table th {
    width: 7rem;
    vertical-align: top;
}

.opac-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 14px;
    border-bottom: 1px solid #dee2e6;
}

.opac-tab {
    border: none;
    background: transparent;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: #555;
    font-size: 14px;
}

.opac-tab.is-active {
    color: #0d47a1;
    border-bottom-color: #0d47a1;
    font-weight: 600;
}

.opac-tab-panel {
    display: none;
}

.opac-tab-panel.is-active {
    display: block;
}

.opac-desc-dl {
    display: grid;
    grid-template-columns: minmax(8rem, 28%) 1fr;
    gap: 0.35rem 1rem;
    border-top: 1px solid #e9ecef;
}

.opac-desc-dl dt {
    font-weight: 700;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.opac-desc-dl dd {
    margin: 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.opac-holdings-table thead th {
    font-size: 12px;
    white-space: nowrap;
    background: #f8f9fa;
}

.opac-holdings-table td {
    font-size: 12px;
    vertical-align: middle;
}

.opac-marc-view-wrap {
    max-height: min(42vh, 360px);
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fafbfc;
}

.opac-marc-view-table {
    font-size: 12px;
    line-height: 1.35;
    margin-bottom: 0;
}

.opac-marc-view-table th {
    width: 44%;
    max-width: 220px;
    vertical-align: top;
    font-weight: 600;
    padding: 0.2rem 0.5rem 0.2rem 0;
    white-space: normal;
    color: #333;
}

.opac-marc-view-table td {
    padding: 0.2rem 0;
    vertical-align: top;
    word-break: break-word;
    color: #222;
}

.opac-marc-table td {
    font-size: 12px;
    word-break: break-word;
}

/* OPAC landing: search hero → new arrivals → results after search */
.opac-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.opac-page-fill {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.opac-public-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.opac-hero-search {
    background: linear-gradient(160deg, var(--brand-button-bg, #ed6b2f) 0%, #ed6b2f 55%, #ed6b2f 100%);
    color: #fff;
    padding: clamp(2rem, 5vw, 3.5rem) 1.25rem clamp(2.25rem, 5vw, 3.75rem);
}

.opac-hero-search-inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.opac-hero-kicker {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.opac-hero-title {
    margin: 0 0 0.65rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
}

.opac-hero-subtitle {
    margin: 0 auto 1.5rem;
    max-width: 34rem;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.88);
}

.opac-hero-search-form {
    max-width: 100%;
}

.opac-hero-search-row {
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
    max-width: 640px;
    margin: 0 auto;
}

.opac-hero-search-input {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0 1.15rem;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.opac-hero-search-input:focus {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.opac-hero-search-btn {
    height: 52px;
    padding: 0 1.5rem;
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
    background: var(--brand-success-bg, #ed6b2f);
    border-color: var(--brand-success-bg, #ed6b2f);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.opac-hero-search-btn:hover {
    background: var(--brand-success-hover-bg, #c2cc08);
    border-color: var(--brand-success-hover-bg, #c2cc08);
}

.opac-search-hint {
    margin: 1rem auto 0;
    max-width: 32rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
}

.opac-new-arrivals-block {
    padding: clamp(1.75rem, 4vw, 2.5rem) 1.25rem 2.5rem;
    background: #fff;
}

.opac-new-arrivals-inner {
    max-width: 1180px;
    margin: 0 auto;
}

.opac-section-head {
    margin-bottom: 1.25rem;
}

.opac-new-arrivals-title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    font-weight: 700;
    color: var(--brand-nav-link, #ed6b2f);
}

.opac-section-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: #ed6b2f;
}

.opac-new-arrivals-block .carousel {
    margin-top: 0;
    margin-bottom: 0;
    overflow: visible;
}

.opac-new-arrivals-block .carousel-container {
    padding: 0 2.5rem;
}

.opac-new-arrivals-block .carosel {
    flex: 0 0 148px;
    cursor: pointer;
    border-radius: 12px;
    padding: 0.65rem;
    background: #f8fafc;
    border: 1px solid #e8edf2;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.opac-new-arrivals-block .carosel:hover {
    transform: translateY(-4px);
    border-color: #cbd5e1;
    box-shadow: 0 12px 28px rgba(15, 42, 92, 0.12);
}

.opac-new-arrivals-block .carosel-cover {
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: #e2e8f0;
}

.opac-new-arrivals-block .carosel-cover img,
.opac-new-arrivals-block .carosel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.opac-new-arrivals-block .carosel-title,
.opac-new-arrivals-block .carosel p {
    margin: 0.65rem 0 0;
    max-width: 100%;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    color: #1e293b;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.opac-new-arrivals-block .carousel-track {
    gap: 14px;
    padding: 0.35rem 0 0.75rem;
}

.opac-new-arrivals-block .arrow {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border-color: #dbe2ea;
    background: #fff;
}

.opac-new-arrivals-block .arrow.left {
    left: 0;
}

.opac-new-arrivals-block .arrow.right {
    right: 0;
}

@media (max-width: 576px) {
    .opac-hero-search-row {
        flex-direction: column;
    }

    .opac-hero-search-btn {
        width: 100%;
    }

    .opac-new-arrivals-block .carousel-container {
        padding: 0 2rem;
    }

    .opac-new-arrivals-block .carosel {
        flex-basis: 128px;
    }
}

/* Legacy aliases kept for other pages referencing these classes */
.opac-search-block {
    background: #f8faf9;
    border-top: 1px solid #e2e8e4;
    border-bottom: 1px solid #e2e8e4;
}

.opac-search-form {
    max-width: 720px;
}

.opac-refine-filters .opac-refine-select {
    min-width: 160px;
    max-width: 220px;
}

.opac-query {
    font-weight: 700;
}

.opac-results-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.opac-sort-select {
    width: 180px;
}

.opac-result-cover img {
    width: 64px;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
    background: #f3f5f8;
}

.opac-result-meta {
    min-width: 0;
    flex: 1;
}

.opac-result-title {
    font-weight: 700;
    line-height: 1.35;
    font-size: 1rem;
}

.opac-result-sub {
    margin-top: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.opac-result-availability {
    font-weight: 700;
    margin-top: 0.45rem;
}

@media (max-width: 576px) {
    .opac-sort-select {
        width: 100%;
        max-width: 100%;
    }
}