body:has(#product-library-mode:not(.hidden) .product-library-page) main { padding: 0; }
#product-library-mode, #product-library-root, .product-library-page { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; overflow-x: hidden; }
.product-library-page { min-height: 100dvh; color: var(--pc-text); background: var(--pc-bg-page); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif; }
.pl-page-content { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; padding: 24px 18px 36px; overflow-x: hidden; }
.pl-heading { box-sizing: border-box; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; width: 100%; max-width: 100%; min-width: 0; margin: 0 0 16px; }
.pl-heading h1 { margin: 3px 0 6px; color: var(--pc-text); font-size: 24px; line-height: 30px; }
.pl-heading p:not(.pl-kicker) { margin: 0; color: var(--pc-text-muted); font-size: 14px; line-height: 20px; }
.pl-kicker { margin: 0; color: var(--pc-brand); font-size: 11px; font-weight: 750; letter-spacing: .09em; }
.pl-heading > div { min-width: 0; }
.pl-card { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; margin: 0; border: 1px solid var(--pc-border); border-radius: 16px; background: var(--pc-surface); box-shadow: 0 1px 2px #1f293708; }
.pl-table-wrap { width: 100%; max-width: 100%; min-width: 0; overflow-x: hidden; overflow-y: hidden; }
.pl-table { width: 100%; max-width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; }
.pl-col-image { width: 6%; }.pl-col-title { width: 19%; }.pl-col-status { width: 9%; }.pl-col-id { width: 13%; }.pl-col-source { width: 10%; }.pl-col-variants { width: 8%; }.pl-col-inventory { width: 8%; }.pl-col-created { width: 13%; }.pl-col-action { width: 14%; }
.pl-table th, .pl-table td { box-sizing: border-box; padding: 10px 6px; border-bottom: 1px solid var(--pc-border); vertical-align: middle; text-align: left; font-size: 12px; overflow-wrap: anywhere; }
.pl-table th { color: var(--pc-text-secondary); background: #fbfaff; font-size: 11px; font-weight: 650; line-height: 15px; }
.pl-table tbody tr:last-child td { border-bottom: 0; }
.pl-table tbody tr:hover { background: #fcfbff; }
.pl-product-image, .pl-image-placeholder { display: grid; width: 38px; height: 38px; place-items: center; overflow: hidden; border: 1px solid var(--pc-border-brand); border-radius: 9px; background: var(--pc-brand-subtle); color: var(--pc-brand); object-fit: cover; font-size: 18px; }
.pl-title { display: block; color: var(--pc-text); font-size: 12px; line-height: 17px; overflow-wrap: anywhere; }
.pl-id { display: block; overflow: hidden; color: var(--pc-text-secondary); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pl-status { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 6px; border-radius: 99px; font-size: 11px; font-weight: 650; }
.pl-status--draft { color: #6d28d9; background: #f3e8ff; }
.pl-status--active { color: #167447; background: #dcfce7; }
.pl-status--failed { color: #b42318; background: #fee4e2; }
.pl-source { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 6px; border-radius: 99px; font-size: 10px; font-weight: 700; letter-spacing: 0; white-space: normal; overflow-wrap: anywhere; }
.pl-source--ai-created { color: #4338ca; background: #e0e7ff; }
.pl-source--shopify-imported { color: #0f766e; background: #ccfbf1; }
.pl-source--manual { color: #a16207; background: #fef3c7; }
.pl-actions { display: flex; flex-direction: column; gap: 5px; align-items: stretch; }
.pl-actions .pc-button { width: 100%; min-height: 30px; padding: 5px 6px; font-size: 11px; white-space: nowrap; }
.pl-open { text-decoration: none; }
.pl-state { display: flex; min-height: 230px; padding: 34px; align-items: center; justify-content: center; flex-direction: column; color: var(--pc-text-muted); text-align: center; }
.pl-state h1 { margin: 10px 0 5px; color: var(--pc-text); font-size: 18px; }
.pl-state p { max-width: 520px; margin: 0; line-height: 20px; }
.pl-state--error { color: #b42318; }
.pl-state--error .pc-button { margin-top: 16px; }
.pl-spinner { width: 26px; height: 26px; border: 3px solid #ddd6fe; border-top-color: var(--pc-brand); border-radius: 50%; animation: pl-spin .8s linear infinite; }
.pl-empty-mark { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; color: var(--pc-brand); background: var(--pc-brand-subtle); font-size: 24px; }
.pl-drawer { position: fixed; z-index: 30; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: #1f29374d; }
.pl-detail-card { width: min(940px, 100%); max-height: min(760px, calc(100dvh - 48px)); overflow: auto; padding: 20px; border: 1px solid var(--pc-border); border-radius: 16px; background: var(--pc-surface); box-shadow: 0 24px 80px #1f293740; }
.pl-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--pc-border); }
.pl-detail-head h2 { margin: 4px 0 0; font-size: 20px; line-height: 26px; }
.pl-detail-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .9fr); gap: 16px; padding-top: 16px; }
.pl-detail-grid section { padding: 16px; border: 1px solid var(--pc-border); border-radius: 12px; background: #fbfaff; }
.pl-detail-grid h3 { margin: 0 0 12px; color: var(--pc-text); font-size: 16px; }
.pl-detail-grid dl { margin: 0; }
.pl-detail-field { padding: 10px 0; border-bottom: 1px solid var(--pc-border); }
.pl-detail-field:last-child { border-bottom: 0; padding-bottom: 0; }
.pl-detail-field:first-child { padding-top: 0; }
.pl-detail-field dt { margin-bottom: 4px; color: var(--pc-text-muted); font-size: 12px; font-weight: 650; }
.pl-detail-field dd { margin: 0; color: var(--pc-text); font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.pl-detail-field ul { margin: 0; padding-left: 18px; }
.pl-detail-field li + li { margin-top: 3px; }
@keyframes pl-spin { to { transform: rotate(360deg); } }
@media (max-width: 1100px) { .pl-page-content { padding: 16px 12px 24px; } .pl-table th, .pl-table td { padding: 8px 4px; font-size: 11px; } .pl-table th { font-size: 10px; } .pl-product-image, .pl-image-placeholder { width: 34px; height: 34px; } .pl-title { font-size: 11px; line-height: 15px; } .pl-actions .pc-button { padding-inline: 3px; font-size: 10px; } }
@media (max-width: 740px) { .pl-heading { align-items: stretch; flex-direction: column; } .pl-heading > .pc-button { align-self: flex-start; } .pl-drawer { padding: 10px; } .pl-detail-card { padding: 14px; } .pl-detail-grid { grid-template-columns: 1fr; } }
