/* Products page — global wwwroot/css/products.css */

.products-filter {
    display: flex;
    gap: var(--gs-space-2);
    align-items: center;
    margin-bottom: var(--gs-space-4);
    flex-wrap: wrap;
}

.products-filter__search {
    position: relative;
    flex: 1 1 320px;
    min-width: 0;
    max-width: 100%;
}

.products-filter__input {
    width: 100%;
    min-height: 44px;
    padding-right: 5.75rem;
    box-sizing: border-box;
}

.products-filter__submit {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    min-height: 36px;
    height: calc(100% - 8px);
    padding: 0 var(--gs-space-4);
    border-radius: var(--gs-radius-sm);
    z-index: 1;
}

.products-retry-row {
    display: flex;
    justify-content: flex-start;
    margin: var(--gs-space-3) 0 var(--gs-space-4);
}

.products-code {
    font-family: var(--gs-font-mono, "IBM Plex Mono", monospace);
    font-size: var(--gs-text-sm);
    font-weight: 700;
    color: var(--gs-primary);
}

.products-name {
    font-weight: 700;
    color: var(--gs-text);
}

.products-price {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--gs-text);
}

.products-barcode {
    display: inline-block;
    padding: 2px 8px;
    background-color: var(--gs-surface);
    border: 1px solid var(--gs-border);
    border-radius: var(--gs-radius-sm);
    font-family: var(--gs-font-mono, "IBM Plex Mono", monospace);
    font-size: var(--gs-text-xs);
    color: var(--gs-text);
}

.products-empty-cell {
    color: var(--gs-text-muted);
}

.products-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--gs-radius-sm);
    background-color: var(--gs-surface);
    color: var(--gs-text);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    line-height: 1;
}

.products-stock__value {
    line-height: 1;
}

.products-stock--low {
    background-color: var(--gs-warning-bg);
    color: var(--gs-warning);
    border: 1px solid var(--gs-warning-border);
}

.products-actions {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--gs-space-1);
    white-space: nowrap;
}

.products-actions__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    flex-shrink: 0;
}

.products-actions__btn--danger:hover:not(:disabled) {
    color: var(--gs-danger);
    background-color: color-mix(in srgb, var(--gs-danger) 12%, transparent);
}

.products-mc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gs-space-2);
    padding-bottom: var(--gs-space-2);
    border-bottom: 1px solid var(--gs-border);
    margin-bottom: var(--gs-space-2);
}

.products-mc__list {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gs-space-1);
}

.products-mc__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gs-space-3);
    padding: var(--gs-space-1) 0;
}

.products-mc__label {
    font-size: var(--gs-text-xs);
    color: var(--gs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
}

.products-mc__value {
    margin: 0;
    text-align: right;
    color: var(--gs-text);
}

.products-mc__actions {
    display: flex;
    gap: var(--gs-space-2);
    margin-top: var(--gs-space-3);
    padding-top: var(--gs-space-2);
    border-top: 1px solid var(--gs-border);
}

.products-mc__actions .gs-btn {
    flex: 1;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 639.98px) {
    .products-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .products-filter__search {
        flex: 1 1 auto;
    }

    .products-filter .gs-btn:not(.products-filter__submit) {
        width: 100%;
    }
}
