.myp-desc-wrap h1 { margin-bottom: 12px; }
.myp-desc-toolbar { display: flex; gap: 8px; align-items: center; margin: 12px 0 16px; }
.myp-desc-grid { display: grid; grid-template-columns: 45% 55%; gap: 16px; align-items: start; }
.myp-desc-col { background: #fff; border: 1px solid #ccd0d4; border-radius: 4px; }
.myp-desc-col-left { min-height: 480px; }
.myp-desc-col-right { position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 24px); overflow: auto; }
.myp-desc-products { /* removed max-height to allow full list */ overflow: auto; padding: 8px; position: relative; }
.myp-desc-products.loading::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.6); }
.myp-desc-empty, .myp-desc-loading { padding: 16px; color: #666; }

.prod-item { position: relative; display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; padding: 10px; border: 1px solid #ececec; border-radius: 6px; margin-bottom: 8px; cursor: pointer; align-items: center; background: #fafafa; }
.prod-item:hover { background: #f5f5f5; }
.prod-item.active { border-color: #2271b1; box-shadow: 0 0 0 1px #2271b1 inset; background: #fff; }
.prod-item .thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; background: #eee; }
.prod-item .thumb.placeholder { display: inline-block; background: #e1e1e1; }
.prod-item .meta { display: grid; }
.prod-item .meta .title { font-weight: 600; }
.prod-item .meta .sub { color: #777; font-size: 12px; }
/* Details section below the main row */
.prod-item .pi-details { grid-column: 1 / -1; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e5e5e5; }
.prod-item .pi-details .myp-desc-attributes .attr-row { font-size: 12px; color: #444; margin: 2px 0; }
.prod-item .pi-details .myp-desc-admin-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.prod-item .pi-details .myp-desc-admin-table th, .prod-item .pi-details .myp-desc-admin-table td { border: 1px solid #f0f0f0; padding: 4px 6px; font-size: 12px; }
.prod-item .pi-details .myp-desc-admin-table th { background: #fcfcfc; width: 45%; }
.prod-item .sku { margin-left: 6px; color: #555; }
.prod-item .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.prod-item .dot-green { background: #22c55e; box-shadow: 0 0 0 2px #e6f7ee inset; }
/* Checkbox column removed */

/* Select-all UI removed */

#myp-desc-form { padding: 12px; }
.myp-desc-form-header { margin-bottom: 12px; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.myp-desc-product-head { display: grid; grid-template-columns: 80px 1fr; gap: 12px; align-items: center; }
.myp-desc-product-thumb img { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; background: #eee; }
.myp-desc-product-texts h2 { display: flex; align-items: center; gap: 6px; }
.myp-desc-product-texts h2 a { text-decoration: none; }
.myp-desc-edit-link .dashicons { font-size: 18px; width: 18px; height: 18px; line-height: 18px; }
.myp-desc-admin-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.myp-desc-admin-table th, .myp-desc-admin-table td { border: 1px solid #e5e5e5; padding: 8px 10px; vertical-align: middle; }
.myp-desc-admin-table th { width: 40%; background: #fafafa; text-align: left; font-weight: 600; }
.myp-desc-admin-table input[type=text] { width: 100%; }

.myp-desc-custom { margin-top: 14px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; margin-bottom: 6px; align-items: center; }
.cf-row input[type=text] { width: 100%; }
.cf-remove { color: #b32d2e; }

.myp-desc-text { margin-top: 14px; }
.myp-desc-text textarea { width: 100%; }

.myp-desc-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid #eee; background: #fff; z-index: 1; }
.myp-desc-status { min-height: 20px; margin-left: auto; }

/* Move toolbar into left column visually */
.myp-desc-toolbar.inside-left { padding: 8px; border-bottom: 1px solid #eee; display: flex; gap: 8px; align-items: center; }

/* Left-align inputs by default */
.myp-desc-admin-table th, .myp-desc-admin-table td { text-align: left; }
.myp-desc-status.ok { color: #0a7a0a; }
.myp-desc-status.err { color: #b32d2e; }

/* Frontend table */
.myp-specs-block { margin: 20px 0; }
.myp-specs-title { font-size: 1.25rem; margin-bottom: 8px; }
.myp-specs-table { width: 100%; border-collapse: collapse; }
.myp-specs-table th, .myp-specs-table td { border: 1px solid #e5e5e5; padding: 8px 10px; text-align: left; }
.myp-specs-table th { width: 40%; background: #fafafa; font-weight: 600; }
.myp-specs-text { margin-top: 10px; }

/* Apply same style for specs table inside list items */
.pi-specs-table { width: 100%; border-collapse: collapse; }
.pi-specs-table th, .pi-specs-table td { border: 1px solid #e5e5e5; padding: 6px 8px; text-align: left; }
.pi-specs-table th { width: 40%; background: #fafafa; font-weight: 600; }

/* Attribute chips with images inside specs table */
.myp-attr-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 2px 8px;
	background: #fff;
	margin: 2px 6px 2px 0;
	white-space: nowrap; /* prevent image stacking above label */
}
.myp-attr-img {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	object-fit: cover;
	background: #f2f2f2;
	flex-shrink: 0; /* keep the image from shrinking */
	display: inline-block;
	vertical-align: middle;
}

/* Material-specific styles */
.myp-attr-chip.material-titanio {
    color: #fff;
    font-weight: 600;
    background-image: linear-gradient(to right, #10069f, #66a3ff, #10069f);
    border-color: rgba(16,6,159,0.35);
}
.myp-attr-chip.material-ouro {
    color: #2b2b2b; /* dark grey text for contrast */
    font-weight: 600;
    background-image: linear-gradient(to right, #dba445, #eed47d, #dba445);
    border-color: rgba(219,164,69,0.45);
}

/* Ensure inner label inherits color on gradient backgrounds */
.myp-attr-chip.material-titanio .label,
.myp-attr-chip.material-ouro .label { color: inherit; }

/* Ensure small labels don't force image above on narrow containers */
@media (max-width: 420px) {
	.myp-attr-chip { padding: 2px 6px; font-size: 13px; }
	.myp-attr-img { width: 18px; height: 18px; }
}
