/* Product management inherits each console theme's surfaces and typography. */
#products-view { min-width:0; }
html[data-design="olive"][data-theme="dark"] #products-view .primary-button { color:#172536; }
#products-view .product-hint { color:var(--muted); font-size:12px; line-height:1.7; font-weight:400; }
#products-view h2 { margin:0; font-size:20px; }
#products-view .view-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; }
#products-view h3 { margin:0 0 20px; font-size:15px; color:var(--ink); }
#products-view label { display:flex; flex-direction:column; gap:8px; color:var(--muted); font-size:12px; min-width:0; }
#products-view input:not([type=checkbox]):not([type=radio]):not([type=file]), #products-view select, #products-view textarea { width:100%; min-width:0; height:38px; padding:8px 10px; background:var(--surface); color:var(--ink); border:1px solid var(--line-strong); border-radius:5px; font:inherit; font-size:13px; }
#products-view input:focus-visible, #products-view select:focus-visible, #products-view textarea:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
#products-view input[type=checkbox], #products-view input[type=radio] { width:16px; height:16px; accent-color:var(--brand); }
#products-view textarea { height:auto; resize:vertical; line-height:1.8; }
.product-filters { display:grid; grid-template-columns:minmax(220px,2fr) repeat(3,minmax(120px,1fr)); gap:16px; margin:24px 0 16px; }
.product-list-table { background:var(--surface); border:1px solid var(--line); border-radius:8px; }
.product-list-name { display:flex; align-items:center; gap:12px; min-width:180px; }
.product-list-name img,.product-list-placeholder { width:46px; height:46px; object-fit:contain; background:var(--soft); border-radius:6px; display:grid; place-items:center; flex-shrink:0; }
.product-list-table td { padding:16px 12px; }
.product-list-table td small { display:block; color:var(--muted); margin-top:6px; }
.product-list-actions { display:flex; gap:8px; align-items:center; }
.product-empty { text-align:center; height:150px; color:var(--muted); }
.product-pagination { display:flex; align-items:center; justify-content:flex-end; gap:10px; margin-top:16px; }
.product-pagination span { margin-right:auto; color:var(--muted); font-size:12px; }
#productEditor { background:var(--surface); border:1px solid var(--line); border-radius:10px; }
.product-editor-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:20px 24px; border-bottom:1px solid var(--line); }
.product-editor-layout { display:grid; grid-template-columns:178px minmax(0,1fr); }
.product-editor-nav { padding:22px 14px; border-right:1px solid var(--line); display:flex; flex-direction:column; gap:10px; align-self:start; position:sticky; top:16px; }
#productCover { display:flex; flex-direction:column; align-items:center; justify-content:center; width:100%; aspect-ratio:1; padding:10px; border:1px dashed var(--line-strong); border-radius:6px; background:var(--soft); color:var(--muted); gap:12px; cursor:pointer; }
#productCover img { width:100%; height:100%; object-fit:contain; }
#productDraftName { overflow-wrap:anywhere; color:var(--ink); font-size:13px; }
#productDraftSku { overflow-wrap:anywhere; color:var(--muted); font-size:11px; }
.product-editor-nav nav { display:flex; flex-direction:column; gap:5px; margin-top:14px; }
.product-editor-nav [data-product-tab] { border:0; padding:12px; text-align:left; border-radius:5px; background:transparent; color:var(--muted); cursor:pointer; font:inherit; font-size:13px; }
.product-editor-nav [data-product-tab]:hover { background:var(--soft); color:var(--ink); }
.product-editor-nav [data-product-tab].active { background:var(--brand-soft); color:var(--brand); font-weight:700; }
#productSections { min-width:0; padding:28px; min-height:560px; }
.product-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px 24px; margin-bottom:28px; }
.product-name-field { grid-column:1/-1; }
.product-row-heading { display:flex; justify-content:space-between; align-items:center; gap:14px; margin:24px 0 18px; }
#products-view .product-row-heading h3 { margin:0; }
.product-row-heading strong { font-size:13px; }
.product-repeat-row { border-top:1px solid var(--line); padding:4px 0 12px; }
.product-repeat-row .product-row-heading { margin:12px 0 16px; }
.product-repeat-row .product-fields { margin-bottom:10px; }
.product-repeating { margin-bottom:18px; }
.product-empty-inline { color:var(--muted); font-size:13px; padding:24px 0; border-block:1px solid var(--line); }
#products-view .product-preferred { align-items:flex-start; justify-content:center; }
.product-quote-total { background:var(--brand-soft); padding:12px; border-radius:5px; display:flex; flex-direction:column; gap:8px; }
.product-quote-total span { color:var(--muted); font-size:12px; }
.product-quote-total strong { color:var(--ink); font-size:16px; }
.product-traits { border:0; padding:0; margin:0 0 32px; display:flex; flex-wrap:wrap; gap:16px; }
.product-traits legend { color:var(--muted); font-size:12px; margin-bottom:14px; }
#products-view .product-traits label { flex-direction:row; align-items:center; }
.product-upload-actions { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:12px; }
#products-view .product-file-button { display:inline-flex; flex-direction:row; align-items:center; position:relative; color:var(--ink); cursor:pointer; }
.product-file-button input { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; }
.product-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:16px; min-height:90px; padding:16px 0; margin-bottom:20px; }
.product-gallery:empty { border:1px dashed var(--line); border-radius:6px; margin-top:12px; }
.product-file-tile { min-width:0; display:flex; flex-direction:column; gap:10px; }
.product-file-tile img,.product-gallery>button img { width:100%; height:125px; object-fit:contain; background:var(--soft); border:1px solid var(--line); border-radius:5px; }
.product-file-tile>a { min-height:70px; display:grid; place-items:center; color:var(--brand); font-size:12px; }
.product-file-tile>span { font-size:11px; color:var(--muted); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.product-file-tile>div { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.product-url-row,.product-template-controls { display:flex; gap:12px; align-items:end; margin:20px 0; }
.product-url-row label { flex:1; }
.product-description-toolbar { display:flex; gap:8px; margin-bottom:10px; }
.product-description-toolbar button { border:1px solid var(--line); border-radius:4px; padding:6px 12px; background:var(--soft); color:var(--ink); cursor:pointer; }
#productDescriptionPreview { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.8; padding:20px; border:1px solid var(--line); margin-top:12px; }
.product-savebar { display:flex; gap:12px; align-items:center; justify-content:flex-end; padding:16px 24px; border-top:1px solid var(--line); background:var(--surface); position:sticky; bottom:0; z-index:3; border-radius:0 0 10px 10px; }
.product-savebar .form-message { margin:0 auto 0 0; overflow-wrap:anywhere; }
#products-view dialog { background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:10px; max-width:min(680px,calc(100vw - 32px)); padding:28px; }
.product-dialog-actions { display:flex; gap:12px; justify-content:flex-end; margin-top:24px; }
@media(min-width:1700px) { .product-fields { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:1150px) { .product-fields { grid-template-columns:repeat(2,minmax(0,1fr)); } .product-editor-layout { grid-template-columns:150px minmax(0,1fr); } #productSections { padding:22px; } }
@media(max-width:900px) {
  html[data-design] .main-nav,html[data-design] .main-nav.admin-enabled { grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:minmax(48px,1fr); overflow-x:auto; scrollbar-width:none; }
  .product-savebar { bottom:66px; }
}
@media(max-width:650px) {
  .product-filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .product-search { grid-column:1/-1; }
  .product-editor-layout { display:block; }
  .product-editor-nav { position:static; display:block; border-right:0; border-bottom:1px solid var(--line); padding:12px; }
  #productCover,#productDraftName,#productDraftSku { display:none; }
  .product-editor-nav nav { flex-direction:row; overflow-x:auto; margin:0; }
  .product-editor-nav [data-product-tab] { white-space:nowrap; flex-shrink:0; padding:10px; }
  #productSections { padding:20px 16px; }
  .product-fields { grid-template-columns:1fr; gap:18px; }
  .product-row-heading { flex-wrap:wrap; }
  #products-view .product-unit-switch { width:100%; }
  .product-editor-heading { padding:16px; }
  .product-savebar { padding:12px 16px; flex-wrap:wrap; bottom:66px; }
  .product-savebar .form-message:not(:empty) { flex-basis:100%; }
  .product-template-controls { flex-wrap:wrap; }
  #products-view input:not([type=checkbox]):not([type=radio]):not([type=file]),#products-view select,#products-view textarea { font-size:16px; }
}
