:root {
    --lbp-burgundy: #5e2a2b;
    --lbp-burgundy-dark: #4a2122;
    --lbp-gold: #ffb71b;
    --lbp-gold-dark: #e5a517;
    --lbp-cream: #f5f0e1;
    --lbp-cream-dark: #e8e0d0;
    --lbp-text: #404040;
    --lbp-text-muted: #6b6560;
    --lbp-white: #ffffff;
    --lbp-border: #e0d9c8;
    --lbp-shadow: rgba(94, 42, 43, 0.08);
    --lbp-focus: rgba(255, 183, 27, 0.45);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--lbp-text);
    background: var(--lbp-cream);
}

a {
    color: var(--lbp-burgundy);
}

a:hover {
    color: var(--lbp-burgundy-dark);
}

.page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

.page--full {
    max-width: none;
    width: 100%;
    padding: 1rem 1.25rem 1.5rem;
}

.builder-viewport {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: calc(100svh - 5.5rem);
}

.builder-viewport > .banner {
    flex-shrink: 0;
    margin: 0;
}

.builder-loading[hidden] {
    display: none !important;
}

.builder-loading {
    position: absolute;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 240, 225, 0.88);
    backdrop-filter: blur(2px);
    border-radius: 10px;
}

.builder-loading__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.builder-loading__spinner {
    width: 2.25rem;
    height: 2.25rem;
    border: 3px solid var(--lbp-cream-dark);
    border-top-color: var(--lbp-burgundy);
    border-radius: 50%;
    animation: builder-spin 0.75s linear infinite;
}

.builder-loading__text {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
}

@keyframes builder-spin {
    to {
        transform: rotate(360deg);
    }
}

.builder-viewport.is-loading .sheet-toolbar__select,
.builder-viewport.is-loading .sheet-toolbar__actions .button,
.builder-viewport.is-loading .preview-toolbar__actions .button {
    pointer-events: none;
    opacity: 0.65;
}

.builder-viewport.is-loading .builder {
    pointer-events: none;
}

.site-header {
    background: var(--lbp-white);
    color: var(--lbp-text);
    border-bottom: 0;
    box-shadow: 0 2px 12px var(--lbp-shadow);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.875rem 1.5rem;
}

.site-header__inner--full {
    max-width: none;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.site-header__brand {
    flex: 0 0 auto;
    flex-shrink: 0;
    line-height: 0;
}

.site-header__brand-link,
.site-header__brand-link:hover,
.site-header__brand-link:focus,
.site-header__brand-link:visited {
    display: inline-block;
    text-decoration: none;
    color: inherit;
    line-height: 0;
}

.site-header__logo {
    display: block;
    width: 220px;
    max-width: min(220px, 42vw);
    height: auto;
    vertical-align: middle;
}

.site-header__nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-header__nav a,
.site-header__nav a:hover,
.site-header__nav a:focus,
.site-header__nav a:visited,
.site-header__nav a.is-active {
    color: var(--lbp-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.global-sync-status[hidden] {
    display: none !important;
}

.global-sync-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 280px;
    margin-right: 0.75rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    line-height: 1.3;
    color: var(--lbp-burgundy);
    background: var(--lbp-white);
    border: 0;
    border-radius: 6px;
}

.global-sync-status--paused {
    color: #92400e;
    background: #fffbeb;
}

.global-sync-status__pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lbp-gold);
    flex-shrink: 0;
    animation: sync-pulse 1.2s ease-in-out infinite;
}

.global-sync-status--paused .global-sync-status__pulse {
    background: #d97706;
    animation: none;
}

@keyframes sync-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}

.sync-replace-option {
    display: block;
    margin: 0.75rem 0;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #4b5563;
}

.sync-replace-option input {
    margin-right: 0.4rem;
}

.products-keep-images {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}

.site-header__nav a.is-active,
.site-header__nav a:hover {
    color: var(--lbp-burgundy);
}

.button {
    border: 1px solid var(--lbp-border);
    background: var(--lbp-white);
    color: var(--lbp-text);
    border-radius: 6px;
    padding: 0.5rem 0.875rem;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.button:hover:not(:disabled) {
    border-color: var(--lbp-burgundy);
    color: var(--lbp-burgundy);
}

.button--primary {
    background: var(--lbp-burgundy);
    border-color: var(--lbp-burgundy);
    color: var(--lbp-white);
}

.button--primary:hover:not(:disabled) {
    background: var(--lbp-burgundy-dark);
    border-color: var(--lbp-burgundy-dark);
    color: var(--lbp-white);
}

.button--ghost {
    background: transparent;
    border-color: var(--lbp-border);
    color: var(--lbp-text);
}

.button--ghost:hover:not(:disabled) {
    background: var(--lbp-cream);
    border-color: var(--lbp-burgundy);
    color: var(--lbp-burgundy);
}

.button--danger {
    background: #dc2626;
    border-color: #b91c1c;
    color: #fff;
}

.button--danger:hover {
    background: #b91c1c;
    border-color: #991b1b;
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.muted {
    color: var(--lbp-text-muted);
    font-size: 0.9rem;
}

.error {
    color: #b91c1c;
}

.message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
}

.message.is-success {
    background: #ecfdf5;
    color: #047857;
}

.message.is-error {
    background: #fef2f2;
    color: #b91c1c;
}

.banner {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.banner--warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.auth-card {
    max-width: 420px;
    margin: 2rem auto;
    background: var(--lbp-white);
    padding: 2rem;
    border-radius: 10px;
    border: 0;
    box-shadow: 0 10px 30px var(--lbp-shadow);
}

.auth-card__logo {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto 1rem;
}

.auth-card h1 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    color: var(--lbp-burgundy);
    text-align: center;
}

.auth-card .muted {
    text-align: center;
}

.auth-card button.button.button--primary {
    margin-top: 10px;
    width: 100%;
}

.settings-card {
    max-width: 720px;
    margin: 2rem auto;
    background: var(--lbp-white);
    padding: 2rem;
    border-radius: 10px;
    border: 0;
    box-shadow: 0 10px 30px var(--lbp-shadow);
}

.catalog-panel,
.api-test-panel {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 0;
}

.catalog-panel h2,
.api-test-panel h2 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.catalog-status {
    margin: 0.75rem 0 1rem;
}

.api-test-results {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: #f9fafb;
    border: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 320px;
    overflow: auto;
}

.api-test-results.is-success {
    background: #ecfdf5;
    color: #065f46;
}

.api-test-results.is-error {
    background: #fef2f2;
    color: #991b1b;
}

label {
    display: block;
    margin: 0.75rem 0 0.35rem;
    font-weight: 600;
    font-size: 0.9rem;
}

input[type="text"],
input[type="password"],
input[type="url"],
input[type="search"],
input[type="number"],
textarea,
select {
    width: 100%;
    border: 1px solid var(--lbp-border);
    border-radius: 6px;
    padding: 0.5rem 0.65rem;
    font: inherit;
    background: var(--lbp-white);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: none;
    border-color: var(--lbp-gold);
    box-shadow: 0 0 0 3px var(--lbp-focus);
}

.lbp-brand-colours {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--lbp-border);
}

.lbp-brand-colours__title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--lbp-burgundy);
}

.lbp-brand-colours__intro {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    line-height: 1.4;
}

.lbp-brand-colours__intro code {
    font-size: 0.85em;
}

.lbp-brand-colours__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
}

.lbp-brand-colours__chip {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    width: 100%;
    margin: 0;
    padding: 0.35rem;
    border: 1px solid var(--lbp-border);
    border-radius: 6px;
    background: var(--lbp-white);
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
}

.lbp-brand-colours__chip:hover {
    border-color: var(--lbp-gold);
    box-shadow: 0 0 0 1px var(--lbp-gold);
}

.lbp-brand-colours__chip:focus-visible {
    outline: 2px solid var(--lbp-burgundy);
    outline-offset: 2px;
}

.lbp-brand-colours__chip-swatch {
    display: block;
    width: 100%;
    height: 1.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

.lbp-brand-colours__chip-swatch--bordered {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.lbp-brand-colours__chip-name {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--lbp-text);
}

.lbp-brand-colours__chip-hex {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.68rem;
    line-height: 1.2;
    color: #4b5563;
}

.color-picker {
    margin-top: 0.5rem;
}

.color-picker label {
    margin-top: 0.75rem;
}

.color-picker__control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-picker__input {
    width: 3rem;
    height: 2.5rem;
    min-width: 3rem;
    padding: 0.15rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
}

.color-picker__swatch {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    flex-shrink: 0;
    background: #000;
}

.color-picker__hex {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    color: #4b5563;
}

.button-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.sheet-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin: 0;
    padding: 0.5rem 0.75rem;
    background: var(--lbp-white);
    border-radius: 10px;
    border: 0;
    box-shadow: 0 4px 16px var(--lbp-shadow);
    flex-shrink: 0;
}

.sheet-toolbar__group {
    flex: 1 1 220px;
    min-width: 200px;
}

.sheet-toolbar__label {
    display: block;
    margin: 0 0 0.35rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.sheet-toolbar__select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 0.65rem;
    font: inherit;
    background: #fff;
}

.sheet-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.builder {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 0.75rem;
    align-items: stretch;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.builder__panel--preview {
    min-width: 0;
}

.builder__panel {
    background: var(--lbp-white);
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    box-shadow: 0 4px 16px var(--lbp-shadow);
    overflow: visible;
}

.builder__panel-title,
.preview-toolbar h2,
.products-page__header h1,
.settings-card h1,
.catalog-panel h2,
.api-test-panel h2 {
    color: var(--lbp-burgundy);
}

.builder__panel--controls {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.builder__panel-title {
    margin: 0 0 0.15rem;
    font-size: 1rem;
    flex-shrink: 0;
}

.builder__panel-hint {
    margin: 0 0 0.4rem;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.preview-toolbar h2 {
    margin: 0;
    font-size: 1rem;
}

.preview-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.slot-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.2rem;
    scrollbar-gutter: stable;
}

.slot-control {
    flex-shrink: 0;
    border: 0;
    border-radius: 8px;
    padding: 0.5rem 0.55rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    min-width: 0;
}

.slot-control .button {
    padding: 0.2rem 0.45rem;
    font-size: 0.7rem;
}

.slot-control label {
    margin: 0.25rem 0 0.15rem;
    font-size: 0.75rem;
}

.slot-control input[type="search"],
.slot-control input[type="text"] {
    padding: 0.3rem 0.45rem;
    font-size: 0.8rem;
}

.slot-control__fields {
    display: grid;
    grid-template-columns: 1fr minmax(4.5rem, 28%);
    gap: 0.25rem;
    align-items: start;
}

.slot-control__drag-handle {
    cursor: grab;
    user-select: none;
}

.slot-control.is-dragging {
    opacity: 0.6;
}

.slot-control__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.25rem;
}

.search-wrap {
    position: relative;
}

.search-wrap:focus-within {
    z-index: 30;
}

.search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    max-height: 220px;
    overflow: auto;
    z-index: 20;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.search-results button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: #fff;
    padding: 0.5rem 0.65rem;
    cursor: pointer;
    font: inherit;
}

.search-results button:hover {
    background: var(--lbp-cream);
}

.slot-summary {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    margin-top: 0.25rem;
    font-size: 0.7rem;
    line-height: 1.2;
    min-width: 0;
}

.slot-summary[hidden] {
    display: none;
}

.slot-summary img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border: 0;
    border-radius: 3px;
    background: #fff;
    flex-shrink: 0;
}

.slot-summary__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sheet-styling-sidebar {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    pointer-events: none;
}

.sheet-styling-sidebar.is-open {
    display: block;
    pointer-events: auto;
}

.sheet-styling-sidebar__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.45);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sheet-styling-sidebar.is-open .sheet-styling-sidebar__backdrop {
    opacity: 1;
}

.sheet-styling-sidebar__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(22rem, 92vw);
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.22s ease;
}

.sheet-styling-sidebar.is-open .sheet-styling-sidebar__panel {
    transform: translateX(0);
}

.sheet-styling-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--lbp-border);
    flex-shrink: 0;
}

.sheet-styling-sidebar__header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.sheet-styling-sidebar__close {
    border: 0;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
}

.sheet-styling-sidebar__close:hover {
    color: var(--lbp-burgundy);
    background: var(--lbp-cream);
}

.sheet-styling-sidebar__body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 0 1rem 1rem;
}

.sheet-styling-sidebar__body label:first-child {
    margin-top: 0.75rem;
}

.sheet-styling-sidebar__note {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
}

.background-image-field {
    margin-top: 0.75rem;
}

.background-image-field__label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.background-image-current__preview-wrap {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 80 / 39;
    border-radius: 6px;
    overflow: hidden;
    background: var(--lbp-cream-dark);
}

.background-image-current__preview {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.background-image-current__name {
    margin: 0.4rem 0 0.5rem;
    font-size: 0.8rem;
    word-break: break-all;
}

.background-image-current__actions,
.background-image-empty {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sheet-styling-sidebar__footer {
    flex-shrink: 0;
    padding: 0.65rem 1rem;
    border-top: 1px solid var(--lbp-border);
    background: #f9fafb;
    font-size: 0.8rem;
}

body.sheet-styling-sidebar-open {
    overflow: hidden;
}

.label-sheet-preview {
    overflow: auto;
    padding: 1rem;
    background: var(--lbp-cream-dark);
    border-radius: 8px;
    width: 100%;
    max-height: calc(100vh - 10rem);
}

.label-sheet-preview .sheet {
    margin: 0 auto;
}

.label-sheet-preview .sheet,
.label-sheet-preview .grid,
.label-sheet-preview .label {
    box-sizing: border-box;
}

.label-sheet-preview .sheet {
    position: relative;
    width: 160mm;
    height: 234mm;
    background: #fff;
}

.label-sheet-preview table.grid {
    width: 160mm;
    height: 234mm;
    border-collapse: collapse;
    table-layout: fixed;
}

.label-sheet-preview table.grid td {
    width: 80mm;
    height: 39mm;
    padding: 0;
    vertical-align: top;
    border: 1px dashed #b8b8b8;
    overflow: hidden;
}

.label-sheet-preview .label {
    position: relative;
    width: 80mm;
    height: 39mm;
    overflow: hidden;
}

.label-sheet-preview .label__media {
    position: absolute;
    top: var(--label-image-top, 7mm);
    right: var(--label-image-right, 1mm);
    width: var(--label-image-size, 26mm);
    height: var(--label-image-size, 26mm);
    border-radius: 50%;
    overflow: hidden;
}

.label-sheet-preview .label__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.label-sheet-preview .label__text {
    position: absolute;
    left: 3mm;
    top: 3mm;
    width: 46mm;
    height: 33mm;
}

.label-sheet-preview .label__title {
    font-size: var(--label-font-title, 7.5pt);
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
}

.label-sheet-preview .label__price {
    font-size: var(--label-font-price, 16pt);
    font-weight: 700;
    line-height: 1;
    margin-top: 2mm;
}

.label-sheet-preview .label__standard {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 48mm;
    font-size: var(--label-font-standard, 4.5pt);
    line-height: 1.15;
}

.label-sheet-preview .label--info .label__info-text {
    position: absolute;
    left: 3mm;
    right: 3mm;
    top: 8mm;
    font-size: var(--label-font-info, 6.5pt);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
}

.layout-controls {
    margin: 0.75rem 0 0;
    padding: 0.65rem 0.75rem;
    border: 0;
    border-radius: 8px;
    background: #f9fafb;
}

.layout-controls legend {
    padding: 0 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.layout-controls__grid {
    display: grid;
    grid-template-columns: 1fr minmax(4.5rem, 38%);
    gap: 0.35rem 0.5rem;
    align-items: center;
    margin-top: 0.35rem;
}

.layout-controls__grid label {
    margin: 0;
    font-size: 0.75rem;
}

.layout-controls__grid input[type="number"] {
    width: 100%;
    padding: 0.35rem 0.45rem;
    font-size: 0.8rem;
}

@media (max-width: 1200px) {
    .builder {
        grid-template-columns: minmax(280px, 1fr) minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .builder {
        grid-template-columns: 1fr;
    }

    .builder__panel--controls {
        max-height: min(50vh, 28rem);
    }
}

.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;
}

.products-page {
    background: var(--lbp-white);
    padding: 2rem;
    border-radius: 10px;
    border: 0;
    box-shadow: 0 10px 30px var(--lbp-shadow);
}

.products-page__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.products-page__header h1 {
    margin: 0 0 0.25rem;
}

.products-page__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.products-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.products-search {
    flex: 1 1 240px;
    max-width: 400px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.products-table-wrap {
    overflow-x: auto;
    border: 0;
    border-radius: 8px;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.products-table th,
.products-table td {
    padding: 0.65rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--lbp-border);
}

.products-table th {
    background: #f9fafb;
    font-weight: 600;
}

.products-table tbody tr:hover {
    background: #f9fafb;
}

.products-table__image-col {
    width: 56px;
}

.product-thumb-btn {
    display: block;
    padding: 0;
    border: 1px solid var(--lbp-border);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    line-height: 0;
}

.product-thumb-btn:hover {
    border-color: var(--lbp-gold);
    box-shadow: 0 0 0 2px var(--lbp-focus);
}

.product-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    display: block;
}

.image-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.image-preview-modal[hidden] {
    display: none;
}

.image-preview-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.image-preview-modal__dialog {
    position: relative;
    z-index: 1;
    max-width: min(90vw, 520px);
    max-height: 90vh;
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.image-preview-modal__close {
    position: absolute;
    top: 0.35rem;
    right: 0.5rem;
    border: 0;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
}

.image-preview-modal__img {
    display: block;
    max-width: 100%;
    max-height: calc(90vh - 5rem);
    margin: 0 auto;
    object-fit: contain;
}

.image-preview-modal__caption {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    text-align: center;
    color: #374151;
}

body.modal-open {
    overflow: hidden;
}

.search-result {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
}

.search-result__thumb {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.products-table__price {
    text-align: right;
    white-space: nowrap;
}

.products-table__empty {
    text-align: center;
    color: #6b7280;
    padding: 2rem 1rem;
}

.products-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.25rem;
}

.sync-panel {
    margin: 1rem 0;
    padding: 1rem;
    border: 0;
    border-radius: 8px;
    background: #f9fafb;
}

.sync-panel__track {
    height: 8px;
    background: var(--lbp-cream-dark);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.sync-panel__bar {
    height: 100%;
    width: 0;
    background: var(--lbp-burgundy);
    border-radius: 4px;
    transition: width 0.2s ease;
}

.sync-panel__bar--indeterminate {
    width: 40% !important;
    animation: sync-indeterminate 1.2s ease-in-out infinite;
}

@keyframes sync-indeterminate {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(350%);
    }
}

.sync-panel__text {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
}

.sync-panel__text.is-error {
    color: #b91c1c;
}

.sync-panel__stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem 1rem;
    margin: 0 0 1rem;
    font-size: 0.85rem;
}

.sync-panel__stat {
    display: contents;
}

.sync-panel__stat dt {
    margin: 0;
    color: #6b7280;
    font-weight: 500;
}

.sync-panel__stat dd {
    margin: 0;
    font-weight: 600;
}

.sync-panel__actions {
    margin-bottom: 0;
}
