/* Un único scroll: dentro del formulario, no en el fondo de la página. */
.admin-modal-backdrop { overflow: hidden; padding: 16px 24px; }
html:has(.admin-modal-backdrop), body:has(.admin-modal-backdrop) {
  overflow: hidden;
  overscroll-behavior: none;
}
.admin-modal.admin-edit-modal {
  height: min(780px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  padding-bottom: 40px;
}
.admin-modal.admin-edit-modal::-webkit-scrollbar { width: 10px; }
.admin-modal.admin-edit-modal::-webkit-scrollbar-track { background: transparent; }
.admin-modal.admin-edit-modal::-webkit-scrollbar-thumb { background: #b8c6d9; border: 3px solid #fff; border-radius: 999px; }
.admin-modal.admin-edit-modal::-webkit-scrollbar-thumb:hover { background: #8ea5c2; }
.admin-edit-modal .admin-product-form-head {
  position: relative;
  top: auto;
  z-index: auto;
}
.admin-edit-modal .admin-form-actions { position: static; bottom: auto; z-index: auto; background: #fff; padding-top: 16px; box-shadow: none; }
.admin-modal.admin-edit-modal { border: 1px solid #e6edf6; border-radius: 20px; gap: 18px 22px; }
.admin-edit-modal .admin-product-form-head { padding-bottom: 18px; margin-bottom: 2px; }
.admin-edit-modal .admin-product-form-head h2 { color: var(--tz-ink); font-size: 1.38rem; }
.admin-edit-modal .admin-product-form-head p { color: #72819a; }
.admin-edit-modal label { gap: 7px; color: #23324a; font-size: .93rem; }
.admin-edit-modal label > small { color: #7d8da5; line-height: 1.35; }
.admin-edit-modal input, .admin-edit-modal select, .admin-edit-modal textarea { background: #fbfcff; border-color: #d6e0ed; }
.admin-edit-modal .field-description, .admin-edit-modal .field-photo { padding-top: 4px; }
.admin-edit-modal .field-photo { border-top: 1px solid #e7edf5; margin-top: 2px; padding-top: 18px; }
.admin-edit-modal .admin-form-actions { border-top: 1px solid #e7edf5; margin-top: 4px; padding-top: 18px; }
.admin-edit-modal textarea { resize: vertical; min-height: 112px; }
.admin-edit-modal input:focus, .admin-edit-modal select:focus, .admin-edit-modal textarea:focus { border-color: var(--tz-blue-mid); outline: 3px solid rgba(33, 174, 229, .18); }
@media (max-width: 680px) {
  .admin-modal-backdrop { align-items: flex-end; padding: 0; }
  .admin-modal.admin-edit-modal { height: 92dvh; max-height: 92dvh; }
  .admin-edit-modal .admin-product-form-head { top: auto; margin: -4px -2px 4px; padding: 0 42px 18px 0; }
  .admin-edit-modal .admin-form-actions { bottom: auto; }
}

/* Selector de productos dentro de cada categoría. */
.admin-category-actions .is-assign { color: #2153a1; background: #edf5ff; border: 1px solid #c8ddf5; border-radius: 7px; padding: 7px 9px; font: inherit; font-size: .72rem; font-weight: 700; cursor: pointer; }
.admin-category-actions .is-assign:hover { color: #fff; background: #2153a1; }
.category-assignment-backdrop { overflow: hidden; }
.category-assignment-modal { width: min(580px, 100%); max-height: min(720px, calc(100dvh - 32px)); display: flex; flex-direction: column; gap: 16px; border-radius: 18px; }
.category-assignment-modal header { padding-right: 38px; }
.category-assignment-modal header h2 { margin: 3px 0 5px; color: var(--tz-ink); }
.category-assignment-modal header p { color: #72819a; margin: 0; font-size: .88rem; }
.category-assignment-kicker { color: var(--tz-blue); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.category-assignment-search { gap: 6px; display: grid; color: #23324a; font-size: .82rem; font-weight: 700; }
.category-assignment-search input { min-height: 44px; }
.category-assignment-list { overflow-y: auto; border: 1px solid #dce6f1; border-radius: 10px; background: #fbfcff; }
.category-product-option { cursor: pointer; display: flex; align-items: center; gap: 11px; min-height: 62px; padding: 10px 13px; border-bottom: 1px solid #e8eef5; }
.category-product-option:last-child { border-bottom: 0; }
.category-product-option:hover { background: #f0f7ff; }
.category-product-option.is-assigned { cursor: default; background: #f2fbf7; }
.category-product-option input { width: 17px; height: 17px; accent-color: var(--tz-blue); }
.category-product-option strong, .category-product-option small { display: block; }
.category-product-option strong { color: #263247; font-size: .88rem; }
.category-product-option small { color: #71819a; margin-top: 2px; font-size: .75rem; }
.category-assignment-empty { color: #71819a; padding: 22px; margin: 0; text-align: center; }
.category-assignment-modal footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.category-assignment-count { color: #71819a; }
@media (max-width: 680px) { .category-assignment-modal { width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0; } .category-assignment-modal footer { align-items: stretch; flex-direction: column; } .category-assignment-modal footer .tz-btn { width: 100%; } }
