.affiliate-product-browser__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.affiliate-product-browser__filters .card-body,
.affiliate-product-browser__results .card-body {
    padding: 1.25rem;
}

.affiliate-product-browser__toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    justify-content: space-between;
}

.affiliate-product-browser__search {
    flex: 1 1 320px;
}

.affiliate-product-browser__search-field {
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.95));
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06);
    display: flex;
    gap: 0.75rem;
    margin: 0;
    padding: 0.4rem 0.95rem;
}

.affiliate-product-browser__search-field .icon,
.affiliate-product-browser__search-field svg {
    color: #64748b;
    flex-shrink: 0;
    height: 1.05rem;
    width: 1.05rem;
}

.affiliate-product-browser__search-field .form-control {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
}

.affiliate-product-browser__toolbar-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.affiliate-product-browser__select-control {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    min-width: 132px;
}

.affiliate-product-browser__select-control span {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.affiliate-product-browser__select-control .form-select {
    border-radius: 0.85rem;
    min-width: 132px;
}

.affiliate-product-browser__popover-wrap {
    position: relative;
}

.affiliate-product-browser__popover {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.16);
    padding: 1rem;
    position: absolute;
    right: 0;
    top: calc(100% + 0.75rem);
    width: min(94vw, 700px);
    z-index: 30;
}

.affiliate-product-browser__popover[hidden] {
    display: none !important;
}

.affiliate-product-browser__popover--columns {
    width: min(94vw, 430px);
}

.affiliate-product-browser__popover-header {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.affiliate-product-browser__popover-close {
    align-items: center;
    background: rgba(15, 23, 42, 0.05);
    border: 0;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    padding: 0;
    width: 2rem;
}

.affiliate-product-browser__filter-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.affiliate-product-browser__filter-grid .form-select[multiple] {
    min-height: 150px;
}

.affiliate-product-browser__filter-grid-wide {
    grid-column: span 2;
}

.affiliate-product-browser__popover-footer {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
}

.affiliate-product-browser__column-grid {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.affiliate-product-browser__column-grid .form-check {
    align-items: center;
    background: rgba(248, 250, 252, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.85rem;
    display: flex;
    gap: 0.55rem;
    margin: 0;
    padding: 0.7rem 0.8rem;
}

.affiliate-product-browser__results-bar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.affiliate-product-browser__table-scroll {
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scrollbar-gutter: stable both-edges;
}

.affiliate-product-browser__table {
    margin-bottom: 0;
    min-width: 1680px;
    width: max-content;
}

.affiliate-product-browser__table th {
    background: rgba(248, 250, 252, 0.96);
    border-bottom-width: 1px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    position: sticky;
    text-transform: uppercase;
    top: 0;
    white-space: nowrap;
    z-index: 1;
}

.affiliate-product-browser__table td {
    min-width: 128px;
    vertical-align: middle;
}

.affiliate-product-browser__table td[data-product-column="image"] {
    min-width: 92px;
}

.affiliate-product-browser__table td[data-product-column="name"] {
    min-width: 260px;
}

.affiliate-product-browser__table td[data-product-column="share"] {
    min-width: 230px;
}

.affiliate-product-browser__image {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.9rem;
    display: inline-flex;
    height: 64px;
    justify-content: center;
    overflow: hidden;
    width: 64px;
}

.affiliate-product-browser__image img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.affiliate-product-browser__name a {
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
}

.affiliate-product-browser__name a:hover {
    color: var(--primary-color, #206bc4);
}

.affiliate-product-browser__price strong,
.affiliate-product-browser__commission strong {
    color: #0f172a;
}

.affiliate-product-browser__categories {
    max-width: 240px;
    min-width: 180px;
    white-space: normal;
}

.affiliate-product-browser__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.affiliate-product-browser__empty {
    color: #475569;
}

.affiliate-product-browser__empty .icon,
.affiliate-product-browser__empty svg {
    color: #94a3b8;
    height: 2rem;
    width: 2rem;
}

.affiliate-product-browser__qr-modal[hidden] {
    display: none !important;
}

.affiliate-product-browser__qr-modal {
    inset: 0;
    position: fixed;
    z-index: 1200;
}

.affiliate-product-browser__qr-backdrop {
    background: rgba(15, 23, 42, 0.72);
    inset: 0;
    position: absolute;
}

.affiliate-product-browser__qr-dialog {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.3);
    left: 50%;
    max-width: 420px;
    padding: 1.25rem;
    position: relative;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 2rem);
    z-index: 1;
}

.affiliate-product-browser__qr-close {
    align-items: center;
    background: transparent;
    border: 0;
    color: #475569;
    display: inline-flex;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.affiliate-product-browser__qr-frame {
    align-items: center;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    display: flex;
    justify-content: center;
    min-height: 220px;
    padding: 1rem;
}

.affiliate-product-browser__qr-frame img {
    height: auto;
    max-width: 100%;
}

@media (max-width: 1199.98px) {
    .affiliate-product-browser__toolbar-controls {
        justify-content: flex-start;
        width: 100%;
    }
}

@media (max-width: 991.98px) {
    .affiliate-product-browser__toolbar {
        align-items: stretch;
    }

    .affiliate-product-browser__search {
        flex-basis: 100%;
    }

    .affiliate-product-browser__toolbar-controls {
        width: 100%;
    }

    .affiliate-product-browser__popover {
        left: 0;
        right: auto;
        width: min(100%, 700px);
    }

    .affiliate-product-browser__popover--columns {
        width: min(100%, 430px);
    }
}

@media (max-width: 767.98px) {
    .affiliate-product-browser__filters .card-body,
    .affiliate-product-browser__results .card-body {
        padding: 1rem;
    }

    .affiliate-product-browser__select-control {
        min-width: calc(50% - 0.5rem);
    }

    .affiliate-product-browser__popover,
    .affiliate-product-browser__popover--columns {
        left: 0;
        position: fixed;
        right: 0;
        top: auto;
        bottom: 1rem;
        width: calc(100vw - 2rem);
    }

    .affiliate-product-browser__filter-grid {
        grid-template-columns: 1fr;
    }

    .affiliate-product-browser__filter-grid-wide {
        grid-column: span 1;
    }

    .affiliate-product-browser__actions .btn,
    .affiliate-product-browser__toolbar-controls > .btn {
        flex: 1 1 100%;
    }
}
