.buying-prices-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 15px;
}

.buying-prices-title {
    color: #fff;
    background-color: var(--gm-concept-color);
    padding: 10px 15px;
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 15px;
}

.buying-prices-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Search Form */
.buying-prices-search {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
}

.buying-prices-search-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.buying-prices-search-field {
    display: flex;
    flex-direction: column;
    flex: 1 1 180px;
    min-width: 0;
}

.buying-prices-search-field label {
    font-size: 0.8em;
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
}

.buying-prices-search-field input,
.buying-prices-search-field select {
    height: 38px;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.9em;
    width: 100%;
    box-sizing: border-box;
}

.buying-prices-search-field input:focus,
.buying-prices-search-field select:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    border-color: #80bdff;
}

.buying-prices-search-btn {
    flex: 0 0 auto;
    height: 38px;
    padding: 0 25px;
    background-color: var(--gm-concept-color);
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    align-self: flex-end;
}

.buying-prices-search-btn:hover {
    opacity: 0.85;
}

/* Toolbar (sort + result info) */
.buying-prices-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.buying-prices-sort-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.buying-prices-sort-wrapper label {
    font-size: 0.85em;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    margin: 0;
    padding: 0;
}

.buying-prices-sort-wrapper select {
    height: 34px;
    padding: 4px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.85em;
    background: #fff;
    margin: 0;
    vertical-align: middle;
}

/* Result Info */
.buying-prices-result-info {
    font-size: 0.85em;
    color: #666;
    white-space: nowrap;
}

/* Table */
.buying-prices-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

.buying-prices-table {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
    font-size: 0.9em;
}

.buying-prices-table thead th {
    background-color: var(--gm-concept-color);
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
    color: #fff;
    font-weight: bold;
}

.buying-prices-table thead th a {
    display: block;
    padding: 10px 12px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

.buying-prices-table thead th a:hover {
    opacity: 0.85;
}

.buying-prices-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.buying-prices-table tbody tr:hover {
    background-color: #eef5ff;
}

.buying-prices-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.buying-prices-table .col-price {
    text-align: right;
    font-weight: bold;
    white-space: nowrap;
    min-width: 70px;
}

.buying-prices-table .col-collection-number {
    white-space: nowrap;
}

/* Pagination */
.buying-prices-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.buying-prices-pagination a,
.buying-prices-pagination span.active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 0.85em;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
}

.buying-prices-pagination a:hover {
    background-color: #f0f0f0;
}

.buying-prices-pagination span.active {
    background-color: var(--gm-concept-color);
    color: #fff;
    border-color: var(--gm-concept-color);
}

.buying-prices-pagination-ellipsis {
    padding: 0 5px;
}

/* No Results / Error */
.buying-prices-no-results {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 0.9em;
}

/* Clickable Row */
.buying-prices-row {
    cursor: pointer;
}

/* Modal */
.bp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 480px;
    width: 90%;
    position: relative;
    padding: 24px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.bp-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 4px 8px;
}

.bp-modal-close:hover {
    color: #333;
}

.bp-modal-body {
    text-align: center;
}

.bp-modal-image {
    margin-bottom: 16px;
}

.bp-modal-image img {
    max-width: 100%;
    max-height: 350px;
    border-radius: 4px;
}

.bp-modal-info h3 {
    margin: 0 0 8px;
    font-size: 1em;
    color: #333;
}

.bp-modal-price-label {
    margin: 0;
    font-size: 0.8em;
    color: #999;
}

.bp-modal-price {
    margin: 4px 0 0;
    font-size: 1.4em;
    font-weight: bold;
    color: var(--gm-concept-color);
}

.bp-modal-cta,
.bp-modal-cta:link,
.bp-modal-cta:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 320px;
    margin-top: 16px;
    padding: 12px 20px;
    background-color: var(--gm-concept-color);
    color: #fff;
    font-size: 0.95em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: opacity .15s ease, transform .05s ease;
}

.bp-modal-cta:hover,
.bp-modal-cta:focus,
.bp-modal-cta:active {
    color: #fff;
    text-decoration: none;
    opacity: .9;
}

.bp-modal-cta:active {
    transform: translateY(1px);
}

.bp-modal-cta i,
.bp-modal-cta span {
    color: inherit;
}

/* Image column */
.buying-prices-table .col-image {
    width: 60px;
    padding: 4px 8px;
}

.buying-prices-table .col-image img {
    display: block;
    width: 50px;
    height: auto;
}

/* Responsive */
@media screen and (max-width: 767px) {
    .buying-prices-search-fields {
        flex-direction: column;
        align-items: stretch;
    }

    .buying-prices-search-field {
        flex: 1 1 100%;
    }

    .buying-prices-search-btn {
        width: 100%;
    }

    .buying-prices-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .buying-prices-table {
        font-size: 0.75em;
    }

    .buying-prices-table thead th,
    .buying-prices-table tbody td {
        padding: 5px 4px;
    }

    .buying-prices-table .col-image {
        width: 36px;
        padding: 3px 2px;
    }

    .buying-prices-table .col-image img {
        width: 36px;
    }
}
